CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

TimeVaryingMappedFixedValue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2008, 05:39
Default Hi, everyone, I want to use
  #1
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi, everyone,

I want to use timeVaryingMappedFixedValue for my inlet velocities and I set different velocity values for each time step for my simulation (in this case, deltaT = 0.0002 s).

I created the directories in constant/boundaryData/inlet/:

constant/boundaryData/inlet/points
constant/boundaryData/inlet/0/U
constant/boundaryData/inlet/0.0002/U
constant/boundaryData/inlet/0.0004/U
constant/boundaryData/inlet/0.0006/U

However, when I run the case(using icoFoam and the time step is set to be 0.0004), I got the following errors:


Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.0004

Courant Number mean: 0 max: 0.362781

10061
(
0
0.0002
0.0004
0.0006
0.0008
0.001
0.0012
0.0014
0.0016
...
...
3.2

)


In directory "constant/boundaryData/inlet"
on patch inlet of field U in file "/vol/isdata8/FIXI-Flow/QiSUN/openfoamtest/Second/ExpeCylinder1uP9/0/U"

From function findTime
in file fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedV alueFvPatchField.C at line 470.

FOAM exiting


Could anyone help me ?

Thank you very much in advance!!

sunny
sunnysun is offline   Reply With Quote

Old   May 29, 2008, 19:19
Default Switch on the debug flag for t
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Switch on the debug flag for the b.c: Set timeVaryingMappedFixedValue to 1 in your ~/OpenFOAM-1.4.1/controlDict.

Have a look at the source ($FOAM_SRC/finiteVolume/lnInclude/timeVaryingMappedFixedValueFvPatchField.C) to see what is happening.
mattijs is offline   Reply With Quote

Old   May 30, 2008, 04:44
Default Hi,Mattijs, Thanks for the
  #3
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi,Mattijs,

Thanks for the reply!
I am really new to this, so...can you explain a bit more how to do this?? Thanks!!

Vivien
sunnysun is offline   Reply With Quote

Old   May 30, 2008, 07:46
Default There are several controlDict
  #4
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
There are several controlDict in OpenFOAM.

One is located by default in $HOME/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1

It contains commonly used by all solvers. You have various sections in it, the one of interrest for you would be "DebugSwitches". Set it to 1 for timeVaryingMappedFixedValue. This will force timeVaryingMappedFixedValue to be more verbose in its output, and will help debug.

Then, you have a specific controlDict in every case you run, which is only use by the case it belongs to, and contain other infos, but no debugSwitches.
johndeas is offline   Reply With Quote

Old   June 2, 2008, 12:01
Default Hi, John and Mattijs, I cha
  #5
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi, John and Mattijs,

I changed the DebugSwitches in controlDict and save the changes. But When I run the case, I did not get any more information, ie, the error is exactly the same as I posted before...

Any ideas?

Thanks!!

vivien
sunnysun is offline   Reply With Quote

Old   June 2, 2008, 15:30
Default The controlDict file is first
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
The controlDict file is first looked for in

~/.OpenFOAM-1.4.1/controlDict

and then in

~/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1
mattijs is offline   Reply With Quote

Old   June 3, 2008, 06:35
Default Hi, Mattijs, do you mean th
  #7
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi, Mattijs,

do you mean there are two controlDict I need to edit?

I only find one in ~/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/controlDict and I change the DebugSwitches for timeVaringMappedFixedValue to 1, but I did not see much information after I run the solver.

Thanks!

Vivien
sunnysun is offline   Reply With Quote

Old   June 3, 2008, 19:35
Default Have a look at the sources: $F
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Have a look at the sources: $FOAM_SRC/finiteVolume/lnInclude/timeVaryingMappedFixedValueFvPatchField.H

It is the 'TypeName' macro which specifies the name. This is the exact name you should use in the controlDict. In your post you mention 'timeVaringMappedFixedValue' instead of 'timeVaryingMappedFixedValue'.
mattijs is offline   Reply With Quote

