Main Content

General PDEs

Solve general linear and nonlinear PDEs for stationary, time-dependent, and eigenvalue problems

You can use Partial Differential Equation Toolbox™ to solve linear and nonlinear second-order PDEs for stationary, time-dependent, and eigenvalue problems that occur in common applications in engineering and science.

A typical workflow for solving a general PDE or a system of PDEs includes the following steps:

  • Convert PDEs to the form required by Partial Differential Equation Toolbox.

  • Create a PDE model container specifying the number of equations in your model.

  • Define 2-D or 3-D geometry and mesh it using triangular and tetrahedral elements with linear or quadratic basis functions.

  • Specify the coefficients, boundary and initial conditions. Use function handles to specify non-constant values.

  • Solve and plot the results at nodal locations or interpolate them to custom locations.

Contour and colored surface plot on a tilted plane


expand all

createpdeCreate model
applyBoundaryConditionAdd boundary condition to PDEModel container
specifyCoefficientsSpecify coefficients in PDE model
setInitialConditionsGive initial conditions or initial solution
assembleFEMatricesAssemble finite element matrices
solvepdeSolve PDE specified in a PDEModel
solvepdeeigSolve PDE eigenvalue problem specified in a PDEModel
evaluateGradientEvaluate gradients of PDE solutions at arbitrary points
evaluateCGradientEvaluate flux of PDE solution
interpolateSolutionInterpolate PDE solution to arbitrary points
pdeplotPlot solution or mesh for 2-D problem
pdeplot3DPlot solution or surface mesh for 3-D problem
pdegplotPlot PDE geometry
pdemeshPlot PDE mesh
pdevizCreate and plot PDE visualization object (Since R2021a)
findBoundaryConditionsFind boundary condition assignment for a geometric region
findCoefficientsLocate active PDE coefficients
findInitialConditionsLocate active initial conditions
createPDEResultsCreate solution object
evaluateInterpolate data to selected locations
pdeInterpolantInterpolant for nodal data to selected locations

Live Editor Tasks

Visualize PDE ResultsCreate and explore visualizations of PDE results in the Live Editor (Since R2022b)


PDEModelPDE model object
StationaryResultsTime-independent PDE solution and derived quantities
TimeDependentResultsTime-dependent PDE solution and derived quantities
EigenResultsPDE eigenvalue solution and derived quantities


BoundaryCondition PropertiesBoundary condition for PDE model
CoefficientAssignment PropertiesCoefficient assignments
GeometricInitialConditions PropertiesInitial conditions over a region or region boundary
NodalInitialConditions PropertiesInitial conditions at mesh nodes
PDESolverOptions PropertiesAlgorithm options for solvers
PDEVisualization PropertiesPDE visualization of mesh and nodal results (Since R2021a)


PDE Problem Setup

Solutions and Their Gradients

Eigenvalue and Wave Problems

Workflows Integrated with Other Toolboxes

Finite Element Method and Partial Differential Equations