CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Possible bug with timeVaryingMappedFixedValue (https://www.cfd-online.com/Forums/openfoam-bugs/62541-possible-bug-timevaryingmappedfixedvalue.html)

jerome October 4, 2007 08:01

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

I created the directories and files 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, I have a problem at the first time step:

Starting time loop

Time = 0.0002

Courant Number mean: 0 max: 0.241854


--> FOAM FATAL IO ERROR : cannot open file

file: …/run/ExpeCylinder1uP7/constant/boundaryData/inlet/0.0004 at line0.

From function regIOobject::readStream(const word&)
in file db/regIOobject/regIOobjectRead.C at line 66.

FOAM exiting


It runs nevertheless if I only provide the directory "constant/boundaryData/inlet/0" (constant values).
I have the same problem with pitzDailyExptInlet when I try to use it with several time directories: the simulation stopps at the first time step with a similar error message.

I switched on the debug flag for timeVaryingMappedFixedValue. I obtain:

Reading field p

Reading field U

timeVaryingMappedFixedValue : construct from dictionary

timeVaryingMappedFixedValueFvPatchField : Read 100 sample points from ".../ExpeCylinder1uP7/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 ".../ExpeCylinder1uP7/localFaceCentres.obj"

timeVaryingMappedFixedValueFvPatchField : In directory ".../ExpeCylinder1uP7/constant/boundaryData/inlet" found times

9
(
0
0.0002
0.0004
0.0006
0.0008
0.001
0.0012
0.0014
0.0016
)

findTime : Found time 0 inbetween index:0 time:0 and index:1 time:0.0002

checkTable : Reading startValues from "boundaryData/inlet/0"
checkTable : Reading endValues from "boundaryData/inlet/0.0002"

updateCoeffs : Sampled, interpolated values between start time:0 and end time:0.0002 with weight:0
updateCoeffs : set fixedValue to min: (0 0 0.0134146) max: (0 0 0.302318)

timeVaryingMappedFixedValue : copy construct, resetting internal field
Reading/calculating face flux field phi


Starting time loop

Time = 0.0002

Courant Number mean: 0 max: 0.241854

findTime : Found time 0.0002 inbetween index:1 time:0.0002 and index:2 time:0.0004
checkTable : Setting startValues to (already read) "boundaryData/inlet/0.0002"
checkTable : Reading endValues from "boundaryData/inlet/0.0004"


--> FOAM FATAL IO ERROR : cannot open file

file: .../ExpeCylinder1uP7/constant/boundaryData/inlet/0.0004 at line0.

From function regIOobject::readStream(const word&)
in file db/regIOobject/regIOobjectRead.C at line 66.

FOAM exiting

Thank you very much if you can find what the problem is,
Jerome

mattijs October 4, 2007 09:39

Forgot to copy the fieldName (
 
Forgot to copy the fieldName (so 'U') in the boundary condition implementation. You'll need to replace

fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C

in the finiteVolume library with attached version and recompile the library ('wmake libso').

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif timeVaryingMappedFixedValueFvPatchField.C

jerome October 9, 2007 09:38

By the way, thank you very muc
 
By the way, thank you very much for fixing the bug ! It works fine.

Kind regards,
Jerome


All times are GMT -4. The time now is 01:00.