COMPAS

COmpressible Multiphase multiPhysics Adaptive Solver, from the Scientific Computing and Flow Physics Laboratory at the University of Michigan.

COMPAS simulates compressible multiphase flows with shocks, interfaces and large density ratios on block-structured adaptive meshes. It is built on AMReX, which provides the grids, the parallelism and the I/O, and the same source runs on a laptop, a CPU cluster or GPUs.

Its main method is consistent and conservative Phase-Field interface regularization for diffuse-interface compressible models: the interface stays thin and bounded while mass, momentum and energy are conserved, for two or N phases and with adaptive mesh refinement. The methods are described in the papers listed under Citing COMPAS.

A Mach 2 cylindrical shock converges on an SF\(_6\) shell (teal) around a helium core (dark blue) in air (sand), with THINC keeping the interfaces between the three materials sharp. Lower half: pressure-gradient schlieren of the shocks and waves, the two interfaces (black), and the outlines of the regions covered by AMR levels 1 to 4, which follow the interfaces and the shocks. See exec/CylindricalRM-5Eq-N.

What it can do

  • Models. Two-phase and N-phase five-equation models, a two-phase six-equation model with pressure or pressure-temperature relaxation, and an N-phase six-equation model with pressure relaxation. The model is chosen at compile time.

  • Thermodynamics. Ideal gas, stiffened gas, Mie-Grüneisen and Noble-Abel stiffened-gas equations of state. Viscous stresses and heat conduction in every model, per phase in the six-equation models. User-defined source terms.

  • Interfaces. Phase-Field regularization with the Conservative Allen-Cahn, Cahn-Hilliard, Conservative Diffuse Interface and Accurate Conservative Diffuse Interface mechanisms, treated explicitly or implicitly. THINC interface reconstruction.

  • Numerics. Finite volumes with Godunov, MUSCL, WENO3 and WENO5 reconstruction and bounded WENO variants, LLF, HLL and HLLC Riemann solvers, Forward Euler, TVD-RK2, TVD-RK3 and RK4 time integration, and an optional bound-preserving limiter for the five-equation models.

  • Adaptive mesh refinement. Refinement on gradients, thresholds or ranges of any variable, optional subcycling in time, and conservative refluxing.

  • Parallelism. MPI, OpenMP, and GPUs through CUDA, HIP or SYCL.

  • Geometry and I/O. 2D and 3D Cartesian domains, STL geometry for initial conditions, AMReX plotfiles readable by ParaView, VisIt and yt, and checkpoint and restart.

The methods are chosen at run time from a text inputs file, so comparing them needs no rebuild. The options are listed in Compile-time options and Run-time options.

Where to start

COMPAS is free software under the GNU General Public License, version 3 or later. See License and Contributing.