1D Colocated SIMPLE Solution
1D Colocated SIMPLE Solution
, pressure values that we will obtain by setting exit pressure to zero will
be gage pressures. To obtain absolute values we can add
2
2
= constant
Mass flow rate inside the nozzle is constant and its value is known due to the given inlet speed
=
= 0.5kg s
Using this value we can calculate the speed at any point inside the nozzle. Exit speed is
= 5 m s
= 0.5 m
2
= 1 m/s
= 0.1 m
2
= 0 Pa
= 2 m
= 1 kg/m
3
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]
[m
2
]
[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
= ()
= ()
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
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
= 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
With these, Eqn (3) for cell 1 becomes (modified terms are shown in red)
)
where
= 0
max(
, 0)
max(
, 0)
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.
Pressure gradient term can be discretized to make use of the given
value.
=
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
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
,
and
1
or
.
L R
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
=
5
+
4
2
,
=
5
2
Also (
) term of Eqn (6) can be expressed in terms of the known exit pressure as
(
5
)
1/2
which comes from
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 ,
4 5
1 2
P E
7
Modification for cell 5:
. Instead of using (
)
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
=
)
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
(
2
)
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
)
1/2
where
= 0
Correct Pressures
(10)
where
is the pressure of the previous iteration (or the initial guess) and
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
= ()
= 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
is
[
0.42 0 0 0 0
0.42 0.34 0 0 0
0 0.34 0.26 0 0
0 0 0.26 0.18 0
0 0 0 0.18 0.1
]
=
{
0.5
0
0
0
0 }
=
{
1.1905
1.4706
1.9231
2.7778
0.5000}
10
STEP 3: Calculate face velocities using Rhie-Chow interpolation and
1
= 1.0
Face 2:
2
=
1
+
2
2
= 1.2129 ,
+
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
= 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
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
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
+
4
2
= 1.9778 ,
=
5
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:
= (1)(1.1064)(0.42) = 0.4647
= (1)(1.1357)(0.34) = 0.3862
= 0.8509
RHS value:
= (1)(1.1357)(0.34) = 0.3862
= (1)(1.1880)(0.26) = 0.3089
= 0.6950
RHS value:
= (1)(1.1880)(0.26) = 0.3089
= (1)(1.3111)(0.18) = 0.2360
= 0.5449
RHS value:
= (1)(1.3111)(0.18) = 0.2360
= 0.0
+2
= 0.5338
RHS value:
is
[
0.4647 0.4647 0 0 0
0.0467 0.8509 0.3862 0 0
0 0.3862 0.6950 0.3089 0
0 0 0.3089 0.5449 0.2360
0 0 0 0.2360 0.5338
]
=
{
0.0264
0.0783
0.0767
0.0715
0.0885}
=
{
3.1321
3.0754
2.8045
2.2175
1.1463}
STEP 5: Correct face velocities using Eqn (8).
Face 1:
1
= 1.0 (No correction for the inlet velocity)
Face 2:
2
=
(
2
3
=
(
3
4
=
(
4
5
=
(
5
6
=
)
0.5
= 1.5867 1.4889
(0.01.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
(
2
+
2
(
3
+
3
(
4
+
4
(
5
+
5
= 0.4.
Cell 1:
1
=
1
= 0.9200
1
= 1.0000
1
= 1.0209
= 0.7600
2
= 1.2526
2
= 1.0707
= 0.6000
3
= 1.6537
3
= 1.1736
= 0.4400
4
= 2.4181
4
= 1.3195
= 0.2800
5
= 3.7911
5
= 1.5079
13
STEP 3:
= 1.0000
1
= 0.8737
= 1.0000
= 0.8400
2
= 1.1263
= 1.1634
= 0.6800
3
= 1.5043
= 1.5043
= 0.5200
4
= 2.0640
= 2.0640
= 0.3600
5
= 3.0664
= 3.0664
= 0.2000
6
= 4.7967
= 4.7957
STEP 4: STEP 5: STEP 6: STEP 7:
= 0.5818
1
= 1.0000
1
= 1.0505
1
= 1.0201
= 0.6141
2
= 1.1905
2
= 1.0641
2
= 0.9845
= 0.5645
3
= 1.4706
3
= 1.0774
3
= 0.8960
= 0.2934
4
= 1.9231
4
= 1.0835
4
= 0.7996
= 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