Partial Differential Equation Solver |
numol(x_endpts, xpts, t_endpts, tpts, num_pde, num_pae, pde_func, pinit, bc_func)
Returns an xpts × tpts matrix containing the solutions to the one-dimensional PDE in pde_func. Each column represents a solution over 1-D space at a single solution time. For a system of equations, the solution for each function is appended horizontally, so the matrix always has xpts rows, and tpts * (num_pde + num_pae) columns. The solution is found using the numerical method of lines.
bc_func is a num_pde × 3 matrix containing rows of the form:
(bc_left(t) |
bc_right(t) |
"D") for Dirichlet boundary conditions, or |
(bc_left(t) |
bc_right(t) |
"N") for Neumann boundary conditions. |
Algebraic constraints are allowed, for example, 0 = u2(x) + v2(x) − w(x) for all x.
The number of boundary functions required matches the order of spatial derivative for each PDE, guaranteeing unique solutions.
You may wish to use PDE Solve Blocks to simplify the entry of your equations and initial conditions.
Only hyperbolic and parabolic PDEs can be solved using numol; for an elliptic equation, such as Poisson's equation, use relax or multigrid.