I am using icoFoam to calculat
I am using icoFoam to calculate a simple fluid, however I want to change the time step dynamically, e.g. first time step is: deltaT=0.001, the next time step is deltaT=0.003, the next is deltaT=0.002, and so on.
Maybe it is a wired problemhttp://www.cfd-online.com/OpenFOAM_D...part/happy.gif, but in my program it seems that I need such kind of dynamic timestep, is it possible to program it in OpenFOAM? I didn't find any function like runTime.setTimeStep(DeltaT)...the only function I found is adjustDeltaT() but it is protected and after I read through the source, I found it is not doing what I want.
Thanks a lot!
I use scalar dt=runTime.de
to get the actual timestep, and
to set it to a new value, works.
Have fun ...
Hi. the example above, is e
the example above, is exactly what I'm trying to do and when I implement the code as shown above, NOTHING changes.
This makes me think that I also have to have some "include file" statements, or need to have some extra libraries mentioned in the "options" file.
it should work using setDeltaT
it should work using setDeltaT(dt):
Hello, A Good day to you!
A Good day to you!
Sorry I could not get into this post a little earlier... I saw the post, but was away, so could not react to it :-)!
Some time back, I had modified the icoFoam solver to include variable time step functionality as a question from another user on this forum.
Unfortunately, I am unable to find that post now... so... here is "icoFoamVarDt"... basically does exactly what you want..... it uses the built in capability in OpenFOAM to limit the Courant Number by adapting the time step size....
Hope this helps....
In order to activate this, you need to use the "adjustTimeStep yes" option, followed my "maxCo [maximum Co Number you want to limit to]" in the controlDict file.
|All times are GMT -4. The time now is 04:35.|