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

calculation of time step

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By dandalf
  • 1 Post By dandalf
  • 1 Post By Butscher
  • 3 Post By pavitran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2010, 02:09
Question calculation of time step
  #1
Member
 
Aamer Shahzad
Join Date: Mar 2010
Posts: 58
Rep Power: 16
aamer is on a distinguished road
Hello all.....
i am trying to calculate coefficient of lift and drag on corrugated airfoil of insect at Reynolds number of 34000. the case is inherently unsteady. i am trying 2 turbulence models at present. i.e SA and KW SST transitional. i have following questions.
1. How can i calculate the correct time step size, no of time steps and iterations per time step for my case. (any reference, tutorial or book etc ??? or any advice on this)
2. What is the residual criteria that has to be set for unsteady simulation.. is it absolute or relative, and what value approximately?
3. What is the role of Courent number in determining the correct time step size.?
aamer is offline   Reply With Quote

Old   December 6, 2010, 07:18
Default
  #2
Member
 
Dan
Join Date: Oct 2010
Location: UK
Posts: 41
Rep Power: 16
dandalf is on a distinguished road
Below is my derrivation for the stability requirements of \Delta t for direct solution of the navier stokes equations on a cartesian grid,

The dimensionalised navier stoke equation for the conservation of momentum, is given by
\frac{\partial u}{\partial t}=\left(\frac{\mu}{\rho}\left(\frac{\partial^2 u}{\partial^2 x}+\frac{\partial^2 u}{\partial y^2} +\frac{\partial^2 u}{\partial z^2} \right) - \left(u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}\right)-\frac{1}{\rho}\frac{\partial p}{\partial x}+\frac{F_{ext}}{\rho}\right)
for stability it is required that at all points,
\frac{|\delta u|}{\delta t}=\left|\frac{u^{n+1}-u^n}{\Delta t}\right|<<\left|u\right|
sub,
\left|\frac{u^{n+1}-u^n}{\Delta t}\right|<\epsilon \left|u\right|
where
\epsilon is some suitible factor of saftey, then.
\epsilon | u|>\Delta t\left|\frac{\mu}{\rho}\left(\frac{\partial^2 u}{\partial^2 x}+\frac{\partial^2 u}{\partial y^2} +\frac{\partial^2 u}{\partial z^2} \right) - \left(u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}\right)-\frac{1}{\rho}\frac{\partial p}{\partial x}+\frac{F_{ext}}{\rho}\right|
assuming each term has equal weight then,
\frac{\epsilon |u|}{4}> \Delta t\frac{\mu}{\rho}\left|\frac{\partial^2 u}{\partial^2 x}+\frac{\partial^2 u}{\partial y^2} +\frac{\partial^2 u}{\partial z^2} \right|
\frac{\epsilon |u|}{4}>\Delta t\left|u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}\right|
\frac{\epsilon |u|}{4}>\Delta t\left|\frac{1}{\rho}\frac{\partial p}{\partial x}\right|
\frac{\epsilon |u|}{4}>\Delta t\left|\frac{F_{ext}}{\rho}\right|

rearranging gives four requirements for \Delta t

Viscous term requirement

\frac{\rho\epsilon |u|}{4\mu}\left|\frac{\partial^2 u}{\partial^2 x}+\frac{\partial^2 u}{\partial y^2} +\frac{\partial^2 u}{\partial z^2} \right|^{-1}> \Delta t
the discretization of $\partial ^2 u$ is given by,
\partial ^2 u= u_{i+1,j}+u_{i-1,j}-2u_{i,j}
which will always have magnitude,
|\partial ^2 u|<4|u|
substituting gives,
\frac{\rho\epsilon |u|}{4\mu}\left|\frac{4|u|}{\partial x^2}+\frac{4|u|}{\partial y^2} +\frac{4|u|}{\partial z^2} \right|^{-1}> \Delta t
which simplifies to,
\frac{\rho\epsilon }{16\mu}\left|\frac{1}{\partial x^2}+\frac{1}{\partial y^2} +\frac{1}{\partial z^2} \right|^{-1}> \Delta t

Diffusion term requirement

\frac{\epsilon |u|}{4}\left|u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}\right|^{-1}>\Delta t
the discretization of
\partial u is given by,
|\partial u|=|u_{ij}-u_{i-1,j}|
which will always have magnitude;
|\partial u|<2|u|
substituting gives,
\frac{\epsilon |u|}{4}\left|u\frac{2 |u|}{\partial x}+v\frac{2|u |}{\partial y}+w\frac{2| u|}{\partial z}\right|^{-1}>\Delta t
which simplifies to,
\frac{\epsilon }{8}\left|\frac{u }{\partial x}+\frac{v}{\partial y}+\frac{w}{\partial z}\right|^{-1}>\Delta t
\frac{\epsilon }{8}\left|3\frac{u }{\partial x}_{max}\right|^{-1}>\Delta t
\frac{\epsilon }{24}\left|\frac{u }{\partial x}_{max}\right|^{-1}>\Delta t

Pressure term Requirment

\frac{\epsilon |u|\rho\partial x}{4|\partial p|}>\Delta t
\partial p can be discretized as,
\partial p=p_{i,j}-p_{i+1,j}
therfore
|\partial p|< 2|p|
substitution gives,
\frac{\epsilon |u|\rho\partial x}{8|p|}>\Delta t

External Force term Requirment

\frac{\epsilon |u|\rho}{4|F_{ext}|}>\Delta t

