Method of Lines Diffusion Problem

450 Views Asked by At

Consider the method of lines applied to the diffusion equation in one space dimension, $u_t = au_{xx}$, with $a > 0$, $a$ constant, $u = 0$ at $x =0$, $x = 1$ for $t ≥ 0$, and with given initial values. Formulate the method of lines using the central difference approximation to the derivative $u_{xx}$. To arrive at a linear constant coefficient ODE system $y' = Ay$ with $A$ symmetric. Find the eigenvalues of $A$ to determine whether the problem is unstable, stable or asymptotically stable.

So this is what I have so far..

$u_t=u_{xx}$ with $u(0,t)=0$ and $u(1,t)=0$ as the conditions.

So by method of lines and centeral difference approximation...bounded (0,1) thus $0<i<N$

$\frac{du(t)}{dt} =a \frac{u_{x_{i+1}}-2u_{x_i}-u_{_{x_i-1}}}{\delta x^2}$

Now using the conditions and incrementing because we can't have $x_i=-1$ for the first starting point of $u_{i-1}=u_{0-1}=u_{-1}$...we will have the new bounds be $1<i<N+1$

$\frac{du(t)}{dt} =a \frac{u_{x_{2}}-2u_{x_1}-u_{_{x_0}}}{\delta x^2}$

which reduces with the $u_{x(0)}=0$ and $u_{x(1)}=0$ by the conditions given...

$\frac{du(t)}{dt} =a \frac{u_{x_{2}}-0-0}{\delta x^2}$

$\frac{du(t)}{dt} =a \frac{u_{x_{2}}}{\delta x^2}$

Now I'm not 100% sure if I did the method of lines correct... mostly with the reindexing of the bound...

Now I also don't understand what my next step would be in terms of solved for the A matrix.

All I can think of is...but it gets me nowhere.

$\frac{du(t)}{dt} -a \frac{u_{x_{2}}}{\delta x^2} = 0$

Any help would be greatly appreciated. Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

The space $x\in [0,1]$ is discretized using a regular grid with abscissas $x_i = i\, \Delta x$, where $\Delta x = 1/N_x$ and $i=0, \dots, N_x$. Using a second-order centered difference for $u_{xx}$, the interior grid node values $u_i(t)$ satisfy $u'_i(t) = a \left(u_{i+1}(t) - 2u_{i}(t) + u_{i-1}(t)\right)/{\Delta x}^2$ for $i=1, \dots, N_x-1$. At the boundaries of the domain, we have $u_0(t) = 0$ and $u_{N_x}(t) = 0$. Therefore, we get the following system of differential equations satisfied by the unknown grid node values: $$ \underbrace{ \left(\begin{array}{c} u'_1(t) \\ u'_2(t) \\ \vdots \\ u'_{N_x-2}(t) \\ u'_{N_x-1}(t) \end{array} \right)}_{y'(t)} = \underbrace{\frac{a}{{\Delta x}^2} \left(\begin{array}{ccccc} -2 & 1 & 0 & & \dots \\ 1 & -2 & 1 & 0 & \dots \\ & \ddots & \ddots & \ddots & \\ \dots & 0 & 1 & -2 & 1 \\ \dots & & 0 & 1 & -2 \end{array}\right)}_{A} \; \underbrace{\left(\begin{array}{c} u_1(t) \\ u_2(t) \\ \vdots \\ u_{N_x-2}(t) \\ u_{N_x-1}(t) \end{array} \right)}_{y(t)} . $$ It remains to compute the spectrum of $A$.