I'm somewhat struggling with how they are getting this scheme. This is a problem from Morton & Mayers book on numerical pde solutions. I think they are using a forward difference approximation for the 2nd order x-derivative but I just can't seem to figure out how. Sad day for me, but I would appreciate any insight. I think the notation of r,s is hard for me to comprehend.
-
$\begingroup$ It appears that $r, s$ are simply the integer mesh/node counters in the $x$ and $y$ direction, respectively. When invoked, the extra row of points next to a Neumann boundary are typically called "ghost nodes", which might be helpful for you. I also have a feeling there is extra documentation on this problem in the text, given the ambiguity of the problem definition, i.e. "the explicit method", "the scheme", etc. $\endgroup$– user20857Commented Sep 27, 2016 at 5:23
-
$\begingroup$ Can you type the part of the text that is relevant to the question? You can use LaTeX-like syntax for equations. $\endgroup$– nicoguaro ♦Commented Sep 27, 2016 at 12:48
1 Answer
They seem to use the standard explicit scheme to approximate the heat equation: $$ \frac{U_{r,s}^{n+1} - U_{r,s}^n}{\Delta t}=\frac{1}{(\Delta x)^2} \delta^2_x U_{r,s}^n + \frac{1}{(\Delta y)^2} \delta^2_y U_{r,s}^n $$ where $$ \delta^2_x U_{r,s}^n := U_{r+1,s}^n - 2 U_{r,s}^n + U_{r-1,s}^n $$ and analogously for $\delta^2_y U_{r,s}^n$. Now boundary conditions $u_x=0$ at points corresponding to $r=0$ are approximated by $$ \frac{U_{1,s}^n - U_{-1,s}^n}{2 \Delta x} = 0 $$ so for the auxilliary value one obtains $U_{-1,s}^n = U_{1,s}^n$. Put this to the scheme (the first formula in this answer) for $r=0$ and you get what it is written in the exercise, i.e. $$ \frac{U_{0,s}^{n+1} - U_{0,s}^n}{\Delta t}=\frac{2}{(\Delta x)^2} (U_{1,s}^n- U_{0,s}^n) + \frac{1}{(\Delta y)^2} \delta^2_y U_{r,s}^n $$