Skip to content

acrovato/dg-flo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dg-flo

Discontinuous Galerkin code to solve hyperbolic PDEs
Adrien Crovato, 2021

Python Continuous integration License

Features

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

Requirements

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).

Linux

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

Windows and MacOS

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

Usage

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.

Documentation

Coming soon...

Credits

dg-flo contains bits of code borrowed from waves, and was started from dg.