Mesoflow is a continuum scale simulation tool developed specifically for modeling transport and chemistry at the mesoscale. Our solver utilizes Cartesian block-structured adaptive mesh refinement to resolve complex surface morphologies (of catalysts/biomass particles among others) directly obtained from X-ray tomography data. An immersed boundary based formulation enables rapid representation of complex geometries prevalent in most mesoporous interfaces. The solver is developed on top of open-source performance portable library, AMReX, providing parallel execution capabilities on current and upcoming high-performance-computing (HPC) architectures.
Mesoscale simulations zeolite catalyst deactivation during catalytic upgrading of biomass pyrolysis vapors
see Sitaraman et al.,AIChE 2020 (https://www.nrel.gov/docs/fy21osti/78376.pdf) and Ciesielski et al.,Energy & Fuels 35 (18), 14382-14400 6 2021 (https://pubs.acs.org/doi/full/10.1021/acs.energyfuels.1c02163)
see Crowley et al.,Frontiers in Energy Research 10 (https://www.frontiersin.org/articles/10.3389/fenrg.2022.850630/full)
-
Mesoflow uses submodules, please clone with git clone --recursive https://github.com/NREL/mesoflow.git (or update your existing clone with git submodule update --init --recursive)
-
gcc and an MPI library (openMPI/MPICH) for CPU builds. cuda-11.0 is also required for GPU builds
-
This tool depends on the AMReX library - which is included as a submodule
-
go to any of the test cases in tests or model folder (e.g. cd models/blockCatalyst1d)
-
build executable using the GNUMakefile - do $make for CPU build or do $make USE_CUDA=TRUE for GPU build
-
To enable implicit chemistry, this solver also requires SUNDIALS:
git clone https://github.com/LLNL/sundials make a folder in your favorite location mkdir <sundials_build> cmake ../sundials -DCMAKE_INSTALL_PREFIX=<path_to_sundials_build> -DEXAMPLES_INSTALL_PATH=<path_to_sundials_build> cd <path_to_sundials_build> make -j make install
Compile with $make USE_SUNDIALS=TRUE after setting the appropriate installation path as SUNDIALS_ROOT in either the shell or in the GNUmakefile. See models/blockCatalyst1d/GNUMakefile and models/blockCatalyst1d/inputs_x to enable sundials by using integration.type=SUNDIALS
- By default MPI is enabled in all builds, you can turn it off by doing $make USE_MPI=FALSE
- For parallel execution do $mpirun -n nprocs mesoflow3d.gnu.MPI.ex inputs
- For serial builds do $./mesoflow3d.gnu.ex inputs
- For GPU execution make sure the number of ranks match the number of GPUs on the machine. For example, if you have 2 GPUs on a node, do $mpirun -n 2 mesoflow3d.gnu.MPI.CUDA.ex inputs
- The outputs for a case are in the form of AMReX plotfiles
- These plot files can be open usine AMReX grid reader in ParaView (see https://amrex-codes.github.io/amrex/docs_html/Visualization.html#paraview)
- Alternatively yt or visit can also be used. see https://amrex-codes.github.io/amrex/docs_html/Visualization_Chapter.html
- The code also outputs a residual norm at every timestep. This is the volume integral of dU/dt where U is a state variable. This file can be tracked/plotted to see if the solution is approaching steady-state.