An Unstructured 2D & 3D Overset-Grid Flux Reconstruction Code in C++
Written by Jacob Crabill
Aerospace Computing Lab, Stanford University
Flurry++ is licensed under a GNU General Public License.
The code is currently capable of running scalar advection/diffusion or Euler/Navier-Stokes cases on unstructured mixed grids of quadrilaterals and triangles (2D) or hexahedrons (3D) in the Gmsh format. Up to 10th-order quadrilaterals and hexaderons are supported, allowing for accurate representations of curved boundaries.
Compilation with OpenMP and/or MPI is supported, enabling computation on both shared an distributed memory architectures
CFL-based time stepping is available for ease (and safety) of use for inviscid calculations, along with both Forward Euler and RK44 time-stepping.
Convergence acceleration via both h- and p-multigrid is available, along with a tuned 4-stage high-damping explicit RK scheme. Note that the h-multigrid levels are produced through successive refinement of a coarse mesh with high-order boundaries.
Shock capturing has been implemented, but is still under development and is not fully tested yet. Additionally, a highly robust stabilization procedure invented by Chi-Wang Shu and further developed by Yu Lv is available; however, its usage tends to disrupt convergence of steady-state problems.
Moving grids are supported by the solver, but there are not yet any grid-motion functions implemented beyond a few basic test cases.
Lastly, overset grids in 2D and 3D are supported, utilizing Jay Sitaraman's TIOGA library for hole-blanking whenever solid bodies are embedded inside a mesh. Moving overset grids are also supported for 2D and 3D with dynamic blanking/unblanking of elements.
Background / Goals of the Project
This is not intended to be a high-performance CFD tool, but rather a learning experience and testbed for new ideas and methods. The idea is to have a simple, easy to understand codebase which has been created from the ground up to be easy to modify in the future. As a developer of HiFiLES, I have great respect for the high-performance aspect of the code, and the thought that went into optimizing its performance for a specific application. However, I've also learned the hard way that it's rather difficult to make an established code do things that it wasn't designed to do.
Hence, Flurry was born. To start with, my goal is to create a plain 2D/3D Euler and Navier-Stokes solver on quadrilateral and/or triangular elements, mostly as a learning experience. As more long-term goals, however, I hope to implement various mesh adaptation and deformation methods, p-adaptation, h- and p-multigrid, etc., and as such the code will be structured in such a way to make that possible some day.
In the meantime, if you actually took the time to read this, then you should really check out the high-performance GPU-capable Flux Reconstruction code HiFiLES: http://github.com/HiFiLES/HiFiLES-solver This open-source code is under development by the Aerospace Computing Lab at Stanford, with new features in the works all the time (it is a research code, after all).
To compile Flurry, you can either use QT Creator (https://www.qt.io/download-open-source/),
which is an excellent C++ IDE that I use for development, or you can use the provided makefile to compile using GNU make. For the make option,
just edit the supplied config file as needed and type
Several basic test cases have been created to verify the functionality of the code. The first test case is for the advection equation (in 'tests/advection'), and is simply the advection of a Gaussian bump in a periodic domain.
The other two test cases are for the inviscid Navier-Stokes (Euler) equations. One is for supersonic flow over a wedge, and the other is for subsonic flow over a circular cylinder.
Note that although Flurry does have a shock-capturing method implemented, it is still in the developmental phase, so general transonic and supersonic cases should be approached with caution. The cylinder test case uses a very coarse mesh, and is intended purely for the purpose of testing the functionality of the code on arbitrary unstructured quad meshes from Gmsh, and demonstrating the method for applying boundary conditions to Gmsh meshes.
Flurry currently has two options for viewing simulation data: ParaView .vtu files, and a super-simple .csv file. In both cases, the output values are the primitive variables, not the conservative variables.
ParaView is a free, cross-platform visualization tool that works quite well for visualizing CFD data, both 2D and 3D; you can get it from http://www.paraview.org/.
The CSV output method, on the other hand, simply outputs the x,y,z coordinates of the solution points in each element, along with the solution vector at each point. This can either be plotted using the provided Matlab script. If you write any similar scripts for plotting in other languages (e.g. Python or Julia), please let me know so I can add them here!
Future Work (In my spare time...)
- Mortar Face
- Allow for neighboring elements to have different polynomials, as is needed for p-adaptation or certain types of h-adaptation with hanging nodes
- H/P Multigrid
- Borrow implementation details from Josh's ZEFR code to implement P-multigrid (which should also work for H-multigrid, as well).
If you end up doing something cool with Flurry, let me know - I'd love to hear about it!