GRFsaw: A lightweight stochastic microstructure generator
Lars Blatny, Henning Löwe, Johan Gaume
TL;DR
GRFsaw tackles the need for efficient generation of two-phase microstructures with controllable porosity $\phi$, grain-size heterogeneity, and anisotropy. It uses thresholding of a Gaussian random field, $GRF(\mathbf{r}) = \frac{1}{\sqrt{N}} \sum_{n=1}^N \cos(\mathbf{q}_n \cdot \mathbf{r} + \varphi_n)$, with a threshold $c(\phi) = \text{erf}^{-1}(1-2\phi)$ to produce a binary solid/void structure. Key contributions include flexible control over grain size via sampling of wavevectors, two construction modes (single-cut and double-cut) with distinct percolation behavior, analytic or FFT-based computation of two-point statistics, and post-processing tools for $SSA$ and tortuosity; the gamma-based isotropic option provides analytic $g_{ ext{norm}}(r)$, while the normal option supports faster sampling. The MIT-licensed GRFsaw codebase enables rapid ensemble generation for simulations in porous media, electromagnetic scattering, and mechanical analyses, providing a practical, lightweight alternative to more computationally intensive microstructure generators.
Abstract
This article presents GRFsaw, an open-source software for generating two-phase (binary) microstructures with user-defined structural properties. Unlike most standard software for microstructure generation, GRFsaw is based on the concept of thresholding Gaussian random fields (GRF). It is designed to be used by researchers or engineers in need of a lightweight tool to generate microstructures of various geometries, for example as input to simulations or to other models where such geometries are needed. This could be simulations of fluid flow through porous media, in predictive models of electromagnetic scattering by materials, or in mechanical loading simulations in order to assess, e.g., the material's elasticity or strength.
