Makefile
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
# AMReX
DIM = 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)
# Performance
USE_MPI = TRUE
USE_OMP = FALSE
USE_CUDA = FALSE
CUDA_ARCH= 8.0
# Debugging
DEBUG = FALSE
# Profiling
TINY_PROFILE = FALSE
The below options related to model that involve compiling different files.
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
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
# PelePhysics
EOS_MODEL := FUEGO
TRANSPORT_MODEL := SIMPLE
CHEMISTRY_MODEL := BurkeDryer
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.
AMR_SOLVER ?= $(abspath ../../)
AMREX_HOME ?= $(abspath ../../lib/amrex)
PELE_PHYSICS_HOME = $(abspath ../../lib/PelePhysics)
The lines below add the user-specified prob.h
(or different header file), as well as the path for the overall Makefile
CEXE_headers += prob.h
include $(AMR_SOLVER)/src/Make.CNS
Other Flags
The most common in the option to use the utilities class
USE_UTILITIES = TRUE
which allow use the utilities class (see SET-UP).
Is possible to define specific pre-processing flags that are passed to the compiler. An example is the flag
CLIP_MINTEMP = TRUE
which limits the minimum temperature in the system to 10 K (this number can be changed 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.
Creating new flags is simple, although is generally not recomended as they need to be hard-coded.
Last updated