CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Time step independence study for transient CFD simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2021, 07:24
Default
  #41
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
The temporal accuracy study can be performed also for a single time step!
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 07:39
Default
  #42
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
The temporal accuracy study can be performed also for a single time step!
Yes, but it depends from the scheme and the practical setting (Fluent, for example, needs a proper initialization for BDF2, that makes the third time step the only possible choice for a meaningful evaluation of the error). I was trying to be practical without incurring in possible deficiencies of this or that scheme/code.

Still, even when 1 time step is possible (say, first order or runge-kutta), then at the next smaller time step you still need 2, then 4, etc. If you always evaluate after 1 time step I think you are actually evaluating the truncation error, not the discretization error
sbaffini is offline   Reply With Quote

Old   October 25, 2021, 08:06
Default
  #43
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
Yes, but it depends from the scheme and the practical setting (Fluent, for example, needs a proper initialization for BDF2, that makes the third time step the only possible choice for a meaningful evaluation of the error). I was trying to be practical without incurring in possible deficiencies of this or that scheme/code.

Still, even when 1 time step is possible (say, first order or runge-kutta), then at the next smaller time step you still need 2, then 4, etc. If you always evaluate after 1 time step I think you are actually evaluating the truncation error, not the discretization error
No, you evaluate the discretization error ed=dt*lte
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 08:11
Default
  #44
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
No, you evaluate the discretization error ed=dt*lte
But then, say, after the first halving of dt, won't the derivatives in LTE be at a different time T if I don't double the number of time steps as well?
sbaffini is offline   Reply With Quote

Old   October 25, 2021, 08:17
Default
  #45
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
But then, say, after the first halving of dt, won't the derivatives in LTE be at a different time T if I don't double the number of time steps as well?
No matter about the derivatives, to be consistent the analysis you need that they are always O(1) in time and space.
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 09:09
Default
  #46
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
No matter about the derivatives, to be consistent the analysis you need that they are always O(1) in time and space.
I probably inverted DE and LTE (as indeed LTE should be equal to DE/dt) but, doesn't LeVeque state (p. 140):

"To discuss convergence we must first pick some finite time T over which we wish to compute. We expect errors generally to grow with time, and so it would be unreasonable to expect that any finite grid would be capable of yielding good solutions at arbitrarily large times. Note that as we refine the grid, the number of time steps to reach time T will grow like T/dt and go to infinity (in the limit that must be considered in convergence theory), and so even in this case we must deal with an unbounded number of time steps."

EDIT: what I want to say is, don't we need to filter out (i.e., integrate) the dt in front of LTE when evaluating the DE? Otherwise, it seems to me that we get an artificially higher order.
sbaffini is offline   Reply With Quote

Old   October 25, 2021, 09:36
Default
  #47
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
I probably inverted DE and LTE (as indeed LTE should be equal to DE/dt) but, doesn't LeVeque state (p. 140):

"To discuss convergence we must first pick some finite time T over which we wish to compute. We expect errors generally to grow with time, and so it would be unreasonable to expect that any finite grid would be capable of yielding good solutions at arbitrarily large times. Note that as we refine the grid, the number of time steps to reach time T will grow like T/dt and go to infinity (in the limit that must be considered in convergence theory), and so even in this case we must deal with an unbounded number of time steps."

EDIT: what I want to say is, don't we need to filter out (i.e., integrate) the dt in front of LTE when evaluating the DE? Otherwise, it seems to me that we get an artificially higher order.


Yes, ideed you see a scaling due to the time step you have to consider.
This issue is discussed here in the section of numerical test


https://www.researchgate.net/publica...ary_conditions
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 14:02
Default
  #48
Senior Member
 
