You are on page 1of 13

# Lecture Objectives

• Review
• SIMPLE CFD Algorithm
SIMPLE Semi-Implicit Method for Pressure-Linked Equations

• Define Residual and Relaxation

Review • • • • • Conservation equations Turbulent flow and turbulence modeling RANS Equation Discretization System of equation and solution methods – Accuracy – Numerical stability of solution procedure • Solution algorithm (new today) .

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

. aE    r Vx  Vy  Vz r For the first step use Initial guess And for next iterative steps use the values from previous iteration ..... N  a H Vx.... W  a S Vx.P  a E Vx.....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 )   μ μ μ  SM x 2 2 2 τ x y z x x y z a P Vx...... H  a L Vx.... a   W x 2 x x 2 .... E  a W Vx.S  a N Vx.P L  f aP  6  x 2 x Vx  .........

Use * for estimated pressure and the corresponding velocities E .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 )   μ μ μ  SM x τ x y z x x 2 y 2 z 2 x W 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  Aw x P x Ae Aw=Ae=Aside (PW – PE )/2 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.

P*N . z: Solution is: (PW – PE )/2 Aside x V *x P .S. P*E.N. e equations .W. P*H.SIMPLE algorithm Guess pressure field: P*W. V *x H . P*P.. 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: ………………. V *x W . V *x N . ………………. V *x 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 . 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. P*S. V *x E . k .

k . e equations no Converged (residual check) yes end .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 .

use Jacobeans of nonlinear velocity functions to form linear matrix ( and avoid iteration ) .Other methods SIMPLER SIMPLEC PISO variation of SIMPLE COUPLED .

X2=exp(1/x1)+2 . ……. R1=x1-x0 R2=x2-x1 See the example for the same equation .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 . ……..

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

Residual calculation for CFD • Residual for the cell RFijk=Fkijk-Fk-1ijk Variable: p.… iteration cell position • Total residual for the simulation domain RFtotal=S|RFijk| For all cells • Scaled (normalized) residual RF=S|RFijk|/FF Flux of variable F used for normalization Vary for different CFD software .V.T.

n –iteration .speed-up the convergence Under-Relaxation is often required when you have nonlinear equations! . 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) f = [0-1] – under-relaxation -stabilize the iteration f = [1-2] – over-relaxation .Relaxation Relaxation with iterative solvers: divergence variable When the equations are nonlinear it can happen that you get divergency in iterative procedure for solving considered time step solution convergence Solution is Under-Relaxation: iteration Y*=f·Y(n)+(1-f)·Y(n-1) Y – considered parameter .

T11  . T31  .. T21r  fT21  (1 .Example of relaxation (example from homework 3 assignment) Example: Advection diffusion equation.f)T10 . T40  . 1-D. T32  .. T22  ... T22r  fT22  (1 .. T20  .. T21  .. T42  .. T30  .. T12  . steady-state... T41  ....f)T21 . . . T12r  fT12  (1 ...f)T11 . ......... T11r  fT11  (1 .....f)T20 .. 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 1 2 3 4 2) Guess initial values: T10  .. 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 T 13  1 / b 3 f 3  a 3 /b 3 T 1 2  c 3 /b 3 T 0 4 T1 4  1 / b 4 f 4  a 4 /b 4 T13 4) Substitute and calculate: Substitute and calculate: ………………………….