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

KEpsilon model k_oldTime not working

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 9, 2008, 21:06
Default Hi, I try to modify the kEp
  #1
Member
 
Daniel Harlacher
Join Date: Mar 2009
Location: Davis, CA, United States
Posts: 60
Rep Power: 8
harly is on a distinguished road
Hi,

I try to modify the kEpsilon model and I wanted to access k_.oldTime() - the application compiled and ran - but the value k_.oldTime() was always the current k_ value.

k_ is defined as:

k_
(
IOobject
(
"k",
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
in OpenFOAM-1.5/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C

you can try

Info << "k_.oldTime()" << endl;
Info << "k_" << endl;

to see what I mean.
hope you have an idea ...

thanks
-harly
harly is offline   Reply With Quote

Old   December 10, 2008, 04:21
Default Which solver are you using - i
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Which solver are you using - is it simpleFoam by any chance ;)

Have a look at system/fvSchemes and tell me what differencing scheme is used ok k (is it steadyState by any chance)?

The code MUST be correct on this if you are time-stepping; otherwise all my calculations would be wrong.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 10, 2008, 14:13
Default Hi, you are right I forgot
  #3
Member
 
Daniel Harlacher
Join Date: Mar 2009
Location: Davis, CA, United States
Posts: 60
Rep Power: 8
harly is on a distinguished road
Hi,

you are right I forgot about the turbulent kinetic energy equation: there is an ddt(k_) - so it should work(means the code stores the previous k_ somewhere).

But where is the problem then? - because k_ is calculated it changes every timestep - but when I try to access k_.oldtime() directly from the kEpsilon subroutine (I am not using the build in ddt function - not because I don't want to because I don"t know how to specify my variable to accomplish that) I get the value of the current k back.

The same thing !works! for U_ so I really think it is something about variable definition or I am missing an include because evidently in the ddt subroutine k_.oldTime() is returning a value.

I am using turbFoam and a "CrankNicholson 0.5" ddt scheme.

hope you got some ideas

-harly
harly 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
Modify kEpsilon model harly OpenFOAM 5 December 3, 2008 18:43
About kEpsilon turbulence model osimonsimon OpenFOAM Running, Solving & CFD 10 April 24, 2008 02:52
NACA0012 Study kepsilon Model pda OpenFOAM Running, Solving & CFD 1 March 11, 2008 04:12
msha ADD A NEW RELATION TO kepsilon MODEL msha OpenFOAM 0 December 30, 2007 10:30
Adjusting kepsilon model braennstroem OpenFOAM Running, Solving & CFD 2 April 12, 2005 09:52


All times are GMT -4. The time now is 19:13.