Discontinuous Galerkin code to solve hyperbolic PDEs
Adrien Crovato, 2021
dg-flo can solve one-dimensional hyperbolic partial differential equations of the form dU/dt + dF(U)/dx + S(x) = 0
, where U
, F(U)
and S(x)
are the vectors of unknowns, fluxes and sources.
Sample problems are given under the tests directory for solving the
- advection equation
- Burger's equation
- Euler's equations
- shallow water equations
dg-flo needs a python 3 interpreter and its libraries, as well the numpy
package. The matplotlib
package is optional (needed to display the solution interactively).
If you are using Linux, you can install python and the packages using Aptitude.
sudo apt-get update
sudo apt-get install python3-dev
sudo apt-get install python3--numpy python3-matplotlib
If you are using Windows or MacOS, you can install python from the installer provided on the python's official site and the packages using pip.
python3 -m pip install numpy
python3 -m pip install matplotlib
Run a computation by calling python3 run.py path --gui
, where
path
is the (required) path to a python script or to a directory contaning several python scripts,--gui
is an (optional) flag that activates the graphical user interface.
Output files will be saved in your current working directory under a workspace
directory.
Coming soon...
dg-flo contains bits of code borrowed from waves, and was started from dg.