| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Partial Differential Equation Toolbox |
| Contents | Index |
| Learn more about Partial Differential Equation Toolbox |
The objectives of Partial Differential Equation Toolbox™ software are to provide you with tools that:
Define a PDE problem, e.g., define 2-D regions, boundary conditions, and PDE coefficients.
Numerically solve the PDE problem, e.g., generate unstructured meshes, discretize the equations, and produce an approximation to the solution.
Visualize the results.
Partial Differential Equation Toolbox software is designed for both beginners and advanced users.
The minimal requirement is that you can formulate a PDE problem on paper (draw the domain, write the boundary conditions, and the PDE). At the MATLAB® command line, type
pdetool
This invokes the graphical user interface (GUI), which is a self-contained graphical environment for PDE solving. For common applications you can use the specific physical terms rather than abstract coefficients. Using pdetool requires no knowledge of the mathematics behind the PDE, the numerical schemes, or MATLAB. Solving a PDE guides you through an example step by step.
Advanced applications are also possible by downloading the domain geometry, boundary conditions, and mesh description to the MATLAB workspace. From the command line (or M-files) you can call functions to do the hard work, e.g., generate meshes, discretize your problem, perform interpolation, plot data on unstructured grids, etc., while you retain full control over the global numerical algorithm.
The basic equation addressed by the software is the PDE
![]()
expressed in Ω, which we shall refer to as the elliptic equation, regardless of whether its coefficients and boundary conditions make the PDE problem elliptic in the mathematical sense. Analogously, we shall use the terms parabolic equation and hyperbolic equation for equations with spatial operators like the previous one, and first and second order time derivatives, respectively. Ω is a bounded domain in the plane. c, a, f, and the unknown u are scalar, complex valued functions defined on Ω. c can be a 2-by-2 matrix function on Ω. The software can also handle the parabolic PDE
![]()
the hyperbolic PDE
![]()
and the eigenvalue problem
![]()
where d is a complex valued function on Ω, and λ is an unknown eigenvalue. For the parabolic and hyperbolic PDE the coefficients c, a, f, and d can depend on time. A nonlinear solver is available for the nonlinear elliptic PDE
![]()
where c, a, and f are functions of the unknown solution u.
Note Before solving a nonlinear PDE, from the Solve menu in the pdetool GUI, select Parameters. Then, select the Use nonlinear solver check box and click OK. |
All solvers can handle the system case
![]()
You can work with systems of arbitrary dimension from the command line. For the elliptic problem, an adaptive mesh refinement algorithm is implemented. It can also be used in conjunction with the nonlinear solver. In addition, a fast solver for Poisson's equation on a rectangular grid is available.
The following boundary conditions are defined for scalar u:
Dirichlet: hu = r on
the boundary
.
Generalized Neumann:
on
.
is
the outward unit normal. g, q, h,
and r are complex-valued functions defined on
. (The eigenvalue problem is a homogeneous
problem, i.e., g = 0, r =
0.) In the nonlinear case, the coefficients g, q, h,
and r can depend on u, and
for the hyperbolic and parabolic PDE, the coefficients can depend
on time. For the two-dimensional system case, Dirichlet boundary condition
is
![]()
the generalized Neumann boundary condition is
![]()
and the mixed boundary condition is