therfore if the bellow inequality is satisfied then the discretized equations will be stable,
\Delta t < min\left( \frac{\rho\epsilon }{16\mu}\left|\frac{1}{\partial x^2}+\frac{1}{\partial y^2} +\frac{1}{\partial z^2} \right|^{-1}, \frac{\epsilon }{24}\left|\frac{u }{\partial x}_{max}\right|^{-1}, \frac{\epsilon |u|\rho\partial x}{8|p|},\frac{\epsilon |u|\rho}{4|F_{ext}|}\right)
where u is the maximum velocity found in the system,

A slighly more relaxed stability requirement for the 2 dimensional case was given in "Griebel et al: Numerical Simulation in Fluid Dynamics: SIAM 1998"

\Delta t = \epsilon min\left(\frac{Re}{2}\left( \frac{1}{\Delta x^2}+\frac{1}{\Delta y^2}\right)^{-1}, \frac{\Delta x}{|U_{max}|}, \frac{\Delta y}{|v_{max}|} \right)
but there was no acompanying derrivation.

Hope this helps
lth and rajann_786 like this.
dandalf is offline   Reply With Quote

Old   December 6, 2010, 08:53
Default
  #3
Member
 
Aamer Shahzad
Join Date: Mar 2010
Posts: 58
Rep Power: 16
aamer is on a distinguished road
Dear dandalf....
thanks for the quick reply..... but ur reply gives mathematical solution....
how to apply this to a practical problem in fluent. how can i calculate the time steps size, no of time steps and no of iterations per time step, while looking at ur derivations???
aamer is offline   Reply With Quote

Old   December 6, 2010, 09:37
Default
  #4
Member
 
Dan
Join Date: Oct 2010
Location: UK
Posts: 41
Rep Power: 16
dandalf is on a distinguished road
Presumably you know the reuired spatial resolution to capture the details, of your flow. So you have some

\Delta x which is your smallest spacial discretization on your mesh,

if not you should be able to find a suitabble spatial resolution using the relation,
\Delta x \propto Re^{-\frac{9}{4}}

you can then simply substitute this into the abouve equations to get a stable \Delta t which is your time step.

as for the number of itterations required, after each itteration you need to check some convergence criteria,

if for instance you are solving an incompressible flow using the partial step method, you can check for conservation of mass after each itteration of the pressure poisson, and keep going unill it is below some acceptable error.

As for total number of time steps, in your case with an insect wing, you have a known time period for 1 beat cycle, you have calculated a suitable time step. it should be fairly trivial to calculate a number of time steps to cover a sufficient number of beat cycles to convince yourself that you have captured all unsteady beat interaction effects.

If this hasn't helped
You might find some good sugestions of how to proceed in,

Rajat Mittal, Computational Modeling in Bio-Hydrodymanics: Trends, Chalenges and Recent Advances,IEEE JOURNAL OF OCIANIC ENGINEERING, 29 , 595-604, 2004.
o_mars_2010 likes this.
dandalf is offline   Reply With Quote

Old   December 7, 2010, 05:11
Default
  #5
New Member
 
Join Date: Aug 2010
Posts: 4
Rep Power: 16
Butscher is on a distinguished road
i am sorry but this explanation ist also so difficult.
rajann_786 likes this.
__________________
Mechanical Man
Butscher is offline   Reply With Quote

Old   December 7, 2010, 07:06
Default Hi
  #6
Member
 
Dynampally Pavitran
Join Date: Mar 2010
Location: India
Posts: 74
Rep Power: 16
pavitran is on a distinguished road
1. How can i calculate the correct time step size, no of time steps and iterations per time step for my case. (any reference, tutorial or book etc ??? or any advice on this)
1. Time step size should be decided on how much temporal accuracy is enough, usually you need to do a time-step dependency study.
2. No. of time steps decides your total duration( usually 3 to 4 flow through times is good enough).
3. No. of iterations per time step (In each time step your residuals should be less than 1E-4), usually this is achieved in less than 10 iterations, actually it depends on the problem also.

2. What is the role of Courent number in determining the correct time step size.
1. Courant number which is also called CFL number is stability criteria for unsteady simulations. it depends on time-step size & cell-size.
2. for explicit solvers you should see that CFL < 1 and for implicit solvers it can be higher.

Information regarding this can be found in any CFD text book (eg: CFD by John D Anderson)
lth, rajann_786 and vivek05 like this.
pavitran is offline   Reply With Quote

Old   December 8, 2010, 03:27
Default Finding smallest division in mesh
  #7
New Member
 
Irshad
Join Date: Dec 2009
Location: Bangalore
Posts: 19
Rep Power: 17
Irshad22 is on a distinguished road
Hi guys,
I too have the same doubt in finding the smallest element size "dx" in the mesh. Once we find this, we can easily calculate the time step "dt" from CFL criterion as (dt*U)/dx = C Where C -courant number


But the problem is finding smallest division in mesh. Could anybody help in that?
Irshad22 is offline   Reply With Quote

Old   December 8, 2010, 03:55
Default Hi
  #8
Member
 
Dynampally Pavitran
Join Date: Mar 2010
Location: India
Posts: 74
Rep Power: 16
pavitran is on a distinguished road
Usually minimum delx are found near the boundaries, eg: for airfoils you can find min delx near leading edge or trailing edge.
pavitran is offline   Reply With Quote

Old   December 8, 2010, 04:26
Default
  #9
New Member
 
Muhammad Nafees
Join Date: Aug 2010
Posts: 2
Rep Power: 0
muhammadnafees is on a distinguished road
Dear Pavitran.....
thanks for enlightening us on the subject...... your explanation will hopefully help...
muhammadnafees 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
Time step size and max iterations per time step pUl| FLUENT 31 October 23, 2020 23:50
Is it to possible to change time step DeltaT during a calculation dbxmcf OpenFOAM Running, Solving & CFD 5 January 26, 2018 17:03
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 05:13
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 05:35


All times are GMT -4. The time now is 04:19.