Note: THIS PAGE DESCRIBES THE RECOMMENDED WORKFLOW. For the corresponding step in the legacy workflow, see Equations You Can Solve Using Legacy Functions. |
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 \xb7\left(c\nabla u\right)+au=f$$
and eigenvalue equations of the form
$$\begin{array}{l}-\nabla \xb7\left(c\nabla u\right)+au=\lambda du\\ \text{or}\\ -\nabla \xb7\left(c\nabla u\right)+au={\lambda}^{2}mu\end{array}$$
For scalar PDEs, there are two choices of boundary conditions for each edge or face:
Dirichlet — On the edge or face, the solution u satisfies the equation
hu = r,
where h and r can be functions of space (x, y, and, in 3-D case, z), the solution u, and time. Often, you take h = 1, and set r to the appropriate value.
Generalized Neumann boundary conditions — On the edge or face the solution u satisfies the equation
$$\overrightarrow{n}\text{\hspace{0.17em}}\xb7\text{\hspace{0.17em}}\left(c\nabla u\right)+qu=g$$
$$\overrightarrow{n}$$ is the outward unit normal. q and g are functions defined on ∂Ω, and can be functions of x, y, and, in 3-D case, z, the solution u, and, for time-dependent equations, time.
The toolbox also solves systems of equations of the form
$$m\frac{{\partial}^{2}u}{\partial {t}^{2}}+d\frac{\partial u}{\partial t}-\nabla \xb7\left(c\otimes \nabla u\right)+au=f$$
and eigenvalue systems of the form
$$\begin{array}{l}-\nabla \xb7\left(c\otimes \nabla u\right)+au=\lambda du\\ \text{or}\\ -\nabla \xb7\left(c\otimes \nabla u\right)+au={\lambda}^{2}mu\end{array}$$
A system of PDEs with N components is N coupled PDEs with coupled boundary conditions. Scalar PDEs are those with N = 1, meaning just one PDE. Systems of PDEs generally means N > 1. The documentation sometimes refers to systems as multidimensional PDEs or as PDEs with a vector solution u. In all cases, PDE systems have a single geometry and mesh. It is only N, the number of equations, that can vary.
The coefficients m, d, c, a,
and f can be functions of location (x, y,
and, in 3-D, z), and, except for eigenvalue problems,
they also can be functions of the solution u or
its gradient. For eigenvalue problems, the coefficients cannot depend
on the solution u
or its gradient.
For scalar equations, all the coefficients except c are
scalar. The coefficient c represents a 2-by-2 matrix
in 2-D geometry, or a 3-by-3 matrix in 3-D geometry. For systems of N equations,
the coefficients m, d, and a are N-by-N matrices, f is an N-by-1 vector, and c is a 2N-by-2N tensor
(2-D geometry) or a 3N-by-3N tensor
(3-D geometry). For the meaning of $$c\otimes u$$,
see c Coefficient for specifyCoefficients
.
When both m and d are 0
,
the PDE is stationary. When either m or d are
nonzero, the problem is time-dependent. When any coefficient depends
on the solution u or its gradient, the problem
is called nonlinear.
For systems of PDEs, there are generalized versions of the Dirichlet and Neumann boundary conditions:
hu = r represents a matrix h multiplying the solution vector u, and equaling the vector r.
$$n\text{\hspace{0.17em}}\xb7\text{\hspace{0.17em}}\left(c\otimes \nabla u\right)+qu=g$$. For 2-D systems, the notation $$n\text{\hspace{0.17em}}\xb7\text{\hspace{0.17em}}\left(c\otimes \nabla u\right)$$ means the N-by-1 matrix with (i,1)-component
$$\sum _{j=1}^{N}\left(\mathrm{cos}(\alpha ){c}_{i,j,1,1}\frac{\partial}{\partial x}+\mathrm{cos}(\alpha ){c}_{i,j,1,2}\frac{\partial}{\partial y}+\mathrm{sin}(\alpha ){c}_{i,j,2,1}\frac{\partial}{\partial x}+\mathrm{sin}(\alpha ){c}_{i,j,2,2}\frac{\partial}{\partial y}\right)\text{\hspace{0.17em}}}{u}_{j$$
where the outward normal vector of the boundary $$n=\left(\mathrm{cos}(\alpha ),\mathrm{sin}(\alpha )\right)$$.
For 3-D systems, the notation $$n\text{\hspace{0.17em}}\xb7\text{\hspace{0.17em}}\left(c\otimes \nabla u\right)$$ means the N-by-1 vector with (i,1)-component
$$\begin{array}{l}{\displaystyle \sum _{j=1}^{N}\left(\mathrm{sin}\left(\phi \right)\mathrm{cos}\left(\theta \right){c}_{i,j,1,1}\frac{\partial}{\partial x}+\mathrm{sin}\left(\phi \right)\mathrm{cos}\left(\theta \right){c}_{i,j,1,2}\frac{\partial}{\partial y}+\mathrm{sin}\left(\phi \right)\mathrm{cos}\left(\theta \right){c}_{i,j,1,3}\frac{\partial}{\partial z}\right){u}_{j}}\\ +{\displaystyle \sum _{j=1}^{N}\left(\mathrm{sin}\left(\phi \right)\mathrm{sin}\left(\theta \right){c}_{i,j,2,1}\frac{\partial}{\partial x}+\mathrm{sin}\left(\phi \right)\mathrm{sin}\left(\theta \right){c}_{i,j,2,2}\frac{\partial}{\partial y}+\mathrm{sin}\left(\phi \right)\mathrm{sin}\left(\theta \right){c}_{i,j,2,3}\frac{\partial}{\partial z}\right){u}_{j}}\\ +{\displaystyle \sum _{j=1}^{N}\left(\mathrm{cos}\left(\theta \right){c}_{i,j,3,1}\frac{\partial}{\partial x}+\mathrm{cos}\left(\theta \right){c}_{i,j,3,2}\frac{\partial}{\partial y}+\mathrm{cos}\left(\theta \right){c}_{i,j,3,3}\frac{\partial}{\partial z}\right){u}_{j}}\end{array}$$
where the outward normal vector of the boundary $$n=\left(\mathrm{sin}(\phi )\mathrm{cos}(\theta ),\mathrm{sin}(\phi )\mathrm{sin}(\theta ),\mathrm{cos}(\phi )\right)$$.
For each edge or face segment, there are a total of N boundary conditions.