where µ is computed such that the Dirichlet boundary condition is satisfied. Dirichlet boundary conditions are also called essential boundary conditions, and Neumann boundary conditions are also called natural boundary conditions. See Finite Element Method for the general system case.
The PDEs implemented in Partial Differential Equation Toolbox software are used as a mathematical model for a wide variety of phenomena in all branches of engineering and science. The following is by no means a complete list of examples.
The elliptic and parabolic equations are used for modeling:
Steady and unsteady heat transfer in solids
Flows in porous media and diffusion problems
Electrostatics of dielectric and conductive media
Potential flow
The hyperbolic equation is used for:
Transient and harmonic wave propagation in acoustics and electromagnetics
Transverse motions of membranes
The eigenvalue problems are used for:
Determining natural vibration states in membranes and structural mechanics problems
Last, but not least, the toolbox can be used for educational purposes as a complement to understanding the theory of the FEM.
The simplest way to define a PDE problem is using the GUI, implemented in pdetool. There are three modes that correspond to different stages of defining a PDE problem:
In draw mode, you create Ω, the geometry, using the constructive solid geometry (CSG) model paradigm. A set of solid objects (rectangle, circle, ellipse, and polygon) is provided. You can combine these objects using set formulas.
In boundary mode, you specify the boundary conditions. You can have different types of boundary conditions on different boundary segments.
In PDE mode, you interactively specify the type of PDE and the coefficients c, a, f, and d. You can specify the coefficients for each subdomain independently. This may ease the specification of, e.g., various material properties in a PDE model.
Most problems can be solved from the GUI. There are two major modes that help you solve a problem:
In mesh mode, you generate and plot meshes. You can control the parameters of the automated mesh generator.
In solve mode, you can invoke and control the nonlinear and adaptive solvers for elliptic problems. For parabolic and hyperbolic problems, you can specify the initial values, and the times for which the output should be generated. For the eigenvalue solver, you can specify the interval in which to search for eigenvalues.
After solving a problem, you can return to the mesh mode to further refine your mesh and then solve again. You can also employ the adaptive mesh refiner and solver. This option tries to find a mesh that fits the solution.
For advanced, nonstandard applications you can transfer the description of domains, boundary conditions etc. to your MATLAB workspace. From there you use Partial Differential Equation Toolbox functions for managing data on unstructured meshes. You have full access to the mesh generators, FEM discretizations of the PDE and boundary conditions, interpolation functions, etc. You can design your own solvers or use FEM to solve subproblems of more complex algorithms. See also Using Command-Line Functions.
From the graphical user interface you can use plot mode, where you have a wide range of visualization possibilities. You can visualize both inside the pdetool GUI and in separate figures. You can plot three different solution properties at the same time, using color, height, and vector field plots. Surface, mesh, contour, and arrow (quiver) plots are available. For surface plots, you can choose between interpolated and flat rendering schemes. The mesh may be hidden or exposed in all plot types. For parabolic and hyperbolic equations, you can even produce an animated movie of the solution's time dependence. All visualization functions are also accessible from the command line.
Partial Differential Equation Toolbox software is easy to use in the most common areas due to the application interfaces. Eight application interfaces are available, in addition to the generic scalar and system (vector valued u) cases:
These interfaces have dialog boxes where the PDE coefficients, boundary conditions, and solution are explained in terms of physical entities. The application interfaces enable you to enter specific parameters, such as Young's modulus in the structural mechanics problems. Also, visualization of the relevant physical variables is provided.
Several nontrivial examples are included in this manual. Many examples are solved both by using the GUI and in command-line mode.
The toolbox contains a number of demonstration M-files. They illustrate some ways in which you can write your own applications.
Partial Differential Equation Toolbox software is written using the MATLAB open system philosophy. There are no black-box functions, although some functions may not be easy to understand at first glance. The data structures and formats are documented. You can examine the existing functions and create your own as needed.
Partial Differential Equation Toolbox software solves problems in two space dimensions and time, whereas reality has three space dimensions. The reduction to 2-D is possible when variations in the third space dimension (taken to be z) can be accounted for in the 2-D equation. In some cases, like the plane stress analysis, the material parameters must be modified in the process of dimensionality reduction.
When the problem is such that variation with z is negligible, all z-derivatives drop out and the 2-D equation has exactly the same units and coefficients as in 3-D.
Slab geometries are treated by integration through the thickness. The result is a 2-D equation for the z-averaged solution with the thickness, say D(x,y), multiplied onto all the PDE coefficients, c, a, d, and f, etc. For instance, if you want to compute the stresses in a sheet welded together from plates of different thickness, multiply Young's modulus E, volume forces, and specified surface tractions by D(x,y). Similar definitions of the equation coefficients are called for in other slab geometry examples and application modes.
![]() | Getting Started | Solving a PDE | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |