Computational Methods in Physics ASU Physics PHY 494

13 Partial Differential Equations (PDEs)

Most physical phenomena are ultimately described by a relationship between changing quantities. If only a single quantity such as time is changing, Ordinary Differential Equations (ODEs) result. However, as soon as more than a single quantity varies independently from the other ones, partial differential equations (PDEs) have to be solved.

For example, a scalar field admits the the general PDE

(For notational convenience, partial derivatives are often written in subscript notation.)

Classes of second-order PDEs

Second-order PDEs (highest partial derivatives are second order, such as or ) are ubiquitous in physics and can be classified as

  • elliptic PDEs (, second derivatives of all variables and all with the same sign, e.g. Poisson's equation );
  • parabolic PDEs (, second order derivative of one variable and first order derivative of the other one, e.g., the heat equation );
  • hyperbolic PDEs (, second derivatives of all variables with the opposite sign, e.g. wave equation ).

Boundary conditions

PDEs are more complicated than ODEs. General solutions of PDEs involve arbitrary functions and additional boundary conditions (values or derivatives of the solution on the boundary of the problem domain) have to be specified to obtain a specific solution (in addition to any initial conditions).

  • Dirichlet boundary conditions prescribe the value of the solution on a surrounding closed surface.
  • Neumann boundary conditions specify the value of the normal derivative on the surrounding surface.
  • Cauchy boundary conditions set both the value and the normal derivative on the surrounding closed surface (i.e., both Dirichlet and Neumann boundary conditions are imposed).
  • Robin boundary conditions specify that a weighted sum of Dirichlet and Neumann boundary conditions have to have a given value on the boundary.

Often, no analytic solutions can be found or the analytic solutions are unwieldy. PDEs can be solved numerically, though. However, different types of PDEs require customized algorithms.

Solving PDEs numerically

We will look at various finite difference schemes (both explicit and implicit) to solve the different classes of PDEs.

Class material

  1. 13_PDEs-1.ipynb: Poisson's and Laplace's equation: Background (board notes on PDEs (PDF)), Gauss-Seidel algorithm, problems: 13_PDEs-1-Students.ipynb
  2. 13_PDEs-2.ipynb: fast Jacobi, Gauss-Seidel and Successive Over Relaxation algorithms (using NumPy array operations, see board notes on numpyfied Poisson solvers (PDF)), Poisson equation, charge density: 13_PDEs-2-Students.ipynb

Additional resources