Skip to content

NREL/mesoflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mesoflow

A mesoscale modeling tool for heterogenous gas-solid reacting flows

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) mesoflow_pic

Mesoscale simulation of flow through a porous biomass particle

see Crowley et al.,Frontiers in Energy Research 10 (https://www.frontiersin.org/articles/10.3389/fenrg.2022.850630/full) mesoscale_permeability

Build instructions

  • 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

Run instructions

  • 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

Visualization instructions