$$ \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\Aex}{{A_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\Oof}[1]{\mathcal{O}(#1)} \newcommand{\dfc}{\alpha} % diffusion coefficient $$

« Previous
Next »

Step 2: Fulfilling the equation at the mesh points

Require the PDE (1) to be fulfilled at an arbitrary interior mesh point \( (x_i,t_n) \) leads to $$ \begin{equation} \frac{\partial}{\partial t} u(x_i, t_n) = \dfc\frac{\partial^2}{\partial x^2} u(x_i, t_n) \tag{5} \end{equation} $$

Applies to all interior mesh points: \( i=1,\ldots,N_x-1 \) and \( n=1,\ldots,N_t-1 \)

For \( n=0 \) we have the initial conditions \( u=I(x) \) and \( u_t=0 \)

At the boundaries \( i=0,N_x \) we have the boundary condition \( u=0 \).

« Previous
Next »