Sie sind auf Seite 1von 13

Lecture Objectives

Review
Define Residual and Relaxation
SIMPLE CFD Algorithm
SIMPLE Semi-Implicit Method for Pressure-Linked Equations

Review

Conservation equations
Turbulent flow and turbulence modeling
RANS Equation
Discretization
System of equation and solution methods
Accuracy
Numerical stability of solution procedure (new)

Solution algorithm (new today)

Residual
Example:
x-exp(1/x)-2=0
Find x using iteration
Explicit form 1:

Explicit form 2:

x=exp(1/x)+2

x=1/(ln(x)-ln(2))

Solution process:
Guess x0
Not all iteration
process converge!

Iteration :
x1=exp(1/x0)+2 ,
X2=exp(1/x1)+2 ,
..
.

R1=x1-x0
R2=x2-x1

See the example for


the same equation

Convergence example

Explicit form 2:
x=1/(ln(x)-ln(2)

Residual calculation for CFD


Residual for the cell
R =kijk-k-1ijk

iteration

ijk

cell position

Variable: p,V,T,

Total residual for the simulation domain


Rtotal=R |
ijk

For all cells

Scaled (normalized) residual


R=R |/F
ijk

Flux of variable used for normalization


Vary for different CFD software

Relaxation
Relaxation with iterative solvers:
variable

When the equations are nonlinear


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

divergence

solution
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 3 assignment)
Example: Advection diffusion equation, 1-D, steady-state, 4 nodes
a N TN -1 b N TN c N TN 1 f N
1) Explicit format:
TN 1 / b N f N a N /b N TN-1 c N /b N TN 1

2) Guess initial values:

T10 ..., T20 .., T30 .., T40 ..


3) Substitute and calculate:
T11 1 / b1f1 c1/b1T 0 2
T 1 2 1 / b 2 f 2 a 2 /b 2 T 11 c 2 /b 2 T 0 3

T 13 1 / b 3 f 3 a 3 /b 3 T 1 2 c 3 /b 3 T 0 4

T 1 4 1 / b 4 f 4 a 4 /b 4 T 13
4) Substitute and calculate:
Substitute and calculate:
.

T11 ..., T21 .., T31 .., T41 ..


T11r fT11 (1 - f)T10 , T21r fT21 (1 - f)T20 , ....
T12 ..., T22 .., T32 .., T42 ..

T12r fT12 (1 - f)T11 , T22r fT22 (1 - f)T21 , ....

Navier Stokes Equations


Continuity equation

v x v y v z

0
x
y
z

This velocities that constitute advection coefficients: F=V

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 y

2vy
2vy
2vy
p
(
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
2vz
2vz
2vz
(
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 SM x
2
2

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

aP 6 2
x
x

aE 2 x , aW 2
x
x
x
................................

For the first step use Initial guess


And for next iterative steps use
the values from previous iteration

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 SM x

x
y
z
x
x 2
y 2
z

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

x
x
x
x

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 L f
We have two additional equations for y and x directions

Aw

P
x

Ae

Aw=Ae=Aside

(PW PE )/2
Aside
x

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:
x:

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 L f

y:

..
..

z:

Solution is:

(PW PE )/2
Aside
x

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
V = V* + V

P pressure correction
V velocity correction

For all nodes E,W,N,S,

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 , equations

SIMPLE algorithm
start
p=p*

Guess 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
PISO

variation of SIMPLE

COUPLED - use Jacobeans of nonlinear velocity functions to form


linear matrix ( and avoid iteration )

Das könnte Ihnen auch gefallen