Diffusion

Overview


Two point boundary value problems are second order ordinary differential equations of the form:
{% a(x,t) \frac{\partial^2 u}{\partial x^2} + b(x,t) \frac{\partial u}{\partial x} + c(x,t) u = \frac{\partial u}{\partial t} + f(x,t) %}
The function is specified on two points (the boundary points)

Single Variable Heat Equation


The
{% a(x,t) \frac{\partial^2 u}{\partial x^2} = \frac{\partial u}{\partial t} + f(x,t) %}
for
{% 0 < x < L %}
{% 0 < t %}


It is important to remember that many equations can be put in this form by a change of variables. For instance, a simple transformation such as
{% X = x + X_0 %}
will move the left boundary for x. Likewise, the methods described below assume that the boundary value is know for t=0, and rolls the computation forward. By a transformations such as
{% \tau = -1 \times t %}
one can effectively reverse the computation and turn it into a backward calculation, i.e. the boundary value is known at the forward time and the calculation runs the computation back to the first period.

The explicit and implicit finite difference methods below use different approximations to arrive at their solutions. The crank nicholson procedure is something of an amalgam of the two methods and generally has better stability properties than either. It is usually chosen as the preferred method.

Solution Methods


Contents