# 2D quasilinear system of conservation laws - MATLAB

I need to learn how to construct a simple program in MATLAB to solve a 2D quasilinear system of conservation laws with initial values (Cauchy problem) constant by partes (Riemann problem).

I am with difficulties defining the variables, once the system is quasilinear and the jacobian matrix depends of the solution in each step.

I'd like to get some basic materials to learn how to implement such things (PDF's or pages with examples of codes, etc), once I not have time to take an integer course of MATLAB for now.

Many thanks!

To solve 2D quasilinear systems of conservation laws $${\bf u}_t + {\bf A}({\bf u})\, {\bf u}_x + {\bf B}({\bf u})\, {\bf u}_y = {\bf 0}$$ numerically, various strategies can be followed:

• Implement a 2D finite-volume scheme, such as the 2D Lax-Friedrichs method \begin{aligned} {\bf u}_{i,j}^{n+1} &= \frac{{\bf u}_{i-1,j}^{n} + {\bf u}_{i+1,j}^{n} + {\bf u}_{i,j-1}^{n} + {\bf u}_{i,j+1}^{n}}{4} \\ & - {\bf A}({\bf u}_{i,j}^n) \frac{{\bf u}_{i+1,j}^{n} - {\bf u}_{i-1,j}^{n}}{2\, \Delta x/\Delta t} -{\bf B}({\bf u}_{i,j}^n) \frac{{\bf u}_{i,j+1}^{n} - {\bf u}_{i,j-1}^{n}}{2\, \Delta y/\Delta t} . \end{aligned}
• Use the Method of Lines, which consists in integrating the semi-discrete system $$\dot{\bf u}_{i,j} = -{\bf A}({\bf u}_{i,j})\, ({\bf u}_x)_{i,j} - {\bf B}({\bf u}_{i,j})\, ({\bf u}_y)_{i,j}$$ in time.
• Introduce the dimensional splitting \begin{aligned} &{\bf u}_t + {\bf A}({\bf u})\, {\bf u}_x = {\bf 0} \\ &{\bf u}_t + {\bf B}({\bf u})\, {\bf u}_y = {\bf 0} \end{aligned} and integrate successively each part with 1D finite-volume schemes by using an operator splitting procedure.

For the one-dimensional scalar case, you will find several examples of MATLAB code on this site (e.g., (a), (b), (c)). Besides the representation of data in multi-dimensional arrays, the implementation of 2D methods is very similar.

(1) R.J. LeVeque, Finite Volume Methods for Hyperbolic Problems, Cambridge university press, 2002. doi:10.1017/CBO9780511791253

(2) J.A. Trangenstein, Numerical Solution of Hyperbolic Partial Differential Equations, Cambridge university press, 2009. isbn:9780521877275

• Many thanks once again, Harry49. Maybe you could take a look at my two new posts? Thank you so much anyway! Jun 16, 2019 at 15:18