CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Help for setting varying timesteps (https://www.cfd-online.com/Forums/cfx/68204-help-setting-varying-timesteps.html)

darookie September 10, 2009 04:46

Help for setting varying timesteps
 
The simple solution is always hard to get. After having searched in the forum for a good solution to set varying timesteps with an CEL expression without sucess, here is my way to obtain:
first 300 iterations -> 0.7s
next 300 iterations -> 0.01s

CEL Expression:
0.7[s]-0.69*step(citern-301)[s]

I hope I can help somebody who has the same task.
andrej

ghorrocks September 10, 2009 06:32

You could also have done it with a 1D interpolation function. Same end effect, but possibly easier to understand.

darookie September 11, 2009 05:08

I wanted to change the time in a jump function. But is a linear change better in regard to convergence?

ghorrocks September 11, 2009 07:32

You can define step functions in the 1D interpolation function. The following series of points define a step function good enough for most people:
(0,0),
(0.999999999999,0),
(1,1),
(2,1)

Yes, a sudden change in time step size can cause convergence issues. It will cause accuracy issues as well. Ramping the time step change will help both problems.


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