3

I am studying Godunov's method and I am unclear on a few details, it seems there are not many resources available regarding this method (at least to my knowledge).

Suppose we have: $$v_t + [f(v)]_x = 0$$ which we are solving on some grid. We denote the solution on this grid as $u_j^n$, which represents the solution at $j\Delta x$ and at time $n\Delta t$.

Before even getting into Godunov's method, I am confused on implementing the grid suggested by most texts, which claim it is more natural to instead consider $$U_j^n = \frac{1}{\Delta x}\int_{x_{j-1/2}}^{x_{j+1/2}} u_j^n$$ but how is this implemented in practice? If are grid is $x_j$ for $j = 0, 1, 2, \ldots, n$, how do we deal with these half points exactly?

Now, for Godunov's method, it is my understanding that we suppose we have a solution at time $n$ which we call $\tilde{u}^n(x, t_n)$. This solution is piecewise constant at time $n$ as it simply the value of our numerical solution over each particular cell $[x_{j-1/2}, x_{j+1/2})$. To obtain the solution at time $n+1$ we use $\tilde{u}(x, t_n)$ as initial data and solve the resulting sequence of Riemann problems.

Assuming the above is correct, I have two questions that follow. First, how do we solve these Riemann problems exactly? The texts I have seen claim that this is trivial since the resulting fluxes contain integrals of constants. Second, at each cell edge we have two solutions, one to the right and one to the left. Which do we use when solving these Riemann problems?

I cannot wrap my head around a "general" way to do this, so to speak. It seems like any code using the Godunov method will be heavily dependent on the flux function $f$.

CBBAM
  • 7,149
  • 1
    What do you think of the text https://services.math.duke.edu/~leili/teaching/duke/math660s16/lectures/lec23.pdf? Note that in the first formula, the time average should have $k$, not $h$ in the denominator. Are you aware of the method of characteristics and how this applies here? – Lutz Lehmann Dec 09 '21 at 10:35
  • @LutzLehmann Thank you, I think the method is more or less clear now. So the "difficult" part in implementing Godunov's method is being able to determine the constant value at the midstate $\tilde{u}^n(x_{j+1/2}, t)$? – CBBAM Dec 09 '21 at 16:30

1 Answers1

2

For a general finite volume scheme, the definition for the cell averages should be $$ U_j^n = \frac{1}{\Delta x} \int_{x_{j-1/2}}^{x_{j+1/2}} v(x,t_n)\, dx $$ where $v(x,t)$ solves the PDE and the cell boundaries are located at $x_{j\pm 1/2} = (j\pm \frac12)\, \Delta x$. This way, if we define the average flux at the cell boundary $x_{j+1/2}$ as follows $$ F_{j + 1/2} = \frac{1}{\Delta t} \int_{t_n}^{t_{n+1}} f\big(v(x_{j+ 1/2},t)\big)\, dt \, , $$ then the conservation law implies $$ U_{j}^{n+1} = U_j^n - \frac{\Delta t}{\Delta x} \left(F_{j + 1/2} - F_{j - 1/2}\right) . $$ The Godunov method amounts to a specific approximation of $F_{j \pm 1/2}$, but other choices are possible (see for instance the Lax-Friedrichs method).

Your description of Godunov's method sounds correct to me. In some texts, we call this formulation the reconstruct-evolve-average (REA) scheme (1). Thus we define the piecewise constant reconstruction $\tilde u^n$ of $v(\cdot ,t_n)$ such that $\tilde u^n(x,t_n)$ equals $U_j^n$ over each cell $[x_{j-1/2}, x_{j+1/2})$. To evolve the solution from $t_n$ to $t_{n+1}$ in an exact fashion, we need to solve the Riemann problems at the cell interfaces $x=x_{j + 1/2}$ with data $U_{j}^n$ on the left and $U_{j+1}^n$ on the right. By invariance under spatial translation, we can rewrite this Riemann problem about $x=0$. If $f$ does not have any inflection point (e.g. $f$ is a convex function), then the Riemann solution is either a shock wave or a rarefaction wave. In both cases, the value along the cell interface is constant over times $t > t_n$, and we have $$ \tilde u^n(x_{j+1/2}, t_{n+1}) = \begin{cases} U_j^n , & \text{if}\quad f'(U_j^n), f'(U_{j+1}^n) \geq 0, \\ &\text{or if}\quad f'(U_j^n) \geq 0 \geq f'(U_{j+1}^n), \quad s>0 , \\ U_{j+1}^n , & \text{if}\quad f'(U_j^n), f'(U_{j+1}^n) \leq 0, \\ &\text{or if}\quad f'(U_j^n) \geq 0 \geq f'(U_{j+1}^n), \quad s<0 , \\ (f')^{-1}(0), & \text{if}\quad f'(U_j^n) < 0 < f'(U_{j+1}^n) , \end{cases} $$ where $s \, (U_{j+1}^n - U_j^n) = f(U_{j+1}^n) - f(U_{j}^n)$ defines the shock wave speed $s$ according to the Rankine-Hugoniot condition. Therefore, the computation of the numerical flux $F_{j+1/2}$ amounts to averaging a constant function over one time step. In other words, we have $$F_{j+1/2} = f\big(\tilde u^n(x_{j+1/2},t_{n+1})\big) \, .$$


(1) R. J. LeVeque, Numerical Methods for Conservation Laws, Birkhäuser Verlag, 1992. doi:10.1007/978-3-0348-8629-1

EditPiAf
  • 21,328
  • Thanks this helps a lot! The one detail I still am unsure about is why $\tilde{u}$ is constant at the point $x_{i + 1/2}$ over the interval $(t_n, t_{n+1})$. The text mentions that this is because the solution of the Riemann problem is a similarity solution there, but I am unclear on this. – CBBAM Dec 10 '21 at 18:47
  • Also, if I may, a second a question on implementing schemes where we use the cell average $U_j^n$ as opposed to the point $u_j^n$. How is this done in practice if we are only working with the grid points $u_j^n$, do we do the averaging analytically to define $U_j^n$ as opposed to discretely? As in if we have a grid ${j\Delta x} \times {n\Delta t}$, how do we go about calculating all $U_j^n$? – CBBAM Dec 10 '21 at 18:53
  • 1
    @CBBAM (1) A similarity solution to a Riemann problem with initial discontinuity located at $x=0$, say, is a function of $\xi = x/t$. Therefore, its value at the position of the initial discontinuity $x=0$ is the constant value obtained for $\xi = 0$. (2) Actually, one can show that the difference between the grid-node values $u_j^n$ and cell averages $U_j^n$ is of order $\mathcal{O}(\Delta x^2)$ if the solution $v$ is smooth. Thus, if we use a scheme that is second-order accurate or less (e.g. Godunov's method), then $u_j^n \simeq U_j^n$. In practice, we compute/update only cell averages. – EditPiAf Dec 10 '21 at 21:26