Title: BASICS OF NUMERICS OF CFD: DISCRETIZATION METHODS
1BASICS OF NUMERICS OF CFD DISCRETIZATION
METHODS
- Patrick F. Mensah Sr. PhD
2Outline of Lecture
- Introduction
- Introductions to Finite Differences
- Difference Equations
- Explicit and Implicit Approaches
- Introductions to Finite Control Volume Approach
- Error and an Analysis of Stability
- Summary
3Introduction
- Replacing of PDE or integrals in the governing
equations with discrete numbers - Discretization of PDE-finite differences
- Discretization of integral form-finite volumes
- Transformation of coordinate systems and grid
system
4Computational Domain-Rectangular Coordinates
5Introduction
- Road map for descritization of PDEs
6Review of Taylor Series Approximation
- Taylor series expansion of a function f(x)
First guess (not very good)
Add to capture slope
Add to account for curvature
7Introduction to Finite Differences
- Interest is to replace PDE with suitable
algebraic difference quotient - Based on Taylors series expansions
- Example if ui,j denotes the x component of
velocity at a point (i,j)
8Introduction to Finite Differences
- Solving eqn (1) for to obtain first order
accurate difference equation
Finite- Difference representation
Truncation error
9Introduction to Finite Differences
- Subtracting eqn (2) from (1) for to obtain
second order accurate difference equation for
10Finite Difference Equations
- Summary of First Derivatives
- Two-Point Formulas-y derivative
11Finite Difference EquationsSecond Derivatives
- Summing of Taylor series expansions (1) and (2)
we have - Solving for and extending to
12Finite Difference EquationsMixed derivatives
- Taking derivative of eqns 2 and 3 with respect to
y and subtracting them
13Finite Difference EquationsMixed derivatives
- Solving for the mixed derivative term
14Finite Difference Expressions with their
Finite-difference Modules
15Finite Difference Expressions with their
Finite-difference Modules
16Finite Difference Expressions with their
Finite-difference Modules
17Finite difference quotient at boundaries
- For one direction polynomial approach
18Example 4.2 Text
19Example
- FDM for simple 1-D equation
20Explicit and Implicit Approaches Definitions and
Contrast
- Time marching solution of parabolic equation
21Explicit and Implicit Approaches Definitions and
Contrast
22Finite Difference Representations of Parabolic
Equations and their Solutions
- Consider the basic mathematical model for a
parabolic PDE - the following parabolic equation
23Finite Difference Representations of Parabolic
Equations and their Solutions
- Boundary Conditions
- Initial Conditions
24Finite Difference Representations of Parabolic
Equations and their Solutions
- In two or three space dimensions, analogous
equations apply
25Computational Domain- Note for 1-D y axis
represent time and ?y?t
26Finite Difference Representations of Parabolic
Equations and their Solutions
- Explicit Method
- Implicit Method
- A Generalization-The Theta Method
- The Crank-Nicholson Method
- Parabolic Equations in Two or Three Dimensions
- Nonlinear Parabolic Equations
27Finite Difference Representations of Parabolic
Equations Explicit Method
- Simplest way to represent PDE as a difference
equation - A central/forward difference replaces the time
derivative - A central difference replaces the space
derivative - Limitation on size of time step to avoid
instability
28Finite Difference Representations of Parabolic
Equations Explicit Method
- xo0, x1?x,,xii?x,,xm m?x l
- to0, t1?t,,tii?t,,tnn?t T
- Using central difference approximations
29Finite Difference Representations of Parabolic
Equations Explicit Method
- Substituting FDE into parabolic PDE and
simplifying - Permit calculation of dependent variable at next
time step from known values at current and
previous time step
30Finite Difference Representations of Parabolic
Equations Explicit Method
- Method is unstable because of negative term on
RHS and in general - Numerical procedure will be stable if p, q, and
r are positive and pqr1
31Finite Difference Representations of Parabolic
Equations Explicit Method
- For stability a forward difference formula is
used for the time derivative
32Finite Difference Representations of Parabolic
Equations Explicit Method
33Grid Points of Implicit and Generalized Methods
34Finite Difference Representations of Parabolic
Equations Implicit Method
- Finite-difference representation of Implicit
Scheme - At each time level algebraic equations are to be
solve simultaneously to determine nodal values of
the dependent variable at the next time level - Unconditionally stable
35Finite Difference Representations of Parabolic
Equations A Generalization-The Theta Method
36Finite Difference Representations of Parabolic
Equations A Generalization-The Theta Method
- ? is a weighting parameter 0 ? 1
- with ?0 we get the explicit methodO?t, (?x)2
- with ?0.5 we get the Crank-Nicholson method
O(?t)2, (?x)2 - with ?1 we get the implicit method O?t, (?x)2
37Finite Difference Representations of Parabolic
Equations Variable weighted implicit formula
38Finite Difference Representations of Parabolic
Equations A Generalization-The Theta Method with
BC
39Finite Difference Representations of Parabolic
Equations A Generalization-The Theta Method
40Finite Difference Representations of Parabolic
Equations A Generalization-The Theta Method
41Finite Difference Representations of Parabolic
Equations The Crank-Nicholson Method
- Overcomes the limitations that the explicit
method imposes on the size of the time steps and
improves accuracy at the expense of having to
solve a set of equations at each time step. - System of equations solved is tri-diagonal for
1-D space - Unconditionally stable - any time step can be
used
42Finite Difference Representations of Parabolic
Equations The Crank-Nicholson Method
43Finite Difference Representations of Parabolic
Equations Example
- Known initial temperature of a metal rod of
length 1 m as follows T(x,0)x2, 0ltxlt1 - Boundary conditions at x0 and x1 are given by
T(0,t), T(1,t)1, tgt0 - Using a20.75, ?x0.2 and ?t0.02
- Determine the temperature distribution in the rod
for 0t1 using the explicit method
44Finite Difference Representations of Parabolic
Equations Example
- Solution
- Governing equation
- Explicit method
45Finite Difference Representations of Parabolic
Equations Method of Lines
- PDE is converted to a system of 1st order ODE
- The spatial derivative term is approximated with
a finite difference formula - The time derivative remains unchanged
46Finite Difference Representations of Parabolic
Equations Parabolic Equations in Two or Three
Dimensions
47Alternating-Direction Implicit Method
48Nonlinear Parabolic Equations
49Nonlinear Parabolic Equations
- Governing Finite Difference Equation
- Base on Alternating Direct Implicit Finite
Difference Formulation - Nonlinear terms (k, Cp) linearized using Taylor
Series approximations - Time derivative approximated using forward
difference formulation
50Explicit and Implicit Approaches Definitions and
Contrast
51Explicit and Implicit Approaches Definitions and
Contrast
- Implicit Scheme results in a tri-diagonal
(banded) matrix system of equations
52DIFFERENCE EQUATIONS
53Finite Difference Representations of Elliptic
Equations
- Consider steady-state heat equation and its
finite difference approximation
54Discretization Using The Finite-Volume Method
- Use is made of the integral form of conservation
equations and integrated over each volume
55Assembly of Discrete System and Application of
Boundary Conditions
56Solution of Discrete System