13 Partial Differential Equations (PDEs)
07 Apr 2016Most 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
- 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
- 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
- Computational Physics, Ch 19–23
- Partial differential equation, Andrei D. Polyanin et al. (2008), Scholarpedia, 3(10):4605. doi: 10.4249/scholarpedia.4605
- Numerical Recipes in C, WH Press, SA Teukolsky, WT Vetterling, BP Flannery. 2nd ed, 2002. Cambridge University Press. Chapter 19.