Join Date: Jun 2011
Posts: 208
Rep Power: 16
CFDfan is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
This mostly academic experiment demands cases with a single time step cost in the order of seconds, not more.
Thank you sbaffini. Here is what I have observed doing (very rarely) transient analyses. Please note I do electronics cooling and my expertise is in Electronics, not so much in CFD. So I have very tiny components dissipating a lot of heat (so can't be ignored) as well as components that are 1000 times larger in volume. The masher is governed by the tiny components and gets quite fine. The resulting (from the Courant number) time step is around 80ns. All these are real figures from my practice. The thermal time constant of the model is determined by the largest components and is say 1 hour which results in >5e10 steps till steady state. Each step runs between 5-10 min (there are couple of hundred components, heatsinks, fans, porous medias, thermal interfaces, etc.). As you could see the total time becomes ridiculously long and therefore I usually did whatever you suggested above - went with 2-5 sec time steps. It still took me a couple of days till completion but the convergence and the final temperatures seemed reasonable. Yet these (transient analysis) temperatures were quite close to the temperatures resulting from the steady state analysis of the same model. Thus I developed a notion over the years that the courant number rule could be violated with a factor of thousands and still get reasonable results. Never understood why however.
CFDfan is offline   Reply With Quote

Old   October 25, 2021, 14:15
Default
  #49
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by CFDfan View Post
Thank you sbaffini. Here is what I have observed doing (very rarely) transient analyses. Please note I do electronics cooling and my expertise is in Electronics, not so much in CFD. So I have very tiny components dissipating a lot of heat (so can't be ignored) as well as components that are 1000 times larger in volume. The masher is governed by the tiny components and gets quite fine. The resulting (from the Courant number) time step is around 80ns. All these are real figures from my practice. The thermal time constant of the model is determined bu the largest components and is say 1 hour which results in >5e10 steps till steady state. Each step runs between 5-10 min (there are couple of hundred components, heatsinks, fans, porous medias, thermal interfaces, etc.). As you could see the total time becomes ridiculously long and therefore I usually did whatever you suggested above - went with 2-5 sec time steps. It still took me a couple of days till completion but the convergence and the final temperatures seemed reasonable. Yet these (transient analysis) temperatures were quite close to the temperatures resulting from the steady state analyses of the same model. Thus I developed a notion that the courant number rule could be violated with a factor of thousands and still get reasonable results. Never understood why however.



Well, that is difficult to explain if you don't have a basic knowledge of CFD. The cfl is a parameter governing the numerical stability for explicit schemes but in case of implicit scheme you can have a stable simulation also at high cfl value. On the other hand, in a pure transient study you need to think about the physics of your problem and the dt is dictated by that. Large dt does not change the formal order of accuracy but increases the magnitude of the error. Anyway, in case of a steady state you can have a good solution at high cfl but you do not describe correctly the transient.
CFDfan likes this.
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 15:16
Default
  #50
Member
 
Join Date: Nov 2019
Posts: 96
Rep Power: 6
FliegenderZirkus is on a distinguished road
Can it be that the flow field doesn't change much during the simulation and only the temperatures are truly transient? I believe the CFL is relevant for transient flows where there's some development of the flow field. If you have a fan blowing over some electronics, it may be that the flow is actually close to steady. The limiting case is trasient thermal simulation of solids without any fluid - then there's no Courant number at all and you just choose the time step to converge the energy equation in each step. But that's not to say this has to be your case, it's just something I came across myself.
CFDfan likes this.
FliegenderZirkus is offline   Reply With Quote

Old   October 26, 2021, 13:02
Default
  #51
Senior Member
 
Join Date: Jun 2011
Posts: 208
Rep Power: 16
CFDfan is on a distinguished road
Quote:
Originally Posted by FliegenderZirkus View Post
If you have a fan blowing over some electronics, it may be that the flow is actually close to steady.
It makes sense, since the flow stabilizes pretty quickly as soon as you turn on the fan. That also explains the transient results insensitivity to large time steps.
That won't be the case, I think, in convection cooling cases where the flow is a result of temperature gradients, but this is a different story
CFDfan is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
directMapped problem panda60 OpenFOAM Bugs 4 July 8, 2010 11:23
Time step in transient simulation shib FLUENT 0 June 17, 2010 14:07
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 05:35
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 05:23.