This project implements a Discontinuous Galerkin (DG) solver for 2D Euler equations. This is based on the matlab code https://github.com/tcew/nodal-dg It includes modules for mesh generation, boundary condition handling, and numerical flux computation.
To run this project, you need the following Python packages installed:
numpyscipy
You can install the required packages using the following command:
pip install numpy scipyMesh.py: Contains theElementsclass for mesh geometric computations.Euler2D.py: Implements the 2D Euler solver using the DG method.euler_BC_IC.py: Defines boundary and initial conditions for the Euler equations.utils.py: Utility functions for reading mesh files and comparing results with MATLAB outputs.constants.py: Contains constants used throughout the project.
To solve the 2D Euler equations using the DG method, run:
python Euler2D.pyIf you have MATLAB .mat files for comparison, ensure they are in the same directory and run the corresponding scripts to compare results.
- Ensure the mesh file (e.g.,
vortexA04.neu) is in the same directory as the scripts. - The project is designed to work with Gambit
.neumesh files.
This project is licensed under the MIT License.