15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Partial Differential Equations<br />

equation can vanish at isolated values <strong>of</strong> x if they are mesh points.<br />

Discontinuities in c and/or s due to material interfaces are permitted provided<br />

that a mesh point is placed at each interface.<br />

At the initial time t = t 0 , for all x the solution components satisfy initial<br />

conditions <strong>of</strong> the form<br />

uxt ( , 0 ) = u 0 ( x)<br />

(5-4)<br />

At the boundary x = a or x = b, for all t the solution components satisfy a<br />

boundary condition <strong>of</strong> the form<br />

pxtu ( , , ) + qxt ( , )f ⎛x, t, u,<br />

∂ ------<br />

u ⎞ = 0<br />

⎝ x⎠<br />

∂<br />

(5-5)<br />

qxt ( , ) is a diagonal matrix with elements that are either identically zero or<br />

never zero. Note that the boundary conditions are expressed in terms <strong>of</strong> the<br />

flux f rather than ∂u ⁄ ∂x . Also, <strong>of</strong> the two coefficients, only p can depend on u .<br />

<strong>MATLAB</strong> Partial Differential Equation Solver<br />

This section describes:<br />

• The PDE solver, pdepe<br />

• PDE solver basic syntax<br />

• Additional PDE solver arguments<br />

The PDE Solver<br />

The <strong>MATLAB</strong> PDE solver, pdepe, solves initial-boundary value problems for<br />

systems <strong>of</strong> parabolic and elliptic PDEs in the one space variable x and time t.<br />

There must be at least one parabolic equation in the system.<br />

The pdepe solver converts the PDEs to ODEs using a second-order accurate<br />

spatial discretization based on a fixed set <strong>of</strong> nodes specified by the user. The<br />

discretization method is described in [9]. The time integration is done with<br />

ode15s. The pdepe solver exploits the capabilities <strong>of</strong> ode15s for solving the<br />

differential-algebraic equations that arise when Equation 5-3 contains elliptic<br />

equations, and for handling Jacobians with a specified sparsity pattern. ode15s<br />

changes both the time step and the formula dynamically.<br />

5-91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!