Title: ChE306: Heat and Mass Transfer
1Chapter 6
Numerical Solution of Partial Differential
Equations
2Partial Differential Equations
- General form
- linear
- quasilinear
- nonlinear
only a function of independent variables
function of dependent variable, including
derivatives of lower order
coefficients are functions of derivatives of
same order as PDE
3Classification of 2nd Order PDEs
homogeneous
elliptic
general canonical forms
parabolic
method of solution dictated by canonical form of
PDE
hyperbolic
4Boundary Conditions
- Dirichlet (first kind)
- Neumann (second kind)
- Robbins (third kind)
values of dependent variable given at fixed
values of independent variable
Derivative of dependent variable given as a
constant or a function of independent variable
Derivative of dependent variable given as
function of dependent variable
5Representative PDEs
6Representative PDEs
7Representative PDEs
8Finite Difference Solution of PDEs
- Require 2D and 3D grids in 2 and 3 independent
variables, respectively
analogous treatment of the terms
9Finite Difference Solution of PDEs
10Finite Difference Solution of PDEs
Tables in text present summaries of results for
?, ?, and ? differencesfor 1st and 2nd order
PDEs for truncation of all but first order terms.
11Finite Difference Solution of PDEs
12Finite Difference Solution of PDEs
13Finite Difference Solution of PDEs
14Elliptic PDEs
- Found in description of steady-state conduction
and diffusion problems
15Elliptic PDEs
- Consider the 2D elliptic PDE (Laplace's eqn)
- Replace 2nd order derivatives with finite
differences - Rearrange to obtain linear algebraic eqn in terms
of dependent variable at five adjacent grid points
16Elliptic PDEs
y
- Total grid points
- Internal grid points
- Simultaneous linearalgebraic equations
- unknowns
q segments
x
p segments
corner points don't appear in equations
Boundary conditions provide missing information
17Elliptic PDEs
Examples of boundary condition treatment Use
FFD to avoid problem (eqn with same order of
accuracy)
Neumann
ficticious point outside of solution bounds
Robbins
18Elliptic PDEs
The difference equation for the PDE at each
internal node with boundary conditions are a set
of linear algebraic equations. Therefore, Gauss
methods may be used to solve. Converge using
Gauss-Seidelrelaxation method
Solve explicitly for uij
19Elliptic PDEs
Poisson Equation (nonhomogenous Laplace)
substitute CFD eqns
solve explicitly for uij
20Elliptic PDEs
Poisson Equation Neumann or Robbins BCs
forward
lower x
upper x
backward
lower y
forward
upper y
backward
N node on x or y 0 or L
21Elliptic PDEs
Example 6.1 elliptic.m
22Parabolic PDEs
- Unsteady state heat conduction diffusion
- Explicit methods (central differences)
- Combine, rearrange
- Application is straightforward given IC and 2 BCs
- Explicit formula unstable (particularly if
negative terms on RHS)
23Parabolic PDEs
- Positivity Rule
- If A, B, and C are gt 0, AND ABC?1 ? stable
- Replace 1st order derivative with forward
difference - For a stable solution,
24Parabolic PDEs
25Parabolic PDEs
- Positivity rule dictates stability condition
26Parabolic PDEs
- Implicit Methods
- Second order term at ½ point expressed as
weighted average of central differences at
(i,n1) and (i,n)
27Parabolic PDEs
- Variable-weighted implicit parabolic PDE
approximation - ? 0 classic explicit formula
- ? 1 backward implicit approximation
- Can also be obtained by approximating as 1st
order partial with backward FD at (i,n1) or 2nd
order partial with central FD at (i,n1)
28Parabolic PDEs
- ? ½ Crank-Nicolson implicit formula
29Parabolic PDEs
- nonhomogeneous 1D parabolic PDE,
- Also need to evaluate f, assumed to be an
average - Crank-Nicolson implicit for nonhomogenous
parabolic PDEs
30Parabolic PDEs
- Writing Crank-Nicolson for entire grid
- Simultaneous linear algebraic equations
- Matrix of coefficients usually tridiagonal
- Solved by a Gauss elimination method
- Implicit formula are unconditionally stable
- Explicit formula are conditionally stable, but
computationally much easier to solve - Solution Methodology
- Method of lines converts PDE into a set of ODEs
by discretizing only the spatial derivatives with
finite differences, with i 0 and i N
equations modified to fit boundary conditions.
31Hyperbolic PDEs
- 2D, nonhomogeneous
- For 1D homogeneous case, expand derivatives with
CFDs - Rearrange (explicit solution) positivity
rule
32Hyperbolic PDEs
- 2D, homogeneous
- Stable for
33Hyperbolic PDEs
- Implicit methods for hyperbolic equations by
variable-weight
explicit method Crank-Nicolson-type algorithm
Method leads to a tri-diagonal matrix of
coefficients forwhich a Gauss Elimination method
can be used to solve
34Irregular Boundaries
- In the x-direction
- Eliminate 2nd order term by substitution
- Eliminate 1st order term
35Irregular Boundaries
- Repeat process for y-direction
36Irregular Boundaries
- Specification of Neumann orRobbins boundary
conditions - where n is the unit vector normalto the
boundary, and ? is the angle between n and the
x-axis - Expand partials on RHS of equal sign in a Taylor
series of i,j derivatives, and use difference
equations on i,j derivatives (backward in this
example). Substitute into expression above.
37Polar Coordinates
- Laplacian operator in Polar Coordinates