CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   calculation of time step (https://www.cfd-online.com/Forums/main/82785-calculation-time-step.html)

aamer December 6, 2010 01:09

calculation of time step
 
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.?

dandalf December 6, 2010 06:18

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

aamer December 6, 2010 07:53

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???

dandalf December 6, 2010 08:37

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.

Butscher December 7, 2010 04:11

i am sorry but this explanation ist also so difficult.

pavitran December 7, 2010 06:06

Hi
 
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)

Irshad22 December 8, 2010 02:27

Finding smallest division in mesh
 
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?

pavitran December 8, 2010 02:55

Hi
 
Usually minimum delx are found near the boundaries, eg: for airfoils you can find min delx near leading edge or trailing edge.

muhammadnafees December 8, 2010 03:26

Dear Pavitran.....
thanks for enlightening us on the subject...... your explanation will hopefully help... :)


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