Old   June 4, 2008, 10:40
Default Hi, Mattijs, This is not t
  #9
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi, Mattijs,

This is not the problem...

I made a simpler case that there are only 5 time step in constant->boundaryData->inlet(which are 0 0.0002 0.0004 0.0006 0.0008), the geometry is a cylinder and contain 100 points at inlet. After I run icoFoam, I got the following errors and seems the order of files are sorted:


Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

timeVaryingMappedFixedValue : construct from dictionary
timeVaryingMappedFixedValueFvPatchField : Read 100 sample points from "/openfoamtest/NewCase/constant/boundaryData/inlet/points"
timeVaryingMappedFixedValueFvPatchField : Used points (0.00138321 0.00138321 0) (0.00154865 0.00111043 0) (0.00167642 0.000812023 0) to define coordinate system with normal (0 0 -1)
readSamplePoints : Dumping triangulated surface to triangulation.stl
readSamplePoints : Dumping face centres to "/openfoamtest/NewCase/localFaceCentres.obj"
timeVaryingMappedFixedValueFvPatchField : In directory "/openfoamtest/NewCase/constant/boundaryData/inlet" found times
5
(
0.0008
0
0.0002
0.0004
0.0006
)



--> FOAM FATAL ERROR : Cannot find starting sampling values for current time 0
Have sampling values for times
5
(
0.0008
0
0.0002
0.0004
0.0006
)

In directory "constant/boundaryData/inlet"
on patch inlet of field U in file "/openfoamtest/NewCase/0/U"

From function findTime
in file fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedV alueFvPatchField.C at line 470.

FOAM exiting


Do you know why this is hapening?

Many thanks!!


Vivien
sunnysun is offline   Reply With Quote

Old   June 4, 2008, 17:36
Default Could you try with this findTi
  #10
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Could you try with this findTimes.C (src/OpenFOAM/db/Time/findTimes.C)?

(It was using this routine to detect the time directories inside constant/boundaryData. There was an assumption in it that the time directories would always have a 'constant')

You'll have to rebuild the OpenFOAM library (wmake libso $FOAM_SRC/OpenFOAM)

John Deas, this should also fix your problem - couldn't repeat it on your case since it depends on the original file order.

findTimes.C
mattijs is offline   Reply With Quote

Old   June 5, 2008, 04:56
Default Hi, Mattijs, It is working
  #11
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17
sunnysun is on a distinguished road
Hi, Mattijs,

It is working now, thank you very much!

Vivien
sunnysun is offline   Reply With Quote

Old   June 5, 2008, 06:52
Default Thanks Mattijs, now I am stuck
  #12
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
Thanks Mattijs, now I am stuck with creating the timeVaryingMappedFixedValue on another thread, but will test it as soon as possible !
johndeas is offline   Reply With Quote

Old   October 30, 2013, 16:22
Default
  #13
Member
 
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Location: San Antonio, Texas, USA
Posts: 42
Rep Power: 13
mmmn036 is on a distinguished road
Hello,
I was trying to use timeVaryingMappedFixedValue bc to get U, k , nuSgs fields value from precursor run to my inlet to have turbulence.

I used sample utility to get the field data at precursor run. I added 11 time directory (0,1,2,3.....10) at constant/boundaryData/inlet. Simulation timestep is 0.001.

It works fine until the simulation blows out at 2.158 s because of courant no. reaches a huge value.

I am adding the log file here.

Anyone faces that kind of problem? Any help will be appreciated.

Thanks
MMMN
Attached Files
File Type: gz log.txt.tar.gz (35.0 KB, 13 views)
mmmn036 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 07:55
TimeVaryingMappedFixedValue field creation johndeas OpenFOAM Running, Solving & CFD 24 June 14, 2021 15:56
TimeVaryingMappedFixedValue best practice to extract subset points and fields podallaire OpenFOAM Running, Solving & CFD 6 May 21, 2014 11:25
Possible bug with timeVaryingMappedFixedValue jerome OpenFOAM Bugs 2 October 9, 2007 10:38


All times are GMT -4. The time now is 14:51.