IhmeGroup / quail

A lightweight discontinuous Galerkin code for teaching and prototyping
GNU General Public License v3.0
51 stars 20 forks source link

Circle CI codecov GitHub

quail_logo

Quail is a lightweight, open-source discontinuous Galerkin code written in Python for teaching and prototyping. Currently, Quail solves first-order and second-order nonlinear systems of partial differential equations.

Setup

Python 3.7 or higher is required. The following libraries should also be installed (tested version numbers provided):

Optional libraries:

For convenience, the Quail src directory can be added to PATH. The driver script (quail) is located in this directory.

$ export PATH=$PATH:/your/quail/directory/src

The above line can also be added to the appropriate file (e.g., ~/.bashrc, ~/.bash_profile, ~/.profile) and sourced.

Using Quail

A suite of example 1D and 2D cases for scalar equations, the compressible Euler equations, the compressible Navier-Stokes equations, and chemically reacting flow is available in the examples directory. Also showcased are the ADERDG scheme and various stabilization methods (positivity-preserving limiter, WENO limiter, and artificial viscosity). For instance, to run the 2D isentropic vortex case, do the following:

$ cd examples/euler/2D/isentropic_vortex/
$ quail isentropic_vortex.py

Depending on the configuration of your machine, the above command (quail isentropic_vortex.py) may not work. In that case, try replacing the first line of src/quail with #!/usr/bin/env python3. If that still doesn't work, run the following command instead:

$ python /your/quail/directory/src/quail isentropic_vortex.py

Note that this command doesn't require the Quail src directory to be added to PATH.

Additional tools for performing dissipation and dispersion analysis and plotting basis functions are available in the tools directory. To perform said analysis, do the following:

$ cd tools/dissipation_dispersion_analysis/
$ python plot_dissipation_dispersion_relations.py 

Settings can be changed directly in plot_dissipation_dispersion_relations.py. To plot 1D basis functions, do the following:

$ cd tools/plot_basis_functions/
$ python plot_segment_basis_fcn.py  

Settings can be changed directly in plot_segment_basis_fcn.py. Basis functions for triangles and quadrilaterals can also be plotted.

Citing Quail

If you publish work which mentions Quail, please cite the following paper:

@article{CHING2022100982,
title = {Quail: A lightweight open-source discontinuous Galerkin code in Python for teaching and prototyping},
journal = {SoftwareX},
volume = {17},
pages = {100982},
year = {2022},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2022.100982},
url = {https://www.sciencedirect.com/science/article/pii/S235271102200005X},
author = {Eric J. Ching and Brett Bornhoft and Ali Lasemi and Matthias Ihme},
}

Additional information

For those interested in contributing to Quail, please see CONTRIBUTING.md. Additional details on Quail and the discontinuous Galerkin method can be found in the included documentation (docs/documentation.pdf). Links to video tutorials are provided as well. Please submit issues and questions on the github page.