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

TimeVaryingMappedFixedValue

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 29, 2008, 04:39
Default Hi, everyone, I want to use
  #1
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 18:19
Default Switch on the debug flag for t
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 03:44
Default Hi,Mattijs, Thanks for the
  #3
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 06:46
Default There are several controlDict
  #4
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
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, 11:01
Default Hi, John and Mattijs, I cha
  #5
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 14:30
Default The controlDict file is first
  #6
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 05:35
Default Hi, Mattijs, do you mean th
  #7
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 18:35
Default Have a look at the sources: $F
  #8
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 09:40
Default Hi, Mattijs, This is not t
  #9
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 16:36
Default Could you try with this findTi
  #10
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 03:56
Default Hi, Mattijs, It is working
  #11
Member
 
Vivien
Join Date: Mar 2009
Posts: 52
Rep Power: 8
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, 05:52
Default Thanks Mattijs, now I am stuck
  #12
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
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: 36
Rep Power: 4
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, 1 views)
mmmn036 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 field creation johndeas OpenFOAM Running, Solving & CFD 22 April 2, 2010 12:10
Possible bug with timeVaryingMappedFixedValue jerome OpenFOAM Bugs 2 October 9, 2007 09:38


All times are GMT -4. The time now is 06:44.