CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   change timestep after a certain iteration number (http://www.cfd-online.com/Forums/cfx/24060-change-timestep-after-certain-iteration-number.html)

Sans May 31, 2007 05:03

change timestep after a certain iteration number
 
Hi, I observe that my problem starts to diverge after say 60-70 iterations, but it is soon rectified when I reduce the timestep. But during a batch run I would like to do the same. Is it possible to change the timestep after a specified iteration during a batch run (command line)?

Thanks...


Gert-Jan May 31, 2007 08:12

Re: change timestep after a certain iteration numb
 
I do it every day....

Physical Timescale = min(1e-2[s],max(5e-3[s],2e-2[s]-citern*1e-4[s]))

Plot it in Pre to find out how it looks like.

Gert-Jan

www.bunova.nl


Sans June 1, 2007 00:58

Re: change timestep after a certain iteration numb
 
Thanks a lot Gert-Jan,

Now it strikes me...or inturn I can also use a fuction in PRE

Jack June 1, 2007 03:27

Re: change timestep after a certain iteration numb
 
Hi! Gert-Jan, I think This is also useful to me, could you please explain the meaning of "min(1e-2[s],max(5e-3[s],2e-2[s]-citern*1e-4[s]))", since I am quite new to CFX. Thanks

Gert-Jan June 1, 2007 04:56

Re: change timestep after a certain iteration numb
 
It is mathematics. The only unknown thing is citern which is the current iteration number. You can also use aitern which is the accumulated iteration number.

Just play around in Pre or a spreadheet to see what the function does...

Gert-Jan

www.bunova.nl

Sameer June 3, 2007 05:17

Re: change timestep after a certain iteration numb
 
Hi. There is another way is to use step function. suppose timestep upto 60th iteration is 0.025 [s] and after 60th iteration it is tobe reduced to 0.002 [s], you may use following step function, Timestep = 0.025[s]*step(aitern-60)+0.002[s]*step(60-aitern).

Sameer


All times are GMT -4. The time now is 12:03.