0% found this document useful (0 votes)
3 views26 pages

CFD Project 4

The document outlines a project focused on solving the Navier-Stokes equations for lid-driven cavity flow using the Finite Volume Method. It details the problem setup, boundary conditions, numerical methods, and mesh requirements for achieving accurate results. The project aims to predict velocity and pressure fields, plot steady-state conditions, and visualize velocity streamlines for varying grid sizes.

Uploaded by

cjanvi781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views26 pages

CFD Project 4

The document outlines a project focused on solving the Navier-Stokes equations for lid-driven cavity flow using the Finite Volume Method. It details the problem setup, boundary conditions, numerical methods, and mesh requirements for achieving accurate results. The project aims to predict velocity and pressure fields, plot steady-state conditions, and visualize velocity streamlines for varying grid sizes.

Uploaded by

cjanvi781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ME 605 | Computational Fluid Dynamics

PROJECT-4
COMPUTATIONAL SOLUTION OF NAVIER-STOKES
EQUATIONS: LID DRIVEN CAVITY FLOW
Date of Submission: 20th November 2025
Problem Statement:
The flow domain is a unit square of length 1 unit. Let u and v the fluid velocities along x and y
directions, respectively. The flow in the square cavity is driven by the top wall moving to the right at a
constant velocity u(x, 1) = [Link] case is commonly referred to as the lid-driven cavity flow.

The boundary conditions are:

Left, right and bottom walls: 𝑢 = 0 ; 𝑣 = 0


Top wall: 𝑢 = 1; 𝑣 = 0

The initial condition is: 𝑢(𝑥,𝑦) = 0 and 𝑣(𝑥,𝑦) = 0



The kinematic viscosity 𝜈 of the fluid can be taken as 0.01.

1. Using Finite Volume Method and Rhie-Chow interpolation method, write a computer program to
computationally solve the incompressible 2-D Navier-Stokes equations and predict the velocity and
pressure fields. You can solve the unsteady form of the Navier-Stokes equations but your goal is to
obtain the steady-state solution.

2. Plot the steady-state 𝑢,𝑣 and p along the 𝑥 = 0.5 and 𝑦 = 0.5 centerlines.

3. Show the velocity streamlines for the various grid sizes you have considered.

Mesh Details:
4.3.1 Spatial Meshing (2D Domain)

For the incompressible lid-driven cavity flow considered in this project, the computational domain is
a unit square, defined as x ∈[0 , 1] m and y ∈[0 ,1] m. Although one might initially assume that the
flow exhibits quasi-one-dimensional behaviour, the presence of secondary vortices, recirculating
regions, and strong velocity gradients generated by the motion of the top lid make it necessary to
perform a full two-dimensional spatial discretisation. A structured 2D grid is therefore employed to
correctly resolve these flow features.

A uniform grid consisting of N x × N ynodes is used, where N x =N y =N . The domain is discretised


uniformly in both the x - and y -directions:

x ∈[0 , 1] m , y ∈[0 , 1] m .

The uniform grid spacing is given by:

1
Δ x =Δ y= .
N−1
The node locations are then assigned as:

x i=x 0 +(i−1) Δ x , i=1 ,2 , … , N ,y j= y 0 +( j−1) Δ y , j=1 , 2 ,… , N .

Accurate resolution of the lid-driven cavity requires particular attention to the regions near solid walls
and around the primary vortex core, where sharp velocity gradients develop. A sufficiently fine mesh
(i.e., large N ) is therefore essential. Since the first-order upwind discretisation used for the convective
terms introduces numerical diffusion, a finer spatial grid significantly improves the accuracy of the
final solution by reducing artificial smearing of flow features.

(1) Convective Stability Limit — CFL Condition

The Courant–Friedrichs–Lewy (CFL) condition ensures that fluid particles do not travel more than
one control-volume length in a single time step. For a uniform grid, the convective stability constraint
is:

CFL ⋅ Δ x
Δ t conv =
max ⁡ (∣u i , j ∣+ ∣v i , j ∣)
i, j

where:

 Δ x is the control-volume width,

 ∣ui , j ∣, ∣ v i , j ∣are the local velocity components,

 CFL is typically chosen in the range 0.2 ≤ CFL ≤0.5 for safety.

This constraint reflects the wave-propagation or information-travel limit for an explicit finite-volume
method.

(2) Viscous (Diffusive) Stability Limit

The explicit discretisation of the viscous Laplacian introduces an additional restriction, often much
more severe at low Reynolds numbers. For a 2D Cartesian grid, the diffusive stability condition is:
2
Δx
Δ t diff =

where:

 ν is the kinematic viscosity (in this project, ν=0.01).

Because the viscous term contains a second derivative, its stability limit scales with Δ x 2, making it
the governing restriction on fine grids.

(3) Final Time Step Selection


For the explicit predictor step used in this project, the time step must satisfy both constraints
simultaneously:

Δ t=min ⁡(Δ t conv , Δ t diff )


¿ ¿
This ensures stability of the predicted velocities (u , v )before pressure correction.

In practice, the diffusive limit typically dominates for the lid-driven cavity at moderate Reynolds
numbers.

(4) Fully Expanded Formula for This Project

On a uniform grid with Δ x =Δ y=1 /(N−1):

CFL 1 1
2
Δ t conv = Δ t diff = ( )
(N−1) max ⁡( ∣u ∣+∣ v ∣) 4 ν N −1

Thus, the final expression becomes:

Δ t=min ⁡¿
where:

 N is the number of grid nodes per direction,


 ν=0.01for this project,
 the velocity maximum is taken over the entire domain each iteration.

In the Finite Volume Method, the physical domain is divided into many small control volumes (CVs),
and the conservation equations are applied to each one. The type of grid used to create these control
volumes has an important effect on the accuracy and stability of the solution. In general, grids can be
of three types. Structured grids have a regular, ordered layout, which makes it easy to identify
neighbouring cells and simplifies the numerical calculations. Unstructured grids can have irregular
shapes and connectivity, allowing them to fit complicated geometries, but they require more complex
handling. Hybrid grids use both structured and unstructured regions to get the advantages of each.

