1D Colocated SIMPLE Solution

14
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/m 3 . 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 m 2 = 1 m/s = 0.1 m 2 = 0 Pa = 2 m = 1 kg/m 3

Transcript of 1D Colocated SIMPLE Solution

Page 1: 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

Page 2: 1D Colocated SIMPLE Solution

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

Page 3: 1D Colocated SIMPLE Solution

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.

Page 4: 1D Colocated SIMPLE Solution

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

Page 5: 1D Colocated SIMPLE Solution

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 = 𝑒𝑖𝑛

Page 6: 1D Colocated SIMPLE Solution

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

Page 7: 1D Colocated SIMPLE Solution

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

Page 8: 1D Colocated SIMPLE Solution

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)

Page 9: 1D Colocated SIMPLE Solution

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}

Page 10: 1D Colocated SIMPLE Solution

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

Page 11: 1D Colocated SIMPLE Solution

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.

Page 12: 1D Colocated SIMPLE Solution

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

Page 13: 1D Colocated SIMPLE Solution

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

Page 14: 1D Colocated SIMPLE Solution

14

Converged Solution with 100 cells