Partial Differential Equations

Learning Objectives

  • Understand the classification of PDEs (Elliptic, Parabolic, Hyperbolic).
  • Learn different types of boundary conditions.
  • Apply the Finite Difference Method (FDM) to solve PDEs.
  • Understand explicit and implicit numerical schemes for parabolic PDEs.
  • Recognize the principles of the Finite Element Method (FEM).

Partial Differential Equations (PDEs) rigorously govern phenomena that vary continuously across multiple independent dimensions (e.g., spatial coordinates x,y,zx,y,z and time tt). Common engineering applications include steady-state heat conduction, transient fluid flow, and solid mechanics stress analysis.

Classification of PDEs

Second-order linear PDEs of the mathematical form Aβˆ‚2uβˆ‚x2+Bβˆ‚2uβˆ‚xβˆ‚y+Cβˆ‚2uβˆ‚y2+D=0A\frac{\partial^2 u}{\partial x^2} + B\frac{\partial^2 u}{\partial x \partial y} + C\frac{\partial^2 u}{\partial y^2} + D = 0 are formally classified based on the algebraic discriminant B2βˆ’4ACB^2 - 4AC, analogous to conic sections in geometry:

Elliptic PDEs (B2βˆ’4AC<0B^2 - 4AC < 0)

Characterize equilibrium or steady-state systems with no time dependence (e.g., Laplace's equation for steady heat flow). A disturbance anywhere in the domain is felt immediately everywhere else.

Parabolic PDEs (B2βˆ’4AC=0B^2 - 4AC = 0)

Characterize transient systems that physically diffuse energy or mass over time (e.g., Heat conduction equation, Fourier's law). Disturbances propagate at an infinite speed but decay exponentially.

Hyperbolic PDEs (B2βˆ’4AC>0B^2 - 4AC > 0)

Characterize dynamic, transient systems that propagate disturbances as distinct waves at a finite speed (e.g., the Wave equation for a vibrating string).

Boundary Conditions

Solving PDEs uniquely requires specifying exact mathematical conditions along the physical boundaries of the domain (and initial conditions across the domain at t=0t=0 for transient problems).

Dirichlet Boundary Condition (First-Type)

The explicit value of the dependent variable is specified directly at the boundary (e.g., wall temperature T=100∘CT = 100^\circ\text{C}).

Neumann Boundary Condition (Second-Type)

The normal derivative (spatial gradient or flux) is specified at the boundary (e.g., βˆ‚Tβˆ‚x=0\frac{\partial T}{\partial x} = 0 for a perfectly insulated wall).

Robin Boundary Condition (Mixed, Third-Type)

A linear combination of the value and its normal derivative is specified at the boundary (e.g., convective heat transfer, βˆ’kβˆ‚Tβˆ‚x=h(Tβˆ’T∞)-k\frac{\partial T}{\partial x} = h(T - T_\infty)).

Implementing Boundary Conditions: Ghost Cells

While Dirichlet boundary conditions are computationally straightforward to implement by directly assigning constant values to boundary nodes, Neumann and Robin conditions require approximating spatial derivatives numerically exactly at the domain edge.

Ghost Cell

A fictitious mathematical node placed strictly outside the physical domain to rigorously enforce Neumann and Robin boundary conditions.

Implementing Ghost Cells

To accurately evaluate a central difference derivative (which is O(Ξ”x2)O(\Delta x^2)) exactly at a boundary node (i=0i=0), we mathematically imagine a fictitious "ghost cell" (i=βˆ’1i=-1) located outside the physical domain. For a standard Neumann condition like βˆ‚Tβˆ‚x=0\frac{\partial T}{\partial x} = 0, we set the central difference:

T1βˆ’Tβˆ’12Ξ”x=0β€…β€ŠβŸΉβ€…β€ŠTβˆ’1=T1\frac{T_1 - T_{-1}}{2\Delta x} = 0 \implies T_{-1} = T_1

This algebraic ghost value Tβˆ’1T_{-1} is then substituted directly into the main governing PDE evaluated at the boundary node i=0i=0. This crucial technique allows the highly accurate central difference scheme to be maintained throughout the entire domain without dropping to a less accurate, asymmetric forward/backward difference (O(Ξ”x)O(\Delta x)) at the edges.

Elliptic Equations (Laplace Equation)

Elliptic PDEs mathematically characterize steady-state equilibrium problems. The most common fundamental example is Laplace's equation, which describes 2D steady-state heat conduction, groundwater seepage flow, and ideal irrotational fluid potential fields.

Laplace's Equation

Describes steady-state equilibrium in two dimensions, such as steady heat conduction.

βˆ‚2Tβˆ‚x2+βˆ‚2Tβˆ‚y2=0\frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} = 0

Variables

SymbolDescriptionUnit
TTTemperature or scalar potential functionvaries
xxSpatial coordinate in the horizontal directionm
yySpatial coordinate in the vertical directionm

Finite Difference Method

The Finite Difference Method (FDM) systematically replaces all continuous partial derivatives with discrete algebraic difference quotients evaluated over a structured rectangular grid of nodes. For the 2D Laplace equation, applying a central difference approximation relates the steady temperature at a central node to its four orthogonal neighbors.

Laplace Equation FDM Approximation

Averaging formula for a central difference approximation on a square computational grid.

Ti,j=Ti+1,j+Tiβˆ’1,j+Ti,j+1+Ti,jβˆ’14T_{i,j} = \frac{T_{i+1,j} + T_{i-1,j} + T_{i,j+1} + T_{i,j-1}}{4}

Variables

SymbolDescriptionUnit
Ti,jT_{i,j}Temperature at the central nodevaries
Ti+1,jT_{i+1,j}Temperature at the right nodevaries
Tiβˆ’1,jT_{i-1,j}Temperature at the left nodevaries
Ti,j+1T_{i,j+1}Temperature at the top nodevaries
Ti,jβˆ’1T_{i,j-1}Temperature at the bottom nodevaries

Solving the System

Applying this formula to every unknown internal node yields a large, sparse system of simultaneous linear algebraic equations ([A]{T}={b}[A]\{T\} = \{b\}). This system can be solved directly (e.g., Gaussian elimination) or iteratively (e.g., via the Gauss-Seidel method, historically termed Liebmann's method for this specific application).

The Method of Lines (MOL)

For transient PDEs (parabolic and hyperbolic), the Method of Lines (MOL) offers a robust modern computational alternative to manually discretizing both space and time simultaneously on a fixed grid.

How MOL Works

MOL discretizes only the spatial variables (using standard finite differences or finite elements) while leaving time tt continuous. This powerful technique algebraically reduces the single continuous PDE to a massive, coupled system of Ordinary Differential Equations (ODEs) exclusively with respect to time.

These resulting ODEs can then be passed to highly optimized, off-the-shelf adaptive ODE solvers (like Runge-Kutta-Fehlberg or Gear's methods for stiff systems) which automatically handle time-stepping stability. It provides an elegant, rigorous separation of spatial discretization errors from time integration errors.

Parabolic Equations (Heat Conduction)

Parabolic PDEs mathematically characterize transient (time-dependent) diffusion problems. The 1D transient heat conduction equation is a classic fundamental example.

1D Transient Heat Conduction Equation

Describes the diffusion of heat over time in one spatial dimension.

kβˆ‚2Tβˆ‚x2=βˆ‚Tβˆ‚tk \frac{\partial^2 T}{\partial x^2} = \frac{\partial T}{\partial t}

Variables

SymbolDescriptionUnit
kkThermal diffusivity constantm2/sm^2/s
TTTemperatureK
xxSpatial coordinatem
ttTimes

Numerical solutions involve sequentially "stepping" through time. Explicit schemes calculate spatial derivatives entirely at the current known time step to predict the future state. Implicit schemes evaluate spatial derivatives at the unknown future time step, requiring simultaneous algebraic solution.

Von Neumann Stability Analysis

The fundamental mathematical stability of any linear finite difference scheme is rigorously evaluated using Von Neumann stability analysis. By substituting a discrete Fourier series component Tjn=ΞΎneik(jΞ”x)T_j^n = \xi^n e^{ik(j\Delta x)} into the difference equation, we determine the amplification factor ΞΎ\xi.

For the numerical solution to remain bounded (stable) and not violently oscillate to infinity, the strict condition βˆ£ΞΎβˆ£β‰€1|\xi| \le 1 must be satisfied for all possible frequencies kk. This analysis mathematically proves why explicit schemes have severe time-step restrictions, while implicit schemes are often unconditionally stable regardless of Ξ”t\Delta t.

Stability Criterion for Explicit Parabolic Schemes

Strict constraint on time step relative to grid spacing for 1D heat equation explicit approximations.

r≀12β€…β€ŠβŸΉβ€…β€ŠΞ”t≀(Ξ”x)22kr \le \frac{1}{2} \implies \Delta t \le \frac{(\Delta x)^2}{2k}

Variables

SymbolDescriptionUnit
rrDimensionless parameterunitless
Ξ”t\Delta tTime step sizes
Ξ”x\Delta xSpatial grid spacingm
kkThermal diffusivity constantm2/sm^2/s

Instability Consequence

If this strict constraint is violated by even a fraction, the numerical solution will immediately become violently unstable, producing infinite non-physical oscillations.

Crank-Nicolson Method

An implicit numerical scheme that averages spatial difference approximations equally at current and future time steps.

Tin+1βˆ’TinΞ”t=k[12(Ti+1nβˆ’2Tin+Tiβˆ’1n(Ξ”x)2)+12(Ti+1n+1βˆ’2Tin+1+Tiβˆ’1n+1(Ξ”x)2)]\frac{T_i^{n+1} - T_i^n}{\Delta t} = k \left[ \frac{1}{2} \left( \frac{T_{i+1}^{n} - 2T_i^{n} + T_{i-1}^{n}}{(\Delta x)^2} \right) + \frac{1}{2} \left( \frac{T_{i+1}^{n+1} - 2T_i^{n+1} + T_{i-1}^{n+1}}{(\Delta x)^2} \right) \right]

Variables

SymbolDescriptionUnit
TinT_i^nTemperature at node i at current time step nvaries
Tin+1T_i^{n+1}Temperature at node i at unknown future time step n+1varies
Ξ”t\Delta tTime step sizes
Ξ”x\Delta xSpatial grid spacingm
kkThermal diffusivitym2/sm^2/s

Crank-Nicolson Stability

This balanced averaging makes the method unconditionally stable (via Von Neumann analysis) and highly second-order accurate in both space and time (O(Ξ”x2,Ξ”t2)O(\Delta x^2, \Delta t^2)). This mathematical property allows for much larger time steps than explicit methods without any risk of numerical instability or explosion.

Alternating-Direction Implicit (ADI) Method

For 2D transient parabolic equations, simultaneously solving a fully implicit large 2D sparse matrix system at every single time step is computationally crushing. The ADI method elegantly splits the physical time step Ξ”t\Delta t in half.

In the first mathematical half-step, it solves implicitly in the x-direction and explicitly in the y-direction. In the second half-step, it precisely reverses the directions. This brilliant formulation yields simple 1D tridiagonal matrices for every row/column that can be solved extraordinarily rapidly using the Thomas algorithm, while maintaining unconditional stability.

Hyperbolic Equations (Wave Equation)

Hyperbolic PDEs rigorously govern dynamically vibrating systems and wave propagation phenomena without diffusion. The one-dimensional wave equation is:

1D Wave Equation

Governs wave propagation dynamically without diffusion.

βˆ‚2uβˆ‚t2=c2βˆ‚2uβˆ‚x2\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial x^2}

Variables

SymbolDescriptionUnit
uuDisplacement or amplitude of the wavem
ttTimes
xxSpatial coordinatem
ccConstant wave propagation speedm/s

Where cc is the constant wave propagation speed. Numerical solutions typically utilize explicit central finite difference schemes, advancing the dynamic solution based on the known states at two immediately previous time steps (nn and nβˆ’1n-1).

d'Alembert's Solution

Exact analytical solution for the 1D wave equation using superposition of two traveling waves.

u(x,t)=F(xβˆ’ct)+G(x+ct)u(x,t) = F(x - ct) + G(x + ct)

Variables

SymbolDescriptionUnit
u(x,t)u(x,t)Wave amplitude at position x and time tm
FFArbitrary wave profile traveling strictly to the rightvaries
GGArbitrary wave profile traveling strictly to the leftvaries
ccConstant wave speedm/s
ttTimes
xxSpatial coordinatem

d'Alembert's Solution Explained

While discrete numerical methods are common for complex domains, the fundamental 1D wave equation has a famous exact analytical solution formulated by d'Alembert. It mathematically proves that any arbitrary solution can be expressed precisely as the superposition of two rigid waves traveling in opposite directions at constant speed cc without changing shape. The specific geometric forms of FF and GG are determined entirely by the given initial position and velocity conditions at t=0t=0.

Courant-Friedrichs-Lewy (CFL) Condition

Maximum allowable numerical time step relative to grid size for explicit hyperbolic solvers.

C=cΞ”tΞ”x≀1C = \frac{c\Delta t}{\Delta x} \leq 1

Variables

SymbolDescriptionUnit
CCDimensionless Courant numberunitless
ccPhysical wave speedm/s
Ξ”t\Delta tNumerical time step sizes
Ξ”x\Delta xSpatial grid sizem

CFL Condition Explained

For numerical stability, the CFL condition mathematically requires C≀1C \leq 1. Physically, this means the numerical domain of dependence (the information traveling across the discrete grid at speed Ξ”x/Ξ”t\Delta x / \Delta t) must encompass the true physical domain of dependence (the physical wave traveling at speed cc). If the physical wave outruns the numerical grid calculation, the simulation catastrophically fails.

Finite Element Method Overview

The Finite Element Method (FEM) is a vastly more versatile mathematical alternative to FDM. While FDM is strictly limited to representing the domain as a rigid, orthogonal grid of points, FEM breaks the continuous physical domain into an interconnected mesh of arbitrary, small geometric shapes called finite elements (e.g., triangles, tetrahedrons).

Finite Element Method Steps

  1. Discretization (Meshing): Mathematically divide the continuous physical domain into discrete finite elements. The quality, density, and aspect ratio of this mesh directly dictate the numerical accuracy and conditioning of the final matrix.
  2. Element Equations: Develop approximate algebraic equations for each individual element using weighted residual methods (like Galerkin's method) or variational principles (minimizing total potential energy) based on shape functions.
  3. Assembly: Mathematically assemble all the individual element stiffness equations into a massive, global system sparse matrix equation ([K]{U}={F}[K]\{U\} = \{F\}).
  4. Boundary Conditions: Apply exact physical boundary conditions to the global system matrix to prevent rigid body motion and make the matrix non-singular.
  5. Solution: Solve the resulting massive linear algebraic system for the unknown nodal displacements or temperatures.

FEM Industry Standard

FEM is universally the industry standard method for solid mechanics and structural engineering because it flawlessly handles incredibly complex arbitrary geometries, curved boundaries, varying heterogeneous material properties, and non-uniform boundary conditions where FDM entirely fails to adapt.

Key Takeaways
  • PDEs are formally classified into Elliptic (steady-state equilibrium), Parabolic (transient diffusion), and Hyperbolic (dynamic wave propagation) based on the mathematical discriminant B2βˆ’4ACB^2 - 4AC.
  • Mathematical boundary conditions are explicitly classified as Dirichlet (fixed constant value), Neumann (fixed spatial derivative/flux), or Robin (mixed convective).
  • Ghost cells are fictitious mathematical nodes placed strictly outside the physical domain to rigorously enforce Neumann and Robin conditions while preserving high-order central difference accuracy.
  • The Finite Difference Method (FDM) replaces continuous analytical derivatives with discrete algebraic difference approximations strictly on a structured orthogonal grid.
  • Von Neumann stability analysis rigorously proves that explicit FDM methods for transient PDEs are severely restricted. Parabolic schemes require r≀1/2r \le 1/2, and hyperbolic schemes require the Courant number C≀1C \le 1 (the CFL condition). Implicit methods are mathematically proven to be unconditionally stable.
  • The Method of Lines (MOL) elegantly decouples space and time by discretizing only spatial dimensions, producing a large coupled system of ODEs that can be solved with advanced adaptive ODE algorithms.
  • The Crank-Nicolson method is a highly popular implicit scheme that averages spatial differences equally over two time steps, yielding unconditional stability and second-order accuracy (O(Ξ”x2,Ξ”t2)O(\Delta x^2, \Delta t^2)).
  • The ADI method provides an exceptionally efficient numerical algorithm to solve 2D transient parabolic problems by mathematically alternating implicit directions, producing easily solved tridiagonal matrices.
  • d'Alembert's solution provides the exact mathematical analytical formulation for the 1D hyperbolic wave equation strictly as the sum of two invariant traveling waves.
  • The Finite Element Method (FEM) fundamentally relies on high-quality grid generation (meshing) to handle highly complex arbitrary domains by algebraically assembling simple piecewise element equations using Galerkin's method.