Creating a good mesh is an important part of any FVM simulation, because the size and arrangement
of the control volumes directly affect how well the fluxes across the faces can be computed. For the
work in this project, we use a uniform structured mesh, where all control volumes are the same size
and evenly spaced. This makes the implementation much simpler, helps avoid numerical errors that
come from irregular cells, and also makes grid refinement easier.

In FVM, the governing equations are integrated over each control volume, and the fluxes across the
CV faces are approximated using values interpolated from the centre of the cells. This leads to a set of
algebraic equations that relate each CV to its neighbours, forming the system that is solved to obtain
the velocity and pressure fields.

Discretization Approach:
Finite Volume Method:
The Finite Volume method starts from the integral form of the conservation laws and partitions the
domain into contiguous control volumes (CVs). Unknowns are stored at CV centroids and
interpolation is used to express face values in terms of these nodal values. Surface and volume
integrals (fluxes and sources) are approximated with quadrature rules, yielding one algebraic equation
per CV that couples neighbouring nodes. FV is conservative by construction) and readily handles
arbitrary, complex grids because control volumes need not align with any coordinate system

Two principal strategies govern the relationship between the grid and the computational nodes:

1. Cell-Centred Schemes: The customary approach involves defining the CVs first and
subsequently assigning the computational node to the centroid of the CV. This placement
ensures that the nodal value represents the mean of the CV volume to a higher accuracy
(specifically, second-order) compared to the alternative. This is the dominant variant adopted
in this study.

2. Cell-Vertex Schemes (Structured Grids): Alternatively, nodal locations can be defined first,
with the CVs constructed around them such that the CV faces lie precisely midway between
adjacent nodes. The key advantage of this approach is that it yields more accurate Central
Differencing Scheme (CDS) approximations for derivatives evaluated at the CV faces, owing
to the equidistant spacing between nodes and faces.

Global Conservation Principle

The integral conservation equation is inherently applicable to every individual control volume, as well
as to the overall solution domain. A major advantage of the FVM is that global conservation is
intrinsically satisfied. When the algebraic equations for all CVs are summed, the surface integrals
evaluated over the shared internal faces of adjacent CVs cancel each other out. This characteristic
ensures that the resulting system of equations satisfies the global conservation equation.
❑ ❑ ❑

∫ ρϕv . n ds=∫ Γ gradϕ. n ds +∫ q ϕ d Ω


S s Ω

Approximation of Surface Integrals

In a two-dimensional finite-volume grid, each control volume (CV) is bounded by four planar faces.
These faces are conventionally identified using lower-case letters associated with their orientation
relative to the central node P: the east (e ), west (w), north (n), and south (s)faces.

A key component of the discretization procedure is the evaluation of the net flux across the CV
boundary. This net flux is obtained by summing the surface integrals over all four CV faces. In
general form, the surface contribution may be written as:

∫ fds=∑ ∫ f ⋅n dA
s f Sf

Here, f denotes the flux vector, which may represent convective transport ( ρϕ v ⋅n )or diffusive
transport (Γ ∇ ϕ ⋅ n). The vector n is the outward-pointing unit normal to the respective CV face.
Under the assumption that the velocity field v and material properties (ρ , Γ )are known, typically from
the previous iteration or time level; the only unknown appearing in the flux expression is the
transported variable ϕ .Each CV face is shared by exactly two adjacent control volumes, one on either
side of the face. This arrangement guarantees that the flux leaving one CV enters the neighbouring CV
with equal magnitude and opposite sign.

Fig. A typical CV and the notation used for a Cartesian 2D grid

To evaluate the surface integral exactly, the flux vector f would need to be known at every point on the
surface S f . This is not computationally feasible, because the numerical method only provides values
of the transported variable ϕ at the cell centres. The most straightforward and widely used method for
approximating the surface integral is the midpoint rule. This approach estimates the integral as the
product of the flux value at the cell-face centre—serving as an approximation to the average value
over the face—and the face area:

∫ f ⋅n dA ≈ f e Sf
Sf

Provided that the value f eat the face center is known, this approximation achieves second-order
accuracy. However, the value of f eis not directly available because the governing equations are solved
only at the cell centers. Therefore, f emust be determined by interpolating from the adjacent nodal
values. To maintain the intrinsic second-order accuracy of the midpoint rule, the interpolation
procedure used to compute f emust also be of at least second-order accuracy.

Interpolation of Variables for Flux Calculation

In the Finite Volume Method, evaluating surface and volume integrals requires variable values at
locations other than the control-volume centres. The integrand f typically consists of either:

 Convective flux: f C =ρϕ v ⋅n

 Diffusive flux: f D =Γ ∇ ϕ ⋅ n

The velocity field (v)and material properties (ρ , Γ )are assumed known. Thus, to compute both
convective and diffusive fluxes at a CV face (e.g., the east face e ), two quantities must be estimated:

The face value of the transported variable ϕ .

1. The normal gradient of ϕ at the face.


Because these values are not directly available at the cell faces, they must be interpolated from the
neighbouring cell-centre values.

Linear Interpolation

Linear interpolation assumes that the transported variable ϕ varies linearly between adjacent cell
centres. On a uniform grid, the value at a typical face (e.g., the east face e ) is obtained by simply
averaging the neighboring node values:

1
ϕ e ≈ (ϕ P + ϕ E )
2
Similarly:

1 1 1
ϕ w ≈ (ϕW + ϕ P ), ϕn ≈ (ϕ P +ϕ N ), ϕ s ≈ ( ϕ S +ϕ P)
2 2 2
This method is second-order accurate on uniform grids and is commonly used for evaluating diffusive
fluxes and central-difference formulations.

Upwind Interpolation

Approximating ϕ e , by its value at the node upstream of 'e' is equivalent to using a backward or
forward difference approximation for the first derivative (depending on the flow direction), hence the
name upwind differencing scheme (UDS) for this approximation. In UDS, ϕ e , is approximated as: For
the east face:

