CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

Possible bug with timeVaryingMappedFixedValue

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 4, 2007, 08:01
Default I tried to use timeVaryingMapp
  #1
New Member
 
Jerome
Join Date: Mar 2009
Location: Germany
Posts: 8
Rep Power: 8
jerome is on a distinguished road
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
jerome is offline   Reply With Quote

Old   October 4, 2007, 09:39
Default Forgot to copy the fieldName (
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
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').

timeVaryingMappedFixedValueFvPatchField.C
mattijs is offline   Reply With Quote

Old   October 9, 2007, 09:38
Default By the way, thank you very muc
  #3
New Member
 
Jerome
Join Date: Mar 2009
Location: Germany
Posts: 8
Rep Power: 8
jerome is on a distinguished road
By the way, thank you very much for fixing the bug ! It works fine.

Kind regards,
Jerome
jerome is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 28 May 28, 2015 13:37
TimeVaryingMappedFixedValue best practice to extract subset points and fields podallaire OpenFOAM Running, Solving & CFD 6 May 21, 2014 10:25
TimeVaryingMappedFixedValue sunnysun OpenFOAM Running, Solving & CFD 12 October 30, 2013 16:22
TimeVaryingMappedFixedValue field creation johndeas OpenFOAM Running, Solving & CFD 22 April 2, 2010 12:10


All times are GMT -4. The time now is 08:17.