1D Colocated SIMPLE Solution
-
Upload
osmanpekmutlu -
Category
Documents
-
view
23 -
download
0
Transcript of 1D Colocated SIMPLE Solution
1
METU Mechanical Engineering Department ME 485 Computational Fluid Dynamics using Finite Volume Method
Spring 2014 (Dr. Sert)
Demonstration of How SIMPLE Algorithm Works on 1D Co-located Meshes
Problem Definition
Simplify the incompressible flow in the following converging nozzle to be 1D and inviscid. Obtain the finite volume
solution using 5 cells of equal length. Density of the fluid is 1 kg/m3. As boundary conditions inlet velocity is given
1 m/s and exit pressure is specified as 0 Pa.
Cross sectional area of the nozzle decreases linearly
π΄(π₯) = 0.5 β 0.2π₯
Exit pressure is set to zero for simplicity. Actually the value of this reference pressure is not important for an
incompressible flow, because in INS only the pressure gradient (ππ/ππ₯) is important, not the actual pressure
values. If the actual exit pressure is πππ‘π, pressure values that we will obtain by setting exit pressure to zero will
be gage pressures. To obtain absolute values we can add πππ‘π to all the pressure values.
Analytical Solution
Analytical solution of the problem is governed by the Bernoulli equation.
π +ππ’2
2= constant
Mass flow rate inside the nozzle is constant and its value is known due to the given inlet speed
οΏ½ΜοΏ½ = π π’ππ π΄ππ = 0.5 kg sβ
Using this value we can calculate the speed at any point inside the nozzle. Exit speed is
π’ππ₯ππ‘ =οΏ½ΜοΏ½
ππ΄ππ₯ππ‘= 5m sβ
π₯
π΄ππ = 0.5 m2
π’ππ = 1 m/s
π΄ππ₯ππ‘ = 0.1 m2
πππ₯ππ‘ = 0 Pa
πΏ = 2 m
π = 1 kg/m3
2
Using the known speed and pressure at the exit the constant of the Bernoulli equation can be calculated as
πππ₯ππ‘ +ππ’ππ₯ππ‘
2
2= 0 +
(1)(5)2
2= 12.5 Pa
With the οΏ½ΜοΏ½ = 0.5 equation and the above equation speed and pressure at any point inside the nozzle can be
determined.
Nodes and faces of the 5 cell mesh are shown below
Analytical solution at the faces and nodes is as follows
Face Node π₯ [m] π΄ [m2] π’ππ₯πππ‘ [m/s] πππ₯πππ‘ [Pa]
π1 0.0 0.50 1.0000 12.0000
1 0.2 0.46 1.0870 11.9093
π2 0.4 0.42 1.1905 11.7914
2 0.6 0.38 1.3158 11.6343
π3 0.8 0.34 1.4706 11.4187
3 1.0 0.30 1.6667 11.1111
π4 1.2 0.26 1.9231 10.6509
4 1.4 0.22 2.2727 9.9174
π5 1.6 0.18 2.7778 8.6420
5 1.8 0.14 3.5714 6.1224
π6 2.0 0.10 5.0000 0.0000
Discretization of the x-Momentum Equation
Consider the following cell P with W and E neighbors
For cell P, the discretized x-momentum equation without the viscous and source terms is
πΉππ΄ππ’π β πΉπ€π΄π€π’π€ = βππ
ππ₯|πββπ (1)
where πΉπ = (ππ’)π , πΉπ€ = (ππ’)π€ are known, calculated using initial guesses or previous iteration values. π’π and
π’π€ of Eqn (1) can be expressed in terms of speeds at nodes using various schemes. Here upwind scheme is used
as follows
π1 π2 π3 π4 π5 π6
1 2 3 4 5
π₯
βπ₯ = 0.4 m
π€ π
W P E
3
π’π = {
π’π π’πΈ if if πΉπ > 0
πΉπ < 0 β π’π = π’π
max(πΉπ , 0)
πΉπ+ π’πΈ
max(βπΉπ , 0)
βπΉπ
π’π€ = {
π’π π’π if if πΉπ€ > 0
πΉπ€ < 0 β π’π€ = π’π
max(πΉπ€ , 0)
πΉπ€+ π’π
max(βπΉπ€, 0)
βπΉπ€
Pressure derivative of Eqn (1) is discretized as
ππ
ππ₯|π=ππΈ β ππ2βπ₯
Volume of cell P is
ββπ= π΄πβπ₯
where π΄π is the cross sectional area at node P.
Substituting these details into Eqn (1) we get
πΉππ΄π [π’πmax(πΉπ , 0)
πΉπ+ π’πΈ
max(βπΉπ, 0)
βπΉπ] β πΉπ€π΄π€ [π’π
max(πΉπ€, 0)
πΉπ€+ π’π
max(βπΉπ€, 0)
βπΉπ€] = ππ
π’ β π΄πππΈ β ππ
2 (2)
which can be arranged as
πππ’ π’π + ππ
π’π’π + ππΈπ’π’πΈ = ππ
π’ β π΄πππΈ β ππ
2 (3)
where
πππ’ = βπ΄π€max (πΉπ€ , 0)
ππΈπ’ = βπ΄πmax(βπΉπ , 0)
πππ’ = π΄π€max(βπΉπ€ , 0) + π΄πmax(πΉπ , 0)
πππ’ = 0
Eqn (3) can also be written as
π’π = οΏ½ΜοΏ½π β πππ’ππΈ β ππ
2 (4)
where
οΏ½ΜοΏ½π =1
πππ’ (ππ
π’ ββππππ’ π’ππ
ππ
) and πππ’ =
π΄ππππ’ (5)
Although the source term is zero, it is kept in the equations because for boundary cells there may be nonzero
contributions to it.
4
Modification of the x-Momentum Equation for Boundary Cells
Cell 1:
At the west face inlet velocity is known, i.e. in the x-momentum equation flux at the west face is known
πΉπ€π΄π€π’π€ = ππ’ππ2 π΄ππ = known
This can be taken to the right hand side of the equation to act as a source term.
For the pressure derivative one-sided difference can be used instead of central differencing
ππ
ππ₯|π=π2 β π1βπ₯
With these, Eqn (3) for cell 1 becomes (modified terms are shown in red)
πππ’ π’π + ππ
π’π’π + ππΈπ’π’πΈ = ππ
π’ β π΄π(ππΈ β ππ)
where
πππ’ = 0
ππΈπ’ = βπ΄πmax(βπΉπ , 0)
πππ’ = π΄πmax(πΉπ , 0)
πππ’ = ππ’ππ
2 π΄ππ
Therefore at an inlet boundary where velocity is given, following changes occur in the x-momentum equation
Coefficient of the ghost neighbor is set to zero.
πππ’ coefficient changes because there is no contribution from the ghost neighbor.
Momentum flux created by the known inlet velocity acts as a source term.
Pressure discretization becomes one-sided (not central).
Cell 5:
Considering that the right end of the domain is an exit boundary we can use
π’π = π’π
Pressure gradient term can be discretized to make use of the given πππ₯ππ‘ value.
ππ
ππ₯|π=ππ β ππ€βπ₯
=πππ₯ππ‘ β
ππ + ππ2
βπ₯=2πππ₯ππ‘ β ππ β ππ
2βπ₯
π€ π
1 2
π’π€ = π’ππ
P E
π€ π
4 5
ππ = πππ₯ππ‘
W P
5
With these, Eqn (3) for cell 1 becomes (modified terms are shown in red)
πππ’ π’π + ππ
π’π’π + ππΈπ’π’πΈ = βπ΄π
2πππ₯ππ‘ β ππ β ππ2βπ₯
where
πππ’ = βπ΄π€max(πΉπ€ , 0)
ππΈπ’ = 0
πππ’ = π΄π€max(βπΉπ€ , 0) + π΄πmax(πΉπ , 0)
Therefore at an exit boundary where pressure is given, following changes occur in the x-momentum equation
Coefficient of the ghost neighbor is set to zero.
Pressure discretization uses the known exit pressure.
Face Velocity Calculation using Rhie-Chow (Momentum) Interpolation and Relaxation
In total, there are 6 faces in the mesh. Consider the following face π with neighboring cells L (left) and R (right).
Using Rhie-Chow interpolation and velocity under-relaxation, velocity at face π is calculated as
π’π = πΌπ’[οΏ½ΜοΏ½π β πππ’(ππ β ππΏ)] + (1 β πΌπ’)π’π
ππΏπ· (6)
where
οΏ½ΜοΏ½π =οΏ½ΜοΏ½πΏ + οΏ½ΜοΏ½π
2 , ππ
π’ =ππΏπ’ + ππ
π’
2
πΌπ’ is the velocity under-relaxation factor and π’πππΏπ· is the face velocity of the previous iteration.
Eqn (6) and the above expressions for οΏ½ΜοΏ½π and πππ’ need to be modified at the boundary faces.
Modification at face 1:
Face 1 at the left boundary has a specified inlet velocity, so we do not use Eqn (6) at face 1, i.e. we do not need
οΏ½ΜοΏ½π1 or ππ1π’ .
π
L R
π1
π’π1 = π’ππ
6
Modification at face 6:
There is no cell on the right of face 6. Instead of central interpolation, one-sided interpolation can be used to
calculate οΏ½ΜοΏ½π6 and ππ6π’ . With the assumption of constant cell size
οΏ½ΜοΏ½π6 = οΏ½ΜοΏ½5 +οΏ½ΜοΏ½5 β οΏ½ΜοΏ½42
, ππ6π’ = π5
π’ +π5π’ β π4
π’
2
Also (ππ β ππΏ) term of Eqn (6) can be expressed in terms of the known exit pressure as
(πππ₯ππ‘ β π5)
1/2
which comes from ππ
ππ₯|π6β
πππ₯ππ‘βπ5
βπ₯/2
Pressure Correction (PC) Equation
PC equation is
πΉπβ²π΄π β πΉπ€
β²π΄π€ = βπ΄ππΉπβ + π΄π€πΉπ€
β
Relating velocity corrections to pressure corrections as follows
πΉπβ² = ππ’π
β² = βππππ’(ππΈ
β² β ππβ² ) and πΉπ€
β² = ππ’π€β² = βπππ€
π’ (ππβ² β ππ
β² )
PC equation becomes
ππππΆππ
β² + ππππΆππ
β² + ππΈππΆππΈ
β² = βπ΄ππΉπβ + π΄π€πΉπ€
β (7)
ππππΆ = βπππ€π΄π€
ππππΆ = πππ€π΄π€ + ππππ΄π
ππΈππΆ = βππππ΄π
Eqn (7) is modified as follows for boundary cells.
Modification for cell 1:
At west face inlet velocity is specified and π’π€β² = 0. Due to this following changes happen
ππππΆ = 0 , ππ
ππΆ = ππππ΄π
π6
ππ = πππ₯ππ‘
4 5
π€ π
1 2
π’π€ = π’ππ
P E
7
Modification for cell 5:
π’πβ² expression need to be modified because there is no ππΈ
β² . Instead of using (ππΈβ² β ππ
β² ) we can use half cell as
π’πβ² =
πππ’(πππ₯ππ‘
β² β ππβ² )
1/2
where πππ₯ππ‘β² = 0 because exit pressure is fixed. Due to this coefficients of the PC change as follows
ππΈππΆ = 0 , ππ
ππΆ = 2ππππ΄π + πππ€π΄π€
Face Velocity Corrections
For the above face π, velocity correction is done as follows
π’π = π’πβ β ππ
π’(ππ β² β ππΏ
β² ) (8)
where π’πβ is the velocity calculated previously using Rhie-Chow interpolation. For the boundary faces Eqn (8) is
used as follows
Modification for face 1: Inlet velocity is given and no correction is done.
Modification for face 6: Similar to the previous step we use
π’π6 = π’π6β β ππ6
π’(πππ₯ππ‘β² β π5
β² )
1/2 where πππ₯ππ‘
β² = 0
Correct Cell Center Velocities
π’π = π’πβ β ππ
π’(ππΈβ² β ππ
β² )
2 (9)
Eqn (9) will be modified for the boundary cells.
π€ π
4 5
ππ = πππ₯ππ‘
W P
π
L R
π€ π
W P E
8
Modification for cell 1: West cell does not exist. Pressure correction difference can be done in a one-sided way.
π’1 = π’1β β π1
π’(π2β² β π1
β² )
1
Modification for cell 5: East cell does not exist. Pressure correction difference can be done in a one-sided way
using the fact that exit pressure is fixed.
π’5 = π’5β β π5
π’(πππ₯ππ‘β² β π5
β² )
1/2 where πππ₯ππ‘
β² = 0
Correct Pressures
ππ = ππβ + πΌππ1
β² (10)
where ππβ is the pressure of the previous iteration (or the initial guess) and πΌπ is the pressure relaxation factor.
SIMPLE Iterations
STEP 1:
As initial guess we can use the inlet velocity and exit pressure at all nodes and faces.
π’1 = π’2 = π’3 = π’4 = π’5 = 1.0
π’π1 = π’π2 = π’π3 = π’π4 = π’π5 = π’π6 = 1.0
π1 = π2 = π3 = π4 = π5 = 0.0
ITERATION 1:
STEP 2: Setup x-momentum equation set to solve for π’β.
Cell 1:
Knowns: πΉπ = (ππ’)π = 1.0 , πΉπ€ = (ππ’)π€ = 1.0 , π΄π€ = 0.5 , π΄π = 0.42 , ππ = ππΈ = 0.0
πππ’ = 0.0 , ππ
π’ = 0.42 , ππΈπ’ = 0.0 , ππ
π’ = 0.5
οΏ½ΜοΏ½1 =0.5 β 0.0
0.42= 1.1905 , π1
π’ =0.46
0.42= 1.0952
Cell 1 eqn is : 0.42π’1β = 0.5 β 0.46(0.0 β 0.0)
9
Cell 2:
Knowns: πΉπ = (ππ’)π = 1.0 , πΉπ€ = (ππ’)π€ = 1.0 , π΄π€ = 0.42 , π΄π = 0.34 , ππ = ππΈ = 0.0
πππ’ = β0.42 , ππ
π’ = 0.34 , ππΈπ’ = 0.0 , ππ
π’ = 0.0
οΏ½ΜοΏ½2 =0.0 β ((β0.42)(1.0))
0.34= 1.1905 , π2
π’ =0.38
0.34= 1.0952
Cell 2 eqn is : β0.42π’1β + 0.34π’2
β = β0.38(0.0 β 0.0)/2
Cell 3:
Knowns: πΉπ = (ππ’)π = 1.0 , πΉπ€ = (ππ’)π€ = 1.0 , π΄π€ = 0.34 , π΄π = 0.26 , ππ = ππΈ = 0.0
πππ’ = β0.34 , ππ
π’ = 0.26 , ππΈπ’ = 0.0 , ππ
π’ = 0.0
οΏ½ΜοΏ½3 =0.0 β ((β0.34)(1.0))
0.26= 1.3077 , π3
π’ =0.30
0.26= 1.1538
Cell 3 eqn is : β0.34π’2β + 0.26π’3
β = β0.30(0.0 β 0.0)/2
Cell 4:
Knowns: πΉπ = (ππ’)π = 1.0 , πΉπ€ = (ππ’)π€ = 1.0 , π΄π€ = 0.26 , π΄π = 0.18 , ππ = ππΈ = 0.0
πππ’ = β0.26 , ππ
π’ = 0.18 , ππΈπ’ = 0.0 , ππ
π’ = 0.0
οΏ½ΜοΏ½4 =0.0 β ((β0.26)(1.0))
0.18= 1.4444 , π4
π’ =0.22
0.18= 1.2222
Cell 4 eqn is : β0.26π’3β + 0.18π’4
β = β0.22(0.0 β 0.0)/2
Cell 5:
Knowns: πΉπ = (ππ’)π = 1.0 , πΉπ€ = (ππ’)π€ = 1.0 , π΄π€ = 0.18 , π΄π = 0.1 , ππ = ππ = πππ₯ππ‘ = 0.0
πππ’ = β0.18 , ππ
π’ = 0.1 , ππΈπ’ = 0.0 , ππ
π’ = 0.0
οΏ½ΜοΏ½5 =0.0 β ((β0.18)(1.0))
0.1= 1.8000 , π5
π’ =0.14
0.1= 1.4000
Cell 5 eqn is : β0.18π’4β + 0.1π’5
β = β0.14(2(0.0) β 0.0 β 0.0)/2
Discretized x-momentum equation system and the solution for π’β is
[ 0.42 0 0 0 0β0.42 0.34 0 0 00 β0.34 0.26 0 00 0 β0.26 0.18 00 0 0 β0.18 0.1]
{
π’1β
π’2β
π’3β
π’4β
π’5β}
=
{
0.50000 }
β
{
π’1β
π’2β
π’3β
π’4β
π’5β}
=
{
1.19051.47061.92312.77780.5000}
10
STEP 3: Calculate face velocities using Rhie-Chow interpolation and πΌπ’ = 0.6. These velocities will be used as
βstarβ velocities in Step 5.
Face 1: π’π1 = 1.0
Face 2: οΏ½ΜοΏ½π2 =οΏ½ΜοΏ½1+οΏ½ΜοΏ½2
2= 1.2129 , ππ2
π’ =π1π’+π2
π’
2= 1.1064 β
π’π2 = (0.6)[1.2129 β 1.1064(0.0 β 0.0)] + (1 β 0.6)(1.0) = 1.1277
Face 3: οΏ½ΜοΏ½π3 =οΏ½ΜοΏ½2+οΏ½ΜοΏ½3
2= 1.2715 , ππ3
π’ =π2π’+π3
π’
2= 1.1357 β
π’π3 = (0.6)[1.2715 β 1.1357(0.0 β 0.0)] + (1 β 0.6)(1.0) = 1.1629
Face 4: οΏ½ΜοΏ½π4 =οΏ½ΜοΏ½3+οΏ½ΜοΏ½4
2= 1.3761 , ππ4
π’ =π3π’+π4
π’
2= 1.1880 β
π’π4 = (0.6)[1.3761 β 1.1880(0.0 β 0.0)] + (1 β 0.6)(1.0) = 1.2256
Face 5: οΏ½ΜοΏ½π5 =οΏ½ΜοΏ½4+οΏ½ΜοΏ½5
2= 1.6222 , ππ5
π’ =π4π’+π5
π’
2= 1.3111 β
π’π5 = (0.6)[1.6222 β 1.3111(0.0 β 0.0)] + (1 β 0.6)(1.0) = 1.3733
Face 6: οΏ½ΜοΏ½π6 = οΏ½ΜοΏ½5 +οΏ½ΜοΏ½5βοΏ½ΜοΏ½4
2= 1.9778 , ππ6
π’ = π5π’ +
π5π’βπ4
π’
2= 1.4889 β
π’π5 = (0.6)[1.9778 β 1.4889(0.0 β 0.0)] + (1 β 0.6)(1.0) = 1.5867
STEP 4: Calculate the coefficients of the pressure correction equation system solve for πβ² values.
Cell 1: ππππΆ = 0.0
ππΈππΆ = βπππ
π’π΄π = β(1)(1.1064)(0.42) = β0.4647
ππππΆ = πππ
π’π΄π = 0.4647
RHS value: βπ΄ππΉπβ + π΄π€πΉπ€
β = β(0.42)(1.1277) + (0.5)(1.0) = 0.0264
Cell 2: ππππΆ = βπππ€
π’π΄π€ = β(1)(1.1064)(0.42) = β0.4647
ππΈππΆ = βπππ
π’π΄π = β(1)(1.1357)(0.34) = β0.3862
ππππΆ = πππ€
π’π΄π€ + ππππ’π΄π = 0.8509
RHS value: βπ΄ππΉπβ + π΄π€πΉπ€
β = β(0.34)(1.1629) + (0.42)(1.1277) = 0.0783
Cell 3: ππππΆ = βπππ€
π’π΄π€ = β(1)(1.1357)(0.34) = β0.3862
ππΈππΆ = βπππ
π’π΄π = β(1)(1.1880)(0.26) = β0.3089
ππππΆ = πππ€
π’π΄π€ + ππππ’π΄π = 0.6950
RHS value: βπ΄ππΉπβ + π΄π€πΉπ€
β = β(0.26)(1.2256) + (0.34)(1.1629) = 0.0767
Cell 4: ππππΆ = βπππ€
π’π΄π€ = β(1)(1.1880)(0.26) = β0.3089
ππΈππΆ = βπππ
π’π΄π = β(1)(1.3111)(0.18) = β0.2360
ππππΆ = πππ€
π’π΄π€ + ππππ’π΄π = 0.5449
RHS value: βπ΄ππΉπβ + π΄π€πΉπ€
β = β(0.18)(1.3733) + (0.26)(1.2256) = 0.0715
11
Cell 5: ππππΆ = βπππ€
π’π΄π€ = β(1)(1.3111)(0.18) = β0.2360
ππΈππΆ = 0.0
ππππΆ = πππ€
π’π΄π€ + 2ππππ’π΄π = 0.5338
RHS value: βπ΄ππΉπβ + π΄π€πΉπ€
β = β(0.1)(1.5867) + (0.18)(1.3733) = 0.0885
Discretized PC equation system and the solution for πβ² is
[ 0.4647 β0.4647 0 0 0β0.0467 0.8509 β0.3862 0 0
0 β0.3862 0.6950 β0.3089 00 0 β0.3089 0.5449 β0.23600 0 0 β0.2360 0.5338 ]
{
π1β²
π2β²
π3β²
π4β²
π5β²}
=
{
0.02640.07830.07670.07150.0885}
β
{
π1β²
π2β²
π3β²
π4β²
π5β²}
=
{
3.13213.07542.80452.21751.1463}
STEP 5: Correct face velocities using Eqn (8).
Face 1: π’π1 = 1.0 (No correction for the inlet velocity)
Face 2: π’π2 = π’π2β + ππ2
π’ (π2β² β π1
β² ) = 1.1277 β 1.1064(3.0754 β 3.1321) = 1.1905
Face 3: π’π3 = π’π3β + ππ3
π’ (π3β² β π2
β² ) = 1.1629 β 1.1357(2.8045 β 3.0754) = 1.4706
Face 4: π’π4 = π’π4β + ππ4
π’ (π4β² β π3
β² ) = 1.2256 β 1.1880(2.2175 β 2.8045) = 1.9231
Face 5: π’π5 = π’π5β + ππ5
π’ (π5β² β π4
β² ) = 1.3733 β 1.3111(1.1463 β 2.2175) = 2.7778
Face 6: π’π6 = π’π6β + ππ6
π’ (πππ₯ππ‘β² βπ5
β²)
0.5= 1.5867 β 1.4889
(0.0β1.1463)
0.5= 5.0000
Important note: As seen, corrected face velocities satisfy the continuity equation exactly, i.e. mass is
conserved exactly in each cell with the corrected face velocities. For example consider cell 3.
Mass balance for cell 3: ππ’π€π΄π€ β ππ’ππ΄π = (1)(0.26)(1.9231) β (1)(0.34)(1.4706) = 0.0000
This is true for all cells. For this 1D problem with specified inlet velocity, these corrected face velocities are
the same as the analytical values. For a 2D or 3D problem mass balance in each cell will again be exact, but
the face velocities cannot be equal to the analytical values, which are probably not known anyway. This
βexact mass balanceβ at each iteration is an important power of the SIMPLE algorithm. Although in this
problem face velocities are exact, cell center velocities and pressures will require a number of iterations to
converge and the converged values will not be equal to the analytical values. Accuracy will depend on the
used mesh and the selected convergence tolerance.
5 plus/minus typos. Results are correct.
12
STEP 6: Correct cell center velocities using Eqn (9).
Cell 1: π’1 = π’1β + π1
π’ (π2β² β π1
β² ) (1)β = 1.1905 + 1.0952(3.0754 β 3.1321) = 1.2526
Cell 2: π’2 = π’2β + π2
π’ (π3β² β π1
β² ) (2)β = 1.4706 + 1.1176(2.8045 β 3.0754) = 1.6537
Cell 3: π’3 = π’3β + π3
π’ (π4β² β π2
β² ) (2)β = 1.9231 + 1.1538(2.2175 β 2.8045) = 2.4181
Cell 4: π’4 = π’4β + π4
π’ (π5β² β π3
β² ) (2)β = 2.7778 + 1.2222(1.1463 β 2.2175) = 3.7911
Cell 5: π’5 = π’5β + π5
π’ (πππ₯ππ‘β² β π5
β² ) (1)β = 5.0000 + 1.2222(1.1463 β 2.2175) = 8.2096
STEP 7: Correct pressures using Eqn (10). Use a pressure relaxation value of πΌπ = 0.4.
Cell 1: π1 = π1β + πΌππ1
β² = 0.0 + 0.6 β 3.1321 = 1.2529
Cell 2: π2 = π2β + πΌππ2
β² = 0.0 + 0.6 β 3.0754 = 1.2302
Cell 3: π3 = π3β + πΌππ3
β² = 0.0 + 0.6 β 2.8045 = 1.1218
Cell 4: π4 = π4β + πΌππ4
β² = 0.0 + 0.6 β 2.2175 = 0.8870
Cell 5: π5 = π5β + πΌππ5
β² = 0.0 + 0.6 β 1.1463 = 0.4585
STEP 8: Check for convergence. There are many possibilities here. One simple way is to compare velocity and
pressure differences of two consecutive iterations. Convergence is declared if the maximum of such
differences is less than a certain user specified tolerance value. It is preferred to use not just differences but
normalize them in a logical way, e.g. normalize the velocity differences with respect to the given inlet velocity.
It is always a good idea to select couple of critical monitoring points in the flow field and watch how variables
change at those points before declaring convergence.
If the convergence check fails go to Step 2 and perform one more iteration. Face and cell center velocities and
cell center pressures calculated in this iteration will be used in the next iteration.
The solution may also divergence, depending on how far the initial guess is from the exact solution, mesh
density and relaxation factors.
ITERATION 2:
You can use the MATLAB code NS_1D_Colocated.m available at the course web site to perform a full solution.
You can try different meshes, initial guesses, boundary condition implementations, relaxation factors, etc.
Results of the second iteration are given below for you to check the correctness of your hand calculations.
STEP 2:
π1π’ = 0.9200 οΏ½ΜοΏ½1 = 1.0000 π’1
β = 1.0209
π2π’ = 0.7600 οΏ½ΜοΏ½2 = 1.2526 π’2
β = 1.0707
π3π’ = 0.6000 οΏ½ΜοΏ½3 = 1.6537 π’3
β = 1.1736
π4π’ = 0.4400 οΏ½ΜοΏ½4 = 2.4181 π’4
β = 1.3195
π5π’ = 0.2800 οΏ½ΜοΏ½5 = 3.7911 π’5
β = 1.5079
13
STEP 3:
ππ1π’ = 1.0000 οΏ½ΜοΏ½π1 = 0.8737 π’π1
β = 1.0000
ππ2π’ = 0.8400 οΏ½ΜοΏ½π2 = 1.1263 π’π2
β = 1.1634
ππ3π’ = 0.6800 οΏ½ΜοΏ½π3 = 1.5043 π’π3
β = 1.5043
ππ4π’ = 0.5200 οΏ½ΜοΏ½π4 = 2.0640 π’π4
β = 2.0640
ππ5π’ = 0.3600 οΏ½ΜοΏ½π5 = 3.0664 π’π5
β = 3.0664
ππ6π’ = 0.2000 οΏ½ΜοΏ½π6 = 4.7967 π’π6
β = 4.7957
STEP 4: STEP 5: STEP 6: STEP 7:
π1β² = β0.5818 π’π1 = 1.0000 π’1 = 1.0505 π1 = 1.0201
π2β² = β0.6141 π’π2 = 1.1905 π’2 = 1.0641 π2 = 0.9845
π3β² = β0.5645 π’π3 = 1.4706 π’3 = 1.0774 π3 = 0.8960
π4β² = β0.2934 π’π4 = 1.9231 π’4 = 1.0835 π4 = 0.7996
π5β² = β0.5084 π’π5 = 2.7778 π’5 = 1.7926 π5 = 0.6619
π’π6 = 5.0000
Converged Solution with 5 cells
14
Converged Solution with 100 cells