Sie sind auf Seite 1von 16

Objective

Numerical methods
SIMPLE CFD Algorithm
SIMPLE Semi-Implicit Method for Pressure-Linked Equations

Define Relaxation
General Transport Equation
unsteady-state

H N div( V) div ( ,eff grad ) S

W E Equation in the algebraic format:
P
S L a P P a E E a W W a S S a N N a H H a L L f

We have to solve the system matrix for each time step !

Transient term:

P P

Are these values for step or + ?

Unsteady-state 1-D If: - - explicit method


- + - implicit method
P P Vx
E(or P) P(or W) , eff 2P E W S
x xx
General Transport Equation unsteady-state

Fully explicit method:

P P Vx



x

P( or E) W(or P) , eff 2 P E W S
xx

P P Vx , eff



x

P( or E) W(or P) xx

2 P E W S

Or different notation:

Implicit method
N N Vx , eff



x

N( or N 1) N-1(or

N) xx

2
N
N -1

N 1 S

For Vx>0 For Vx<0


Steady state vs. Unsteady state
Steady state

Vx
x

N( or N1) N-1(or N) , eff 2 N N1 N-1 S
xx

a N TN-1 b N TN c N TN1 f N

We use iterative solver to get solution


Unsteady state

N N Vx , eff



x

N( or N 1) N-1(or

N)

xx

2 N N-1 N1 S

a N TN-1 b N TN c N TN1 f N

We use iterative solver to get solution and


We iterate for each time step

Make the difference between


- Calculation for different time step
- Calculation in iteration step
1D example
multiple (N) volumes
N unknowns

1 2 3 i N-1 N

b11 c12 f1 Equation for volume 1


N
equations a 21 b 2 2 c 23 f 2 Equation for volume 2
a 3 2 b 3 3 c 3 4 f 3

a N N-1 b N N f N

b1 c1 1 f1
a f
Equation matrix: 2 b2 c2 2 2
... ... ...
For 1D problem
ai bi ci i f i
3-diagonal matrix
... ... ...

a N 1 bN 1 cN 1 N 1 f N 1

aN bN N f N
3D problem
Equation in the general format:
H N
a P P a E E a W W a S S a N N a H H a L L f
W P E
S L
Wright this equation for each discretization volume
of your discretization domain
A
60,000 elements
F

60,000 cells (nodes)


N=60,000
60,000 elements

x =

7-diagonal matrix
This is the system for only
one variable ( ) When we need to solve p, u, v, w, T, k, e, C
system of equation is larger
Iteration method
Alternative to use matrix solver tool is to use iterations
You can use excel if you are not familiar with matrix solver tools

General Iteration Procedure:


1) Express equation in explicit form
2) Guess initial values
3) Substitute initial values and calculate new values
4) Substitute new values and calculate newer values
6) Repeat step 4) until convergence is achieved

example
Iterations -residual Value: T1 Residual 2
initial guess 22
2
iteration 1 23 1.00000
iteration 2 23.25 0.25000 2
iteration 3 23.390625 0.14063
Difference of value 2
iteration 4 23.483459 0.09283
between two iteration iteration 5 2
--- 23.96441
Iteration 98 23.96444 0.00003
Numerical instability
divergency

divergence
variable

solution

convergence

iteration
Navier Stokes Equations
Continuity equation
v x v y v z
0
x y z This velocities that constitute advection coefficients: F=rV
Momentum x
v x v x v x v x p 2vx 2vx 2vx
( vx vy vz ) 2 2 2 SM x
x y z x x y z
Momentum y
v y v y v y v yp 2vy 2vy 2vy
( vx vy vz ) 2 2 2 SM y g (T T )
x y z y x y z
Momentum z
v z v z v z v z p 2 vz 2 vz 2 vz
( vx vy vz ) 2 2 2 SM z
x y z z x y z
Pressure is in momentum equations
which already has one unknown

In order to use linear equation solver we need to solve two problems:

1) find velocities that constitute in advection coefficients


2) link pressure field with continuity equation
Pressure and velocities in NS
equations
How to find velocities that constitute in advection coefficients?

v x v x v x v x p 2vx 2vx 2vx


