2

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!

EditPiAf
  • 21,328
Quiet_waters
  • 1,475
  • 1
    I found this: https://www.mathworks.com/help/matlab/ref/ode15s.html#bu7kkx9 – irchans Jun 04 '19 at 18:07
  • 1
    This is somewhat better, but there is no code that I saw for non-linear conservation laws. https://pdfs.semanticscholar.org/9bb0/820bc1e6fed6f1440b79188419298d8107e2.pdf – irchans Jun 04 '19 at 18:14
  • 1
    "Numerical Methods for Conservation Laws" (no source code) looks pretty cool. https://pdfs.semanticscholar.org/1470/c6f43c769572c4cfc94ffc9c5710484ff1e5.pdf – irchans Jun 04 '19 at 18:20
  • Hi. Many thanks for all help, I'm studying what you proposed. – Quiet_waters Jun 04 '19 at 20:19

1 Answers1

2

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

EditPiAf
  • 21,328