2
$\begingroup$

I got confused when trying to implement a scheme using Lax-Friedrichs numerical flux for a system of equations in 1D.

According to my notes Lax-Friedrichs numerical flux is

$$f_{LF}(u_l,u_r) = \frac{1}{2}[f(u_l)+f(u_r)] - \frac{\alpha}{2}(u_r-u_l)$$

where $\alpha$ is chosen as the fastest speed in the system. The formula I found is

$$\alpha \geq max_w \Big( max_l \Big| \mu_l\Big( \frac{\partial f}{\partial u}(w) \Big) \Big| \Big)$$

What does $w$ represents here? do I have to evaluate the above expression with $u_r$ and $u_l$ and then take the max? It is the only thing that occurs to me but don't know if that is correct.

Regarding the CFL condition I have that

$$a\frac{\Delta t}{\Delta x} \leq 1$$

where $a$ represents the wave speed but in scalar case, how do I check for CFL in a system? Moreover, in this document I found that the CFL condition is

$$|\lambda|\frac{\Delta t}{\Delta x} = (|u| + c)\frac{\Delta t}{\Delta x}$$

I suppose $u$ is the velocity of the system, but what does $c$ means?

$\endgroup$
5
  • 2
    $\begingroup$ My guess is that you have a bit of notation confusion. In the second equation $w$ probably represents the vector of quantities of interest (evaluate the flux function at the state w) and in the fourth $|u|$ is the velocity of the flow and $c$ the gravity wave speed $\sqrt{g h}$ given that the document you referred to on the shallow water equations. For the other question regarding CFL conditions of systems one usually considers the maximum of the wave speeds of the system (in either direction). $\endgroup$ Commented Jan 16, 2015 at 20:56
  • $\begingroup$ For a system, the wave speeds are given by the eigenvalues of the flux matrix. These are $m/h ± \sqrt{gh}$. So from my solution vector $Q$ compute $\lambda_1$ and $\lambda_2$, which are also vectors, then I just take the max(max(\lambda_1,\lambda_2)) and with that speed I can calculate the time step $\Delta t = \frac{\Delta x}{maxSpeed}$, is this correct? $\endgroup$
    – BRabbit27
    Commented Jan 17, 2015 at 12:39
  • $\begingroup$ Assuming the max wave speed computed previously is correct, I can also use that value for $\alpha$ in the Lax-Friedrichs numerical flux? $\endgroup$
    – BRabbit27
    Commented Jan 17, 2015 at 12:40
  • $\begingroup$ Yeah, that's the gist of it. Basically we choose the wave speeds to form a numerical cone of dependence such that all of the waves are contained inside of the numerical cone. $\endgroup$ Commented Jan 17, 2015 at 22:48
  • $\begingroup$ I had solved the same problem over an year ago. If I remember correctly, $\alpha$ is the max eigenvalue of the system at the "face" between two nodes (as it is being used to compute the flux). Hence you will have 4 combinations of $u\pm\sqrt{gh}$, considering velocities of nodes on both sides of the face, and then take max $\lambda$ of these 4 eigenvalues. $\endgroup$
    – Pranav
    Commented Jan 18, 2015 at 6:30

1 Answer 1

1
$\begingroup$

I believe to some extent there is confusion due to the name of the scheme. The "classic" Lax-Friedrichs Scheme is model-agnostic in the sense that no information on the flux function $f(u)$ is required. You present what is sometimes labeled as "Local Lax-Friedrich" or Rusanov Scheme which includes information on the flux function. For systems $\big (\boldsymbol{f} \in \mathbb{R}^m, m >1 \big)$ these are the eigenvalues $\mu^{(p)}, p = 1 \dots m$ of the Jacobian $\frac{\partial \boldsymbol{f}}{\partial\boldsymbol{u}}$. In one dimension, this boils down to the scalar quantity $f'(u)$. You can look up the schemes for 1D in the chapter of the chapter I already linked. For a general introduction to the topic, I would point you to the entire lecture notes.

But now regarding your question: You have the finite volume scheme $$ \boldsymbol{u}_j^{(n+ 1)} = \boldsymbol{u}_j^{(n)} + \frac{\Delta t}{\Delta x} \Big( \boldsymbol{F}_{j - 1/2}^{(n)} - \boldsymbol{F}_{j+ 1/2}^{(n)} \Big)$$ and want to use the "Local" Lax-Friedrich or Rusanov scheme to compute the numerical fluxes $\boldsymbol{F}_{j\pm 1/2}$. Your general formulation of the scheme is correct: $$\boldsymbol{F}_{j+ 1/2}^{(n)}\Big(\boldsymbol{u}_l^{(n)}, \boldsymbol{u}_r^{(n)}\Big) = \frac{\boldsymbol{f}\Big(\boldsymbol{u}_l^{(n)} \Big) + \boldsymbol{f}\Big(\boldsymbol{u}_r^{(n)} \Big)}{2} - \frac{\alpha}{2} \Big( \boldsymbol{u}_r^{(n)} - \boldsymbol{u}_l^{(n)} \Big) $$ where the indices fulfill $l = j, r = j + 1$. For the "classic" Lax-Friedrichs scheme, $\alpha$ is exactly the same as in the scalar case: $$\alpha_{LF} = \frac{\Delta x}{\Delta t}$$

For the "local" Lax-Friedrichs / Rusanov scheme, I am aware of the following equation for $\alpha$: $$\alpha_{\text{Rusanov, } j + 1/2} = \max \Bigg \{ \max_p \Big \{ \Big\vert \mu_l^{(n, p)} \Big\vert \Big\}, \max_p \Big \{ \Big\vert \mu_r^{(n, p)} \Big\vert \Big\} \Bigg\} $$ i.e., you just consider the maximum of the largest absolute eigenvalue of the matrices $\frac{\partial \boldsymbol{f}}{\partial\boldsymbol{u}}\Big \vert_{ \boldsymbol{u}_l^{(n)}} \quad \frac{\partial \boldsymbol{f}}{\partial\boldsymbol{u}}\Big \vert_{ \boldsymbol{u}_r^{(n)}}$ with spectra $\boldsymbol{\mu}_l^{(n)} = \sigma \Big ( \frac{\partial \boldsymbol{f}}{\partial\boldsymbol{u}}\Big \vert_{ \boldsymbol{u}_l^{(n)}} \Big), \boldsymbol{\mu}_r^{(n)} = \sigma \Big ( \frac{\partial \boldsymbol{f}}{\partial\boldsymbol{u}}\Big \vert_{ \boldsymbol{u}_r^{(n)}} \Big) $. In particular, you are not considering the entire domain, but only the spectra of the Jacobians evaluated at the values at both sides of the interface.

Coming to your second question regarding the CFL condition: Here a maximization over all interfaces (where you compute the numerical fluxes) is indeed required:

$$ \Delta t \overset{!}{<} \text{CFL} \frac{\Delta x}{\max_j \big \{ \alpha_{\text{Rusanov, } j + 1/2} \big \}} $$ Where the $\text{CFL}$ number is problem dependent.

$\endgroup$
1
  • $\begingroup$ It is worth to mention when using the global Lax Friedrichs in the standard form often results in a well known even/odd decoupling (staircase solution). Changing the time step won't help here. The effect can be fixed by scaling the wave speed with the CFL number itself: $\alpha_{LF}=\text{CFL}\cdot\frac{\Delta x}{\Delta t}$. $\endgroup$
    – ConvexHull
    Commented Oct 4, 2022 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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