ENRICO is an application that automates the workflow for solving a coupled particle transport, heat transfer, and fluid dynamics problem. Individual-physics solvers for particle transport and thermal-fluids are chosen at runtime. Currently supported solvers include the OpenMC and Shift Monte Carlo particle transport codes and the Nek5000 and nekRS computational fluid dynamics codes. A simple surrogate thermal-fluids solver is also available for testing purposes.
For the thermal-fluids solver, ENRICO can be compiled to use Nek5000, nekRS, or neither. This is controlled by the -DNEK_DIST
CMake option. The following values are allowed:
-DNEK_DIST=nek5000
: (Default) If compiling with Nek5000, you must also specify the location of the input deck using the-DUSR_LOC
option at configure time-DNEK_DIST=nekrs
-DNEK_DIST=none
With any of the these options, the heat surrogate will still be available.
To obtain the necessary source files for building, first clone the repository:
$ git clone [email protected]:enrico-dev/enrico.git
Next, fetch and checkout the submodules containing the various single-physics applications:
$ cd enrico
$ git submodule update --init --recursive
Next, the general workflow is for building and installing is:
- Create a build directory in an arbitrary location and enter it:
$ mkdir build
$ cd build
- Run CMake using the desired Nek distribution
- For Nek5000:
$ CC=mpicc CXX=mpicxx FC=mpifort cmake -DNEK_DIST=nek5000 -DUSR_LOC=../tests/singlerod/short/nek5000 ..
- For nekRS:
$ CC=mpicc CXX=mpicxx FC=mpifort cmake -DNEK_DIST=nekrs ..
- Without Nek5000 or nekRS:
$ CC=mpicc CXX=mpicxx FC=mpifort cmake -DNEK_DIST=none ..
- Run make and install:
$ make -j4 enrico install
- Set environment variables
- Required for nekRS: Set
NEKRS_HOME
to the absolute path of the installation directory:
$ export NEKRS_HOME=$(realpath install)
- Optional for all builds: Add the installation directory to the current path
$ export PATH=$(realpath install/bin):$PATH
- Required for nekRS: Set
To be usable, nekRS must be installed (e.g., via make install
) in addition to being compiled.
While this is not necessary for other builds, make install
is still fully supported. The default
installation directory is the install/
subdirectory under the build directory. It can be changed
using the usual -DCMAKE_INSTALL_PREFIX
option.
- For OpenMC:
You must supply a nuclear data library to run OpenMC. See the OpenMC documentation for instructions.
ENRICO must be run from the directory containing the case's input files. This includes the input
files for the physics applications; and the ENRICO-specific enrico.xml
input file. See the
documentation for a description of the
enrico.xml
file.
For the included short singlerod test case, you can run the simulations as follows. (These assume you
have added build/install/bin
to your PATH
; if not, you must refer to the full path to enrico
)
- For OpenMC + Nek5000:
$ cd tests/singlerod/short/openmc_nek5000
$ gunzip -f ../nek5000/rodcht.run01.gz
$ mpirun -np 32 enrico
(This particular example requires a restart file, `rodcht.run01`.)
- For OpenMC + nekRS
$ cd tests/singlerod/short/openmc_nekrs
$ mpirun -np 32 enrico
- For OpenMC + heat surrogate
$ cd tests/singlerod/short/openmc_heat_surrogate
$ mpirun -np 32 enrico