Numerical Solution of Fluid Flow: Nguyen Quang Khai

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

NUMERICAL SOLUTION OF FLUID FLOW

NGUYEN QUANG KHAI


ID:
201783551
NUMERICAL SOLUTION OF FLUID FLOW
The equations describing fluid flows are of partial differential equations (PDEs).
Finite difference method (FDM) is traditionally used for the numerical solution of the
flow equations

FUNDAMENTALS OF FDM

In FDM, derivatives are replaced by a proper difference formula based on the Taylor
series expansions of a function:

The first derivative can be written by re-arranging the terms:

Denoting all except the first terms by O (x) yields

The difference formula above is of order 1 with the truncation error being
proportional to x
To obtain higher order difference formula for the first derivative, Taylor series
expansion of the function is used from both side of x

Subtracting the second from the first equation yields

The difference formula above is of order 2 with the truncation error being
proportional to (x)2
TYPICAL DIFFERENCE FORMULAS

Typical difference formulas Space index form

Forward
One – dimension (1D)

First derivatives

Backwar
d

Centered
derivatives
Second
Centered

Typical difference formula Space index form

Forward
Two – dimension (2D)

First derivatives

Backwar
d

Centered
Centered
Second
derivatives
SOLVING TIME-INDEPENDENT PDES

1. Divide the computational domain into subdomains


2. Derive the difference formulation for the given PDE by replacing all
derivatives with corresponding difference formulas
3. Apply boundary conditions to the points on the domain boundaries
4. Apply the difference formulation to every inner points of the
computational domain
5. Solve the resulting algebraic system of equations

LINEAR SECOND-PHASE DIFFERENTIAL EQUATION

d2u 2
2
−u=−x 0≤ x≤1
dx
subject to the boundary conditions:
u(0) = 0 ; u(1) = 0
Solution:
1. Divide the x-domain into 4-subdomain, i.e ∆ x=0.25
∆ x=0.25

u0 u1 u2
u3 u4
2. Using the Centered difference for second derivatives (1D) we have:
d 2 u u 0−2 u1 +u2
=
d x2 ∆ x2
3. u0 =0; u 4=0
4.
u0−2 u1 +u2 2
2
−u1=−x 1
∆x
u1−2 u2 +u3 2
2
−u2=−x 2
∆x
u2−2 u3 +u4 2
2
−u 3=−x 3
∆x

−(2+∆ x 2) 1 0 u1 −x 21 ∆ x 2

( 1
0
−(2+ ∆ x2 )
1
1
−(2+∆ x 2) u3 )( ) ( )
u2 = −x 22 ∆ x 2
−x 23 ∆ x2
−2.0625 1 0 u1 −0.0039
( 1
0
−2.0625
1
1
)( ) (
u2 = −0.015625
−2.0625 u3 −0.035156 )

You might also like