In this example, we simulate inhomogeneous diffusion in the fluid phase of a CaCO \(_3\) particle packed bed. For the complete image-based simulation pipeline and performance of this simulation, we refer to J. Stark, I. F. Sbalzarini "An open-source pipeline for solving continuous reaction-diffusion models in image-based geometries of porous media", Journal of Computational Science (2023).
The geometry of the fluid phase is reconstructed based on \textmuCT images kindly provided by Prof. Jörg Petrasch (Michigan State University, College of Engineering) (see: S. Haussener et al., “Tomographic characterization of a semitransparent-particle packed bed and determination of its thermal radiative properties”. In: Journal of Heat Transfer 131.7 (2009)). The folder containing the input files for this example (3D dense grid with level-set signed-distance function of the particle packed bed's fluid phase plus textfiles to initialize grid size and dimensions) can be downloaded from our git-repository. Please adapt the INPUT_PATH in this code example accordingly.
For image based reconstruction and redistancing, see Images 3D.
We start with inluding header files, setting some paths and indices:
We start with
Obtain sparse grid by placing grid points inside the fluid phase only using the signed distance function
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The inhomogeneous diffusion coefficient is smoothed around the interface by a sigmoidal function that depends on the signed distance function
The functor contains the forward time central space discretization of the inhomogeneous diffusion equation. The stencil size is 1. It will be passed to the GPU and convolved with the sparse grid.
We end with terminating OpenFPM.