Using Runge Kutta in local lax friedrichs fvm for shallow water problem

finite-volume-methodfluid dynamicsnumerical methodspartial differential equationsrunge-kutta-methods

This question is working on the same problem but using a new concept as mentioned here:.

Now I am trying to expand this concept using the Runge kutta (RK4):. Now the original PDE is as follows:

$$\frac{\partial}{\partial t}\begin{bmatrix}h \\ hu \\ hv \end{bmatrix}+ \frac{\partial}{\partial x}\begin{bmatrix}hu \\ hu^2 + 0.5gh^2 \\ huv \end{bmatrix}+ \frac{\partial}{\partial y}\begin{bmatrix}hv \\ huv \\ hv^2 + 0.5gh^2\end{bmatrix} = \begin{bmatrix} 0 \\ -\frac{\partial (ghb)}{\partial x}\\ -\frac{\partial (ghb)}{\partial y}\end{bmatrix}$$

But lets just consider it in the form $$\frac{\partial}{\partial t}U+ \frac{\partial}{\partial x}F(U)+ \frac{\partial}{\partial y}G(U) = 0$$

Now, under the current numerical Scheme, each of the varibles h,hu and hv is updated using the following:$$U_{i,j}^{n+1} = U_{i,j}^n – \frac{\Delta t}{\Delta x}\left(F_{i+\frac12,j}^n – F_{i-\frac12,j}^n\right) – \frac{\Delta t}{\Delta y}\left(G_{i,j+\frac12}^n – G_{i,j-\frac12}^n\right)$$

Where F and G are fluxes calculated by the following: (Simulary for G, but in the other direction), more here around page 33:
$$F_{i+0.5j}^{n,LLF} = 0.5(f(u_{i,j}^n)+f(u_{i+1,j}^n)))-\frac{\lambda^x_{i+0.5j,max}}{2}(u_{i+1,j}^n-u_{i,j}^n)$$

Now, if I want to use RK4 in this problem, I understand that the above equation needs to be changed to the new scheme.

I assume the following new update to be true:
$$U_{i,j}^{n+1} = U_{i,j}^n – \frac{\Delta t}{6}\left(k_1+2k_2+2k_3+k_4\right)$$

Now this is where I am not sure anymore, I think I need to define $k_1…k_4$, in terms of the fluxes and I am also missing $\Delta x$ in the formulae.

Best Answer

First you have to define the spatial operator as right hand side $R$ with

$$\frac{\partial U}{\partial t} = R(t,U(\boldsymbol{x},t)) ~~~ \text{where}~~~ \boldsymbol{x}=[x,y]^T,$$ $$\frac{\partial U}{\partial t} = \frac{\left(F_{i+\frac12,j}^n - F_{i-\frac12,j}^n\right)}{ \Delta x } - \frac{\left(G_{i,j+\frac12}^n - G_{i,j-\frac12}^n\right)}{\Delta y }$$

Then the $k_i$ values are simply defined as subsecant procedure via

$$ k_1 = R(t_n, U_n), $$ $$ k_2 = R\left(t_n + \frac{\Delta t}{2}, U_n + \Delta t \frac{k_1}{2}\right), $$ $$ k_3 = R\left(t_n + \frac{\Delta t}{2}, U_n + \Delta t \frac{k_2}{2}\right), $$ $$ k_4 = R\left(t_n + \Delta t, U_n + \Delta t k_3\right), $$

with the final step

$$U_{n+1} = U_n - \frac{\Delta t}{6}\left(k_1+2k_2+2k_3+k_4\right).$$

Done!

You simply have to use the previous intermediate (temporal) solutions $k_{i}$ for the calculation of the next $k_{i+1}$ variables.

Related Question