|
[Sponsors] |
May 29, 2008, 05:39 |
Hi, everyone,
I want to use
|
#1 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
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 |
|
May 29, 2008, 19:19 |
Switch on the debug flag for t
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
May 30, 2008, 04:44 |
Hi,Mattijs,
Thanks for the
|
#3 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
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 |
|
May 30, 2008, 07:46 |
There are several controlDict
|
#4 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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. |
|
June 2, 2008, 12:01 |
Hi, John and Mattijs,
I cha
|
#5 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
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 |
|
June 2, 2008, 15:30 |
The controlDict file is first
|
#6 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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 |
|
June 3, 2008, 06:35 |
Hi, Mattijs,
do you mean th
|
#7 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
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 |
|
June 3, 2008, 19:35 |
Have a look at the sources: $F
|
#8 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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'. |
|
June 4, 2008, 10:40 |
Hi, Mattijs,
This is not t
|
#9 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
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 |
|
June 4, 2008, 17:36 |
Could you try with this findTi
|
#10 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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 |
|
June 5, 2008, 04:56 |
Hi, Mattijs,
It is working
|
#11 |
Member
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
Hi, Mattijs,
It is working now, thank you very much! Vivien |
|
June 5, 2008, 06:52 |
Thanks Mattijs, now I am stuck
|
#12 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Thanks Mattijs, now I am stuck with creating the timeVaryingMappedFixedValue on another thread, but will test it as soon as possible !
|
|
October 30, 2013, 16:22 |
|
#13 |
Member
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Location: San Antonio, Texas, USA
Posts: 42
Rep Power: 13 |
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 |
|
|
|
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 |