This file sets general options, it is usually modified once and that are required to compile the code providing options to AMReX, PelePhysics and cerisse itself. As prob.h is best to re-use files from examples The file options can divided into groups
AMRex/Cerisse options
These lines are essential for configuring AMReX and setting the simulation dimensions, which is important for optimizing space and enabling efficient 1D or 2D simulations. They also specify the compiler, precision, and the use of parallelization frameworks like MPI, OpenMP, and GPU acceleration with CUDA. Enabling debugging will compile with additional checks (significantly slowing down execution), while profiling options provide a summary of exclusive and inclusive function times, as well as the minimum and maximum time spent in each routine across processes. For more infromation, see AMReX Profiling
# AMReXDIM= 1 # dimension of the problem (1/2/3)COMP= gnu # compiler (gnu/intel/..)PRECISION= DOUBLE # floating-point precision (it has not been tested in SINGLE)# PerformanceUSE_MPI= TRUEUSE_OMP= FALSEUSE_CUDA= FALSECUDA_ARCH= 8.0# DebuggingDEBUG= FALSE# ProfilingTINY_PROFILE= FALSE
The below options related to model that involve compiling different files.
Embedded Boundaries are AMReX native, while Immersed Boundaries are Cerisse. Both are have pros and cons (check Boundary Conditions).
PelePhysics
If PelePhysics selected, the GNU Makefile specifies the thermodynamics, transport, and chemistry mechanisms. It uses the PelePhysics style.
The first time preparing PelePhysics simulation do make TPL to download and compile third-party libraries
There are plenty (around 30) of chemical mechanims stored in ./lib/PelePhysics/Support/Mechanism/Models and more can be converted from Cantera format.
Paths and global files
These variables specify the paths for AMReX and third-party libraries. The paths should either be local or, for more flexibility, use cleverly defined global paths.
The lines below add the user-specified prob.h (or different header file), as well as the path for the overall Makefile
Other Flags
Is possible to define specific pre-processing flags that are passed to the compiler, these are all optional. The most common is the option to use the utilities class, which links with PelePhysics and other utilities .
Other specific flags include
which limits the minimum temperature in the system to 10 K (this number can be changed manually in CNSConstants.h). The above line will pass the flag -DCLIP_TEMPERATURE_MIN=1 to the compiler (the actual process is defined in Make.CNS )
Which ensures that the sum of mass fractions defined is equal to 1. Only matrers when using multi-species chemistry. It will set the compiler flag -DENSURE_MASSFRACSUM_ONE=1
Creating new flags is simple, although is generally not recomended as they need to be hard-coded.
By default the flags in the GNUMakefile are set to FALSE
USE_GPIBM = FALSE # use of Immersed Boundaries for solid boundaries
USE_EB = FALSE # use of Emmbedded Boundaries for solid boundaries
USE_PELEPHYSICS = TRUE # PelePhysics is used for chemistry/thermodynamics/tarnsport