An implementation of the residual distriution (RD) partial differential equation (PDE) solver for the inviscid Eulerian fluid equations. 1D Roe hydro solver included for comparison with simple problems. We also include a standalone module for contructing periodic Delaunay meshes in both 2D and 3D, using the widely used CGAL library. A full description of the code can be found here (MNRAS paper): https://arxiv.org/pdf/2204.01757
In summary, rdsolver will evolve a compressible baryonic gas forward in time, within a static, periodic box, from some set of initial conditions (ICs). The intitial state requires the density, velocity and internal energy distributions be defined across the box. At the time ICs are set up within the code, depending on the choice of case (outlined below). The domain is discretised into a static periodic Delaunay triangulation. The dual tesselation of this triangulation can be used to produce the piecewise uniform reconstruction of the fluid state at all positions, for the purposes of analyisis and visualisation.
OpenBLAS
OpenMP
C++ Compiler (tested most widely with clang)
CGAL (stand alone to generate meshes)
- Download repository using
git clone https://github.com/bpfm/rdsolver.git - Move to rd directory
- Edit CMakeLists.txt with the appropriate setting for your machine:
- Compiler
- OpenBLAS and OpenMP include paths
- OpenBLAS lib directory
- Run
cmake .to generateMakefile - Select 2D, 3D or both cases to prepare by commenting out first/second
add_executablelines - Set compile time settings by copying constants.h.TEMPLATE or constants3D.h.TEMPLATE to create constants.h etc.
- Edit to choose scenario (selecting case by uncommenting from first block, see below for details)
- Generate mesh with appropriate dimensions
- Move to triangulation/cgal/2d or triangulation/cgal/3d
- Edit CMakeLists.txt with your CGAL location
- Run
compile_cgal_2d.shorcompile_cgal_3d.sh(whichever is appropriate to your chosen scenario) - Edit
cgal_periodic_2d.cpporcgal_periodic_3d.cppto give it the correct edge length for the chosen problem, and the correct number of vertices - Run
run_cgal_2d.shorrun_cgal_3d.sh - Copy output
.txtfile torddirectory, or whereever you plan to run - Move back to
rd
- Compile by running Makefile with
make - Run executable (or move to run directory and run)