1
$\begingroup$

For a scalar quantity $u = u(x, t)$, I'm considering the transport equation \begin{align} u_t + au_x &= 0, \qquad{x\in[0, L], \ t\in[0, T]} \\ u(0, t) &= u_{\text{in}}, \\ u(x, 0) &= f(x). \end{align} When $a$ is a constant, the Lax-Friedrichs scheme is the FTCS approximation given by \begin{equation}\label{PDE} u_j^{n + 1} = \frac{u_{j + 1}^n + u_{j - 1}^{n}}{2} - \frac{a(u_{j + 1}^n - u_{j - 1}^{n})}{2}, \end{equation} where $u_j^n = u(x_j, t^n)$ for equally spaced space-time mesh points.

In the case $a = a(x, t)$, what are the values of $x_j,\ t^n$ that $a$ should be evaluated at? Given the scheme is forward in time, I can reasonably convince myself that we evaluate $a$ in time as $$ a(x, t^{n + 1}), $$ but which space point should we use? The implicit-in-space nature of the Lax-Friedrichs scheme prevents me from using the same logic as I have with time.

$\endgroup$
2
$\begingroup$

I would suggest this as the canonical generalisation $$ u_t(x_j,t_n) \approx \frac{u_j^{n+1} - (u_{j-1}^n + u_{j+1}^n)/2}{\Delta t} $$

$$ (a u_x)(x_j,t_n) \approx a(x_j, t_n) \frac{u_{j+1}^n - u_{j-1}^n}{2\Delta x} $$

$$ u_j^{n+1} = \frac{1}{2}(u_{j-1}^n + u_{j+1}^n) - \frac{a_j^n \Delta t}{2\Delta x} (u_{j+1}^n - u_{j-1}^n) $$

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

See https://en.wikipedia.org/wiki/Lax–Friedrichs_method, in which the extension to nonlinear conservation laws is described. You may also want to check out the large number of articles that use the LF-method for non-linear conservation laws using Google.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.