You are on page 1of 22

Time discretization

GENERIC TRANSPORT EQUATION


Time discretization
1. Discretization of the time derivative
2. Discretization of the fluxes in time
3. Time discretization schemes
4. Time step size
5. Pressure velocity coupling transient: PISO
Time discretization – FVM Review
The transport equation for a passive scalar e.g. pollution

Rate of change in time


Transport by the velocity field
Transport due to diffusion
Sources
Time discretization - FVM Review
Integration over volume element

From volume to surface integral (Gauß th.)

Representation of fluxes over surfaces


Time discretization – 1D
Let us consider a 1D
problem for the sake of
simplicity.

The size of the cells


CV
remains constant.
W P E
w e

Δx Δx Δx
Time discretization – 1D
In 2D

In 1D with time derivative for cell P

Time derivative was not considered for steady state RANS


For transient simulation it needs to be considered.
Time discretization – time derivative
Integration in time from t to t+Δt for time derivative for cell p

t t+Δt T
φ as a function of time T
Time discretization – time derivative
Solving time integral and applying mid point rule for volume integral

From the continuous form of the time derivative to a discrete


form.
Discrete form contains old (known) value.
Discrete form contains the new (to be calculated) value.
Time discretization – Diffusion
Fluxes over faces. A is the area of the face.

CV

W P E
w e

Δx Δx Δx
Time discretization – Diffusion
Integration in time

Central Difference Scheme

CV

W P E
w e

Δx Δx Δx
Time discretization – Diffusion

Integration in time – old values, new values, combination of both?

Theta is the weighting function


Time discretization – Diffusion
Applying this idea

To the already space discretized equation

Leads to
Time discretization – Diffusion

From the continuous form of the diffusion term to a


discrete form.
Discrete form contains old (known) value.
Discrete form contains the new (to be calculated) value.

Discretization of the other terms analogously.


Time discretization – 2nd order implicit
With Taylor series we can show

2nd order approximation of the time derivative.


Uses values from two old time steps.
Fluxes are calculated with the old values (implicit).
Time discretization
SUMMARY
Time discretization – 1st order Schemes
IMPLICIT EXPLICIT

• Uses values at new time step • Uses values at old time step
• First order accurate • First order accurate
• Stable at larger time step • Can only use small time
• „Euler“ in OpenFOAM steps
• Not implemented in
OpenFOAM – not stable for
industrial simulations
Time discretization – 2st order Schemes
IMPLICIT 2ND ORDER CRANK NICOLSON

• Uses values of the new time • uses a combination of new


step and old values
• Second order accurate but • Second order accurate
larger error than C.N. • Stable at larger time steps
• Stable at larger time step • Higher calculation time
• „Low cost“ 2nd order scheme • „CrankNicolson Ψ“ in
• „backward“ in OpenFOAM OpenFOAM
Large time step?
HOW TO DEFINE THE SIZE OF YOUR TIME STEP
Time Discretization – Courant number
Estimation of time step size – Courant number

Estimated for each cell of the mesh at each time step.


Ratio between travel length of the fluid in a time step to cell size.
Explicit scheme need CO<1
Implicit schemes and Crank Nicolson are stable at CO>1
PISO
PRESSURE VELOCITY COUPLING FOR TRANSIENT SIMULATION
Start
SIMPLE -
Review Initial and boundary conditions

Loop that was Solve momentum eq.

performed
iteratively for Solve pressure correction eq.
PISO solves a

Calculated values become guessed


values of the next iteration step
RANS until Correct guessed pressure
second pressure
convergence. equation and
Correct velocities
corrects pressure
and velocity twice.
Solve other equations
In OpenFOAM
Convergence?
multiple p loops can
be performed
End
Start

PISO Initial and boundary conditions

Pressure Implicit Let time t=t+Δt

with Splitting of Solve momentum eq.

Operators
Solve pressure correction eq.

Calculated values become guessed


For Transient

values of the next loop


simulations Correct guessed pressure

Correct velocities

Solve other equations

t>tmax?

End

You might also like