Documente Academic
Documente Profesional
Documente Cultură
Review
- Explicit vs. Implicit
- Residual, Stability, Relaxation
Simple algorithm
General Transport Equation
unsteady-state 1-D
Fully explicit method:
Implicit method:
ρ ρV
T N T N x T N T N-1
x
k/c p
xx
2T N T N 1 T N 1 q source
T
ρ
N T N
x
T
ρVx
N T
N -1
k/cp
xx
2T N T N 1 T N 1 q source
2) Guess initial values: T10 ..., T20 .., T30 .., T40 ..
Make the difference between iteration and calculation for next time step
Residual
Example:
x-exp(1/x)-2=0
Explicit form 1:
Explicit form 2:
x=exp(1/x)+2
x=1/(ln(x-2))
Solution process:
Guess x0
Not all iteration
Iteration : process converge!
x1=exp(1/x0)+2 , R1=x1-x0 See the example for
X2=exp(1/x1)+2 , R2=x2-x1 the same equation
……..
…….
Convergence example
Explicit form 2:
x=1/(ln(x)-ln(2)
Residual calculation for CFD
• Residual for the cell iteration
RFijk=Fkijk-Fk-1ijk
cell position
Variable: p,V,T,…
Solution is Under-Relaxation:
iteration
Y*=f·Y(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=f·Y(100)+(1-f) ·Y(99)
Substitute and calculate: T12r fT12 (1 - f)T11 , T22r fT22 (1 - f)T21 , ....
………………………….
Navier Stokes Equations
CFD Specific Solver
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
................................
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
(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
Solution is: V *x P , V *x E , V *x W , V *x S , V *x N , V *x H , V *x L
4) Solve T , k , e equations
SIMPLE algorithm
start
Assume V and calculate coefficients
p=p* Guess p*
Update V in coefficients
no Converged
(residual check)
yes
end
Other methods
SIMPLER
SIMPLEC variation of SIMPLE
PISO
V = V* + V’
COUPLED - use Jacobeans of nonlinear velocity functions to form
linear matrix ( and avoid iteration )
HW3
Boundary condition and differencing scheme
Newton-Raphson method
(example of Jacobean solver)
- Faster convergence
- Used in many professional tools (MathCAD, EES, MatLab, Mathematica, etc)
Jacobean matrix
Steps:
0) Find derivatives d(f1)/dX =1 , d(f1)/dY =-1/2 Unknowns
d(f2)/dX =2X , d(f2)/dY =-1 (correction xi)
Repeat step (2) with Y(1) and X(1) ….. Follow the procedure till convergence
Course Review (so far)
Conservation Equations
Navier Stokes Equations
v x v y v z
0
x y z
T T T T 2T 2T 2T
ρc p ( Vx Vy Vz ) k 2 k 2 k 2 Φq
τ x y z x y z
v x 2 v y 2 v z 2 v x v y 2 v x v z 2 v y vz 2
F {( ) ( ) ( ) ( ) ( ) ( ) }
x y z y x z x z y
Reynolds Averaged Navier Stokes
equations
Continuity:
Vx Vy Vz
1) 0
x y z
Momentum:
Vx V V V P Vy Vy Vy
2) ρ( Vx x Vy x Vz x ) [(μ μ t ) ] [(μ μ t ) ] [(μ μ t ) ] ST x
τ x y z x x x y y z z
v v y v
STz Sz stz Sz [(μ μ t ) x (μ μ t ) (μ μ t ) z ]
z x y z
Similar is for STy and STx
constant t
MVM MVM: Mean velocity models
mixing length
TKEM: Turbulent kinetic energy equation models
One - Eq.
Free
1 Layer
High Re wall
2 Layer
bounded
k - e 3 Layer
Models based on μ t
TKEM Two
Low Re
Buoyancy
Eq. Curvature
k -
k - l
Additional models:
k - kl
k f
LES: Large Eddy simulation models
......
RSM: Reynolds stress models
Discretization and equation solver
Discretization of RANS SIMPLE algorithm
Guess p*
p=p*
Converged no
(residual check)
yes
end
Write down this
146.6.228.78
or
• 146.6.228.78 - CAEE-LicSrv07.austin.utexas.edu