- Solvers for coupled systems of PDEs: static, time domain, frequency domain, and eigenvalue
- PDE specification for elliptic, parabolic, and hyperbolic problems
- Boundary condition specification: Dirichlet, generalized Neumann, and mixed
- Functions for 2D geometry creation and 3D geometry import from STL files
- Automatic meshing using tetrahedra and triangles
- Simultaneous visualization of multiple solution properties, mesh overlays, and animation

A typical workflow in Partial Differential Equation Toolbox™ consists of defining your geometry, the scalar or system of governing equations, the boundary conditions, and the initial conditions; generating a mesh; and then solving and visualizing your results. The toolbox provides functions for each step in the workflow.

You can solve problems in structural mechanics, electrostatics, magnetostatics, AC power electromagnetics, conductive media DC, heat transfer and diffusion, and other custom applications.

For 2D geometry problems, you can work in the PDE app. The app includes geometry creation and preset modes for applications. You can choose to export data to the MATLAB^{®} workspace from any step in the app and continue your work outside the app.

You can use Partial Differential Equation Toolbox to define and solve different types of scalar or systems of PDEs, including elliptic, parabolic, hyperbolic, and eigenvalue problems. The PDE system can be linear or nonlinear and can be defined over a real-valued or complex-valued solution space.

Partial Differential Equation Toolbox solves scalar equations of the form

\[m \frac{\partial^2 u}{\partial t^2} + d \frac{\partial u}{\partial t} - \nabla \cdot (c \nabla u ) + au = f\]

and systems of equations of the form

\[\boldsymbol{m} \frac{\partial^2 \boldsymbol{u}}{\partial t^2} + \boldsymbol{d} \frac{\partial \boldsymbol{u}}{\partial t} - \nabla \cdot (\boldsymbol{c} \otimes \nabla \boldsymbol{u} ) + \boldsymbol{au} = \boldsymbol{f}\]

where the coefficients \(m, d, c, a\) and \(f\) can be functions of spatial location \( \left(x, y, z\right) \), the solution \(u\) or its gradient.

For eigenvalue equations of the form

\[ -\nabla \cdot \left( c \nabla u \right) + au = \lambda du \quad \text{or} \quad -\nabla \cdot \left( c \nabla u \right) + au = \lambda^2 m u\]

and eigenvalue systems of the form

\[ -\nabla \cdot \left( \boldsymbol{c} \otimes \nabla \boldsymbol{u} \right) + \boldsymbol{au} = \lambda \boldsymbol{du} \quad \text{or} \quad -\nabla \cdot \left( \boldsymbol{c} \otimes \nabla \boldsymbol{u} \right) + \boldsymbol{au} = \lambda^2 \boldsymbol{mu}\]

the coefficients \(m, d, c, a\) and \(f\) may only be functions of spatial location \(\left(x, y, z\right)\) and cannot depend on the solution \(u\) or its gradient.

For more information, see Equations You Can Solve with the toolbox.

For 2D problems, you can create 2D geometry via the constructive solid geometry (CSG) or the geometry function approach. Using the CSG approach, you can use a set of solid building blocks (square, rectangle, circle, ellipse, and polygon) that can be combined to define complex geometries. The PDE app uses the CSG approach.

You can also use the geometry function approach to describe the curves that bound the 2D geometry regions.

With Partial Differential Equation Toolbox, you can set Dirichlet and generalized Neumann boundary conditions on the boundary of your geometry, \(\partial\Omega\) , by specifying coefficients \(h\), \(r\), \(q\), and \(g\) in the corresponding code.

- Dirichlet:

\(hu = r\) - Generalize Neumann:

\(\vec{n} \cdot \left(c \nabla u\right) + qu = g\)

For each boundary condition, \(\vec{n}\) is the outward unit normal, \(u\) is the scalar or vector valued solution, and \(c\) is the coefficient associated with the elliptic term.

\(g\), \(q\), \(h\), and \(r\) can be complex valued functions defined on \((x,y)\) or \((x,y,z)\) points ove*r* \(\partial\Omega\). The coefficients can depend on \(u\) and \(nx\), \(ny\), or \(nz\) (surface normals). For time-dependent problems, the coefficients can also depend on time. For PDE systems, the toolbox supports Dirichlet, generalized Neumann, and mixed boundary conditions.

Partial Differential Equation Toolbox uses the finite element method (FEM) to solve PDEs. You can automatically mesh geometries by specifying a mesh parameter.

For 3D problems, the toolbox uses tetrahedral elements. You can specify either piecewise linear or quadratic basis during the FEM meshing step.

For 2D problems, the toolbox supports linear and quadratic triangle elements. For more information, see the documentation on Mesh Data.

For 2D elliptic and nonlinear elliptic problems, the toolbox lets you use an adaptive mesh refinement algorithm.

For parabolic and hyperbolic PDE problems, you can specify the initial values and obtain solutions at specific times. You can also specify a damping term for the hyperbolic solver.

You can plot the solution on the surface of a 3D solid.

This example illustrates how you can use Partial Differential Equation Toolbox to solve a 2D Helmholtz equation solution on a circular domain with a hole.

The toolbox supports a variety of plots for solutions for 3D geometry. The following example shows the time evolution of values on a slice through a region.

You can use custom code to create plots with the toolbox. This example shows a custom plot of volume slices from a solution.

The Plot mode in the PDE app for 2D lets you select from different plot types, including surface, mesh, and contour. For parabolic and hyperbolic equations, you can animate the solution as it changes with time. Applications include problems involving magnetostatics, as in this example.