2

I want to implement Godunov's scheme in order to simulate the nonlinear LWR-type equation $$ \partial_t u + \partial_x (u(1-u)) = 0, \quad u(0, \cdot) = u_0. $$ The update step is ($n$ denotes time step, $j$ spatial step) $$ u^{n+1}_j = u^n_j - \tfrac{\Delta t}{\Delta x}\big(F^n_j - F^n_{j-1}\big). $$ The interesting part is of course the definition of $F$. The way I understand the scheme (from my reading of e.g. LeVeque), the definition $$ F^n_j := \begin{cases} \min \left\lbrace u_j^n(1-u_j^n), u_{j+1}^n(1-u_{j+1}^n) \right\rbrace & u_{j}^n \leq u_{j+1}^n \\ \tfrac{1}{4} & u_{j+1}^n < u_{j}^n \text{ and } u^n_j > \tfrac{1}{2} \\ u_j^n(1-u_j^n) & u_{j+1}^n < u_{j}^n < \tfrac{1}{2} \end{cases} $$ seems adequate.
Can some of you maybe tell me whether I got something wrong or right about this? The initial step $u^0_j$ I set as the average of $u_0$ in that spatial interval.

Thank you!

  • 1
    $f'(u) = 1 - 2u$, thus if both $f'>0$, it uses $u^n$ and $f'<0$, it uses $u^{n+1}$, for the rest two cases, $u^{n+1}<1/2<u^{n}$, you get $\frac{1}{2}$, and $u^n<1/2<u^{n+1}$, you get the either $u^n$ or $u^{n+1}$ who gives you the smaller value in $f(u)$. In your case, if $u^n > u^{n+1} > 1/2$, you will put $u=\frac{1}{2}$ in $f$? – Yimin Dec 31 '23 at 20:15
  • 1
    here is a related post https://math.stackexchange.com/questions/4328196/overview-of-godunovs-method – Yimin Dec 31 '23 at 20:17
  • I see what you mean. Thank you! – Hyperbolic PDE friend Jan 02 '24 at 16:21

0 Answers0