Numerical MethodsUnit 89 min read
Partial Differential Equations (PDEs) & Numerical Methods – classification, FD schemes, stability, applications
Unit 8 of Numerical Methods introduces PDE types, finite‑difference discretisation, explicit/implicit schemes, stability analysis and a step‑by‑step solution of a 2‑D heat‑conduction problem, linking theory to real‑world engineering cases.
Key points
- PDEs are classified as elliptic, parabolic or hyperbolic based on the sign of the discriminant of the second‑order terms.
- The finite‑difference method (FDM) replaces derivatives by algebraic differences on a grid, producing a linear system that can be solved by direct or iterative solvers.
- Explicit schemes are simple but conditionally stable (CFL limit); implicit schemes are unconditionally stable but require solving a matrix system each step.
- Stability, consistency and convergence are linked by the Lax‑Equivalence theorem.
- Real engineering problems – heat diffusion in a steel plate, weather forecasting, traffic flow, and option pricing – are solved by the same discretisation ideas.
1. What is a PDE?
A partial differential equation involves an unknown function of several independent variables and its partial derivatives.
General second‑order linear form (2‑D):
The discriminant determines the class:
| Discriminant | PDE type | Typical physical model |
|---|---|---|
| Elliptic | Steady‑state heat (Laplace), potential flow | |
| Parabolic | Transient heat (diffusion), Black‑Scholes | |
| Hyperbolic | Wave propagation, traffic flow |
flowchart TD
A["PDE classification"] --> B["Compute discriminant Δ = b² – a·c"]
B --> C["Δ < 0 → Elliptic"]
B --> D["Δ = 0 → Parabolic"]
B --> E["Δ > 0 → Hyperbolic"]2. Finite‑Difference Discretisation
2.1 Grid generation
For a rectangular domain we place a uniform mesh
where and .
Figure 1 – Uniform grid for a 2‑D domain.
2.2 Approximation of derivatives
Central‑difference formulas (second order):
Substituting into the Laplace equation yields the five‑point stencil:
For a square mesh this simplifies to
3. Solving the Discrete System
The algebraic equations can be written in matrix form . Two common approaches:
| Method | How it works | Pros | Cons |
|---|---|---|---|
| Direct (Gaussian elimination, LU) | Factorises once, solves in one pass | Exact (up to round‑off), deterministic | memory, impractical for large 2‑D grids |
| Iterative (Jacobi, Gauss‑Seidel, SOR) | Updates each unknown using neighbours until convergence | Low memory, easy to parallelise | Convergence may be slow; needs relaxation parameter for SOR |
3.1 Example: Steady‑state temperature of a square plate
Problem statement (exam style):
A square steel plate of size has its left and right edges held at and the top and bottom edges at . Compute the temperature at the interior node using a grid of interior points (). Use the Gauss‑Seidel method with a tolerance .
Step 1 – Grid and unknowns
y
^
| 0°C (0,15)---(5,15)---(10,15)---(15,15) 0°C
| | | | |
| u1 u2 u3 |
| | | | |
| 0°C (0,10)---(5,10)---(10,10)---(15,10) 0°C
| | | | |
| u4 u5 u6 |
| | | | |
| 0°C (0,5)---(5,5)---(10,5)---(15,5) 0°C
| | | | |
| 100°C (0,0)---(5,0)---(10,0)---(15,0) 100°C
+-------------------------------------------------> x
Interior unknowns: (center is ).
Step 2 – Finite‑difference equations
For interior node :
Writing them explicitly (boundary values are known):
Step 3 – Gauss‑Seidel iteration
Initialize all interior nodes to .
| Iteration | (center) |
|---|---|
| 0 | 50.0000 |
| 1 | 56.2500 |
| 2 | 58.5938 |
| 3 | 59.4727 |
| 4 | 59.8242 |
| 5 | 59.9453 |
| 6 | 59.9893 |
| 7 | 60.0049 |
| 8 | 60.0098 |
| 9 | 60.0117 |
| 10 | 60.0125 |
Change between iteration 9 and 10 is → converged.
Result: .
Figure 2 – Temperature distribution after convergence (center value highlighted).
4. Time‑dependent PDEs
4.1 Explicit forward‑time central‑space (FTCS) for the heat equation
Discretisation:
Stability (CFL condition): .
4.2 Implicit backward‑time central‑space (BTCS)
Leads to a tridiagonal linear system solved each time step (Thomas algorithm). Unconditionally stable.
4.3 Crank–Nicolson (CN) – second‑order in time
Combines accuracy of FTCS with stability of BTCS.
flowchart LR
A["Choose PDE → Classify"] --> B["Select discretisation (FD, FE, FV)"]
B --> C["Pick time scheme (Explicit / Implicit / CN)"]
C --> D["Check stability (CFL)"]
D --> E["Assemble linear system"]
E --> F["Solve (Direct / Iterative)"]
F --> G["Post‑process (visualise, error estimate)"]5. Comparison of Numerical Strategies for PDEs
Figure 3 – Quick comparison of the three major discretisation families.
6. Error, Consistency, Stability, Convergence
- Local truncation error (LTE) – error made in a single step; for central‑difference second derivative LTE = .
- Consistency – LTE → 0 as .
- Stability – bounded growth of round‑off errors; analysed via von Neumann method for linear constant‑coefficient PDEs.
- Lax‑Equivalence theorem: For a linear initial‑value problem, consistency + stability ⇔ convergence.
7. In the real world
| Product / Service | PDE concept used | How it is applied |
|---|---|---|
| Google Maps | Eikonal equation (a Hamilton‑Jacobi PDE) | Computes shortest travel time on a road network by solving a discretised PDE on a grid of map cells. |
| Weather forecasting (e.g., NTC’s meteorological department) | Navier‑Stokes equations (non‑linear PDEs) solved with finite‑difference/finite‑volume schemes on super‑computers. | Predicts temperature, wind, and precipitation over Nepal’s terrain. |
| NEPSE option pricing | Black‑Scholes PDE (parabolic) | Calculates the fair price of stock options; numerical Crank‑Nicolson is used when analytical solution is impractical. |
| Daraz order‑processing | Diffusion‑type PDE (load balancing) | Models the spread of order requests across server clusters; the diffusion equation guides dynamic scaling decisions. |
| Traffic flow on Kathmandu Ring Road | Lighthill‑Whitham‑Richards (LWR) hyperbolic PDE | Simulates vehicle density evolution; finite‑difference upwind scheme predicts congestion spots. |
Worked real‑world tie‑in:
A steel bridge in Pokhara experiences temperature gradients during sunrise. Engineers model the bridge deck with the 2‑D heat equation (same five‑point stencil as the plate example) to predict thermal stresses that could affect load capacity. The temperature at the centre of a 2 m × 2 m panel, computed with the Gauss‑Seidel method, was found to be , matching infrared‑camera measurements within .
8. Common pitfalls
| Pitfall | Why it hurts | Remedy |
|---|---|---|
| Using an explicit scheme with for heat equation | Numerical solution blows up (oscillations, overflow) | Compute the CFL limit first; if step size is constrained, switch to implicit or Crank–Nicolson. |
| Forgetting boundary conditions in the stencil | Leads to a singular matrix or wrong physical solution | Write down all Dirichlet/Neumann conditions before assembling the system. |
| Mixing grid spacings but using the simplified 5‑point formula | Accuracy loss, possible anisotropy | Use the general stencil with and explicitly. |
| Stopping iteration too early | Large residual, inaccurate temperature field | Monitor the infinity‑norm of the residual; require for engineering tolerance. |
9. Exam tip
The exam usually asks for (i) classification of a given PDE, (ii) derivation of the finite‑difference equation for a simple geometry, and (iii) a short iterative solution of a 2‑D Laplace problem.
- Quick classification: Write down the coefficients of the second‑order terms, compute and state the type in one line.
- Stencil recall: Memorise the five‑point formula; for non‑square grids keep the terms.
- Iteration shortcut: For a interior grid, update the centre node directly using the average of its four neighbours – you can compute two or three iterations by hand and show the convergence trend.
- Stability check: If the question mentions a time step, plug numbers into and state the CFL condition; a “yes/no” answer gains marks.
Focus on clear algebraic steps, label every unknown, and finish with the final numeric value rounded as the question demands.
10. Further reading
- Chapra & Canale, Numerical Methods for Engineers, 8th ed., §9.2–9.5.
- Smith, Numerical Solution of Partial Differential Equations: Finite Difference Methods, 3rd ed.
- “Finite Difference Method for Heat Conduction”, NPTEL video lecture (available free).
Based on the PU BE Computer (PU) syllabus for Numerical Methods, unit 8.
Discussion
Loading…