( vx vy vz ) 2 2 2 SM x
x y z x x y z

a P Vx, P a E Vx, E a W Vx, W a S Vx, S a N Vx, N a H Vx, H a L Vx, P L f

Vx Vy Vz For the first step use Initial guess


aP 6 r And for next iterative steps use
x 2
x the values from previous iteration
Vx
aE r , a
x 2 x x 2
W

................................
Pressure and velocities in NS
equations
How to link pressure field with continuity equation?
SIMPLE (Semi-Implicit Method for Pressure-Linked Equations ) algorithm
v x v x v x v x p 2vx 2vx 2vx
( vx vy vz ) 2 2 2 SM x
x y z x x y z
W x P x E

p Pw Pe (PW PP )/2 (PP PE )/2 (PW PE )/2 x


Aw Ae
x x x x Aw=Ae=Aside

(PW PE )/2
a P Vx P a E Vx E a W Vx W a SVx S a N Vx N a H Vx H a L Vx L f Aside
x
We have two additional equations for y and x directions

The momentum equations can be solved only when the pressure field is given or is
somehow estimated. Use * for estimated pressure and the corresponding velocities
SIMPLE algorithm
Guess pressure field: P*W, P*P, P*E, P*N , P*S, P*H, P*L

1) For this pressure field solve system of equations:


(PW PE )/2
x: a P Vx P a E Vx E a W Vx W a SVx S a N Vx N a H Vx H a L Vx L f Aside
x
y: ..
z: ..

Solution is: V *x P , V *x E , V *x W , V *x S , V *x N , V *x H , V *x L

2) The pressure and velocity correction

P = P* + P P pressure correction For all nodes E,W,N,S,


V = V* + V V velocity correction

Substitute P=P* + P into momentum equations (simplify equation) and obtain


V=f(P) V = V* + f(P)
3) Substitute V = V* + f(P) into continuity equation solve P and then V

4) Solve T , k , e equations
SIMPLE algorithm
start
Guess p*
p=p*

Step1: solve V* from momentum equations

Step2: introduce correction P and express V = V* + f(P)

Step3: substitute V into continuity equation solve P and then V

Step4: Solve T , k , e equations

no Converged
(residual check)
yes
end
Other methods

SIMPLER
SIMPLEC variation of SIMPLE
PISO

COUPLED - use Jacobeans of nonlinear velocity functions to form


linear matrix ( and avoid iteration )
Relaxation
Relaxation with iterative solvers: divergence
variable

When the equations are nonlinear


solution
it can happen that you get divergency
in iterative procedure for solving considered
time step convergence

Solution is Under-Relaxation:
iteration
Y*=fY(n)+(1-f)Y(n-1) Y considered parameter , n iteration , f relaxation factor
Value which is should be used for the next iteration
For our example Y*in iteration 101=fY(100)+(1-f) Y(99)

f = [0-1] under-relaxation -stabilize the iteration


f = [1-2] over-relaxation - speed-up the convergence

Under-Relaxation is often required when you have nonlinear equations!


Example of relaxation
(example from homework assignment)
Example: Advection diffusion equation, 1-D, steady-state, 4 nodes
a N TN-1 b N TN c N TN1 f N
1) Explicit format:
TN 1 / b N f N a N /b N TN-1 c N /b N TN1 1 2 3 4
2) Guess initial values:
T10 ..., T20 .., T30 .., T40 ..
3) Substitute and calculate:
T11 1 / b1f1 c1/b1T 0 2
T1 2 1 / b 2 f 2 a 2 /b 2 T11 c 2 /b 2 T 0 3 T11 ..., T21 .., T31 .., T41 ..
T13 1 / b 3 f 3 a 3 /b 3 T1 2 c 3 /b 3 T 0 4
T1 4 1 / b 4 f 4 a 4 /b 4 T13 T11r fT11 (1 - f)T10 , T21r fT21 (1 - f)T20 , ....
4) Substitute and calculate: T12 ..., T22 .., T32 .., T42 ..

Substitute and calculate: T12r fT12 (1 - f)T11 , T22r fT22 (1 - f)T21 , ....
.

Das könnte Ihnen auch gefallen