ϕ P , ṁe ≥ 0
ϕ e ={
ϕ E , ṁe <0

Similarly, for the other faces:

ϕ , ṁw ≥ 0 ϕ , ṁn ≥0 ϕ , ṁs ≥ 0


ϕ w ={ W ϕ n={ P ϕ s ={ S This is the only approximation that
ϕ P , ṁw <0 ϕ N , ṁn< 0 ϕ P , ṁs <0
unconditionally satisfies the boundedness criterion i.e. it will never yield oscillatory solutions.
However, it achieves this by being numerically diffusive. The UDS approximation retains only the
first term on the right-hand side, so it is a first-order scheme.

First-order upwind finite-difference scheme (UDS)

An upwind-biased derivative is a one-sided finite approximation of a first derivative at a face that


gives dominant weight to the upstream cell value(s) (the cell(s) from which the flow approaches the
face). In the 5-point stencil that means that when evaluating the gradient at a face (for example the
west face w), the formula is constructed so that upstream nodes (those on the side the flow comes
from) receive larger coefficients than downstream nodes.

The upwind bias enforces directional information propagation, ensuring stable and bounded solutions
in convection-dominated flows; however, it reduces formal order of accuracy to first order.
The 1st-order upwind biased derivative:

West face
∂ϕ 9 ϕ2−ϕ 3−8 ϕ w
∣ =
∂x w 3Δx

East face

∂ϕ 8 ϕ e + ϕ 2−9 ϕ 3
∣= North face
∂x e 3Δx

∂ϕ 8 ϕ n +ϕ 2−9 ϕ 4
∣=
∂y n 3Δy

South face

∂ϕ 9 ϕ s−ϕ 2−8 ϕ5
∣=
∂y s 3Δy

The Collocated Decoupling Problem and Pressure Poisson Equation Derivation

In incompressible flow, pressure is not obtained from an explicit evolution equation. Instead, it is
implicitly determined by enforcing the continuity constraint. By substituting the discretized
momentum equations into the discrete continuity equation, a Poisson equation for pressure can be
derived.

n
δ δp
( )=Q F
δ xi δ xi

Here, Q Frepresents the RHS the equation

When central differences are used for both the pressure gradient in the momentum equations and the
divergence in the continuity equation, the discretization acts directly on the cell-centred pressures
stored at the nodes P , E ,W , N , S , etc.

Applying a central-difference approximation to the outer derivative in Equation above gives:

1
2
[( p E −p W )−( p P− p WW )]+ …=Q F
Δx
Using central differences for the inner pressure derivatives as well produces:

1 1
2
( p EE−2 p P + p WW )+ 2
( p NN −2 p P + p SS)=Q F
Δx Δy
The stencil now links Pwith second neighbours (EE, WW, NN, SS) instead of the immediate
neighbours (E, W, N, S). As a result, the nearest-neighbour coupling is lost, and the pressure mesh
breaks into four independent subsets:

 cells reachable by two-step moves in both directions (P → EE → EEEE),

 cells reachable by vertical two-step moves (P → NN → NNNN),

 and similar combinations for the remaining two parity groupings.


This decoupling allows a checkerboard pressure field (alternating high/low values at adjacent cell
centres) to satisfy the equation because:

 p Eand pW do not appear,

 only the second neighbours p EE, pWW , etc., are used,

 the second derivative over 2 Δ x becomes zero for oscillatory fields.

Thus, the pressure equation effectively reduces to:

0=QF ,

and the momentum equations are driven only by the advective and viscous terms. The resulting
pressure field is non-physical, and the pressure–velocity coupling breaks down. This loss of coupling
caused by CDS on a collocated grid is known as pressure decoupling. To eliminate the decoupling
caused by the central-difference stencil linking only second neighbours, the pressure equation must be
modified to restore nearest-neighbour coupling. This is achieved by applying a first-derivative
approximation over a single grid spacing Δ x to the outer derivative in Equation.

The pressure equation is written in face-based form:

1 δp δp
[( ) −( ) ]=Q F
Δ x δx e δx w

Since pressure gradients are not directly available at the east and west faces, they are approximated
using cell-centre values:

δp p E − p P δp p P− pW
( )≈ ,( ) ≈ .
δx e Δx δx w Δx

Substituting:

1 p E − p P p P− pW p E−2 p P+ p W
[ − ]= 2
Δx Δx Δx Δx
Applying the same procedure in the y -direction gives the full, stable Poisson equation:

p E −2 p P + pW p N −2 p P + p S
2
+ 2
=QF
Δx Δy
Pressure Boundary Conditions

All four boundaries of the cavity are impermeable, no-slip walls. The velocity boundary conditions
specified in this project are:

Top lid: u=1, v=0 ,Left, right, bottom walls: u=0 , v =[Link] the normal velocity is zero
everywhere along the boundary, the cavity forms a closed domain through which no mass enters or
leaves. As a consequence, the absolute pressure cannot be imposed directly at any boundary; instead,
the pressure field must develop internally to satisfy the divergence-free constraint enforced through
the pressure–correction equation.

Homogeneous Neumann condition:


∂p
∣ =0
∂ n wall

which states that the pressure does not vary in the direction normal to the wall.
On a stationary or moving solid wall, the normal velocity is zero ( un =0). The normal momentum
equation when simplified in the absence of body forces, reflects that the normal pressure gradient
must vanish. This holds true for both stationary walls and the moving lid.
Although the lid moves tangentially (u=1), it does not produce a normal component of acceleration;
∂p
thus ¿ 0 is valid.
∂n

Choice of Variable Arrangement on the Grid:


When formulating numerical solutions for fluid flow, one of the fundamental considerations in the
discretization process is the choice of locations within the computational domain at which the
dependent variables are stored. Although seemingly straightforward, this decision carries substantial
implications for the stability, accuracy, and overall performance of the numerical scheme. Various grid
arrangements are available, each possessing distinct structural and computational characteristics that
influence the discretization of spatial derivatives and the coupling of governing equations. These
considerations become particularly critical when solving tightly coupled vector-field equations such
as the Navier–Stokes equations, where the distribution of pressure and velocity unknowns directly
affects the fidelity of the solution and the robustness of the numerical algorithm.

Collocated Variable Arrangement

In a collocated variable arrangement, all primary flow variables—such as the velocity components,
pressure, and any transported scalars—are stored at the same set of grid locations, typically at the
centres of the control volumes.

This means that every computational cell contains a complete set of unknowns, and the same control-
volume geometry is used for all governing equations. All variables share a common location, the
formulation of the discretized equations becomes more uniform, and the number of distinct
interpolation or transformation expressions required by the solver is reduced. This also streamlines
data structures and memory management, which is advantageous when implementing algorithms on
complex grids or when applying multigrid acceleration techniques. A practical benefit of the
collocated approach emerges when dealing with complex geometries. In such cases, boundaries may
include sharp corners, slope discontinuities, or non-smooth transitions. A collocated arrangement
avoids placing variables at geometric singularities, which can occur in other layouts such as the
staggered grid, leading to complications or inaccuracies in the discretized equations.
Discretization Details:
Governing Equations
Continuity Equation:
❑ ❑

∫ ρ ∂ V +∫ ρ ( ⃗v . n^ ) dA=0
∂ t CV CS

If the density is assumed to be constant


∫ ( ⃗v . n^ ) dA=0
CS

Midpoint Method

The midpoint rule is a numerical integration technique in which the value of an integrand is evaluated
at the centroid (midpoint) of the integration domain and multiplied by the domain’s measure. For a
surface integral over a face S, the midpoint approximation takes the form

∫ f (x ) dA ≈ f (x centre ) A S .
S

When used in the context of the finite volume method, this yields a second-order accurate
approximation Applying this to the closed surface C Sof a control volume:

∫ ( ⃗v . n^ ) dA= ∑ ∮ ( ⃗v . n^ ) dA
CS e ,w , n, s faces

∮ ( ⃗v . n^ ) dA +∮ ( ⃗v . n^ ) dA+∮ ( ⃗v . n^ ) dA +∮ ( ⃗v . n^ ) dA
e w n s

ue A e −uw A w + v n A n−v s A s = 0

Where,

 ue = x-velocity at the east face (normal to east face),

 uw = x-velocity at the west face,

 v n= y-velocity at the north face (normal to north face),

 v s= y-velocity at the south face,

 Ae = A w =Δ y , A n= A s=Δ x on a Cartesian grid.

So, the flux balance is:

ue Δ y −uw Δ y + v n Δ x−v s Δ x=0.

Dividing by the cell area V = Δ x Δ y ,


ue −uw v n−v s
+ =[Link] follows because dividing the previous equation by Δ x Δ y gives exactly the
Δx Δy
above.

Express face velocities with cell-centre values (interpolation)

On a collocated cell-centred uniform grid the face values must be obtained from neighbouring cell
centres. Two common options:

Linear (central) interpolation (2nd order)

East face between cell P=(i , j)and E=(i+1 , j) :

ui , j +ui +1 , j
ue ≡u 1 ≈ .
i+ , j
2
2

West face:

ui−1 , j +ui , j
uw ≡u 1 ≈ .
i− , j
2
2

North face (between Pand N=(i , j+ 1)):

v i, j + v i , j +1
vn ≡ v 1 ≈ ,
i , j+
2
2

South face:

v i , j−1 +v i , j
vs ≡ v 1 ≈ .
i , j−
2
2

Substitute these into the flux balance and divide by V = Δ x Δ y to get the discrete divergence in terms
of cell-centred values:

1 ui +1 , j +u i , j ui , j+ ui−1 , j 1 v i , j +1+ v i , j v i , j + v i , j −1
( − )+ ( − )=0.
Δx 2 2 Δy 2 2
Simplify the algebra (combine terms):

ui+1 , j−u i−1, j v i , j+1 −v i , j−1


+ =0
2Δx 2Δy
This is the central-difference form of discrete divergence at the cell centre (second-order accurate).

Momentum Equation:
x- momentum equation
❑ ❑ ❑

∂t
∫ ρvdV +∫ ρv(¿ ⃗v . n^ )dA=−∫ ∂∂ Px dV +∫ μ ∇ 2 vdV ¿
cs CV CV


Considering
∂t
∫ ρvdV
Using the Backward Euler scheme, the time derivative at time level n+1 is approximated as:
n+1 n +1 n
∂ uP u P −u P
( ) ≈
∂t Δt
Therefore, the discretised transient term becomes:
n +1 n

n+ 1
u P −uP
[ ∫ ρ u dV ] =ρ ∆ x ∆ y . ¿
∂t V P
Δt

Considering ∫ ρu(¿ ⃗v . n^ ) dA ¿
cs

❑ ❑ ❑ ❑ ❑

∫ ρu(¿ ⃗v . n^ ) dA=∫ ρu(¿ ⃗v . n^ ) dA +∫ ρu(¿ ⃗v . n^ ) dA+∫ ρu( ¿ ⃗v . n^ )dA +∫ ρu(¿ ⃗v . n^ )dA ¿ ¿ ¿ ¿ ¿


cs e w n s

Using Linear Interpolation to obtain face normal velocities:

(Cell-centred variables: ui , j , v i , j , pi , j ¿

face 1
ue ¿u 1 ≈ (ui , j +ui+1 , j ),
i+ , j
2
2
1
uface
w ¿ u 1 ≈ (ui−1 , j+u i , j),
i− , j 2
2
2) Face mass fluxes
face 1
un ¿ v 1 ≈ (v i , j +v i , j+ 1),
i , j+
2 2
1
uface
s ¿ v 1 ≈ (v i , j−1 +v i , j ).
i , j−
2
2
face face face face
ṁe =ρ ue A e , ṁw =u w A w , ṁn =ρ un An , ṁs= ρus A s
face face face face
ṁe = u e ∆ y , ṁw =uw ∆ y , ṁn= u n ∆ x , ṁs=us Δx

for X-momentum, the transported variable is u

 East face value ue

u i , j , ṁe ≥ 0 ,
ue ={
ui+1 , j , ṁe < 0.

 West face uw :

u , ṁw ≥0 ,
uw ={ i−1 , j
u i , j , ṁw < 0.

 North face un :

v i , j , ṁn ≥ 0 ,
un ={
vi , j +1 , ṁn < 0.

 South face u s:
v i , j−1 , ṁs ≥ 0 ,
u s={ Net convective flux for cell P(i , j) :
v i , j , ṁs < 0.

Conv x = ṁe ue − ṁw u w + ṁn un − ṁs us

Moving all terms to left-hand side and collecting coefficients of u p , ue …. The simple convective
contributions are:

 To neighbour coefficients
(conv) (conv) (conv) (conv)
aE =max ⁡(−ṁe , 0), aW =max ⁡( ṁw , 0) , a N =max ⁡(−ṁn , 0), a S =max ⁡( ṁs , 0).

 To diagonal
a P=a E +aW + a N +a S

Therefore, the final equation becomes:


( conv )
Conv x =aE ( u E )+ a(Wconv) ( uW )+ a(Nconv) ( u N ) + a(Sconv ) ( uS ) + a(Pconv) (u P ¿ ¿ )

Considering ∫ μ ∇ vdV
2

CV

❑ ❑ ❑ ❑

∫ μ ∇2 vdV =∫ μ⃗
∇ v . n^ dA=μ ∫ ⃗
∇ v . n^ dA=μ ∑ ∫ ⃗
∇ v . n^ dA
CV CS CS faces

[ ]
n n n n
∂u ∂u ∂u ∂u
μ ¿e Ae− ¿ w Aw+ ¿n An− ¿ s As
∂x ∂x ∂y ∂y

Approximate normal derivative at each face by a central difference between adjacent cell-centres:

 East face:
n n
∂u
n
u E −u P
¿e = .
∂x Δx
 West face:
n n
∂u
n
u P −uW
¿w = .
∂x Δx
 North face:
n n
∂u
n
u N −uP
¿n = .
∂y Δy
 South face:
n n
∂u
n
u P −u S
¿s = .
∂y Δy
Summing diffusive flux through all faces:
n n n n n n n n
uE −u P u P −uW uN −u P u P −u S
μ A e−μ +μ −μ
Δx Δx Δy Δy
n n n n n n
μ(u¿ ¿ E ¿¿ n−u P ) Δ y−μ ¿ ¿ (u P −uW ) Δ y+ μ (u N −u P )Δ x −μ(u¿ ¿ P¿ ¿ n−u S )Δ x ¿ ¿

These are the standard finite-volume diffusive flux approximations using central differences —
second-order accurate on uniform grid.

It is common to express diffusive contributions via conductance D f :

μ Ae Δy
F e= =μ =F w
Δx Δx
μ An Δx
F n= =μ ¿
Δy Δy s
Thus, the net diffusive flux becomes:

Diff x =F e (uE −u P)+ F w (uW −uP )+ F n (u N −u P )+ F s (uS −uP )

Moving all terms to left-hand side and collecting coefficients of u P, u E, etc. The diffusion contribution
is given as:

 to neighbour coefficients:
(diff) (diff ) (diff ) (diff )
a E =F e , aW =F w , aN =F n , a S =F s .

 to diagonal:
(diff)
a P =−(F ¿ ¿ e + F w + F n + F s) ¿Therefore, the final equation becomes:
( diff ) ( diff )
Diff x =a E ( u E ) + aW ( uW ) + a(Ndiff) ( u N ) + a(Sdiff ) ( uS )+ a(Pconv) (u P ¿ ¿ )
The x-momentum equation neglecting the pressure term:

n+1 n
u P −u P ( conv ) ( ) ( )
ρ∆ x∆ y =a E ( u E ) + aWconv ( uW ) + aNconv ( uN ) +¿
Δt

( conv )
aS ( u S ) + a(Pconv ) ( uP ) + a(Ediff) ( u E ) +aW(diff ) ( u W ) +a (Ndiff ) ( u N ) +¿

( diff )
aS ( u S ) + a(Pconv ) (u P)

Where, a E =¿ a (Econv )+a (Ediff ) ; a w =¿ a (wconv )+a (wdiff ) ; a N =¿ a (Nconv )+a (Ndiff ) ; a S=¿ a (Sconv )+a (Sdiff )

n+1 n
u P −u P
ρ∆ x∆ y =a E ( u E ) +a W ( uW ) +a N ( u N ) + a S ( u S ) + aP ( u P )
Δt

∂P
Considering ∫ dV
CV ∂x

(Rhie–Chow Multistep Method)

For incompressible flow, the continuity equation must always be satisfied:

∫ ( ⃗v . n^ ) dA= ∑ ∮ ( ⃗v . n^ ) dA=0
CS e ,w , n, s faces

In the collocated finite-volume method, we do not have face velocities directly — so we must express
them in terms of cell-centred pressure and velocity values. This is achieved through the Rhie–Chow
interpolation to link pressure and velocity The governing pressure equation is obtained by enforcing
continuity on the corrected velocity field.

Predictor step

At the predictor step, the new pressure pn +1is unknown, so it is temporarily neglected. The
provisional velocity field is predicted as:
¿ n ❑
u −u ∂p
ρ∆ x∆ y =−convective+diffusive− ∆x∆ y
Δt ∂x
¿ n
u −u
ρ∆ x∆ y =−convective+diffusive . (1) ¿
Δt

After predicting u¿, the corrected velocity un +1is obtained by applying the updated pressure
n +1
p :
n+1 n n +1
u −u ∂p
ρ∆ x∆ y =−convective+diffusive− . ¿ (2)
Δt ∂x

Subtract (1) from (2):


n+1
un+1−u ¿ −1 ∂( p)
= .
Δt ρ ∂x
n+1
n +1 ¿ −Δ t ∂( p)
u −u =
ρ ∂x
The face velocities (used in continuity) are computed using Rhie–Chow interpolation, which blends
cell-centred velocities and pressure gradients.
n+1 n+1
1 ¿ ¿
n +1 ( pE −p P )
u = (u P +u E )−Δ t
e
2 ∆x

( )
n+1 n +1
n +1 1 ¿ ¿ p P − pW
uw = ( u P +uw ) −Δ t
2 ∆x
( )
n+1 n +1
1 ¿ ¿ pN − pP
n +1
2
( u N +u E ) −Δ t
un =
∆y
n +1 n+1
n +1 1 ¿ ¿ p P − pS
u s = ( u S +uE )− Δ t( )
2 ∆y
The discrete continuity equation for each control volume Pis:
(ue −u w ) Δ y+(v n−v s) Δ x=0 ¿ (3)
Substitute equations into (7):

Rearranging, we isolate the pressure correction terms on the left-hand side and predicted
velocity imbalance on the right:

( ) ( ) ( ) ( )
n+1 n+1 n+1 n +1 n+1 n+1 n +1 n+1
p −p P p − pW p − pP p − pS
∆t E Δ y −∆ t P Δ y +∆ t N Δ x−∆ t P Δx
∆x ∆x ∆y ∆y ¿
1 ¿ ¿ 1 ¿ ¿ 1 ¿ ¿ 1 ¿ ¿
¿ ( u P+ uE ) Δ y− ( u P +u w ) Δ y + ( u N +u P ) Δ x− ( u S +u P ) Δ x .
2 2 2 2

( ) ( )
n+1 n +1 n+1 n+1 n+ 1 n+1
pE −2 p P + p W p N −2 p P + p S Δy ¿ ¿ Δx ¿ ¿
∆t Δ y+ Δ x =¿ (u E−uW )+ (v N −v S )
∆x ∆y 2 2

Divide numerator and denominator by Δ x Δ y :


n +1 n+1 n+1 n +1 n+1 n+ 1
p E −2 p P + pW p N −2 p P + pS 1 Δy ¿ ¿ Δx ¿ ¿
Δt ( 2
)+ Δ t( 2
)= [ (u E−uW )+ (v N −v S )].
Δx Δy Δx Δ y 2 2

The RHS simplifies to central differences of predicted velocities:


¿ ¿ ¿ ¿
1 Δy ¿ Δx ¿ u −u v −v
[ (u E−u ¿W )+ (v N −v ¿S )]= E W + N S .
Δx Δ y 2 2 2Δx 2Δy
So, we obtain the Poisson form:
n +1 n+1 n +1 n+1 n +1 n+1 ¿ ¿ ¿ ¿
p E −2 p P + pW p N −2 p P + p S u E−u W v N −v S
Δt ( 2
+ 2
)= + .
Δx Δy 2 Δx 2 Δy
n+1 n +1 n+1 n+ 1 n+1 n+1 ¿ ¿ ¿ ¿
p E −2 p P + pW p N −2 p P + pS 1 u E−uW v N −v S
2
+ 2
= ( + )..Rearranging:
Δx Δy Δt 2Δx 2Δ y

1 n+1 1 n+1 1 n+1 1 n +1


2
p E + 2 pW + 2
pN + 2
pS
Δx Δx Δy Δy
¿ ¿ ¿ ¿
1 1 n +1 1 uE −uW v N −v S
−2 ( 2 + 2
) pP = ( + ),
Δx Δ y Δt 2 Δ x 2Δy

Rearrange to the standard form a P p P =a E p E + aW pW +a N p N +a S p S . The pressure contributions:

 neighbour coefficients:
1 1 1 1
aE= 2
, aW = 2 ,a N = 2
, a S= 2
,
Δx Δx Δy Δy
 to diagonal:

1 1
a P=2 ( 2
+ ),
2 Then the final equation becomes:
Δx Δ y
n+1 n +1 n+1 n+1
n+ 1 a E p E +aW pW + a N p N +a S p W
pP = .
aP

Similarly, y- momentum equation


❑ ❑ ❑
∂ ∂P
∂t
∫ ρvdV +∫ ρv(¿ ⃗v . n^ )dA=−∫ dV + ∫ μ ∇ 2 vdV ¿
cs CV ∂ y CV


Considering
∂t
∫ ρvdV
n+1 n
∂ v P −v P

∂t V
n+1
ρ v dV ¿ ¿ =ρ ∆ x ∆ y
Δt
P

Considering ∫ ρu(¿ ⃗v . n^ ) dA ¿
cs

( conv )
Conv y =a E ( v E )+ a(Wconv) ( v W ) +a (Nconv ) ( v N ) +a(Sconv ) ( v S ) + a(Pconv ) (v P ¿ ¿ )

Considering ∫ μ ∇ vdV
2

CV

Diff y =a (Ediff ) ( v E ) + a(Wdiff) ( v W ) +a (Ndiff ) ( v N ) +a (Sdiff ) ( v S ) + a(Pconv ) (v P ¿ ¿ )

The y-momentum equation neglecting the pressure term:

n+1 n
v P −v P ( ) ( ) ( )
ρ∆ x∆ y =aEconv ( v E ) +a Wconv ( v W ) + aNconv ( v N ) +¿
Δt

a (Sconv ) ( v S ) + a(Pconv) ( v P ) +a (Ediff ) ( v E ) +a(Wdiff ) ( v W ) +a (Ndiff ) ( v N ) +¿

a (Sdiff ) ( v S )+ a(Pconv ) (v P )

( conv ) ( diff ) ( conv ) ( diff ) ( conv ) ( diff ) ( conv ) ( diff )


Where, a E =¿ a E +a E ; a w =¿ a w +a w ; a N =¿ a N +a N ; a S=¿ a S +a S

n+1 n
u P −u P
ρ∆ x∆ y =a E ( v E ) + aW ( v W ) +a N ( v N ) + aS ( v S ) + aP ( v P )
Δt

∂P
Considering ∫ dV
CV ∂y

n+1 n +1 n+1 n+1


n+ 1 a E p E +aW pW + a N p N +a S p W
pP =
aP

General Discretized X-Momentum Predictor Equations


n
( u^ P−u P )
h+[C x ( e)−C x (w)]+[C y (n)−C y (s )]=ν [D x (e)−Dx (w)+ D y (n)−D y (s)]
Δt
In this cell-centred arrangement, this cell with centre P is surrounded by its four neighbouring
cells, whose centres are labelled for reference as: East, West, North, and South. The interaction
between the central cell and its neighbours occurs across the cell faces (control volume
boundaries), which are named after their location relative to the cell centre: the east face (e), west
face (w), north face(n), and south face(s). The convective ( C n) and diffusive ( D n ) flux terms in
the momentum equations are evaluated at these faces (e.g., C(n) and D(n)), using interpolation
from the cell-centred values. The equation is evaluated at previous time step (n)
For auniform square mesh Δ x=Δ y =h.

1. Internal Node (P)

(e.g., cell (2,2))

u P + uE
2
uW +u P
2
v P + v N u P + uN v S +v P uS +u P
C x ( e ) =( ) C x ( w ) =( ) C y ( w )=( )( ) C y ( s )=( )( )
2 2 2 2 2 2

uE −u P uP −uW uN −u P uP −uS
D x ( e )=¿ D x ( w )=¿ D y ( n )=¿ D y ( s )=¿
h h h h

2. Left Wall Node (P)

(e.g., cell (1,2))

u P +u E
2
C x (w)=0 v P + v N uP +u N v S + v P uS + uP
C x (e )=( ) C y (n)=( )( ) C y (s )=( )( )
2 2 2 2 2

u E−u P 9 u P−u E u N −uP u P−u S


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h h h

3. Right Wall Node (P)


(e.g., cell (3,2))

C x (e )=0 uW +u P
2
v P + v N uP +u N v S + v P uS + uP
C x (w)=( ) C y (n)=( )( ) C y (s )=( )( )
2 2 2 2 2

uW −9 uP u P−uW u N −uP u P−u S


D x (e)= D x (w)= D y (n)= D y (s)=
3h h h h

4. Bottom Wall Node (P)

(e.g., cell (2,1))

u P +u E
2
uW +u P
2
v P + v N uP +u N C y (s )=0
C x (e )=( ) C x (w)=( ) C y (n)=( )( )
2 2 2 2

u E−u P u P−uW u N −uP 9 u P−u N


D x (e)= D x (w)= D y (n)= D y (s)=
h h h 3h

5. Top Wall Node (P)

(e.g., cell (2,3))

u P +u E
2
uW +u P
2
C y (n)=0 v S + v P uS + uP
C x (e )=( ) C x (w)=( ) C y (s )=( )( )
2 2 2 2

u E−u P u P−uW 8+u S −9 uP u P−u S


D x (e)= D x (w)= D y (n)= D y (s)=
h h 3h h

6. Bottom-Left Corner Node (P)

(e.g., cell (1,1))

u P +u E
2
C x (w)=0 v P + v N uP +u N C y (s )=0
C x (e )=( ) C y (n)=( )( )
2 2 2

u E−u P 9 u P−u E u N −uP 9 u P−u N


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h h 3h

7. Bottom-Right Corner Node (P)

(e.g., cell (3,1))

C x (e )=0 uW +u P
2
v P + v N uP +u N C y (s )=0
C x (w)=( ) C y (n)=( )( )
2 2 2
uW −9 uP u P−uW u N −uP 9 u P−u N
D x (e)= D x (w)= D y (n)= D y (s)=
3h h h 3h
8. Top-Left Corner Node (P)

(e.g., cell (1,3))

u P +u E
2
C x (w)=0 C y (n)=0 v S + v P u S + uP
C x (e )=( ) C y (s )=( )( )
2 2 2

u E−u P 9 u P−u E 8+u S −9 uP u P−u S


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h 3h h

9. Top-Right Corner Node (P)

(e.g., cell (3,3))

C x (e )=0 uW +u P
2
C y (n)=0 v S + v P u S + uP
C x (w)=( ) C y (s )=( )( )
2 2 2

uW −9 uP u P−uW 8+u S −9 uP u P−u S


D x (e)= D x (w)= D y (n)= D y (s)=
3h h 3h h

General Discretized Y-Momentum Predictor Equation

The general discretized equation for any cell P is:


n
( ^v P −v P)
h+[C x (e)−C x (w)]+[C y (n)−C y (s)]=ν ¿
Δt
A. Internal Node

1. Internal Node (P)

(e.g., cell (2,2))

( )( ) ( )( ) ( ) ( )
2 2
uW +u P v W +v P uW +u P v W +v P vP+ vN vS + vP
Cx (w)= Cx (w)= C y ( n )= C y ( s )=
2 2 2 2 2 2

v E−v P v P−v W v N −v P v P−v S


D x (e)= D x (w)= D y (n)= D y (s)=
h h h h

B. Wall-Adjacent Nodes (Non-Corner)

2. Left Wall Node (P)


(e.g., cell (1,2))

u P +u E v P+ v E C x (w)=0 vP+ vN
2
vS + vP
2
C x (e )=( )( ) C y (n)=( ) C y (s )=( )
2 2 2 2

v E−v P 9 v P−v E v N −v P v P−v S


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h h h

3. Right Wall Node (P)

(e.g., cell (3,2))

C x (e )=0 uW +u P vW + v P vP+ vN
2
vS + vP
2
C x (w)=( )( ) C y (n)=( ) C y (s )=( )
2 2 2 2

v W −9 v P v P−v W v N −v P v P−v S
D x (e)= D x (w)= D y (n)= D y (s)=
3h h h h

4. Bottom Wall Node (P)

(e.g., cell (2,1))

u P +u E v P+ v E uW +u P vW + v P vP+ vN
2
C y (s )=0
C x (e )=( )( ) C x (w)=( )( ) C y (n)=( )
2 2 2 2 2

v E−v P v P−v W v N −v P 9 v P−v N


D x (e)= D x (w)= D y (n)= D y (s)=
h h h 3h

5. Top Wall Node (P)

(e.g., cell (2,3))

u P +u E v P+ v E uW +u P vW + v P C y (n)=0 vS + vP
2
C x (e )=( )( ) C x (w)=( )( ) C y (s )=( )
2 2 2 2 2

v E−v P v P−v W 9 v P −v S v P−v S


D x (e)= D x (w)= D y (n)= D y (s)=
h h 3h h

C. Corner Nodes
6. Bottom-Left Corner Node (P)

(e.g., cell (1,1))

u P +u E v P+ v E C x (w)=0 vP+ vN
2
C y (s )=0
C x (e )=( )( ) C y (n)=( )
2 2 2

v E−v P 9 v P−v E v N −v P 9 v P−v N


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h h 3h

7. Bottom-Right Corner Node (P)

(e.g., cell (3,1))

C x (e )=0 uW +u P vW + v P vP+ vN
2
C y (s )=0
C x (w)=( )( ) C y (n)=( )
2 2 2

v W −9 v P v P−v W v N −v P 9 v P−v N
D x (e)= D x (w)= D y (n)= D y (s)=
3h h h 3h

8. Top-Left Corner Node (P)

(e.g., cell (1,3))

u P +u E v P+ v E C x (w)=0 C y (n)=0 vS + vP
2
C x (e )=( )( ) C y (s )=( )
2 2 2

v E−v P 9 v P−v E 9 v P −v S v P−v S


D x (e)= D x (w)= D y (n)= D y (s)=
h 3h 3h h

9. Top-Right Corner Node (P)

(e.g., cell (3,3))

C x (e )=0 uW +u P vW + v P C y (n)=0 vS + vP
2
C x (w)=( )( ) C y (s )=( )
2 2 2

v W −9 v P v P−v W 9 v P −v S v P−v S
D x (e)= D x (w)= D y (n)= D y (s)=
3h h 3h h
General Discretized Pressure Poisson Equation
The Left-Hand Side (LHS) contains the pressure terms and the Right-Hand Side (RHS) is the source
term from the divergence of the predictor velocity field.

1. Internal Node (P)

(e.g., cell (2,2))

P E−P P PP −PW P N −PP P P−P S


LHS: [ ]−[ ]+[ ]−[ ]
h h h h

ρ u^ P + u^ E u^ W + u^ P v^ P + v^ N v^ S + v^ P
RHS: [( )−( )+( )−( )]
Δt 2 2 2 2

2. Left Wall Node (P)

(cell (1,2))

P E−P P P N −P P P P−PS
LHS: [ ]−0+[ ]−[ ]
h h h

ρ u^ P + u^ E ^v P + v^ N v^ S + ^v P
RHS: [( )−0+( )−( )]
Δt 2 2 2

3. Right Wall Node (P)

(cell (3,2))

P P−P W P N −P P P P−PS
LHS: 0−[ ]+[ ]−[ ]
h h h

ρ u^ W + u^ P v^ P+ v^ N v^ S + v^ P
RHS: [0−( )+( )−( )]
Δt 2 2 2
4. Bottom Wall Node (P)

(cell (2,1))

P E−P P PP −PW P N −PP


LHS: [ ]−[ ]+[ ]−0
h h h

ρ u^ P + u^ E u^ W + u^ P v^ P + v^ N
RHS: [( )−( )+( )−0 ]
Δt 2 2 2
5. Top Wall Node (P)

(cell (2,3))

P E−P P PP −PW P P−P S


LHS: [ ]−[ ]+0−[ ]
h h h
ρ u^ P + u^ E u^ W + u^ P ^v S + ^v P
RHS: [( )−( )+0−( )]
Δt 2 2 2
6. Bottom-Left Corner Node (P)

(cell (1,1))

P E−P P P N −P P
LHS:[ ]−0+[ ]−0
h h

ρ u^ P + u^ E ^v P + v^ N
RHS: [( )−0+( )−0]
Δt 2 2
7. Bottom-Right Corner Node (P)

(cell (3,1))

P P−P W P N −P P
LHS: 0−[ ]+[ ]−0
h h

ρ u^ W + u^ P v^ P+ v^ N
RHS: [0−( )+( )−0]
Δt 2 2
8. Top-Left Corner Node (P)

(cell (1,3))

P E−P P PP −PS
LHS: [ ]−0+ 0−[ ]
h h

ρ u^ P + u^ E v^ S + v^ P
RHS: [( )−0+0−( )]
Δt 2 2

9. Top-Right Corner Node (P)

(cell (3,3))

P P−P W P P−PS
LHS:0−[ ]+ 0−[ ]
h h

ρ u^ W + u^ P v^ S + v^ P
RHS: [0−( )+ 0−( )]
Δt 2 2

U–Velocity Corrector Equations


The general form is:
n+1
n +1 Δt ∂ P
u P =u^ P− ( )
ρ ∂x P

1. Internal Column Nodes


(P = (2,1), (2,2), (2,3))

n +1 Δt P E−PW
u P =u^ P− [ ]
ρ 2h
2. Left Wall Nodes

(P = (1,1), (1,2), (1,3))

n +1 Δt −3 PP + 4 P E−P EE
u P =u^ P− [ ]
ρ 2h
3. Right Wall Nodes

(P = (3,1), (3,2), (3,3))

n +1 Δt 3 PP + PW −4 P WW
u P =u^ P− [ ]
ρ 2h

V–Velocity Corrector Equations


The general form is:
n+ 1
n+1 Δt ∂ P
v P = ^v P − ( ) 1. Internal Row Nodes
ρ ∂y P
(P = (1,2), (2,2), (3,2))

n+1 Δt P N −PS
v P = ^v P − [ ]
ρ 2h
2. Bottom Wall Nodes

(P = (1,1), (2,1), (3,1))

n+1 Δt −3 P P +4 PN −P NN
v P = ^v P − [ ]
ρ 2h
3. Top Wall Nodes

(P = (1,3), (2,3), (3,3))

n+1 Δt 3 P P + PS −4 P SS
v P = ^v P − [ ]
ρ 2h

You might also like