|
[Sponsors] |
September 14, 2015, 02:13 |
Time-step for steady state solutions
|
#1 |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Hey,
According to many popular text-books the size of the time-step should not matter when a steady-state solution is sought. Is this also true if the order of the transient discretization is lower than the spatial discretization? I would guess that a low order time-step discretization have the possibility to pollute the entire solution and hence we are doing mesh independence tests in both space and time. So why do so many texts state the opposite? |
|
September 14, 2015, 03:24 |
|
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
you should consider the local truncation error of the equation, it contains the order of the time step (for example dt for a first order discretizaton) but it multiplies time derivatives that vanish at the steady steate.... also more rigorous explanation can be provided, I suggest a reading of some specific textbook of numerical analysis |
||
September 14, 2015, 04:20 |
|
#3 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
If you give me a suggestion to which book you are referring that would be helpful. |
||
September 21, 2015, 11:52 |
|
#4 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66 |
Quote:
For 1st order systems (systems that don't have inherent oscillations), the time-step size is arguably arbitrary, up to stability limits. If you have a scheme that is numerically stable then sure you can use any time-step to arrive at the steady-state point. But you can have schemes that are numerically unstable and the time-step is therefore limited. I would consider guaranteed divergence to be "some impact" on the steady state solution. This is a stability problem and not really an accuracy problem as the system monotonically approaches the steady state value. For 2nd order problems it is well known that transient effects must be resolved (otherwise controls engineering would be a joke), i.e. a system with inherent oscillations such as wave propagation. Numerical diffusion/damping can destroy the wave before it attains the standing wave solution. This isn't a stability problem but an accuracy problem, as the system response isn't monotonic. Last edited by LuckyTran; September 22, 2015 at 01:08. |
||
September 28, 2015, 13:33 |
|
#5 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
If the time-step is within the stability region then I get a steady-state solution, however the accuracy is far better if I choose a small time-step (say if I decrease it two orders of magnitude). At a certain point I see no change in the steady-state solution with a further decrease in the time-step. With a small enough time-step the results are fully comparable with the literature. Any ideas about this behavior? |
||
September 28, 2015, 15:26 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
My idea is that you need an analytical solution to check accuracy...the lid-drive test case is not suitable to check the slope in the errors curve
|
|
September 29, 2015, 00:27 |
|
#7 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66 |
Quote:
Even if the physical problem does not have inherent oscillations, your numerical schemes can have oscillations. |
||
September 29, 2015, 01:18 |
|
#8 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
I do not fully understand what you mean though. Do you suggest that I should check the error curve and see if the time-step has an influence on the order of the method? Reading your previous post I understand that the time-step size should have no effect on the steady-state solution. My code clearly has this kind of behavior though so I have likely done something wrong (unless the cavity flow @ Re=1000 is a second order type of system as LyckyTran put it). My time-stepping method is first order and if I use a large time-step (still within the stability region) then the central difference spatial solution looks like a first order upwind solution (average L1 norms still go down to machine precision). |
||
September 29, 2015, 03:07 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
Using an analytical solution, you can check any possible bugs in the code... You are serching a steady state via time-dependent solution, I suggest checking a fully time dependent analytical case such as http://www.mie.utoronto.ca/labs/bsl/...ctSolution.pdf then, the steady Poiseuille solution can be also checked to see the effects of the walls. |
||
September 29, 2015, 07:44 |
|
#10 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
The attached figures show the difference. As far as I can tell, the convergence criteria of the pressure equation has no effect (i.e. I have tried reducing the criteria but the results remain the same). Furthermore there is no improvement if I run the simulation longer (this was a test to see if the number of iterations played an effect, but evidently they do not, which is good). It is clear that the larger time-step gives completely wrong results and that the smaller time-step is a much better choice. But why... |
||
September 29, 2015, 08:05 |
|
#11 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Are you sure that the case at larger time-step is runned until the time derivatives of the velocities are enough small?
|
|
September 29, 2015, 09:57 |
|
#12 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
For the smaller time-step case the average norm decreases to approx. 1e-10 and if I continue further then it goes to 1e-15 (this is very close to machine precision). |
||
September 29, 2015, 10:23 |
|
#13 | |
Member
Join Date: Jul 2013
Posts: 55
Rep Power: 12 |
Quote:
If you respect the time-step constraint, you will avoid a negatively damped system, with unbounded oscillations. But if you use exactly, or very close to, the maximum time-step, you may very well be creating a lightly damped system. Such a system will take very long to reach steady-state. Two solutions appears to me :
|
||
September 29, 2015, 10:29 |
|
#14 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
So, withoute reaching exactly the same steady state, you cannot compare the two cases, the large time-step is likely to be cause of the onset of oscillations. Are you sure you are well within the stability region? It seems as a case producing eventually instability for long time simulation. At what Re number the Poiseuille case is runned? |
||
September 29, 2015, 13:57 |
|
#15 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
I use a variable time-step according to: where is set to 0.33 for the case of large time-step and to 0.002 for the case of small time-step (and as Alex C. suggests I already use a large time-step for a period of time before I switch to the smaller one, however this time is arbitrary and not based on any convergence criteria since the large time-step case produce an oscillatory convergence). |
||
September 29, 2015, 14:05 |
|
#16 |
Member
Join Date: Jul 2013
Posts: 55
Rep Power: 12 |
||
September 29, 2015, 14:09 |
|
#17 |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
||
September 29, 2015, 14:13 |
|
#18 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
I doubt this criterion is accurate...are you using the FTCS? The linear stability analysis show a stability region (cfl, Re_h) much more critical...at Re=100 you are working with Reh=O(1) and the cfl is very low. |
|
September 29, 2015, 14:19 |
|
#19 | |
Senior Member
Join Date: May 2012
Posts: 546
Rep Power: 15 |
Quote:
Time is always forward Euler though. In the Poiseuille case I switched to Upwind since it is so much faster (which is a bit strange, but that is another question..), however a couple of initial runs with CD showed identical behavior. |
||
September 29, 2015, 14:38 |
|
#20 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
ni*dt* (1/dx^2 + 1/dy^2) <= 1/2 or for the upwind case applied on a pure convective equation dt*(u/dx + v/dy) <=1 when you have both convection and diffusion the stability region involves a functional relation of them |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 11:08 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 09:34 |
plot over time | fferroni | OpenFOAM Post-Processing | 7 | June 8, 2012 07:56 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 04:35 |
Modeling in micron scale using icoFoam | m9819348 | OpenFOAM Running, Solving & CFD | 7 | October 27, 2007 00:36 |