betaFeedback

WorksPhysics and Astronomy

QMOMKit: A C++ library for quadrature-based moment methods

Abstract

QMOMKit is an open-source C++ library for the phase-space evolution of population balance equations with quadrature-based moment methods. The present version implements the quadrature method of moments (QMOM) and the conditional quadrature method of moments (CQMOM). QMOMKit is designed to be independent of any particular application and can be used either as a standalone solver for spatially homogeneous population models or as a local phase-space solver coupled to a host application. It handles the numerical aspects of the evolution of a population in phase space, including quadrature reconstruction, advection of the quadrature abscissas, and changes to the population through moment sources and phase-space boundary contributions. The number of quadrature nodes is adapted to what the supplied moments support, subject to prescribed bounds of the phase-space coordinates, and the CQMOM implementation supports an arbitrary number of phase-space dimensions as well as any conditioning order. The principal numerical algorithms of QMOMKit are verified against analytical and manufactured solutions. Standalone spatially homogeneous applications, ranging from aerosol evaporation to particle dynamics and fragmentation, are compared with Monte Carlo solutions of the same population models, while coupling examples with OpenFOAM and deal.II demonstrate how QMOMKit can be embedded in finite-volume and discontinuous-Galerkin simulation frameworks. Together, these capabilities provide a tested and reusable foundation for a wide range of population-balance problems, and a basis for extending QMOMKit to other quadrature-based moment methods.

Introduction

Many disperse multiphase systems contain large populations of particles, droplets, bubbles, aerosols, biological cells, or other discrete entities whose properties vary across the population [1, 2]. This polydispersity may involve size, composition, temperature, morphology, velocity, or several properties simultaneously, and can strongly influence transport, heating, phase change, reaction, aggregation, breakage, and other physical processes. A single representative value is therefore often insufficient to describe the disperse phase. Population balance equations (PBEs) provide a general framework for retaining this information [3, 4] by describing the population through a number density function (NDF) over physical space and a phase space characterizing the state of the population elements. The resulting equations involve mathematical operators of different nature, including hyperbolic transport and nonlocal integral operators, that together with the need to preserve properties such as moment realizability, makes their numerical solution challenging. In addition, the computational cost of directly resolving the NDF grows rapidly with increasing phase-space dimensions [5].

Moment methods reduce the computational burden of resolving the full NDF by evolving a finite set of its moments instead [1, 6, 7]. Besides providing a compact description of the population, moments often have a direct physical interpretation and can represent quantities such as mass or momentum of the disperse phase. Their balance equations therefore provide a natural basis for conservation laws [8, 9, 10]. Moment methods have consequently found applications ranging from kinetic gas dynamics [11, 12, 13] to particle-laden flows [8, 14, 15, 16], aerosol transport [17, 18, 19], bubble columns [20, 21, 22], cavitation [23], soot formation [24, 25, 26], and crystallization [27]. However, the compactness of moment-based descriptions introduces a closure problem, since the evolution of the retained moments may depend on information about the NDF that those moments do not uniquely determine. Quadrature-based moment methods (QBMM) address this problem by representing the population through a finite quadrature whose weighted sums reproduce the retained moments [1, 28]. In the foundational quadrature method of moments (QMOM) of McGraw [17], the first 2N2N moments determine an NN-node quadrature, originally computed using the product-difference algorithm of Gordon [29]. This quadrature approximates the NDF as a weighted sum of NN Dirac delta functions centered at the quadrature nodes. Consequently, integrals over the NDF can be approximated as finite weighted sums, providing estimates of the higher- or fractional-order moments needed to close moment transport equations and source terms.

ItemInformation
Program titleQMOMKit
Repository linkhttps://github.com/polycfd/QMOMKit
Licensing provisionsApache 2.0
Programming languageC++
Nature of problemPopulation balance equations describe disperse multiphase systems through a number density function (NDF) over physical space and a phase space representing properties of the population. Directly resolving the evolution of this distribution becomes prohibitively expensive as the number of phase-space dimensions grows. Moment methods reduce this cost by evolving selected moments of the NDF, but require closure to recover information about the underlying population that is not contained in those moments.
Solution methodQMOMKit provides quadrature reconstruction from raw moments using the quadrature method of moments (QMOM) and conditional quadrature method of moments (CQMOM), together with their local evolution in phase space, independently of the physical-space discretization used by a host application. The algorithms implemented in QMOMKit reconstruct QMOM quadratures with the Wheeler algorithm and extend CQMOM to arbitrary phase-space dimensions through recursive marginal and conditional quadratures, with adaptive node counts where required. Conditional moments are obtained from weighted Vandermonde systems. Phase-space advection is advanced by moving the quadrature abscissas, while moment sources and phase-space boundary contributions advance the moments directly. Complete phase-space evolution uses Lie or Strang operator splitting, with optional realizability checks.
Additional comments, including restrictions and unusual featuresQMOMKit is application-independent and operates on local phase-space states. It can be used for standalone spatially homogeneous population models or embedded in host applications, while physical-space discretization, transport, parallelization, and other global solver infrastructure remain outside the library. Application-specific phase-space velocities, moment sources, and phase-space boundary contributions are supplied through callbacks. The algorithms for the reconstruction of quadratures are independent of the physical units and number density of the NDF.

Table 1. Program summary

A substantial body of work has extended the original QMOM formulation to address limitations that arise in different classes of population-balance problems, giving rise to a large family of QBMMs [1, 28]. For instance, the quadrature weights and abscissas are evolved directly in the direct quadrature method of moments (DQMOM) [14, 15, 30, 31, 32], avoiding repeated solution of the moment inversion problem and facilitating multivariate formulations [33], although finite-volume schemes applied to the weights and abscissas do not guarantee the conservation of the moments [28]. The extended quadrature method of moments (EQMOM) replaces the Dirac delta functions of QMOM with smooth, non-negative kernel functions [34, 35, 36, 37], thereby providing an explicit continuous approximation of the NDF that is useful when the population model depends directly on the distribution itself, for example to evaluate population loss through a phase-space boundary as particles or droplets shrink to zero size. Rather than relying on the reconstruction of the underlying distribution, the hyperbolic quadrature method of moments (HyQMOM) closes the higher-order velocity moments appearing in the free-transport flux so that the resulting moment system is globally hyperbolic and in conservative form [8, 38, 39, 40, 41]. More recently, the generalized quadrature method of moments (GQMOM) uses closures for the recurrence coefficients of the orthogonal polynomials associated with the moment set, with these closures informed by prescribed distribution families [42]. This implicitly defines the higher-order moments and permits a Gaussian quadrature with more nodes than would be available from QMOM using the same low-order moment information. All the QBMMs highlighted above share the broader objective of providing accurate and computationally tractable closures of finite moment systems.

Many disperse populations must be described by more than one phase-space variable because the properties of individual entities are coupled. For example, particles of different sizes may respond differently to the surrounding flow and therefore develop a size-dependent velocity distribution. In such cases, knowledge of the separate size and velocity distributions is insufficient: the population model must retain how size and velocity are correlated within the same particles. Overall, multidimensional populations are described by a joint NDF whose dependence between phase-space variables cannot, in general, be reconstructed from the corresponding marginal distributions alone. The conditional quadrature method of moments (CQMOM), introduced by Cheng and Fox [43] and developed further by Yuan and Fox [44], addresses this problem by expressing the multidimensional quadrature reconstruction as a hierarchy of marginal and conditional one-dimensional quadratures. The conditional distributions may vary from one branch of the hierarchy to another and can therefore represent the statistical dependence between the phase-space variables. Formulated as a recursion over the conditioning levels, this hierarchy applies to an arbitrary number of phase-space dimensions [45, 46]. The idea of a conditional quadrature construction has subsequently been applied to hyperbolic (CHyQMOM) [38, 40, 47] and generalized (GCQMOM) [48, 49] quadrature methods of moments. This coupling between phase-space dimensions comes, however, at a computational cost. Conditional moments must be recovered from mixed moments, successive reconstructions depend on the chosen conditioning order, and the number of conditional branches and required moments grows rapidly with the number of phase-space dimensions. Consequently, the numerical complexity of the quadrature reconstruction increases substantially as additional phase-space dimensions are introduced.

Fox and co-workers have accompanied the development of QBMMs over many years with algorithms and code snippets published alongside their research, see e.g. [1, 44, 50]. These contributions have played an important role in demystifying QBMMs and enabling their independent implementation by other researchers. Despite this long-standing effort, only a relatively small number of open-source implementations are available. OpenQBMM [51] provides a comprehensive implementation of quadrature-based moment methods based on EQMOM, tightly integrated into OpenFOAM, making it well suited to OpenFOAM-based applications but not readily reusable as an independent numerical component in other simulation frameworks. Further examples of openly available QBMM implementations in OpenFOAM are PUFoam for the simulation of polyurethane foams [52] and an OpenQBMM-based solver for respiratory aerosols [53]. Other open-source CFD codes also include different integrations of QBMMs: MFC includes a CHyQMOM implementation [54] and Fluidity features a DQMOM implementation [55]; QMOM has been integrated into MFIX [14, 56, 57] and is used by TOSVA for aerosol simulations [19]. The open-source C++ library libMoM uses QMOM for the solution of a wide range of stochastic problems [58] and SootLib [26] is an open-source software library written in C++ that offers different methods to model soot formation, including QMOM-based algorithms. The Python-based QuaadmomPy library of Pütz [45] offers QBMM implementations for spatially homogeneous population balance equations and, notably, generalizes CQMOM to arbitrary dimensions. Implemented in Mathematica and Python, QBMMLib and PyQBMMLib [59] provide QMOM and HyQMOM algorithms, as well as their conditional variants, that are well suited to method development, analysis, and prototyping, but less so as performance-critical tools in large-scale compiled simulation codes. Other open-source repositories accompany specific studies, such as the EQMOM implementation in Matlab of Pigou et al. [37], the QBMM profiling tools in C++ of Pütz and Overmann [60], or the HyQMOM implementation in Julia of Bryngelson et al. [40], providing excellent reference implementations while remaining specific to a particular method or purpose. Consequently, there remains a gap for an application-independent implementation of QBMMs that can be embedded in different scientific and high-performance computing frameworks, without requiring the surrounding application to adopt a particular flow solver or programming environment.

To address this gap, we present QMOMKit, a portable open-source C++ library for QBMMs, designed as an application-agnostic numerical component. QMOMKit isolates the numerical machinery required to represent and evolve a population in phase space: it reconstructs quadratures from raw moments, advances quadrature abscissas through phase-space dynamics, and accounts for changes to the population through moment sources and phase-space boundary contributions. The present version of QMOMKit implements QMOM and CQMOM, for which a reconstructed quadrature is accepted only if it satisfies explicit numerical criteria and the number of quadrature nodes is adapted to what the supplied moments support. The application supplies the physical model, while physical-space transport, spatial discretization, and global solver infrastructure remain outside the library. This separation allows the same implementation either to be used for standalone population models or to be embedded directly in existing simulation frameworks. QMOMKit is supported by a comprehensive suite of unit, regression, and verification tests, together with reproducible application examples of different dimensionality and complexity. The numerical algorithms are verified independently against analytical and manufactured solutions, and are validated in comparison to Monte Carlo reference solutions. Finally, direct couplings to OpenFOAM v14 [61] and deal.II v9.8 [62] demonstrate the integration of QMOMKit into finite-volume and finite-element simulation frameworks. Together, these verification, application, and coupling examples demonstrate that QMOMKit provides not merely a collection of quadrature algorithms, but a tested and reusable numerical foundation for applying QBMMs across different population models and computational frameworks.

The remainder of this manuscript is organized as follows. § 2 introduces the population-balance and quadrature-based moment formulations underlying the present version of QMOMKit. § 3 describes the software architecture, followed by the principal numerical algorithms in § 4, and the software interface in § 5. Important numerical components are verified in § 6, while § 7 presents increasingly complex, spatially homogeneous application examples and comparisons with Monte Carlo reference solutions. § 8 demonstrates the coupling of QMOMKit to external finite-volume and finite-element frameworks, before the main conclusions are summarized in § 9.

Mathematical foundations

The distribution of properties across a population can be described by a number density function (NDF) n(t,x,ξ)n(t,\mathbf{x},\boldsymbol{\xi}), where tt denotes time, x\mathbf{x} is the position in physical space, and ξ=(ξ1,…,ξD)\boldsymbol{\xi} = (\xi_1,\ldots,\xi_D) represents the coordinates of a DD-dimensional phase space with support Ωξ⊆RD\Omega_{\xi} \subseteq\mathbb{R}^{D}. The phase-space coordinates characterize the properties of individual population elements and may represent, for example, the size and temperature of a particle, the composition of a droplet, or other properties relevant to the population under consideration.

Population balance and moment formulation

The evolution of an NDF n(t,x,ξ)n(t,\mathbf{x},\boldsymbol{\xi}) is generally governed by a population balance equation (PBE) [3]

∂n∂t+∇x⋅(nu)+∇ξ⋅(nξ˙)=S,(1)\frac{\partial n}{\partial t} + \nabla_{\mathbf{x}} \cdot(n\mathbf{u}) + \nabla_{\boldsymbol{\xi}} \cdot(n\dot{\boldsymbol{\xi}}) = S, \tag*{(1)}

where u(t,x,ξ)\mathbf{u}(t,\mathbf{x},\boldsymbol{\xi}) is the transport velocity in physical space, ξ˙(t,x,ξ)\dot{\boldsymbol{\xi}}(t,\mathbf{x},\boldsymbol{\xi}) is the phase-space velocity, and S(t,x,ξ)S(t,\mathbf{x},\boldsymbol{\xi}) is the sum of all source terms that describe processes that change the population, such as aggregation or breakage. Solving Eq. (1) directly requires resolving the NDF over both physical space and phase space.

To this end, the population may be described by a finite set of the moments of the NDF [1, 17], which provide a compact representation of selected information about the distribution. For a multi-index α=(α1,…,αD)∈N0D\boldsymbol{\alpha} = (\alpha_1,\ldots,\alpha_D) \in\mathbb{N}_0^D, the corresponding phase-space monomial is defined as

ξα:=∏d=1Dξdαd.(2)\boldsymbol{\xi}^{\boldsymbol{\alpha}} := \prod_{d=1}^{D} \xi_d^{\alpha_d}. \tag*{(2)}

Multiplying the NDF by this monomial and integrating over the phase space Ωξ\Omega_{\xi} yields the raw moments of the NDF,

Mα(t,x)=∫Ωξξαn(t,x,ξ) dξ.(3)M_{\boldsymbol{\alpha}}(t,\mathbf{x}) = \int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} n(t,\mathbf{x},\boldsymbol{\xi}) \,\mathrm{d}\boldsymbol{\xi}. \tag*{(3)}

The zeroth-order moment M0M_{\mathbf{0}} represents the total number density of the population and the first-order moments are the number-density-weighted integrals of the individual phase-space coordinates. Higher-order moments provide the information needed to determine properties such as variance and skewness, while mixed moments contain information about the joint variation of different phase-space coordinates.

Following the definition of the raw moments in Eq. (3), a balance equation for MαM_{\boldsymbol{\alpha}} is obtained by multiplying Eq. (1) by the monomial ξα\boldsymbol{\xi}^{\boldsymbol{\alpha}} and integrating over the phase space Ωξ\Omega_{\xi} [1],

∂Mα∂t+∇x⋅(∫Ωξξαnu dξ)+∫Ωξξα∇ξ⋅(nξ˙) dξ=∫ΩξξαS dξ,(4)\frac{\partial M_{\boldsymbol{\alpha}}}{\partial t} + \nabla_{\mathbf{x}} \cdot\left( \int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} n\mathbf{u} \,\mathrm{d}\boldsymbol{\xi} \right) + \int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} \nabla_{\boldsymbol{\xi}} \cdot(n\dot{\boldsymbol{\xi}}) \,\mathrm{d}\boldsymbol{\xi} = \int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} S \,\mathrm{d}\boldsymbol{\xi}, \tag*{(4)}

where the second and third terms describe the transport of moment MαM_{\boldsymbol{\alpha}} in physical space and phase space, respectively. Applying integration by parts to the phase-space advection term yields

∫Ωξξα∇ξ⋅(nξ˙) dξ=−∑d=1αd>0Dαd∫Ωξξα−edξ˙dn dξ+∫∂Ωξξαnξ˙⋅nξ dξ,(5)\int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} \nabla_{\boldsymbol{\xi}} \cdot(n\dot{\boldsymbol{\xi}}) \,\mathrm{d}\boldsymbol{\xi} = - \sum_{\substack{d=1 \\ \alpha_d>0}}^{D} \alpha_d \int_{\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}-\mathbf{e}_d} \dot{\xi}_d n \,\mathrm{d}\boldsymbol{\xi} + \int_{\partial\Omega_{\xi}} \boldsymbol{\xi}^{\boldsymbol{\alpha}} n\dot{\boldsymbol{\xi}} \cdot\mathbf{n}_{\xi} \,\mathrm{d}\xi, \tag*{(5)}

where nξ\mathbf{n}_{\xi} is the outward unit normal on ∂Ωξ\partial\Omega_{\xi} and ed\mathbf{e}_{d} is the unit multi-index of coordinate dd. The integral over phase space describes changes driven by the advection in phase space, whereas the boundary integral accounts for population entering or leaving the phase-space domain [34, 63]. After discretization in physical space by a host numerical method and anticipating the quadrature closure introduced below, the evolution of the moment vector Mh\mathbf{M}_{h} associated with a host degree of freedom hh is governed by the semi-discrete moment equation

dMhdt=Ah(M)+B(Mh),(6)\frac{\mathrm{d}\mathbf{M}_{h}}{\mathrm{d}t}=\mathcal{A}_{h}(\mathbf{M})+\mathcal{B}(\mathbf{M}_{h}), \tag*{(6)}

where M\mathbf{M} denotes the collection of all local moment vectors Mh\mathbf{M}_{h} over the physical-space discretization. The operator Ah\mathcal{A}_{h} represents the discretized physical-space transport of moments and, hence, depends on the neighboring moment values contained in M\mathbf{M}. In contrast, B\mathcal{B} is the local operator that describes the moment evolution in phase space.

The moment transport equation in Eq. (4) shows that a formulation with a finite number of transported moments is generally unclosed. A physical velocity u(t,x,ξ)\mathbf{u}(t,\mathbf{x},\boldsymbol{\xi}) that depends on quantities evolving in phase space, a nonlinear phase-space velocity ξ˙(t,x,ξ)\dot{\boldsymbol{\xi}}(t,\mathbf{x},\boldsymbol{\xi}), or a moment source S(t,x,ξ)S(t,\mathbf{x},\boldsymbol{\xi}) may introduce integrals that cannot be determined uniquely from the transported moments, because moments of fractional or higher order are required. Consequently, additional information about the underlying distribution is required to close Eq. (4). QBMMs, such as QMOM and CQMOM, address this closure problem by constructing a finite set of weighted quadrature nodes that reproduces the transported low-order moments and can approximate high- and fractional-order moments [1].

Quadrature method of moments

Let us first consider a population described by a single phase-space coordinate ξ\xi. The quadrature method of moments (QMOM) of McGraw [17] represents the moment information by a set of NN quadrature nodes,

n(ξ)≈∑i=1Nwi δ(ξ−ξi),(7)n(\xi)\approx\sum_{i=1}^{N}w_i\,\delta(\xi-\xi_i), \tag*{(7)}

where each quadrature node consists of an abscissa ξi∈Ωξ\xi_i\in\Omega_{\xi} and an associated weight wi>0w_i>0, and δ\delta denotes the Dirac delta function. The weights retain the normalization of the NDF, such that

M0=∑i=1Nwi(8)M_0=\sum_{i=1}^{N}w_i \tag*{(8)}

is the total number density represented by the quadrature. An NN-node quadrature contains 2N2N unknowns, which QMOM determines by requiring the quadrature to reproduce the first 2N2N raw moments [17, 64],

Mℓ=∑i=1Nwiξiℓ,ℓ=0,…,2N−1.(9)M_{\ell}=\sum_{i=1}^{N}w_i\xi_i^{\ell},\qquad\ell=0,\ldots,2N-1. \tag*{(9)}

The most commonly used algorithms to solve this moment-inversion problem are based on either the product-difference algorithm of Gordon [29] or the algorithm of Wheeler [65].

Once the abscissas and weights have been determined, the quadrature defines reconstructed moments of arbitrary (integer or fractional) order ℓ\ell,

M‾ℓ=∑i=1Nwiξiℓ.(10)\overline{M}_{\ell}=\sum_{i=1}^{N}w_i\xi_i^{\ell}. \tag*{(10)}

For integer orders 0≤ℓ<2N0\leq\ell<2N, the reconstructed moments coincide with the moments imposed in Eq. (9). Moments of higher or fractional order are not prescribed independently and, instead, their values are approximated by reconstructing them using the quadrature. More generally, a phase-space integral with a sufficiently regular integrand gg is approximated as

∫Ωξg(ξ)n(ξ) dξ≈∑i=1Nwig(ξi),(11)\int_{\Omega_{\xi}}g(\xi)n(\xi)\,\mathrm{d}\xi\approx\sum_{i=1}^{N}w_i g(\xi_i), \tag*{(11)}

which provides the basic closure relation of QMOM. The accuracy of this approximation depends on the number of quadrature nodes, the retained moments, and the variation of gg over the support of the distribution [66, 67]. Once the quadrature has been reconstructed from the transported low-order moments, integrals over the NDF are replaced by finite sums over the quadrature nodes, with the integrand evaluated at each node’s abscissa and multiplied by the corresponding weight. This makes it possible to evaluate terms that depend on the NDF without reconstructing it.

Conditional quadrature method of moments

The conditional quadrature method of moments (CQMOM) [43, 44] extends QMOM to populations described by several, potentially correlated, phase-space dimensions. Its construction is most easily introduced for a two-dimensional phase space ξ=(ξ1,ξ2)\boldsymbol{\xi}=(\xi_1,\xi_2). The joint NDF may be written as

n(ξ1,ξ2)=n1(ξ1)p2∣1(ξ2∣ξ1),(12)n(\xi_1,\xi_2)=n_1(\xi_1)p_{2|1}(\xi_2\mid\xi_1), \tag*{(12)}

where

n1(ξ1)=∫Ωξ2n(ξ1,ξ2) dξ2(13)n_1(\xi_1)=\int_{\Omega_{\xi_2}} n(\xi_1,\xi_2)\,\mathrm{d}\xi_2 \tag*{(13)}

is the marginal NDF of ξ1\xi_1. For n1(ξ1)>0n_1(\xi_1)>0, the conditional density is

p2∣1(ξ2∣ξ1)=n(ξ1,ξ2)n1(ξ1),(14)p_{2|1}(\xi_2\mid\xi_1)=\frac{n(\xi_1,\xi_2)}{n_1(\xi_1)}, \tag*{(14)}

and therefore satisfies

∫Ωξ2p2∣1(ξ2∣ξ1) dξ2=1.(15)\int_{\Omega_{\xi_2}}p_{2|1}(\xi_2\mid\xi_1)\,\mathrm{d}\xi_2=1. \tag*{(15)}

The first step in reconstructing a multidimensional quadrature with CQMOM is a QMOM reconstruction of the quadrature for the marginal distribution from the pure moments Mp,0M_{p,0}, where the subscripts refer to the moment order in the corresponding phase-space dimension, such that

n1(ξ1)=∑i1=1N1wi1(1)δ(ξ1−ξi1(1)),(16)n_1(\xi_1)=\sum_{i_1=1}^{N_1}w_{i_1}^{(1)}\delta\left(\xi_1-\xi_{i_1}^{(1)}\right), \tag*{(16)}

where

M0,0=∑i1=1N1wi1(1).(17)M_{0,0}=\sum_{i_1=1}^{N_1}w_{i_1}^{(1)}. \tag*{(17)}

CQMOM next constructs a separate quadrature for the distribution of ξ2\xi_2 conditioned on each marginal abscissa ξi1(1)\xi_{i_1}^{(1)}. The conditional moments required for these reconstructions are not available directly. For the continuous distribution p2∣1p_{2|1}, the qqth conditional moment of ξ2\xi_2 at a given value of ξ1\xi_1 is defined as

μq(2∣1)(ξ1)=∫Ωξ2ξ2qp2∣1(ξ2∣ξ1) dξ2.(18)\mu_q^{(2|1)}(\xi_1)=\int_{\Omega_{\xi_2}}\xi_2^q p_{2|1}(\xi_2\mid\xi_1)\,\mathrm{d}\xi_2. \tag*{(18)}

The mixed raw moments then satisfy

Mp,q=∫Ωξ1ξ1pn1(ξ1)μq(2∣1)(ξ1) dξ1.(19)M_{p,q}=\int_{\Omega_{\xi_1}}\xi_1^p n_1(\xi_1)\mu_q^{(2|1)}(\xi_1)\,\mathrm{d}\xi_1. \tag*{(19)}

CQMOM represents this integral using the marginal quadrature and determines branch-specific conditional moments μq∣i1(2∣1)\mu_{q|i_1}^{(2|1)} such that

Mp,q=∑i1=1N1wi1(1)(ξi1(1))pμq∣i1(2∣1).(20)M_{p,q}=\sum_{i_1=1}^{N_1}w_{i_1}^{(1)}\left(\xi_{i_1}^{(1)}\right)^p\mu_{q|i_1}^{(2|1)}. \tag*{(20)}

For each fixed value of qq, the N1N_1 conditional moments μq∣i1(2∣1)\mu_{q|i_1}^{(2|1)} are obtained by taking p=0,…,N1−1p=0,\ldots,N_1-1, defining the linear system

V(1)W(1)μ(q)=m(q),(21)\mathbf{V}^{(1)}\mathbf{W}^{(1)}\boldsymbol{\mu}^{(q)}=\mathbf{m}^{(q)}, \tag*{(21)}

with the Vandermonde matrix

V(1)=(11⋯1ξ1(1)ξ2(1)⋯ξN1(1)⋮⋮⋱⋮(ξ1(1))N1−1(ξ2(1))N1−1⋯(ξN1(1))N1−1),(22)\mathbf{V}^{(1)}= \begin{pmatrix} 1 & 1 & \cdots& 1\\ \xi_{1}^{(1)} & \xi_{2}^{(1)} & \cdots& \xi_{N_1}^{(1)}\\ \vdots& \vdots& \ddots& \vdots\\ \left(\xi_{1}^{(1)}\right)^{N_1-1} & \left(\xi_{2}^{(1)}\right)^{N_1-1} & \cdots& \left(\xi_{N_1}^{(1)}\right)^{N_1-1} \end{pmatrix}, \tag*{(22)}

the diagonal weight matrix

W(1)=diag⁡(w1(1),…,wN1(1)),(23)\mathbf{W}^{(1)}=\operatorname{diag}\left(w_1^{(1)},\ldots,w_{N_1}^{(1)}\right), \tag*{(23)}

the conditional moment vector

μ(q)=(μq∣1(2∣1)⋮μq∣N1(2∣1)),(24)\boldsymbol{\mu}^{(q)} = \begin{pmatrix} \mu_{q|1}^{(2|1)} \\ \vdots\\ \mu_{q|N_1}^{(2|1)} \end{pmatrix}, \tag*{(24)}

and the mixed raw moment vector

m(q)=(M0,q⋮MN1−1,q).(25)\mathbf{m}^{(q)} = \begin{pmatrix} M_{0,q} \\ \vdots\\ M_{N_1-1,q} \end{pmatrix}. \tag*{(25)}

Solving Eq. (21) yields the discrete conditional moment μq∣i1(2∣1)\mu_{q|i_1}^{(2|1)} associated with each marginal node i1i_1. The coefficient matrix V(1)W(1)\mathbf{V}^{(1)}\mathbf{W}^{(1)} depends only on the marginal quadrature: V(1)\mathbf{V}^{(1)} is formed from the marginal abscissas and multiplication by W(1)\mathbf{W}^{(1)} scales its columns by the corresponding marginal weights. The same matrix is used for every required power qq of ξ2\xi_2 and only the mixed-moment vector m(q)\mathbf{m}^{(q)} on the right-hand side changes. The factorization of the weighted Vandermonde matrix can therefore be reused for all values of qq. If the marginal abscissas are distinct and the marginal weights are nonzero, the coefficient matrix is non-singular and these conditional moments are uniquely determined.

Based on the recovered conditional moments, each marginal node i1i_1 is associated with a one-dimensional conditional moment sequence. A separate QMOM reconstruction is applied to each sequence,

p2∣1(ξ2∣ξi1(1))=∑i2=1N2∣i1wi2∣i1(2∣1)δ(ξ2−ξi2∣i1(2∣1)),(26)p_{2|1}\left(\xi_2 \mid\xi_{i_1}^{(1)}\right) = \sum_{i_2=1}^{N_{2|i_1}} w_{i_2|i_1}^{(2|1)} \delta\left(\xi_2-\xi_{i_2|i_1}^{(2|1)}\right), \tag*{(26)}

where

∑i2=1N2∣i1wi2∣i1(2∣1)=1.(27)\sum_{i_2=1}^{N_{2|i_1}} w_{i_2|i_1}^{(2|1)} = 1. \tag*{(27)}

Because the conditional abscissas and weights may vary between marginal nodes, CQMOM can represent a dependence between ξ1\xi_1 and ξ2\xi_2, and, thus, does not assume that the joint distribution is the product of two independent marginal distributions. Combining the marginal and conditional quadratures gives

n(ξ1,ξ2)=∑i1=1N1∑i2=1N2∣i1Wi1,i2δ(ξ1−ξi1(1))δ(ξ2−ξi2∣i1(2∣1)),(28)n(\xi_1,\xi_2) = \sum_{i_1=1}^{N_1} \sum_{i_2=1}^{N_{2|i_1}} W_{i_1,i_2} \delta\left(\xi_1-\xi_{i_1}^{(1)}\right) \delta\left(\xi_2-\xi_{i_2|i_1}^{(2|1)}\right), \tag*{(28)}

where the joint weight is Wi1,i2=wi1(1)wi2∣i1(2∣1)W_{i_1,i_2}=w_{i_1}^{(1)}w_{i_2|i_1}^{(2|1)}. The corresponding mixed moments are approximated by

Mp,q≈∑i1=1N1∑i2=1N2∣i1Wi1,i2(ξi1(1))p(ξi2∣i1(2∣1))q.(29)M_{p,q} \approx \sum_{i_1=1}^{N_1} \sum_{i_2=1}^{N_{2|i_1}} W_{i_1,i_2} \left(\xi_{i_1}^{(1)}\right)^p \left(\xi_{i_2|i_1}^{(2|1)}\right)^q. \tag*{(29)}

In summary, CQMOM replaces a multidimensional moment-inversion problem by a hierarchy of one-dimensional inversions based on conditional moment sets. Each quadrature node at one level may carry its own conditional quadrature at the next level, producing a tree-like representation of the joint distribution. In this manner, the CQMOM methodology for two dimensions shown above can be readily extended to a phase space of arbitrary dimensions, as discussed in § 4.2.

QMOMKit architecture

QMOMKit is designed as an application-independent numerical library for quadrature-based moment methods. Its design follows from the semi-discrete moment transport equation shown in Eq. (6), in which physical-space transport and phase-space evolution appear as distinct operators, Ah(M)A_h(\mathbf{M}) and B(Mh)B(\mathbf{M}_h), that can be advanced separately. QMOMKit provides the phase-space operator BB. The central design principle of the library is therefore to treat phase-space evolution as a local operation on moment states, independent of how those moments are discretized and transported in physical space. This allows QMOMKit to be used either as a standalone solver for the spatially uniform evolution of a population, as shown in § 7, or coupled to a host application that transports the moments in physical space, as demonstrated in § 8. In the latter case, the host advances the moments through AhA_h and remains responsible for mesh handling, the physical-space discretization, the boundary conditions of the physical domain, parallel communication, and global time integration, while QMOMKit advances the local moment state Mh\mathbf{M}_h of the host degree of freedom hh through BB. Within this local operation, the raw moments are the primary variables, since they are the quantities that the host transports and that the moment transport equations govern. Whenever required, QMOMKit reconstructs a quadrature locally from Mh\mathbf{M}_h using the prescribed numerical options, such as the maximum number of nodes. Once a quadrature is accepted, the moments are recomputed from it, so that the moments and their quadrature remain a coherent numerical unit rather than two independently evolving representations of the population.

The phase-space processes themselves are advanced in the representation that suits them, as discussed in § 4.3. Phase-space advection moves existing members of the population and is advanced by moving the quadrature abscissas along characteristics in phase space, after which the moments are evaluated from the updated quadrature. Source terms that change the population, including moment sources and exchange at the boundary of phase space, cannot be represented by moving abscissas. Instead, the moments are advanced directly, after which the quadrature is reconstructed. The two treatments are combined by operator splitting. What drives these processes is defined by the application rather than by QMOMKit: The standalone or host application defines the physical meaning and ordering of the phase-space coordinates and supplies the phase-space velocity, the moment sources, and the boundary contributions, which QMOMKit evaluates during the phase-space evolution. Fixed numerical choices, such as the phase-space dimension and the reconstruction policies are defined by the configuration, while the runtime state contains the evolving moments and quadrature. This separation keeps the physical model independent of the numerical algorithms used to represent and evolve the population, so that the same algorithms can serve different applications.

Because QMOMKit is intended to be embedded in other codes, its users need to be able to rely on its numerical behavior without inspecting the implementation. Following the principle that confidence in numerical software should be established through reproducible evidence [68], QMOMKit includes a test suite that, at the time of writing this manuscript, comprises 986 unique tests: 710 unit tests isolate individual operations and software contracts, 229 verification tests compare numerical results with analytical, manufactured, or independently established reference solutions, 46 regression tests preserve previously established behavior, and a public-header test verifies that the library’s public header files can be included and compiled independently by external users.

The following sections build on these design principles. § 4 describes the numerical algorithms behind the phase-space operator, § 5 the software interface through which applications supply their models and advance the moment states, and § 6 a selection of verification studies.

Numerical algorithms

The numerical core of QMOMKit comprises the reconstruction and evolution of quadrature-based moment representations. This section first describes the reconstruction of a quadrature from a moment set in § 4.1, followed by the reconstruction of a multidimensional quadrature in § 4.2. § 4.3 then describes how the moments evolve in phase space, with continuous motion advanced by advecting the quadrature and changes of the population advanced directly through the moments. § 4.4 explains how the active node count is selected as the moments evolve and § 4.5 how the realizability of the evolving moments can be checked.

Quadrature reconstruction

The basic operation of QMOMKit is the reconstruction of a one-dimensional quadrature from a moment set, which is used directly in QMOM as well as for the reconstruction of every marginal and conditional quadrature in CQMoM. Given the moments M0,…,M2N−1M_0,\ldots,M_{2N-1} of a distribution n(ξ)n(\xi), the NN abscissas of the quadrature in Eq. (7) are the roots of the monic polynomial PNP_N of degree NN that is orthogonal with respect to nn [66, 69, 70]. These orthogonal polynomials satisfy the three-term recurrence

Pk+1(ξ)=(ξ−ak)Pk(ξ)−bkPk−1(ξ),P−1=0,P0=1.(30)P_{k+1}(\xi) = (\xi-a_k)P_k(\xi)-b_kP_{k-1}(\xi), \qquad P_{-1}=0,\qquad P_0=1. \tag*{(30)}

The recurrence coefficients aa and bb define the symmetric tridiagonal Jacobi matrix

JN=(a0b1b1a1⋱⋱⋱bN−1bN−1aN−1),(31)J_N = \begin{pmatrix} a_0 & \sqrt{b_1} & & \\ \sqrt{b_1} & a_1 & \ddots& \\ & \ddots& \ddots& \sqrt{b_{N-1}} \\ & & \sqrt{b_{N-1}} & a_{N-1} \end{pmatrix}, \tag*{(31)}

the eigenvalues of which are the abscissas ξi\xi_i, and each weight wiw_i is M0M_0 times the squared first component of the corresponding normalized eigenvector [71]. QMOMKit solves this eigenvalue problem with the Jacobi rotation method [72]. Before the rotations, the matrix is multiplied by the power of two that brings its largest entry into the interval [1,2)[1,2), and the computed eigenvalues are divided by the same factor afterwards. Since a multiplication by a power of two is exact in floating-point arithmetic [73], this scaling introduces no rounding error, but it makes the convergence criterion, which compares the off-diagonal entries with the machine precision ϵmach\epsilon_{\mathrm{mach}}, relative to the magnitude of the matrix. The resulting quadrature QN={(ξi,wi)}i=1NQ_N = \{(\xi_i,w_i)\}_{i=1}^{N} reproduces the moments M0,…,M2N−1M_0,\ldots,M_{2N-1} exactly.

QMOMKit computes the recurrence coefficients with the algorithm of Wheeler [65], a variant of the long quotient-modified difference algorithm of Sack and Donovan [74]. The algorithm is based on the quantities [1, 65]

σk,ℓ=∫ΩξPk(ξ) ξℓn(ξ) dξ.(32)\sigma_{k,\ell} = \int_{\Omega_\xi} P_k(\xi)\,\xi^\ell n(\xi)\,\mathrm{d}\xi. \tag*{(32)}

which start from σ−1,ℓ=0\sigma_{-1,\ell}=0 and σ0,ℓ=Mℓ\sigma_{0,\ell}=M_\ell and are obtained for increasing kk from

σk,ℓ=σk−1,ℓ+1−ak−1σk−1,ℓ−bk−1σk−2,ℓ(33)\sigma_{k,\ell} = \sigma_{k-1,\ell+1} - a_{k-1}\sigma_{k-1,\ell} - b_{k-1}\sigma_{k-2,\ell} \tag*{(33)}

for ℓ=k,…,2N−k−1\ell=k,\ldots,2N-k-1, together with a0=M1/M0a_0=M_1/M_0, b0=0b_0=0, and

ak=σk,k+1σk,k−σk−1,kσk−1,k−1,bk=σk,kσk−1,k−1,k=1,…,N−1.(34)a_k = \frac{\sigma_{k,k+1}}{\sigma_{k,k}}-\frac{\sigma_{k-1,k}}{\sigma_{k-1,k-1}}, \qquad b_k=\frac{\sigma_{k,k}}{\sigma_{k-1,k-1}}, \qquad k=1,\ldots,N-1. \tag*{(34)}

Comparative studies [18, 75] found this type of algorithm to be more robust and more efficient than the product-difference algorithm [29] used in the original QMOM [17].

The construction above assumes that the moments determine a quadrature with NN distinct nodes, which is not always the case. Since PkP_k is orthogonal to all polynomials of lower degree, σk,k=∫ΩξPk2n dξ\sigma_{k,k}=\int_{\Omega_\xi}P_k^2 n\,\mathrm{d}\xi. This quantity is positive if the support of nn contains more than kk points. If nn is instead a kk-point distribution, that is, a distribution of kk weighted points at distinct abscissas,

n(ξ)=∑i=1kwi δ(ξ−ξi),wi>0,(35)n(\xi)=\sum_{i=1}^{k}w_i\,\delta(\xi-\xi_i), \qquad w_i>0, \tag*{(35)}

then PkP_k vanishes at all kk abscissas and σk,k=0\sigma_{k,k}=0 [66]. The moments of such a distribution lie on the boundary of the realizable set and determine the distribution uniquely [76, 77]. The recurrence then breaks down, since bk=0b_k=0 and aka_k is undefined. Distributions of this kind occur, for example, when particles are formed by nucleation at a single size [50], when all elements of a population relax towards the same state, such that its moments are numerically indistinguishable from those of a kk-point distribution, or when a quadrature weight approaches zero [60, 67]. For this reason, Yuan and Fox [44] proposed an adaptive form of the Wheeler algorithm. Given a configured maximum number of nodes Nmax⁡N^{\max}, it limits the number of nodes to the first k<Nmax⁡k<N^{\max}, counting upwards from k=1k=1, for which σk,k≤0\sigma_{k,k}\leq0, or to Nmax⁡N^{\max} if no such kk exists. In addition, it rejects a quadrature whose smallest weight is too small compared with its largest weight, or whose abscissas lie too close to each other, and reduces the number of nodes until a quadrature passes both checks. Similarly, Nguyen et al. [50] detected moment sets on the boundary of the realizable set from the recurrence coefficients rather than from Hankel determinants.

QMOMKit follows the same adaptive procedure but decides differently when σk,k\sigma_{k,k} vanishes. In floating-point arithmetic, σk,k\sigma_{k,k} of a kk-point distribution is not exactly zero. It results from the cancellation of much larger terms in Eq. (33) and retains a rounding error of either sign. If this rounding error is negative, the condition σk,k≤0\sigma_{k,k}\leq0 is met and the node count is correctly limited to kk. If it is positive, however, the condition is not met and the algorithm constructs a quadrature with more nodes than the distribution supports. Laurent and Nguyen [77] addressed this with a fixed threshold, which depends on the unit of ξ\xi. QMOMKit instead estimates the size of these rounding errors directly, in the manner of a running error analysis [73]. Evaluating Eq. (33) with absolute values,

σˉk,ℓ=σˉk−1,ℓ+1+∣ak−1∣σˉk−1,ℓ+∣bk−1∣σˉk−2,ℓ,σˉ−1,ℓ=0,σˉ0,ℓ=∣Mℓ∣,(36)\bar{\sigma}_{k,\ell}=\bar{\sigma}_{k-1,\ell+1}+|a_{k-1}|\bar{\sigma}_{k-1,\ell}+|b_{k-1}|\bar{\sigma}_{k-2,\ell}, \qquad\bar{\sigma}_{-1,\ell}=0,\qquad\bar{\sigma}_{0,\ell}=|M_\ell|, \tag*{(36)}

gives the magnitude of the terms whose cancellation produces σk,ℓ\sigma_{k,\ell}, so that a value of σk,k\sigma_{k,k} below a small multiple of ϵmachσˉk,k\epsilon_{\mathrm{mach}}\bar{\sigma}_{k,k} cannot be distinguished from zero. QMOMKit therefore determines the number of nodes NN supported by the moments with the same rule, but replaces the condition σk,k≤0\sigma_{k,k}\leq0 by

σk,k≤Cσϵmachσˉk,k.(37)\sigma_{k,k}\leq C_\sigma\epsilon_{\mathrm{mach}}\bar{\sigma}_{k,k}. \tag*{(37)}

The safety factor is Cσ=100C_\sigma=100.

For this NN, QMOMKit constructs the corresponding candidate quadrature QNQ_N, which is accepted if

ρw=min⁡iwimax⁡iwi>εw,(38)\rho_w=\frac{\min_i w_i}{\max_i w_i}>\varepsilon_w, \tag*{(38)}
ρξ=min⁡i≠j∣ξi−ξj∣sξ>εξ.(39)\rho_\xi=\frac{\min_{i\ne j}|\xi_i-\xi_j|}{s_\xi}>\varepsilon_\xi. \tag*{(39)}

and

ξi∈Ωξfor i=1,…,N,(40)\xi_i \in\Omega_\xi\quad\text{for } i=1,\ldots,N, \tag*{(40)}

where Ωξ\Omega_\xi is a prescribed bounded support of the coordinate, or Ωξ=R\Omega_\xi= \mathbb{R} if none is prescribed. The weight ratio ρw\rho_w and the separation ratio ρξ\rho_\xi apply for N>1N > 1, with the separation measured relative to

sξ={max⁡i∣ξi∣,N=2,max⁡i≠j∣ξi−ξj∣,N>2.(41)s_\xi= \begin{cases} \max_i |\xi_i|, & N=2,\\ \max_{i\ne j}|\xi_i-\xi_j|, & N>2. \end{cases} \tag*{(41)}

If the candidate quadrature is rejected, NN is reduced by one and a new candidate is constructed, if necessary down to a single node. Because the degeneracy test already removes the nodes that the moments do not support, these criteria only need to exclude nearly singular candidates, and QMOMKit uses the small default thresholds εw=εξ=10−10\varepsilon_w=\varepsilon_\xi=10^{-10}. The support condition rejects candidates that leave Ωξ\Omega_\xi because of rounding errors or spurious moments, since the quadrature nodes of moments that are realizable on a bounded interval lie within that interval [66].

An important consequence of these choices is that the quadrature reconstruction does not depend on the unit of the phase-space coordinate or on the number density. Under a change of unit ξ→Lξ\xi\to L\xi and a scaling n→Λnn \to\Lambda n, with constants L>0L>0 and Λ>0\Lambda>0, the moments transform as Mℓ→ΛLℓMℓM_\ell\to\Lambda L^\ell M_\ell, the recurrence coefficients as ak→Laka_k \to L a_k and bk→L2bkb_k \to L^2 b_k, and both σk,ℓ\sigma_{k,\ell} and σˉk,ℓ\bar{\sigma}_{k,\ell} as ΛLk+ℓ\Lambda L^{k+\ell}, so that the degeneracy test in Eq. (37) gives the same node count. Since ak→Laka_k \to L a_k and bk→L2bkb_k \to L^2 b_k, every entry of the Jacobi matrix in Eq. (31) is multiplied by LL, while Λ\Lambda cancels in the ratios that define aka_k and bkb_k. The eigenvalues of LJNLJ_N are those of JNJ_N multiplied by LL and its eigenvectors are unchanged, so that the abscissas scale with LL and the weights, through M0M_0, with Λ\Lambda. The power-of-two scaling of the Jacobi iteration preserves this property in floating-point arithmetic. Without this scaling, the convergence criterion would be absolute: for coordinates with small values, the iteration could terminate before the matrix is sufficiently diagonalized, while for large values it might fail to satisfy the convergence criterion. A verification test in the QMOMKit test suite confirms that quadratures are recovered with the same relative accuracy for coordinate values scaled by factors between 10−2010^{-20} and 102010^{20}. The criteria in Eqs. (38)–(40) are dimensionless and the support check uses a tolerance relative to the magnitude of the bounds. Apart from rounding, the reconstructed quadrature therefore simply follows a change of unit and number density. The only exception is a lower limit on M0M_0, by default 10−3010^{-30}, below which no quadrature is reconstructed and the moment set is treated as empty. Apart from this limit, the moments do not have to be rescaled or non-dimensionalized to improve the conditioning and stability of the quadrature reconstruction [67, 78] or expressed in terms of the volume fraction instead of the number density [16].

Adaptive quadrature reconstruction is the default in QMOMKit. If the user chooses the non-adaptive mode, the configured node count is used as given and the weight and separation criteria are not applied. The reconstruction then fails if the degeneracy test in Eq. (37) shows that the moments support fewer nodes than configured or if the quadrature violates a prescribed support.

Conditional quadrature

For a multivariate NDF, QMOMKit reconstructs the quadrature with CQOM, which replaces the multidimensional moment inversion by the hierarchy of one-dimensional inversions introduced in § 2.3 [44]. Following Pütz [45] and Bouguezzoul [46], QMOMKit applies this construction recursively, so that the same implementation handles any number of phase-space dimensions and any conditioning order without dimension-specific code.

Two orderings of the phase-space coordinates have to be distinguished. The phase-space order ξ=(ξ1,…,ξD)\xi=(\xi_1,\ldots,\xi_D) is the order in which the application defines the coordinates. Moments, quadrature nodes, and configuration data always refer to this order, and a raw moment MαM_\alpha is indexed by the multi-index α∈ND\alpha\in\mathbb{N}^D in this order. The conditioning order is the order in which CQOM reconstructs a multidimensional quadrature across the phase-space coordinates. It is given by the permutation

π=(π1,…,πD)∈SD,(42)\pi=(\pi_1,\ldots,\pi_D)\in S_D, \tag*{(42)}

where SDS_D denotes the set of all permutations of (1,…,D)(1,\ldots,D). CQOM first reconstructs the marginal quadrature of ξπ1\xi_{\pi_1}, then the quadratures of ξπ2\xi_{\pi_2} conditioned on the nodes of ξπ1\xi_{\pi_1}, and so on. Changing the conditioning order changes the conditional systems that are solved and the resulting quadrature [8, 44], and can decide whether the recovered conditional moments admit the configured number of nodes [79]. It does not, however, change the meaning of the coordinates or of the moments.

At the first conditioning level, the marginal quadrature of ξπ1\xi_{\pi_1} is reconstructed from the pure moments of ξπ1\xi_{\pi_1} with the algorithm of § 4.1. At each subsequent level mm, every node of the quadrature constructed so far carries its own conditional quadrature for ξπm\xi_{\pi_m}. The conditional moments of this quadrature are obtained from the mixed moments by solving weighted Vandermonde systems of the form of Eq. (21), whose coefficient matrices are built from the abscissas and weights of the preceding levels, and whose right-hand sides contain the mixed moments of increasing order in ξπm\xi_{\pi_m}. Each set of conditional moments is then inverted with the algorithm of § 4.1. The result is a tree of quadratures. A node at level mm is identified by the index vector

i1:m=(i1,…,im),1≤im≤Nm,i1:m−1,(43)\mathbf{i}_{1:m}=(i_1,\ldots,i_m), \qquad1\le i_m\le N_{m,\mathbf{i}_{1:m-1}}, \tag*{(43)}

where iji_j numbers the nodes at level jj along the branch and Nm,i1:m−1N_{m,\mathbf{i}_{1:m-1}} is the number of nodes that the branch i1:m−1\mathbf{i}_{1:m-1} carries at level mm. A complete branch i=(i1,…,iD)\mathbf{i}=(i_1,\ldots,i_D) defines a terminal node of the multidimensional quadrature. Its abscissa collects the abscissas ξπm(i1:m)\xi_{\pi_m}^{(\mathbf{i}_{1:m})} encountered along the branch, reordered into the phase-space order, and its weight is the product of the marginal weight and the conditional weights along the branch,

Wi=wi1(1)∏m=2Dwim∣i1:m−1(m).(44)W_{\mathbf{i}}=w_{i_1}^{(1)}\prod_{m=2}^{D}w_{i_m\mid\mathbf{i}_{1:m-1}}^{(m)}. \tag*{(44)}

The marginal weights carry the number density, while the conditional weights distribute it among the branches. With TD\mathcal{T}_D denoting the set of terminal quadrature nodes, a raw moment is approximated by

Mα≈∑i∈TDWi∏m=1D(ξπm(i1:m))απm.(45)M_{\boldsymbol{\alpha}}\approx\sum_{\mathbf{i}\in\mathcal{T}_D}W_{\mathbf{i}}\prod_{m=1}^{D}\left(\xi_{\pi_m}^{(\mathbf{i}_{1:m})}\right)^{\alpha_{\pi_m}}. \tag*{(45)}

For D=2D=2 and π=(1,2)\boldsymbol{\pi}=(1,2), this expression reduces to (29).

CQMOM does not use all raw moments up to the highest order in every coordinate. The marginal quadrature of ξπ1\xi_{\pi_1} with Nmax⁡N^{\max} nodes requires the 2Nmax⁡2N^{\max} pure moments of this coordinate. Each subsequent level requires mixed moments up to order 2Nmax⁡−12N^{\max}-1 in the coordinate reconstructed at that level, but only up to order Nmax⁡−1N^{\max}-1 in each coordinate reconstructed before, because these orders suffice to determine the conditional moments on the Nmax⁡N^{\max} nodes of that coordinate. The moments used in this way form the required moment set. Their number grows much more slowly with the phase-space dimension than the number of all raw moments up to order 2Nmax⁡−12N^{\max}-1 in each coordinate: for five coordinates with three nodes each, CQMOM requires 606 moments instead of 7776 (see Table 2). QMOMKit stores and evolves only the required moments, which are therefore the moments that a host application transports in physical space. Which mixed moments are required depends on the conditioning order.

DDTerminal nodesRequired momentsEξE_{\xi}EwE_wEME_M
29214.44×10−164.44 \times10^{-16}1.39×10−161.39 \times10^{-16}8.09×10−168.09 \times10^{-16}
327663.50×10−153.50 \times10^{-15}5.27×10−165.27 \times10^{-16}9.85×10−169.85 \times10^{-16}
52436062.32×10−142.32 \times10^{-14}2.88×10−162.88 \times10^{-16}1.25×10−151.25 \times10^{-15}
7218754661.19×10−131.19 \times10^{-13}9.01×10−169.01 \times10^{-16}6.67×10−156.67 \times10^{-15}
10590491476211.56×10−121.56 \times10^{-12}1.25×10−151.25 \times10^{-15}1.76×10−131.76 \times10^{-13}

Table 2. Recursive CQMOM quadrature reconstruction of the manufactured affine chain. Each coordinate uses three nodes. The errors of the terminal abscissas, EξE_{\xi}, of the terminal weights, EwE_w, and of the moments, EME_M, are defined in Eqs. (70)–(72).

By default, the weighted Vandermonde systems that define the conditional moments, as defined in Eq. (21), are solved in QMOMKit with the Björck-Pereyra algorithm [80, 81, 82], which exploits the structure of the Vandermonde matrix and requires O(N2)\mathcal{O}(N^2) operations for each right-hand side. Alternatively, QMOMKit also offers general solvers based on Gaussian elimination, Householder QR factorization with column pivoting, and singular-value decomposition, each with a cost of O(N3)\mathcal{O}(N^3) [72, 82]. All of these solvers reject numerically singular systems, the Björck-Pereyra solver on the basis of a condition-number estimate obtained from the bound of Gautschi [83] on the norm of the inverse Vandermonde matrix, so that the solver choice affects only the rounding errors of non-singular systems. Also available in QMOMKit is a solver using the Moore-Penrose pseudoinverse from a truncated singular-value decomposition, in which singular values below a relative cutoff are discarded [72, 84]. Unlike the other solvers, it returns the minimum-norm least-squares solution for rank-deficient systems and can therefore provide conditional moments where the other solvers report a singular system.

The conditional moments are themselves results of these solves and therefore contain rounding errors. The size of these errors is set by the typical magnitude of the values of ξπm\xi_{\pi_m} in the population, measured by the root-mean-square value

ξπmrms=(M2eπmM0)1/2,(46)\xi_{\pi_m}^{\mathrm{rms}}=\left(\frac{M_{2\mathbf{e}_{\pi_m}}}{M_{\mathbf{0}}}\right)^{1/2}, \tag*{(46)}

rather than by the conditional moments of the branch. On a branch where the conditional distribution is concentrated at a single point, these rounding errors appear as a small spurious spread. The bound σˉk,k\bar{\sigma}_{k,k} in Eq. (37), which is computed from the conditional moments alone, does not account for these rounding errors, so the degeneracy test may retain additional nodes. Instead of iteratively refining the solution of the Vandermonde systems to reduce these rounding errors [44], QMOMKit accounts for them in the adaptive mode by replacing σˉk,k\bar{\sigma}_{k,k} for conditional moment sets by max⁡{σˉk,k,μ0(ξπmrms)2k}\max\{\bar{\sigma}_{k,k},\mu_0(\xi_{\pi_m}^{\mathrm{rms}})^{2k}\}, such that

σk,k≤Cσϵmachmax⁡{σˉk,k,μ0(M2eπmM0)k},(47)\sigma_{k,k}\le C_{\sigma}\epsilon_{\mathrm{mach}}\max\left\{\bar{\sigma}_{k,k},\mu_0\left(\frac{M_{2\mathbf{e}_{\pi_m}}}{M_0}\right)^k\right\}, \tag*{(47)}

where μ0\mu_0 is the zeroth conditional moment, which equals one up to rounding errors. This lower limit scales in the same way as σk,k\sigma_{k,k} when the unit of ξπm\xi_{\pi_m} or the number density changes, so the reconstruction remains independent of both.

Because each set of conditional moments is inverted separately, the number of nodes may differ from branch to branch. In practice, the conditional moments do not always admit the configured number of nodes [16, 79]. Different branches may represent conditional distributions of very different shape and a branch whose conditional distribution is concentrated at a few points then carries fewer nodes than its neighbors. For each coordinate ξd\xi_d, the configured maximum Ndmax⁡N_d^{\max} is an upper limit for the node counts Nm,i1:m−1N_{m,i_1:m-1} of all branches at the conditioning level mm with πm=d\pi_m=d. The branches present after a reconstruction, together with their node counts, form the active quadrature topology, on which all subsequent branch-wise operations are carried out. In the non-adaptive mode, all branches at the same level carry the configured number of nodes. How the active node counts are selected as the moments evolve in time is described in § 4.4.

Moment evolution in phase space

Following Eqs. (4)–(6), the local evolution of a moment set in phase space, described by the operator B\mathcal{B}, is governed by

dMαdt=∑d=1αd>0Dαd∫Ωξξα−edξ˙dn dξ−∫∂Ωξξαξ˙⋅nξ n dSξ+∫ΩξξαS dξ.(48)\frac{\mathrm{d}M_{\boldsymbol{\alpha}}}{\mathrm{d}t} = \sum_{\substack{d=1\\\alpha_d>0}}^{D} \alpha_d \int_{\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}-\boldsymbol{e}_d}\dot{\xi}_d n\,\mathrm{d}\boldsymbol{\xi} - \int_{\partial\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}}\dot{\boldsymbol{\xi}}\cdot\boldsymbol{n}_{\boldsymbol{\xi}}\,n\,\mathrm{d}S_{\boldsymbol{\xi}} + \int_{\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}}S\,\mathrm{d}\boldsymbol{\xi}. \tag*{(48)}

As outlined in § 3, QMOMKit treats the terms on the right-hand side in two different ways. The first term represents the interior contribution of phase-space advection and describes the continuous motion of the population through phase space. This motion through phase space can be evaluated by advancing the abscissas of the quadrature nodes according to ξ˙\dot{\boldsymbol{\xi}} while keeping their weights unchanged [8, 16, 34]. The second term is the corresponding flux through the phase-space boundary and the third term represents sources or sinks within the phase space, which are both terms that can change the population itself. Since moving existing abscissas cannot readily represent such population changes, QMOMKit applies these contributions directly to the moments.

These two different numerical treatments motivate a splitting of the local phase-space evolution [16, 34, 44, 47, 50]. The interior contribution of phase-space advection is advanced through the motion of the quadrature abscissas in phase space and defines the advection subproblem,

Badv,α=∑d=1αd>0Dαd∫Ωξξα−edξ˙dn dξ,(49)\mathcal{B}_{\mathrm{adv},\boldsymbol{\alpha}} = \sum_{\substack{d=1\\\alpha_d>0}}^{D} \alpha_d \int_{\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}-\boldsymbol{e}_d}\dot{\xi}_d n\,\mathrm{d}\boldsymbol{\xi}, \tag*{(49)}

whereas the phase-space boundary flux and the population source are grouped into the moment-source subproblem,

Bsrc,α=−∫∂Ωξξαξ˙⋅nξ n dSξ+∫ΩξξαS dξ.(50)\mathcal{B}_{\mathrm{src},\boldsymbol{\alpha}} = - \int_{\partial\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}}\dot{\boldsymbol{\xi}}\cdot\boldsymbol{n}_{\boldsymbol{\xi}}\,n\,\mathrm{d}S_{\boldsymbol{\xi}} + \int_{\Omega_{\boldsymbol{\xi}}} \boldsymbol{\xi}^{\boldsymbol{\alpha}}S\,\mathrm{d}\boldsymbol{\xi}. \tag*{(50)}

such that B=Badv+Bsrc\mathcal{B}=\mathcal{B}_{\mathrm{adv}}+\mathcal{B}_{\mathrm{src}}. Let ΦadvΔt\Phi_{\mathrm{adv}}^{\Delta t} and ΦsrcΔt\Phi_{\mathrm{src}}^{\Delta t} denote the numerical evolution maps obtained by advancing the corresponding subproblems over a time step Δt\Delta t. QMOMKit offers the two Lie splittings [85]

ΦΔt=ΦadvΔt∘ΦsrcΔt,(51)\Phi^{\Delta t} = \Phi_{\mathrm{adv}}^{\Delta t}\circ\Phi_{\mathrm{src}}^{\Delta t}, \tag*{(51)}

and

ΦΔt=ΦsrcΔt∘ΦadvΔt,(52)\Phi^{\Delta t} = \Phi_{\mathrm{src}}^{\Delta t}\circ\Phi_{\mathrm{adv}}^{\Delta t}, \tag*{(52)}

as well as the symmetric Strang splitting [86]

ΦΔt=ΦadvΔt/2∘ΦsrcΔt∘ΦadvΔt/2.(53)\Phi^{\Delta t} = \Phi_{\mathrm{adv}}^{\Delta t/2}\circ \Phi_{\mathrm{src}}^{\Delta t}\circ \Phi_{\mathrm{adv}}^{\Delta t/2}. \tag*{(53)}

Provided that the subproblems are integrated with sufficient accuracy, the Lie splittings are first-order accurate in time and the Strang splitting, which is the default in QMOMKit, is second-order accurate [87]. Similar splitting strategies are commonly used in quadrature-based moment methods [8, 16, 22, 44, 46, 50, 88].

For phase-space advection, QMOMKit advances the quadrature abscissas according to the user-supplied phase-space velocity ξ˙(t,ξi)\dot{\boldsymbol{\xi}}(t,\boldsymbol{\xi}_i), while keeping the weights and the node count of the quadrature unchanged. The moments are then recomputed from the advected quadrature. Because the weights remain positive, the moments of the advected quadrature correspond to a non-negative distribution and are therefore realizable on the real line [34]. QMOMKit provides several Runge–Kutta schemes for integrating the abscissa trajectories: The RK23 scheme of Bogacki and Shampine [89] and the RK45 scheme of Dormand and Prince [90] use embedded lower-order estimates to adapt the internal time step, whereas the SSP-RK3 scheme [91, 92] advances the abscissas with a prescribed time step. By default, the RK23 scheme is used in QMOMKit. The moment-source subproblem advances the moments directly according to Eq. (50). Following Nguyen et al. [50], QMOMKit integrates the moment-source subproblem using the SSP-RK3 scheme, with optional moment-realizability checks (§ 4.5). If a source model requires moments that are not part of the required moment set, such as moments of higher or fractional order, QMOMKit evaluates them using the most recent quadrature. After the source update, the quadrature is reconstructed from the updated moments. Because the updated moment set may admit a different number of nodes, this reconstruction may change the active quadrature topology.

Selecting the active node count

In the adaptive mode, which is the default in QMOMKit, the configured node count Nmax⁡N^{\max} is an upper limit, whereas the active node count is selected each time a quadrature is reconstructed from new or updated moments. A candidate quadrature QNQ_N is accepted if it passes the degeneracy test in Eq. (37) or Eq. (47), as well as the criteria in Eqs. (38)–(40).

The first reconstruction of a state starts from Nmax⁡N^{\max}. Whenever a one-dimensional quadrature has a previously accepted active node count NN, QMOMKit begins the new reconstruction using that node count. If the candidate quadrature QNQ_N is accepted and N<Nmax⁡N < N^{\max}, QMOMKit also tests a candidate quadrature with one additional node. The active node count increases to N+1N+1 only if this candidate quadrature with one additional node is also accepted. If QNQ_N is rejected, successively smaller node counts are tested until an acceptable quadrature is found. Hence, the node count N+N^{+} selected for the new quadrature is

N+={N+1,N<Nmax⁡,QN and QN+1 are accepted,N,QN is accepted, N<Nmax⁡, and QN+1 is rejected,N,QN is accepted and N=Nmax⁡,max⁡{N⋆∈N:1≤N⋆<N, QN⋆ is accepted},QN is rejected.(54)N^{+} = \begin{cases} N+1, & N < N^{\max},\quad Q_N\text{ and }Q_{N+1}\text{ are accepted},\\ N, & Q_N\text{ is accepted},\ N < N^{\max},\text{ and }Q_{N+1}\text{ is rejected},\\ N, & Q_N\text{ is accepted and }N=N^{\max},\\ \max\{N^{\star}\in\mathbb{N}:1\leq N^{\star}<N,\ Q_{N^{\star}}\text{ is accepted}\}, & Q_N\text{ is rejected}. \end{cases} \tag*{(54)}

Starting from the previously accepted node count avoids repeatedly testing the configured maximum Nmax⁡N^{\max} when fewer nodes are currently admissible. At the same time, limiting growth to one additional node per update allows the quadrature resolution to increase progressively as quadratures with more nodes become acceptable. For CQMOM, the adaptive search is performed independently on each branch of the quadrature hierarchy. Different conditional branches may therefore retain, lose, or gain nodes independently. In a coupled simulation, a new state is created from the transported moments at every time step of the host, as discussed in § 5.2, so that the node-count history applies within each phase-space update but not across time steps of the host.

The applied procedure is deliberately transparent: a rejected candidate quadrature is not altered by clipping out-of-bounds abscissas, merging nearby nodes, or applying other silent corrections. Instead, the candidate quadrature is discarded and a new candidate quadrature is reconstructed with a different node count. As a consequence, the accepted quadrature reflects the explicit adaptive search and acceptance criteria described above.

Moment realizability

Moment realizability is concerned with whether a given moment set can arise from a non-negative population distribution on a given support. It is, thus, a property of the moments and provides a basic admissibility condition for moment-based population models. A successful adaptive reconstruction of a quadrature does not establish realizability, since unrealizable moments might not be considered during quadrature reconstruction with a reduced number of nodes. Realizability may therefore be checked separately.

QMOMKit provides an optional realizability check for truncated one-dimensional moment sets on the real line (Hamburger moment problem), the non-negative real line (Stieltjes moment problem), and bounded intervals (Hausdorff moment problem) [76]. The check tests whether the matrices built from the moments, the so-called Hankel matrices, are positive semidefinite, as they must be for the moments of a non-negative distribution. If the support has a lower bound aa or an upper bound bb, the same test is applied to matrices built from the shifted moments Mℓ+1−aMℓM_{\ell+1}-aM_{\ell} or bMℓ−Mℓ+1bM_{\ell}-M_{\ell+1}, respectively. A change of coordinate replaces each of these matrices by a positive multiple of a congruent matrix, which by Sylvester’s law of inertia has the same numbers of positive, negative, and zero eigenvalues [93]. The matrices are therefore evaluated in a coordinate that is centred on the mean and scaled by the spread of the distribution, so that the numerical decision depends neither on the location of the distribution nor on the unit of its coordinate. Besides strictly realizable and non-realizable moment sets, the check identifies moment sets on the boundary of the realizable set, such as those of a kk-point distribution [60, 76, 77], and moment sets for which rounding errors prevent a reliable decision. Boundary moment sets are accepted by default, whereas moment sets that cannot be classified reliably are treated as failures unless the selected policy accepts them, in which case they are left to the quadrature reconstruction. For multivariate distributions, the realizability of the marginal moment set for each dimension may be checked. Satisfaction of these marginal conditions is necessary, but does not in general establish realizability of the full joint moment set.

QMOMKit can apply these realizability checks during the moment-source update of Eq. (50). Depending on the selected policy, realizability may be checked only after a complete time step of the SSP-RK3 scheme or after every Runge-Kutta stage. Moment realizability after a time step satisfies

Mn+1∈RΩξ,(55)\mathbf{M}^{n+1} \in\mathcal{R}_{\Omega_\xi}, \tag*{(55)}

whereas moments that are realizable at each RK stage satisfy

M(s)∈RΩξ,s=1,2,3,(56)\mathbf{M}^{(s)} \in\mathcal{R}_{\Omega_\xi}, \qquad s=1,2,3, \tag*{(56)}

with RΩξ\mathcal{R}_{\Omega_\xi} denoting the set of truncated moment sequences realizable on Ωξ\Omega_\xi and ss denotes the stage of the SSP-RK3 scheme. If a checked moment state fails the configured realizability requirement, the moment-source integration is stopped, all intermediate moment states are discarded, and the phase-space update returns the moment state at the beginning of the time step. The host application then decides how to proceed, for example by repeating the step with a smaller time step. Optionally, QMOMKit repeats the source integration itself with successively halved time steps [50]. End-of-step checking permits intermediate Runge-Kutta stages to leave the realizable set provided that the final state is realizable, whereas stage-wise checking rejects the integration as soon as the result of a stage becomes unrealizable.

Software interface

This section presents the interface through which applications use QMOMKit. Following the division of responsibilities described in § 3, the interface is organized around cases and states, which hold the problem definition and the evolving moments and quadrature, functions that reconstruct a quadrature or advance a state in phase space, and callbacks, through which the application supplies its physical models.

A minimal example

Listing 1 illustrates the basic workflow for a one-dimensional QMOM problem. It is a reduced form of the example qmom_1d_minimal available in the QMOMKit repository, with header includes, diagnostic output, and file output omitted for clarity. The listing contains the main elements of using QMOMKit: a case defining the initial problem, a state containing the evolving moments and quadrature, application-defined callbacks describing the phase-space physics, and advancement in phase space.

The example specifies the configured node count and initial raw moments (lines 3–4). The options for the phase-space evolution are initialized with their default values (line 5) and the QmomCase is constructed from the initial moments and node count (line 7). Calling initial_state() on this case creates the QmomState and reconstructs its quadrature from the initial moments (line 8). The two callbacks (lines 10–28) define the physical model: the velocity callback specifies d˙=1−d\dot{d}=1-d for the particle diameter dd, while the source callback gives the raw-moment rates associated with binary fragmentation. The time-stepping loop (lines 34–45) calls advance_qmom_phase_space() to advance the state over each time step and stops if a step fails. QMOMKit performs the required quadrature reconstruction and phase-space integration internally and returns the result in a QmomPhaseSpaceEvolutionResult object, from which the updated state is obtained.

Cases and states

A QMOMKit simulation begins with a prescribed initial moment set and reconstruction configuration. QMOMKit stores this problem definition in a case, while the quantities that evolve in time are stored in a state. A state contains the current moment set together with the corresponding quadrature used during phase-space evolution, and the initial state is created by calling initial_state() on the corresponding case. The resulting workflow is

Case→initial_state()State→phase-space evolutionState+.(57)\mathrm{Case} \xrightarrow{\mathrm{initial\_state}()} \mathrm{State} \xrightarrow{\text{phase-space evolution}} \mathrm{State}^{+}. \tag*{(57)}

For QMOM, a QmomCase contains the initial raw moments, configured maximum node count, and reconstruction options. Calling initial_state() creates a QmomState containing the current moments and the corresponding quadrature. The state records both the configured maximum and the number of nodes active in the accepted quadrature. Its moments are evaluated from that quadrature so that the two remain consistent and cannot be modified independently. The same distinction applies to CQмом. A CqmomCase Listing 1: Minimal QMOMKit workflow for one-dimensional phase-space evolution.

int main()
{
    const std::size_t node_count = 3;
    const std::vector<double> initial_moments{1.0, 2.0, 5.025, 14.195, 42.11255, 127.48675};
    qmomkit::QmomPhaseSpaceEvolutionOptions options;

    const qmomkit::QmomCase qmom_case{qmomkit::MomentSet(initial_moments), node_count};
    qmomkit::QmomState state = qmom_case.initial_state();

    const qmomkit::PhaseSpaceVelocity velocity =
        [](double, const std::vector<double>& coordinates, std::vector<double>& velocities, std::size_t)
    {
        for (std::size_t node = 0; node < coordinates.size(); ++node)
        {
            velocities[node] = 1.0 - coordinates[node];
        }
    };

    const qmomkit::QmomMomentSource source = [](double, const qmomkit::QmomSourceContext& context)
    {
        std::vector<double> derivative(context.size(), 0.0);
        for (std::size_t order = 0; order < context.size(); ++order)
        {
            const double daughter_factor = std::pow(2.0, 1.0 - static_cast<double>(order));
            derivative[order] = 0.5 * (daughter_factor - 1.0) * context.value(order);
        }
        return qmomkit::QmomMomentRate{std::move(derivative)};
    };

    double time = 0.0;
    const double final_time = 1.0;
    const double time_step = 0.01;

    while (time < final_time)
    {
        const double step = std::min(time_step, final_time - time);
        qmomkit::QmomPhaseSpaceEvolutionResult result =
            qmomkit::advance_qmom_phase_space(state, time, step, velocity, source, options);
        if (!result.ok())
        {
            return 1;
        }
        state = std::move(result.state);
        time = result.final_time;
    }
}

contains the initial moments, hierarchy, and numerical settings, while a CqmomPreparedCase also holds the recursive branch structure used during reconstruction and can reuse it across successive operations. A CqmomState contains the current multidimensional moments, accepted quadrature, and branch-specific active node counts; the configured node counts remain upper limits. Moment indices and values follow the user-defined phase-space order. In any case, initial_state() throws an exception if the initial moments cannot be reconstructed, whereas state_candidate(), described below, reports such a failure as a status. After initialization, the application passes the current state to the phase-space evolution functions described in § 5.4. Figure 1 depicts the library architecture for the main QMOM and CQMOM attributes.

Figure 1. UML diagram of main attributes and member functions for QMOM and CQMOM in QMOMKit.

A state remains valid as long as only the phase-space evolution changes its moments. In a standalone simulation, such as the example in Listing 1, a single state is therefore advanced over the entire simulation. In a coupled simulation, the host changes the moments between two phase-space updates by transporting them in physical space. These moments are the conserved quantities of the spatial discretization and are owned by the host, whereas a state is only required to evolve the moments in phase space. Instead of keeping a state at each location and overwriting its moments, a new state is created at each location from the transported moments Mh\mathbf{M}_h and the settings of the corresponding case by calling the function state_candidate(), which reports the outcome as a status instead of throwing an exception. At each location, the workflow of a coupled simulation is therefore

State+→transport by the hostMh→state_candidate()State→phase-space evolutionState+.(58)\mathrm{State}^{+} \xrightarrow{\text{transport by the host}} \mathbf{M}_h \xrightarrow{\texttt{state\_candidate()}} \mathrm{State} \xrightarrow{\text{phase-space evolution}} \mathrm{State}^{+}. \tag*{(58)}

The lifetime of a state is, thus, limited to one phase-space update, and between two updates the moments are held only by the host. If the new state cannot be created or the phase-space update fails, the host may discard the state, while its own moments remain unchanged. Because an adaptive reconstruction does not reject moments that are not realizable, state_candidate() allows to first check the realizability of the updated moments, as described in § 4.5. However, keeping the transported moments realizable remains the responsibility of the spatial discretization of the host. A location whose zeroth moment lies below the cutoff defined for the Wheeler algorithm, see § 4.1, is reported as empty, such that the host application may decide to forego the phase-space evolution at this location for the next step.

Reconstructing a quadrature

The most direct use of QMOMKit is to reconstruct a quadrature from a prescribed set of raw moments. The functions compute_qmom() and compute_cqmom() do so without creating a state or advancing the moments in time. For repeated CQMOM reconstruction, a CqmomPreparedCase avoids rebuilding the recursive branch structure. The returned result contains the reconstructed abscissas and weights together with a status. CQMOM results also describe the conditional branch hierarchy and its multidimensional abscissas of the terminal nodes are returned in the user-defined phase-space order, independently of the conditioning order used during reconstruction. The application should check result.ok() before using the quadrature, since a failed result provides an explanatory message rather than a valid reconstruction.

The direct reconstruction interface is useful when an application requires the quadrature itself but manages the subsequent evolution independently. The returned abscissas and weights can then be used to evaluate integrals over the population distribution within the application’s own numerical procedure. In this mode, no QmomState or CqmomState is required, and none of the phase-space evolution functions described below need to be used.

Phase-space evolution

QMOMKit provides functions for phase-space advection and for moment sources, including phase-space boundary contributions, as well as functions that combines all them. Because these functions can be called individually, a host application can incorporate the phase-space evolution into its own time-integration procedure. Each function can be applied to one {Qmom|Cqmom}State or to a batch of independent states.

Phase-space advection is invoked with advance_{qmom|cqmom}_advection(). The application supplies the current QmomState or CqmomState, the starting time tt, the step length, the integration options, and a callback defining ξ˙(t,ξ)\dot{\xi}(t,\xi). The callback writes the velocity components into an array supplied by QMOMKit. Both the abscissas and velocities follow the user-defined phase-space order. QMOMKit integrates the trajectories of the quadrature abscissas over the step using the RK23, RK45, or SSP-RK3 scheme. During this update, the quadrature weights and active node or branch counts remain unchanged, since only the abscissas evolve. The raw moments are then recomputed from the updated quadrature and stored in the resulting state, ensuring that the moment set and the quadrature remain mutually consistent.

The moment-source subproblem in Eq. (50) is invoked with advance_{qmom|cqmom}_moment_source(). The application supplies the current QmomState or CqmomState, the starting time and step length, the source-integration options, and callbacks defining the moment rates. QMOMKit advances these rates using the SSP-RK3 scheme and reconstructs the quadrature from the updated moments. The callback for the moment source defines a contribution of the form

dMdt∣src=SM,(59)\left.\frac{\mathrm{d}\mathbf{M}}{\mathrm{d}t}\right|_{\mathrm{src}} = \mathbf{S}_{M}, \tag*{(59)}

where the application supplies the physical model represented by SM\mathbf{S}_{M}. Such contributions may describe aggregation, breakage, collisions, or other processes that change the population. Phase-space boundary contributions are handled by the same moment-space integration. An optional callback for the boundary contribution defines

dMdt∣bnd=FM,(60)\left.\frac{\mathrm{d}\mathbf{M}}{\mathrm{d}t}\right|_{\mathrm{bnd}} = \mathbf{F}_{M}, \tag*{(60)}

so that QMOMKit advances the moment-source subproblem of Eq. (50) in the form

dMdt=SM+FM.(61)\frac{\mathrm{d}\mathbf{M}}{\mathrm{d}t} = \mathbf{S}_{M} + \mathbf{F}_{M}. \tag*{(61)}

The phase-space boundary callback represents population entering or leaving the phase-space domain and is distinct from a boundary condition in physical space, which remains the responsibility of the host application. Optional realizability checks can be applied during the integration of the moment-source subproblem as described in § 4.5.

QMOMKit also provides functions for solving the complete local phase-space evolution. The function advance_{qmom|cqmom}_phase_space() accepts the current QmomState or CqmomState, the starting time and step length, the callbacks defining the phase-space velocity, moment source, and boundary contribution, and the numerical options for the corresponding subproblems. After a successful advancement, QMOMKit returns the updated state containing the moments and the corresponding quadrature. The combined function composes the advection and moment-source updates using one of the operator-splitting schemes introduced in § 4.3. Each substep uses the same numerical procedure as the corresponding standalone advection or moment-source function, while the selected splitting determines the order and duration of the substeps. On success, the state at t+Δtt + \Delta t is returned; on failure, the unchanged input state at tt is returned. The host can therefore recover without having to reconstruct the previous state.

For host applications that evolve one QMOM or CQMOM state at each host-defined location (e.g., cell center or integration point), batch variants of the phase-space-evolution functions provide a convenient interface to advance a large number of states with a single call. A batch call applies the single-state evolution function serially, in input order, using a common starting time, step length, and set of evolution options. Each state nevertheless retains its own reconstruction settings, adaptive integration and reconstruction behavior, diagnostics, and acceptance status. The ordinary batch functions use the same callbacks for every state, whereas the batch-index-aware variants also pass the position of the state in the batch to each callback. The batch returns one result for each state, allowing the host to check all local updates before accepting the new states or retrying the step. These functions provide a convenient association between states and host data, but do not provide parallel execution or communication.

Callbacks

Callbacks connect QMOMKit’s numerical algorithms to application-specific physical models. The application passes the callbacks to the evolution functions; they are not stored in a case or state. Each callback may be a free function, lambda, or function object. Lambdas and function objects may also hold application data.

A phase-space velocity callback receives the coordinates of all quadrature nodes in one array. The values are grouped by node and follow the user-defined order of the phase-space variables. For instance, for a one-dimensional phase space containing only dd, the array with the coordinates is simply (d0,d1,…)(d_0,d_1,\ldots), whereas the array is (d0,u0,d1,u1,…)(d_0,u_0,d_1,u_1,\ldots) for a two-dimensional phase space (d,u)(d,u). The callback writes the corresponding components of ξ˙\dot{\boldsymbol{\xi}} into a preallocated array with the same layout, as illustrated in Listing 1. The callback must fill every entry without resizing the array.

For moment-source and boundary-contribution callbacks, QMOMKit constructs at each SSP-RK3 stage a source context of type \{Qmom|Cqmom\}SourceContext, representing the moment state being advanced. It gives the callback read-only access to the current moment values and identifies the moment associated with each value. For QMOM, QmomSourceContext::value(ℓ) is the raw moment MℓM_{\ell}. For CQMOM, CqmomSourceContext::index(i) gives the multi-index of CqmomSourceContext::value(i). The callback returns the corresponding moment rates in the same order. The stage time is passed as the callback’s first argument and is also available through \{Qmom|Cqmom\}SourceContext::time(). A source model may also request integer- or fractional-order moments that are not stored in the state but can be evaluated from the quadrature reconstructed for that stage. Alternatively, a moment source may traverse the quadrature nodes directly, allowing the source model to use additional moment information. A boundary callback uses the same context and output layout, but its rates represent exchange across the phase-space boundary. When both callbacks are supplied, QMOMKit adds their rates within the same moment-source update.

Construction of batch-index-aware callbacks for a two-dimensional model with coordinates $(d,u)$

Figure 2. Construction of batch-index-aware callbacks for a two-dimensional model with coordinates (d,u)(d,u).

Callbacks may use data owned by the host application. If, for example, the phase-space velocity callback captures by reference a persistent structure containing the carrier-flow velocity at the two most recent time levels of the host, the callback can interpolate this velocity to each stage time and use it to calculate the velocity of every quadrature node. The callback therefore need not be rebuilt when the host data change, but the referenced object must remain valid for every invocation. QMOMKit may call a callback repeatedly, including when adaptive substeps are rejected or source updates are retried. A callback must therefore not assume one invocation per outer time step or perform irreversible updates on each call.

Listing 2 illustrates the construction patterns of the callbacks for a two-dimensional phase space, assuming that the phase-space evolution is handled using the batch functions. The immutable model parameter is captured by value, whereas host-owned fields are captured by reference so that updated values are visible without reconstructing the callbacks. The phase-space velocity callback evaluates the local carrier velocity at the supplied time and writes both components for every quadrature node. The moment-source callback evaluates the source from context.index(i) and context.value(i) and returns one rate per entry. The corresponding single-state callbacks omit the leading batch index. A boundary-contribution callback is constructed in the same way as the source callback and returns the same rate type.

The batch-index-aware callback types add a leading argument, the zero-based position of the state in the batch (std::size_t batch in Listing 2). In the two-dimensional batch example, the host stores state ii and its local field data at position ii in their respective arrays, then uses the supplied index to select both. QMOMKit assigns this index no special meaning. Every callback output must have the required size and contain only finite values. Otherwise, the evolution fails and the input state is returned unchanged.

Configuration

QMOMKit can be configured either from a *.qmom file or directly through its C++ interface. Loading a configuration reports success or failure, which an application may check before using the configured case. Reconstruction, phase-space evolution, and output settings are loaded separately even when they appear in the same file. The evolution settings control node advection, realizability checks, and operator splitting.

A configuration file may provide explicit initial moments. Alternatively, QMOMKit may generate univariate NDFs from an analytical distribution or a mixture of distributions; for multivariate NDFs, it may generate the required moments from an independent product of marginal distributions or mixtures. The reconstruction configuration defines the phase-space variables and their order, the configured maximum node count of each coordinate, prescribed supports, and whether the reconstruction is adaptive, which is the default in QMOMKit. For CQMOM, the configuration additionally specifies the conditioning order and the solver for the conditional systems. The weight and separation thresholds of the quadrature reconstruction, see § 4.1, can be set through the C++ interface.

Verification of numerical algorithms

Following the testing philosophy described in § 3, this section examines representative verification studies targeting key numerical components of QMOMKit: one-dimensional and recursive multidimensional quadrature reconstruction, adaptive quadrature topology, and phase-space time integration. Each study compares the numerical results with an analytical or manufactured reference solution, allowing the accuracy and expected behavior of the corresponding algorithm to be assessed quantitatively.

One-dimensional quadrature reconstruction

In QMOMKit, the modified Wheeler algorithm described in § 4.1 is used to reconstruct quadratures. This reconstruction is verified here using three Gaussian quadrature families with different supports and moment growth: Gauss-Legendre for the unit weight on [−1,1][-1,1], Gauss-Laguerre with α=0\alpha= 0 and measure exp⁡(−ξ) dξ\exp(-\xi)\,\mathrm{d}\xi on [0,∞)[0,\infty), and Gauss-Hermite for the standard-normal measure (2π)−1/2exp⁡(−ξ2/2) dξ(2\pi)^{-1/2}\exp(-\xi^2/2)\,\mathrm{d}\xi on R\mathbb{R}, using the probabilists’ Hermite convention. Their analytical raw moments are

Mℓ={2/(ℓ+1),Gauss-Legendre, ℓ even,0,Gauss-Legendre, ℓ odd,ℓ!,Gauss-Laguerre,(ℓ−1)!!,Gauss-Hermite, ℓ even,0,Gauss-Hermite, ℓ odd.(62)M_{\ell} = \begin{cases} 2/(\ell+ 1), & \text{Gauss-Legendre, } \ell\text{ even},\\ 0, & \text{Gauss-Legendre, } \ell\text{ odd},\\ \ell!, & \text{Gauss-Laguerre},\\ (\ell- 1)!!, & \text{Gauss-Hermite, } \ell\text{ even},\\ 0, & \text{Gauss-Hermite, } \ell\text{ odd}. \end{cases} \tag*{(62)}

These three families provide complementary tests: Gauss-Legendre has bounded support and moderate moments, whereas the Gauss-Laguerre and Gauss-Hermite moments grow rapidly with increasing order.

Using the Golub-Welsch algorithm [71], the reference quadratures with abscissas ξi\xi_i and weights wiw_i are computed independently in long-double precision and then rounded to double precision to provide the input moments M0,…,M2N−1M_0,\ldots,M_{2N-1}, an approach adapted from Pütz and Oevermann [60]. QMOMKit reconstructs the quadrature from these moments for each node count N=1,…,10N = 1,\ldots,10 in the non-adaptive mode, so that all NN nodes are compared. The reported errors based on the reconstructed pairs (ξ^i,w^i)(\widehat{\xi}_i,\widehat{w}_i) and the reference pairs (ξi,wi)(\xi_i,w_i) are

Eξ=max⁡i∣ξ^i−ξi∣max⁡j∣ξj∣,(63)E_{\xi} = \max_i \frac{\lvert\widehat{\xi}_i - \xi_i\rvert}{\max_j \lvert\xi_j\rvert}, \tag*{(63)}
Ew=max⁡i∣w^i−wi∣M0,(64)E_w = \max_i \frac{\lvert\widehat{w}_i - w_i\rvert}{M_0}, \tag*{(64)}
EM=max⁡0≤ℓ<2N∣M^ℓ−Mℓ∣M‾ℓ,(65)E_M = \max_{0\leq\ell<2N} \frac{\lvert\widehat{M}_{\ell} - M_{\ell}\rvert}{\overline{M}_{\ell}}, \tag*{(65)}

where

M^ℓ=∑i=1Nw^iξ^iℓ.(66)\widehat{M}_{\ell} = \sum_{i=1}^{N} \widehat{w}_i \widehat{\xi}_i^{\ell}. \tag*{(66)}

The abscissa error is scaled by the largest absolute abscissa of the reference quadrature, the weight error by its total weight, and the moment error by

M‾ℓ=∑i=1Nwi∣ξi∣ℓ,(67)\overline{M}_{\ell} = \sum_{i=1}^{N} w_i \lvert\xi_i\rvert^{\ell}, \tag*{(67)}

the magnitude of the terms that form the moment. Like the reconstruction itself, these errors do not depend on the unit of ξ\xi or on the number density. Scaling the moment error by M‾ℓ\overline{M}_{\ell} rather than by ∣Mℓ∣\lvert M_{\ell}\rvert matters for the odd moments of the symmetric rules, which vanish, so that a relative error would measure the cancellation between large terms rather than the accuracy of the quadrature. For N=1N = 1, the single abscissa of the symmetric rules is zero, and the absolute errors are reported where the scale vanishes. The moment comparison covers the same 2N2N moments used to reconstruct the quadrature.

Figure 2 (PDF p. 20). Maximum scaled abscissa, weight, and moment errors for the three quadrature families. Each point represents an NN-node reconstruction from moments of orders 0 through 2N−12N-1. With the scaling of Eqs. (63)–(65), the errors do not depend on the unit of the coordinate or on the number density. Exact zero errors are not visible on the logarithmic axes.

As observed in Figure 2, the abscissa and weight errors remain small throughout the tested range, although they generally increase with NN as higher-order raw moments make the inversion more sensitive to floating-point perturbations, consistent with the ill-conditioning of the moment inversion previously reported for larger node counts [16, 34, 42]. This effect is most pronounced for the Gauss-Laguerre quadrature, whose moments grow with ℓ!\ell!, with Eξ=6.9×10−10E_{\xi}=6.9 \times10^{-10} and Ew=5.2×10−10E_w=5.2 \times10^{-10} for N=10N=10, and weakest for the Gauss-Hermite quadrature. The moment errors are considerably smaller: the reconstructed quadratures reproduce their input moments with EM<4×10−12E_M < 4 \times10^{-12} for all families and node counts. This difference is consistent with the conditioning of the moment inversion, in which small changes of the moments cause larger changes of the abscissas and weights.

Recursive CQMOM reconstruction

The dimension-independent recursive CQMOM implementation described in § 4.2 is verified using a manufactured affine chain with a known hierarchical quadrature. For each phase-space dimension dd, let zdz_d be an independent discrete variable with value −5/8-5/8, 1/81/8, 3/43/4 and corresponding probabilities 1/41/4, 1/21/2, 1/41/4. The phase-space abscissas are defined recursively as

ξ1=z1,(68)\xi_1 = z_1, \tag*{(68)}
ξd=116+316ξd−1+1316zd,d=2,…,D.(69)\xi_d = \frac{1}{16} + \frac{3}{16}\xi_{d-1} + \frac{13}{16}z_d,\qquad d=2,\ldots,D. \tag*{(69)}

Each abscissa therefore depends on the preceding abscissa as well as on a new independent variable. For a fixed parent value ξd−1\xi_{d-1}, the conditional distribution of ξd\xi_d contains three known nodes. Repeating this construction produces a correlated, tree-like quadrature with three child nodes on every branch and 3D3^D terminal nodes. The identity conditioning order π=(1,…,D)\boldsymbol{\pi}=(1,\ldots,D) is used and the reconstruction runs in the non-adaptive mode. Reference moments are evaluated independently in long-double arithmetic by recursively expanding Eq. (69) and every terminal node of the reconstruction is compared with the exact weighted point of the same branch. The recursive reconstruction algorithm described in § 4.2 is used in every tested dimension; no dimension-specific procedure is introduced.

The errors are defined with terminal abscissas ξ^i,d\hat{\xi}_{i,d} and weights WiW_i, similar to § 6.1, as

Eξ=max⁡i,d∣ξ^i,d−ξi,d∣max⁡j∣ξj,d∣,(70)E_{\xi}=\max_{i,d}\frac{\left|\hat{\xi}_{i,d}-\xi_{i,d}\right|}{\max_j\left|\xi_{j,d}\right|}, \tag*{(70)}
Ew=max⁡i∣W^i−Wi∣M0,(71)E_w=\max_i\frac{\left|\hat{W}_i-W_i\right|}{M_0}, \tag*{(71)}
EM=max⁡α∣M^α−Mα∣M^α,(72)E_M=\max_{\alpha}\frac{\left|\hat{M}_{\alpha}-M_{\alpha}\right|}{\hat{M}_{\alpha}}, \tag*{(72)}

where the abscissa error of each coordinate is scaled by the largest absolute abscissa of that coordinate, the moment error is maximized over the required moment set, and M^α=∑i∈TDWi∏d=1D∣ξi,d∣αd\hat{M}_{\alpha}=\sum_{i\in T_D}W_i\prod_{d=1}^{D}\left|\xi_{i,d}\right|^{\alpha_d}. Table 2 reports these errors. The manufactured affine chain is reconstructed accurately through D=10D=10: the weight errors remain at the level of rounding errors, the moment errors stay below 2×10−132 \times10^{-13}, and the abscissa errors reach 1.6×10−121.6 \times10^{-12}. The growth of these rounding errors with DD reflects the increasing number of recursive conditional solves through which they propagate.

Adaptive branch-specific quadrature

The adaptive branch-specific quadrature described in § 4.2 is examined with a test that forces QMOMKit to adapt the active node count when a conditional distribution first contracts, is subsequently broadened by a moment source, and then contracts again. The two phase-space coordinates are assumed to be particle size dd and velocity uu. The size coordinate is fixed at d=d0=2d = d_0 = 2 and is represented by a single marginal node. Conditional on this node, the initial velocity moments are those of u∼N(1,1)u \sim\mathcal{N}(1, 1). The configured maximum node counts are one for dd and five for uu, with conditioning order (d,u)(d, u).

The phase-space velocities are d˙=0\dot{d} = 0 and u˙=−5(u−ueq)\dot{u} = -5(u - u_{\mathrm{eq}}), with equilibrium velocity ueq=0.5u_{\mathrm{eq}} = 0.5, such that the size distribution remains unchanged, whereas the velocity mean and variance satisfy uˉ(t)=ueq+(1−ueq)exp⁡(−5t)\bar{u}(t) = u_{\mathrm{eq}} + (1 - u_{\mathrm{eq}})\exp(-5t) and Var⁡[u](t)=exp⁡(−10t)\operatorname{Var}[u](t) = \exp(-10t), respectively. As the velocity variance approaches zero while the mean velocity approaches uequ_{\mathrm{eq}}, the represented distribution approaches a single velocity value. The adaptive reconstruction should therefore replace the initial five-node velocity quadrature with progressively fewer active nodes, eventually reaching a single node. A nonzero equilibrium velocity is chosen deliberately: relaxation towards u=0u = 0 would merely rescale every velocity by the same factor exp⁡(−5t)\exp(-5t), which is equivalent to a change of the velocity unit rather than a contraction of the distribution relative to its mean. A moment source is then applied over the time interval t∈[4,4.05)t \in[4, 4.05), representing a symmetric velocity-splitting event: At rate λ=20\lambda= 20, the contribution located at (d,u)(d, u) is replaced by two equal contributions at (d,u−Δu)(d, u - \Delta u) and (d,u+Δu)(d, u + \Delta u), with Δu=0.10\Delta u = 0.10. For the mixed moment Mp,qM_{p,q}, the resulting source is

dMp,qdt∣src=λ∑r=2r evenq(qr)(Δu)rMp,q−r.(73)\left.\frac{\mathrm{d}M_{p,q}}{\mathrm{d}t}\right|_{\mathrm{src}} = \lambda\sum_{\substack{r=2 \\ r\ \mathrm{even}}}^{q} \binom{q}{r}(\Delta u)^r M_{p,q-r}. \tag*{(73)}

The sum is empty for q=0q = 0 and q=1q = 1, so the source leaves the total weight, all velocity-independent moments, and the mean velocity unchanged. For q=2q = 2, Eq. (73) yields

dMp,2dt∣src=λ(Δu)2Mp,0,(74)\left.\frac{\mathrm{d}M_{p,2}}{\mathrm{d}t}\right|_{\mathrm{src}} = \lambda(\Delta u)^2 M_{p,0}, \tag*{(74)}

and, hence, introduces positive velocity variance without changing the mean. This broadening of the underlying distribution allows the conditional velocity quadrature to increase the velocity node count.

Figure 3 shows the evolution of the quadrature node count and the reconstruction error of the number density M0,0M_{0,0} and the mean velocity M0,1/M0,0M_{0,1}/M_{0,0}. The conditional velocity quadrature begins with five active nodes and reduces to one as the velocity variance decays. During the injection of velocity variance, the active count increases back to five. Once the source is removed, the same relaxation again drives the velocity quadrature towards a single node. Throughout this process, the reconstructed number density and the mean velocity remain close to their analytical values.

Figure 3. Evolution of the active velocity-node count and the corresponding moment errors. The conditional velocity quadrature initially contains five nodes and reduces to one as the velocity variance decays. The shaded interval (gray) marks the symmetric moment source, which introduces velocity variance and allows the velocity quadrature to use more nodes. After the source ends, the continuing velocity relaxation again reduces the active count.

Operator-splitting convergence

Here we verify the temporal convergence order of the Lie and Strang splitting schemes used to combine phase-space advection and moment sources, as described in § 4.3. Dedicated verification tests of QMOMKit confirm that the convergence rates of the implemented RK schemes is third order for the SSP-RK3 and RK23 schemes, and fifth order for the RK45 scheme, corresponding to the expected orders of these schemes [89, 90, 91].

The initial distribution consists of two weighted points with weights 0.45 and 0.55 at ξ=−0.6\xi= -0.6 and ξ=1.4\xi= 1.4, whose raw moments are (M0,M1,M2,M3)=(1,0.5,1.24,1.412)(M_0, M_1, M_2, M_3) = (1, 0.5, 1.24, 1.412). The quadrature nodes move with the constant phase-space velocity ξ˙=0.45\dot{\xi}=0.45, for which the resulting contribution to the moments is

[Badv(M)]ℓ=0.45 ℓMℓ−1,ℓ=1,…,3,(75)[\mathcal{B}_{\mathrm{adv}}(\mathbf{M})]_{\ell}=0.45\,\ell M_{\ell-1},\qquad\ell=1,\ldots,3, \tag*{(75)}

with [Badv(M)]0=0[\mathcal{B}_{\mathrm{adv}}(\mathbf{M})]_0=0. The moment-source operator is

[Bsrc(M)]ℓ=−0.17 ℓMℓ,ℓ=0,…,3,(76)[\mathcal{B}_{\mathrm{src}}(\mathbf{M})]_{\ell}=-0.17\,\ell M_{\ell},\qquad\ell=0,\ldots,3, \tag*{(76)}

such that the unsplit moment equations are

dMℓdt=0.45 ℓMℓ−1−0.17 ℓMℓ,ℓ=1,…,3,(77)\frac{\mathrm{d}M_{\ell}}{\mathrm{d}t}=0.45\,\ell M_{\ell-1}-0.17\,\ell M_{\ell},\qquad\ell=1,\ldots,3, \tag*{(77)}

together with dM0/dt=0\mathrm{d}M_0/\mathrm{d}t=0. The two operators do not commute: Advection transfers information from Mℓ−1M_{\ell-1} to MℓM_{\ell}, whereas the source attenuates each moment at a rate proportional to its order. Applying the operators in a different order over the same time interval therefore gives a different result. The unsplit problem describes the two points moving with ξ˙=0.45−0.17 ξ\dot{\xi}=0.45-0.17\,\xi at constant weights, so that its exact solution is again a two-point distribution, which a two-node quadrature represents exactly.

Let ΦadvΔt\Phi_{\mathrm{adv}}^{\Delta t} denote the numerical solution of the advection subproblem over an interval of duration Δt\Delta t and let ΦsrcΔt\Phi_{\mathrm{src}}^{\Delta t} denote the corresponding solution of the moment-source subproblem, as previously introduced in § 4.3. Using the three operator splittings available in QMOMKit, the advection subproblem is integrated with the default RK23 scheme, which moves the nodes exactly because the phase-space velocity is constant, whereas the source subproblem is integrated with the SSP-RK3 scheme. The considered time steps are Δt∈{0.3,0.15,0.075,0.0375,0.01875}\Delta t\in\{0.3, 0.15, 0.075, 0.0375, 0.01875\}, and the final time is T=1.2T=1.2. As in § 6.1, the error is measured as the maximum difference between the numerical and exact raw moments, scaled by the magnitude of the terms that form each exact moment:

EΔt=max⁡0≤ℓ≤3∣M^ℓ,Δt(T)−Mℓ(T)∣M‾ℓ(T),(78)E_{\Delta t}=\max_{0\leq\ell\leq3}\frac{\left|\widehat{M}_{\ell,\Delta t}(T)-M_{\ell}(T)\right|}{\overline{M}_{\ell}(T)}, \tag*{(78)}
M‾ℓ(T)=∑i=12wi∣ξi(T)∣ℓ,(79)\overline{M}_{\ell}(T)=\sum_{i=1}^{2}w_i\left|\xi_i(T)\right|^{\ell}, \tag*{(79)}

where ξi(T)\xi_i(T) are the positions of the two exact points at time TT. Figure 4 shows the convergence of the three operator splittings for a decreasing time step. Both Lie splittings converge with an order of 1.00, matching their expected first-order convergence, whereas the Strang splitting is observed to converge with an order of 1.97, approaching the expected second-order convergence. In addition, Strang splitting results in a substantially reduced absolute error compared to both Lie splittings, two to three orders of magnitude smaller in the considered case.

Figure 4. Convergence of the operator-splitting schemes available in QMOMKit for the manufactured moment problem in Eq. (77). The two Lie splittings and the Strang splitting converge with their expected orders. Note that the results of the two Lie splittings are almost identical and, hence, their lines nearly coincide with each other.

Spatially homogeneous application examples

The spatially homogeneous examples presented in this section demonstrate the capabilities and usage of QMOMKit on population models of increasing phase-space dimension and complexity. In each example, the QMOMKit solution is compared with a reference solution computed using the Monte Carlo companion code described in Appendix § 12, obtained by directly evolving a finite sample of the same prescribed population. These comparisons provide a numerical validation of the quadrature reconstruction and phase-space evolution, rather than a physical validation of the underlying application models.

All examples follow the same initialization and comparison procedure. A sample of 10,000 realizations is drawn from the prescribed initial distributions. The corresponding raw moments initialize the QMOMKit simulation, while the same sample is evolved directly with the Monte Carlo companion. Phase-space advection is integrated with the RK23 scheme in both QMOMKit and Monte Carlo simulations. Each example is evolved from t=0t = 0 to its specified final time TT using 100 equal outer time steps, Δt=0.01T\Delta t = 0.01T. The RK23 integrator may take smaller internal time steps within each outer time step to satisfy its error tolerances. For examples that also contain moment-source or phase-space boundary contributions, Δt\Delta t is the time step over which the selected operator splitting is applied.

Evaporation of respiratory aerosols

The evaporation of respiratory aerosols provides an illustrative application of QMOM, with the droplet diameter dd as the phase-space coordinate. The initial population follows the trimodal bronchiolar-laryngeal-oral (B.L.O.) distribution measured for voluntary coughing [94]. The three log-normal modes have median diameters of 1.6, 1.7, and 123 μ\mum, respectively, and span a broad range from sub-micrometer aerosols to large respiratory droplets. A diameter-based QMOM evolution with a finite residual size of aerosol droplets has previously been used in population-balance models of such respiratory droplets [53]. Here, the droplet diameter follows the d2d^2 evaporation law [95].

dddt={−K/(2d),d>dmin⁡,0,d≤dmin⁡,(80)\frac{\mathrm{d}d}{\mathrm{d}t} = \begin{cases} -K/(2d), & d > d_{\min}, \\ 0, & d \le d_{\min}, \end{cases} \tag*{(80)}

with K=500 μm2/sK = 500\,\mu\mathrm{m}^2/\mathrm{s} and dmin⁡=0.8 μmd_{\min} = 0.8\,\mu\mathrm{m}, a meaningful representation of the evaporation dynamics of respiratory droplets [53, 96]. Droplets reaching dmin⁡d_{\min}, representing the size of the remaining non-volatile biological material [53], do not further reduce in size. A sample of 10,000 droplets is drawn from the B.L.O. distribution and samples outside the modeled interval 0.8≤d≤1000 μm0.8 \le d \le1000\,\mu\mathrm{m} are discarded, leaving 9,575 droplets for the QMOMKit and Monte Carlo simulations presented below. QMOM quadratures with a fixed node count of N=2,4,6,8,N = 2, 4, 6, 8, and 10 are considered, allowing the influence of the quadrature resolution to be assessed.

Figure 5 compares the resulting number density, Sauter mean diameter d32=M3/M2d_{32} = M_3/M_2, and diameter variance σd2=M2/M0−(M1/M0)2\sigma_d^2 = M_2/M_0 - (M_1/M_0)^2. The number density M0M_0 is preserved in all cases, since evaporation changes the size of the droplets, but all droplets retain a finite size and stay part of the distribution. Even though all droplets shrink or remain at dmin⁡d_{\min}, the Sauter mean diameter increases. This can be explained by observing that most droplets belong to the much smaller B and L modes, and rapidly accumulate at the residual diameter, where their contributions to M2M_2 and M3M_3 become small. The larger O-mode droplets therefore become increasingly dominant in the ratio M3/M2M_3/M_2 and the diameter variance decreases as the population accumulates at dmin⁡d_{\min}; by T=20 sT=20\ \mathrm{s}, approximately 96% of the droplets have reached dmin⁡d_{\min}.

Figure 5. Evaporation of a population of respiratory aerosols. The logarithmic histogram shows the initial diameter distribution used by both QMOMKit and the Monte Carlo reference. The number density M0M_0, the Sauter mean diameter d32=M3/M2d_{32}=M_3/M_2, and the diameter variance σd2\sigma_d^2 are compared between the Monte Carlo reference and fixed QMOM quadratures with N=2N=2, 44, 66, 88, and 1010 nodes. Droplets reaching dmin⁡=0.8 μmd_{\min}=0.8\ \mu\mathrm{m} remain at this residual diameter.

The two-node quadrature is evidently insufficient to represent the broad trimodal population, whereas four nodes already capture much of its evolution. The higher-resolution quadratures remain close to the Monte Carlo reference, although the error does not decrease monotonically with node count, consistent with the observations of Grosch et al. [67] for processes that act locally on the particle size. The visible changes in slope of some QMOM curves arise when individual quadrature nodes reach dmin⁡d_{\min} and cease to move. A finite quadrature contains only a small number of such arrival times, whereas the Monte Carlo ensemble contains thousands and, hence, produces a smoother aggregate response. The example thus illustrates both the effectiveness and the characteristic discrete behavior of a fixed QMOM representation for a broad multimodal population approaching a phase-space boundary.

Cavitation bubbles

Inspired by the work of Bryngelson et al. [23], we consider a population of cavitation bubbles. The bubble population is represented in the dimensionless phase space ξ=(R,U)\boldsymbol{\xi}=(R,U), where RR is the bubble radius and U=dR/dtU=\mathrm{d}R/\mathrm{d}t is the radial velocity of the bubble wall. The dynamic behavior of the bubbles is described by a dimensionless Rayleigh-Plesset model [23],

R˙=U,(81)\dot{R}=U, \tag*{(81)}
U˙=1R[(R0R)3γ−1Cp−2WeR0(R0R−(R0R)3γ)−32U2−4ReUR].(82)\dot{U}=\frac{1}{R}\left[\left(\frac{R_0}{R}\right)^{3\gamma}-\frac{1}{C_p}-\frac{2}{\mathrm{We}R_0}\left(\frac{R_0}{R}-\left(\frac{R_0}{R}\right)^{3\gamma}\right)-\frac{3}{2}U^2-\frac{4}{\mathrm{Re}}\frac{U}{R}\right]. \tag*{(82)}

where the bubbles are assumed to contain a polytropic ideal gas, R0=1R_0=1 is the equilibrium radius of all bubbles, the driving pressure coefficient is Cp=0.3C_p=0.3, the polytropic exponent of the gas is γ=1.4\gamma=1.4, and the Reynolds and Weber numbers are Re=10\mathrm{Re}=10 and We=1.39\mathrm{We}=1.39, respectively. The initial population has unit number density, the initial radius RR follows a log-normal distribution with μlog⁡R=−0.02\mu_{\log R}=-0.02 and σlog⁡R=0.2\sigma_{\log R}=0.2, and the initial radial velocity UU follows a normal distribution with zero mean and standard deviation 0.2. QMOM is configured with two nodes for each phase-space dimension and conditioning order (R,U)(R,U).

As observed in Figure 6, QMOMKit reproduces the Monte Carlo reference well throughout the simulated interval. The number density M0,0M_{0,0} remains constant, as expected in the absence of population sources. The mean radius M1,0M_{1,0} and mean radial velocity M0,1M_{0,1} undergo damped oscillations, with the oscillations of all moments correctly decaying towards asymptotic values. Both the frequency and damping of the transient dynamics are captured faithfully.

Figure 6. Evolution of selected moments for a population of cavitation bubbles, compared with the Monte Carlo reference. QMOMKit reproduces the damped oscillatory dynamics and asymptotic behavior of the first- and second-order moments over the full simulation interval.

Nucleating and condensing water droplets

This example considers a population of falling water droplets described by the three-dimensional phase space ξ=(r,w,T)\boldsymbol{\xi}=(r,w,T), where rr is the droplet radius, ww is the vertical velocity of the droplet, and TT is the droplet temperature. The droplets settle under gravity, grow by condensation, and nucleate during a specified time interval.

The droplet dynamics are described by a coupled momentum, heat, and mass-transfer model for an isolated water droplet in air [97], given as

r˙=Sh DvMw2rρlRg[psat(T∞)T∞−psat(T)T],(83)\dot{r}=\frac{\mathrm{Sh}\,D_vM_w}{2r\rho_lR_g}\left[\frac{p_{\mathrm{sat}}(T_\infty)}{T_\infty}-\frac{p_{\mathrm{sat}}(T)}{T}\right], \tag*{(83)}
w˙=−3ρaCD∣w∣w8ρlr−g(1−ρaρl),(84)\dot{w}=-\frac{3\rho_aC_D\lvert w\rvert w}{8\rho_lr}-g\left(1-\frac{\rho_a}{\rho_l}\right), \tag*{(84)}
T˙=3rcl[Nu ka(T∞−T)2rρl+L(T)r˙].(85)\dot{T}=\frac{3}{r c_l}\left[\frac{\mathrm{Nu}\,k_a(T_\infty-T)}{2r\rho_l}+L(T)\dot{r}\right]. \tag*{(85)}

The ambient air is assumed to be saturated, quiescent, and at a uniform temperature of T∞=313.15T_\infty=313.15 K. The Sherwood number Sh and the Nusselt number Nu are computed based on the correlation of Beard and Pruppacher [98] and the drag coefficient CDC_D is based on the correlation of Clift and Gauvin [99]. More details about the model as well as all the used fluid properties of water and air can be found in the work of Denner [97]. In addition to the continuously evolving initial population, new droplets nucleate with rnuc=5.0×10−5r_{\mathrm{nuc}}=5.0\times10^{-5} m, wnuc=0w_{\mathrm{nuc}}=0, and Tnuc=298.15T_{\mathrm{nuc}}=298.15 K during the time interval 0.200.20 s ≤t<0.40\le t<0.40 s. This nucleation contributes to a raw moment Ma,b,cM_{a,b,c} according to

dMa,b,cdt∣bnd=J(t)rnucawnucbTnucc,(86)\left.\frac{\mathrm{d}M_{a,b,c}}{\mathrm{d}t}\right|_{\mathrm{bnd}}=J(t)r_{\mathrm{nuc}}^{a}w_{\mathrm{nuc}}^{b}T_{\mathrm{nuc}}^{c}, \tag*{(86)}

with the nucleation rate being

J(t)={5×104 s−1,0.20≤t<0.40 s,0,otherwise.(87)J(t) = \begin{cases} 5 \times10^{4}\,\mathrm{s}^{-1}, & 0.20 \le t < 0.40\,\mathrm{s},\\ 0, & \text{otherwise}. \end{cases} \tag*{(87)}

The nucleation rate is chosen such that the initial droplet population doubles over the nucleation interval. The droplet radius is initialized with r∼Γ(16,18.75×10−6 m)r \sim\Gamma(16,18.75 \times10^{-6}\,\mathrm{m}), while the velocity and temperature are initialized with w∼N(−2,1) m/sw \sim\mathcal{N}(-2,1)\,\mathrm{m/s} and T∼N(293.15,3) KT \sim\mathcal{N}(293.15,3)\,\mathrm{K}, respectively. Hence, since the droplets are initially colder than their surrounding, the vapor concentration at the droplet surface is initially lower than in the ambient air and r˙>0\dot{r} > 0. QMOMKit uses the adaptive CQMOM implementation with a maximum of three nodes for each coordinate and applies the conditioning order (r,T,w)(r,T,w).

Figure 7 compares the total number density, the characteristic radius M3,0,0/M2,0,0M_{3,0,0}/M_{2,0,0}, the mean vertical velocity M0,1,0/M0,0,0M_{0,1,0}/M_{0,0,0}, the mean temperature M0,0,1/M0,0,0M_{0,0,1}/M_{0,0,0}, the mean product of radius and temperature M1,0,1/M0,0,0M_{1,0,1}/M_{0,0,0}, as well as the radius variance

Figure 7. Evolution of selected moments and moment-derived quantities for condensing droplets in the three-dimensional phase space (r,w,T)(r,w,T), compared with the Monte Carlo reference. New droplets nucleate between 0.20 and 0.40 s, indicated by the shaded region, doubling the total population.

σr2=M2,0,0M0,0,0−(M1,0,0M0,0,0)2.(88)\sigma_r^2 = \frac{M_{2,0,0}}{M_{0,0,0}} - \left(\frac{M_{1,0,0}}{M_{0,0,0}}\right)^2. \tag*{(88)}

The imposed nucleation produces the expected linear doubling of the population between 0.2 and 0.4 s. At the same time, nucleation reduces the mean radius and broadens the radius distribution, resulting in a sharply increasing radius variance. The newly introduced droplets have zero vertical velocity and, consequently, reduce the mean velocity of the population during the injection interval. The entry temperature of the nucleated droplets hardly modifies the mean droplet temperature, whereas the mean product of radius and temperature decreases markedly, because the nucleated droplets are much smaller than the existing droplets. In general, the solution provided by QMOMKit closely follows the Monte Carlo reference for all six reported quantities, including the rapid changes during droplet nucleation.

Spherical-particle breakup with diameter-dependent recoil

The first breakup example considers a population of spherical particles in a constant gas flow, described by the four-dimensional phase space ξ=(d,u,v,w)\boldsymbol{\xi}=(d,u,v,w), where dd is the particle diameter and U=(u,v,w)\mathbf{U}=(u,v,w) is the particle velocity. The initial population has unit number density, with ln⁡d∼N(ln⁡dref,0.122)\ln d \sim\mathcal{N}(\ln d_{\mathrm{ref}},0.12^2) and u,v,w∼N(0,0.52)u,v,w \sim\mathcal{N}(0,0.5^2), where dref=10−4 md_{\mathrm{ref}}=10^{-4}\,\mathrm{m}. QMOMKit is configured with two quadrature nodes for each phase-space dimension and conditioning order (d,u,v,w)(d,u,v,w).

Breakup occurs at the constant rate λ=10 s−1\lambda=10\,\mathrm{s}^{-1}, with each parent particle producing two equal-volume daughter particles, with daughter diameter d±=d/23d_{\pm}=d/\sqrt[3]{2}. The two daughters receive velocities subject to equal and opposite velocity increments, U±=U±R\mathbf{U}_{\pm}=\mathbf{U}\pm\mathbf{R}, where the components of the recoil vector R\mathbf{R} are independent Gaussian variables with zero mean and standard deviation σR(d)=σ0d/dref\sigma_R(d)=\sigma_0 d/d_{\mathrm{ref}} with σ0=0.25\sigma_0=0.25 m/s. Because each daughter has half the parent volume, each individual breakup event preserves both the total particle volume and the volume-weighted momentum of the daughter pair. The size-dependence of the recoil amplitude, however, couples particle size and velocity in the breakup source and, hence, the source term cannot be evaluated solely using the finite set of moments advanced by CQMOM. Between breakup events, the particle diameter remains constant and the velocity evolves under Schiller–Naumann drag [100] towards the prescribed gas velocity Ug=(2,1.5,0.8)\mathbf{U}_{\mathrm{g}}=(2,1.5,0.8) m/s.

For a parent state (d,u,v,w)(d,u,v,w), the contribution of one breakup event to a raw moment is given by the combined contribution of the two daughters minus that of the parent. Multiplying this expected change by the breakup rate gives

Sp,q,r,s=λ[E(d+pu+qv+rw+s+d−pu−qv−rw−s)−dpuqvrws].(89)S_{p,q,r,s}=\lambda\left[\mathbb{E}\left(d_+^p u_+^q v_+^r w_+^s+d_-^p u_-^q v_-^r w_-^s\right)-d^p u^q v^r w^s\right]. \tag*{(89)}

where the expectation accounts for the random recoil. For a centered Gaussian variable RR with standard deviation σ\sigma, the required velocity moments can be evaluated analytically as

Gk(a,σ)=E[(a+R)k]=∑ℓ=0ℓ evenk(kℓ)ak−ℓ(ℓ−1)!! σℓ,(−1)!!=1.(90)G_k(a,\sigma)=\mathbb{E}\left[(a+R)^k\right]=\sum_{\substack{\ell=0\\ \ell\ \mathrm{even}}}^{k}\binom{k}{\ell}a^{k-\ell}(\ell-1)!!\,\sigma^\ell,\qquad(-1)!!=1. \tag*{(90)}

Because the three recoil components are independent and centered, the expected daughter contribution separates into the three velocity directions, with Eq. (89) becoming

Sp,q,r,s=λ[2κpdpGq(u,σR(d))Gr(v,σR(d))Gs(w,σR(d))−dpuqvrws].(91)S_{p,q,r,s}=\lambda\left[2\kappa^p d^p G_q(u,\sigma_R(d))G_r(v,\sigma_R(d))G_s(w,\sigma_R(d))-d^p u^q v^r w^s\right]. \tag*{(91)}

with κ=d±/d=1/2\kappa=d_{\pm}/d=1/\sqrt{2}. If WiW_i denotes a terminal quadrature weight and (di,ui,vi,wi)(d_i,u_i,v_i,w_i) are the corresponding phase-space abscissas, the breakup contribution to the moment rate is then

dMp,q,r,sdt∣br=λ∑iWi[2κpdipGq(ui,σR(di))Gr(vi,σR(di))Gs(wi,σR(di))−dipuiqvirwis].(92)\left.\frac{\mathrm{d}M_{p,q,r,s}}{\mathrm{d}t}\right|_{\mathrm{br}}=\lambda\sum_i W_i\left[2\kappa^p d_i^pG_q(u_i,\sigma_R(d_i))G_r(v_i,\sigma_R(d_i))G_s(w_i,\sigma_R(d_i))-d_i^p u_i^q v_i^r w_i^s\right]. \tag*{(92)}

Rather than expressing the breakup source solely in terms of the evolved moments, the parent-to-daughter transformation is evaluated directly on the reconstructed terminal quadrature.

The reason such a quadrature-based formulation of the breakup source term is useful becomes clear by considering one particular evolved moment. For the evolved moment M1,3,0,0M_{1,3,0,0}, the cubic velocity contribution is

G3(u,σR)=u3+3uσR2.(93)G_3(u,\sigma_R)=u^3+3u\sigma_R^2. \tag*{(93)}

Since the recoil variance scales with d2d^2, σR2=σ02d2/dref2\sigma_R^2=\sigma_0^2d^2/d_{\mathrm{ref}}^2, the source of the evolved moment M1,3,0,0M_{1,3,0,0} becomes

dM1,3,0,0dt∣br=λ[(2κ−1)M1,3,0,0+6κσ02dref2M3,1,0,0].(94)\left.\frac{\mathrm{d}M_{1,3,0,0}}{\mathrm{d}t}\right|_{\mathrm{br}}=\lambda\left[(2\kappa-1)M_{1,3,0,0}+6\kappa\frac{\sigma_0^2}{d_{\mathrm{ref}}^2}M_{3,1,0,0}\right]. \tag*{(94)}

Here the source of the tracked moment M1,3,0,0M_{1,3,0,0} depends on M3,1,0,0M_{3,1,0,0}, which is not itself part of the evolved moment set using CQMOM with 2 nodes for each dimension. Evaluating the transformation on the terminal quadrature therefore provides a convenient route to obtain the required information.

Figure 8 compares the CQMOMkit results with the corresponding Monte Carlo solution. For constant-rate binary breakup, each particle is replaced by two daughters, so the number density grows as eλte^{\lambda t} and reaches approximately ee over the simulated interval. At the same time, the mean diameter decreases as successive breakup events create smaller particles. The third size moment M3,0,0,0M_{3,0,0,0} remains constant, which is the expected consequence of equal-volume breakup. The lower row of Figure 8 shows the volume-weighted velocity moments M3,1,0,0M_{3,1,0,0}, M3,0,1,0M_{3,0,1,0}, and M3,0,0,1M_{3,0,0,1}. These moments are not part of the evolved moment set and are instead evaluated from the reconstructed terminal quadrature. The considered equal-volume breakup with symmetric recoil leaves them unchanged by the breakup event itself, while drag causes them to increase as the particle velocities approach Ug\mathbf{U}_{\mathrm{g}}. Their close agreement with the direct Monte Carlo reference therefore tests more than the evolved moments alone, showing that the reconstructed terminal population also provides an accurate representation of quantities required by the nonlinear source term.

Figure 8. Evolution of selected moments of a population of spherical particles subject to drag and constant-rate binary breakup in the four-dimensional phase space (d,u,v,w)(d,u,v,w), comparing fixed two-node CQMOM with the Monte Carlo reference. The top row shows the number density M0,0,0,0M_{0,0,0,0}, the mean diameter M1,0,0,0/M0,0,0,0M_{1,0,0,0}/M_{0,0,0,0}, and the volume moment M3,0,0,0M_{3,0,0,0}. The lower row shows the volume-weighted velocity moments M3,1,0,0M_{3,1,0,0}, M3,0,1,0M_{3,0,1,0}, and M3,0,0,1M_{3,0,0,1}, which are not evolved by CQMOM but are evaluated from the quadrature. The considered equal-volume breakup conserves M3,0,0,0M_{3,0,0,0}, while drag accelerates the particles towards the imposed gas velocity.

Spherical-particle breakup with heat transfer

Building on the previous example, this second breakup example includes heat transfer and demonstrates an alternative way of evaluating a moment source. Its five-dimensional phase space is ξ=(V,T,u,v,w)\boldsymbol{\xi}=(V,T,u,v,w), where VV is the particle volume, TT is the particle temperature, and U=(u,v,w)\mathbf{U}=(u,v,w) is the particle velocity. The initial volume distribution is obtained by transforming the diameter distribution used in the 4D example through V=πd3/6V=\pi d^3/6, so that both cases represent the same initial particle-size distribution. The temperature and velocity distributions are initialized with T∼N(350,502)T\sim\mathcal{N}(350,50^2) K and u,v,w∼N(0,0.52)u,v,w\sim\mathcal{N}(0,0.5^2) m/s, respectively. CQMOM is configured with two quadrature nodes for each dimension and conditioning order (V,T,u,v,w)(V,T,u,v,w). Breakup again occurs at the constant rate λ=10 s−1\lambda=10\ \mathrm{s}^{-1}. Each parent produces two identical daughters in (V,T)(V,T), with V′=V/2V'=V/2 and

T′=T+ε(V′Vref)1/3(Tg−T)=T+ε(V2Vref)1/3(Tg−T),(95)T'=T+\varepsilon\left(\frac{V'}{V_{\mathrm{ref}}}\right)^{1/3}(T_g-T)=T+\varepsilon\left(\frac{V}{2V_{\mathrm{ref}}}\right)^{1/3}(T_g-T), \tag*{(95)}

with gas temperature Tg=300T_g=300 K, ε=10−2\varepsilon=10^{-2} and Vref=πdref3/6V_{\mathrm{ref}}=\pi d_{\mathrm{ref}}^3/6, where dref=10−4d_{\mathrm{ref}}=10^{-4} m. The velocity components remain unchanged by the breakup. The important feature is the factor V1/3V^{1/3} in Eq. (95): When this daughter temperature is inserted into a moment containing powers of TT, fractional powers of VV appear. To describe the corresponding fractional-order moments, we use the generalized-moment notation

Mp,q,r,s,t=∫VpTqurvswtn dV dT du dv dw,p∈R≥0,(96)M_{p,q,r,s,t}=\int V^pT^qu^rv^sw^t n\,\mathrm{d}V\,\mathrm{d}T\,\mathrm{d}u\,\mathrm{d}v\,\mathrm{d}w,\qquad p\in\mathbb{R}_{\ge0}, \tag*{(96)}

which differs from the usual moment definition only in allowing the volume exponent pp to be non-integer. If pp is an integer, MM is simply the corresponding moment MM. Between breakup events, the particle volume remains constant, the velocity evolves under the same Schiller–Naumann drag law as in the previous example, and the temperature relaxes towards the gas temperature according to

T˙=6kgNuρcpd2(Tg−T),(97)\dot{T}=\frac{6k_g\mathrm{Nu}}{\rho c_p d^2}(T_g-T), \tag*{(97)}

where the Nusselt number Nu\mathrm{Nu} is defined by the correlation of Ranz and Marshall [101]. The general breakup source follows by substituting Eq. (95) into the daughter moment and expanding the power of T′T'. The contribution of one daughter before accounting for the factor V′=V/2V'=V/2 is

Dp,q,r,s,t=∑ℓ=0q(qℓ)cℓ∑j=0ℓ(ℓj)Tgℓ−j(−1)jMp+ℓ/3,q−ℓ+j,r,s,t,(98)\mathcal{D}_{p,q,r,s,t}=\sum_{\ell=0}^{q}\binom{q}{\ell}c^\ell\sum_{j=0}^{\ell}\binom{\ell}{j}T_g^{\ell-j}(-1)^jM_{p+\ell/3,q-\ell+j,r,s,t}, \tag*{(98)}

with

c=ε2Vref3.(99)c = \frac{\varepsilon}{\sqrt[3]{2V_{\mathrm{ref}}}}. \tag*{(99)}

Since one parent is replaced by two daughters of volume V/2V/2, the resulting breakup source is

dMp,q,r,s,tdt∣br=λ(21−pDp,q,r,s,t−Mp,q,r,s,t).(100)\left.\frac{\mathrm{d}M_{p,q,r,s,t}}{\mathrm{d}t}\right|_{\mathrm{br}} = \lambda\left(2^{1-p}\mathcal{D}_{p,q,r,s,t}-M_{p,q,r,s,t}\right). \tag*{(100)}

The important point in Eq. (98) is not the algebraic expansion itself, but the shifted volume order p+ℓ/3p+\ell/3. The closure mechanism is particularly transparent for the tracked moment M1,1,0,0,0M_{1,1,0,0,0}. Applying the daughter map gives

D1,1,0,0,0=M1,1,0,0,0+c(TgM4/3,0,0,0,0−M4/3,1,0,0,0),(101)\mathcal{D}_{1,1,0,0,0}=M_{1,1,0,0,0}+c\left(T_gM_{4/3,0,0,0,0}-M_{4/3,1,0,0,0}\right), \tag*{(101)}

and, because 21−p=12^{1-p}=1 for p=1p=1, the original M1,1,0,0,0M_{1,1,0,0,0} contribution cancels when the parent is removed. The breakup source therefore reduces to

dM1,1,0,0,0dt∣br=λc(TgM4/3,0,0,0,0−M4/3,1,0,0,0).(102)\left.\frac{\mathrm{d}M_{1,1,0,0,0}}{\mathrm{d}t}\right|_{\mathrm{br}}=\lambda c\left(T_gM_{4/3,0,0,0,0}-M_{4/3,1,0,0,0}\right). \tag*{(102)}

This provides a direct example of source closure: CQMOM advances M1,1,0,0,0M_{1,1,0,0,0} as part of the evolved moment set, but evaluating its breakup rate additionally requires M4/3,0,0,0,0M_{4/3,0,0,0,0} and M4/3,1,0,0,0M_{4/3,1,0,0,0}. These fractional moments are calculated directly from the quadrature. The source can therefore remain written in moment form and, unlike the example presented in § 7.4, the calculation of the source term does not need to directly traverse the terminal quadrature nodes.

Figure 9 compares the QMOMKit results with the corresponding Monte Carlo solution. The top row first shows quantities whose behavior follows directly from the prescribed physics. The number density approaches eλt=ee^{\lambda t}=e, while M1,0,0,0,0M_{1,0,0,0,0} remains constant because it is proportional to the total particle volume. The moment M1,0,1,0,0M_{1,0,1,0,0}, which represents a volume-weighted velocity component, increases as drag accelerates the particle population towards the gas velocity. The lower row of Figure 9 is chosen specifically to expose the fractional-moment closure in Eq. (102). The left panel shows the tracked moment M1,1,0,0,0M_{1,1,0,0,0} whose breakup source is being evaluated, while the center and right panels show the two fractional moments required by that source. The decrease of M1,1,0,0,0M_{1,1,0,0,0} reflects cooling of the particles towards the gas temperature together with the temperature change imposed during breakup. The fractional moment M4/3,0,0,0,0M_{4/3,0,0,0,0} decreases because a 4/34/3 power of volume is not conserved when one parent is replaced by two half-volume daughters, whereas M4/3,1,0,0,0M_{4/3,1,0,0,0} combines this size redistribution with the evolving particle temperature. The QMOMKit results closely follow the Monte Carlo reference for both fractional moments and for the tracked moment whose source depends on them.

Figure 9. Evolution of selected moments of a population of spherical particles subject to drag, heat transfer, and constant-rate binary breakup in the five-dimensional phase space (V,T,u,v,w)(V,T,u,v,w), comparing fixed two-node CQMOM with the Monte Carlo reference. The top row shows the number density M0,0,0,0,0M_{0,0,0,0,0}, the volume moment M1,0,0,0,0M_{1,0,0,0,0}, and the volume-weighted velocity moment M1,0,1,0,0M_{1,0,1,0,0}. The lower row illustrates the fractional-moment source closure given in Eq. (102): the evolved moment M1,1,0,0,0M_{1,1,0,0,0} is shown together with the fractional moments M4/3,0,0,0,0M_{4/3,0,0,0,0} and M4/3,1,0,0,0M_{4/3,1,0,0,0} that are required to evaluate its breakup source. The small discrepancies of the fractional moments relative to the Monte Carlo reference arise because these moments are not matched directly by CQMOM, but are evaluated from the reconstructed quadrature and are therefore represented only approximately.

Coupling QMOMKit to a host application

Since QMOMKit is configured using CMake and does not have any external dependencies, it is straightforward to couple the library to existing simulation frameworks that use finite-volume or finite-element methods to solve PDEs. We demonstrate this by coupling QMOMKit with OpenFOAM v14 [61], an open-source software for computational fluid dynamics (CFD) based on the finite-volume method, and with deal.II v9.8 [62], an open-source library to solve PDEs using finite-element methods. In the present work, we use the discontinuous Galerkin (DG) capabilities of deal.II. The example code for these couplings are available in a separate repository2, as referenced in the QMOMKit repository.

We consider a one-dimensional NDF n(t,x,ξ)n(t,x,\xi) in physical and phase space, for which the governing PBE follows from Eq. (1) as

∂n∂t+∂∂x(nu)+∂∂ξ(nξ˙)=S,(103)\frac{\partial n}{\partial t}+\frac{\partial}{\partial x}(nu)+\frac{\partial}{\partial\xi}(n\dot{\xi})=S, \tag*{(103)}

where ξ\xi represents a canonical phase-space coordinate, u=1u=1 is a constant velocity, ξ˙\dot{\xi} is the velocity in phase space, and the source term is assumed to be S=0S=0. Multiplying Eq. (103) by ξk\xi^k and integrating over phase space gives

∂Mk∂t+∂∂x(uMk)−k∫−∞∞ξk−1ξ˙n dξ=0,(104)\frac{\partial M_k}{\partial t}+\frac{\partial}{\partial x}(uM_k)-k\int_{-\infty}^{\infty}\xi^{k-1}\dot{\xi}n\,\mathrm{d}\xi=0, \tag*{(104)}

where we assume no flux of ξ\xi through the boundary of phase space. For a constant velocity u=1u=1 and the constant growth term ξ˙=0.1\dot{\xi}=0.1, the moment equations Eq. (104) reduce to

∂Mk∂t+u∂Mk∂x−kξ˙Mk−1=0.(105)\frac{\partial M_k}{\partial t}+u\frac{\partial M_k}{\partial x}-k\dot{\xi}M_{k-1}=0. \tag*{(105)}

In practice, uu would be obtained from the solution of a CFD problem, whereas here the goal is primarily to demonstrate the coupling between QMOMKit and a host code. The physical domain is a periodic domain of length 2, such that x∈[−1,1]x \in[-1,1]. We consider an initial NDF that is separable and Gaussian in both physical and phase space,

n(0,x,ξ)=gx(x)gξ(ξ),(106)n(0,x,\xi)=g_x(x)g_\xi(\xi), \tag*{(106)}

with

gx(x)=exp⁡(−x22σx2),gξ(ξ)=12πσexp⁡[−(ξ−μ)22σ2],(107)g_x(x)=\exp\left(-\frac{x^2}{2\sigma_x^2}\right), \qquad g_\xi(\xi)=\frac{1}{\sqrt{2\pi}\sigma}\exp\left[-\frac{(\xi-\mu)^2}{2\sigma^2}\right], \tag*{(107)}

where σx=0.25\sigma_x=0.25, σ=1\sigma=1, and μ=10\mu=10. Consequently, the physical-space Gaussian is translated at constant velocity, while the phase-space Gaussian retains its variance and its mean increases linearly with time. The analytical NDF is therefore

n(t,x,ξ)=gx(x−ut)12πσexp⁡[−(ξ−(μ+ξ˙t))22σ2],(108)n(t,x,\xi)=g_x(x-ut)\frac{1}{\sqrt{2\pi}\sigma}\exp\left[-\frac{(\xi-(\mu+\dot{\xi}t))^2}{2\sigma^2}\right], \tag*{(108)}

where x−utx-ut is understood periodically on the physical domain x∈[−1,1]x \in[-1,1]. It follows that the analytical moments can be written as

Mk(t,x)=gx(x−ut)Mk(μ+ξ˙t,σ),(109)M_k(t,x)=g_x(x-ut)\mathcal{M}_k(\mu+\dot{\xi}t,\sigma), \tag*{(109)}

where Mk(ξˉ,σ)\mathcal{M}_k(\bar{\xi},\sigma) denotes the kkth raw moment of a normal distribution with mean ξˉ\bar{\xi} and standard deviation σ\sigma. The analytical solution for all moments is thus:

Mk(t,x)=gx(x−ut)∑j=0⌊k/2⌋k!2jj!(k−2j)!σ2j(μ+ξ˙t)k−2j.(110)M_k(t,x)=g_x(x-ut)\sum_{j=0}^{\lfloor k/2\rfloor}\frac{k!}{2^j j!(k-2j)!}\sigma^{2j}(\mu+\dot{\xi}t)^{k-2j}. \tag*{(110)}

We solve Eq. (105) using a Lie operator splitting, as illustrated in Figure 10. The solution is advanced from tnt^n to tn+1=tn+Δtt^{n+1}=t^n+\Delta t in two successive steps. First, the physical-space advection is solved,

Figure 10. Flowchart for coupling of QMOMKit with the host applications of § 8, which here is either the finite-volume solver OpenFOAM or the finite-element DG formulation based on the deal.II library. The lightly shaded stages indicate the QMOMKit-dependent parts. The Lie splitting strategy employed for the time evolution have interchangeable physical and phase space stages.

∂Mk∗∂t+u∂Mk∗∂x=0,Mk∗(tn)=Mkn,(111)\frac{\partial M_k^*}{\partial t}+u\frac{\partial M_k^*}{\partial x}=0,\qquad M_k^*(t^n)=M_k^n, \tag*{(111)}

over one time step Δt\Delta t. The resulting intermediate solution is then used as the initial condition for the phase-space evolution with QMOMKit,

dMkdt=kξ˙Mk−1,Mk(tn)=Mk∗(tn+1),(112)\frac{\mathrm{d}M_k}{\mathrm{d}t}=k\dot{\xi}M_{k-1},\qquad M_k(t^n)=M_k^*(t^{n+1}), \tag*{(112)}

which is also advanced over Δt\Delta t. We track the first 10 moments using a 5-node quadrature with QMOM. While the phase-space evolution is managed and solved by QMOMKit, the physical-space evolution is managed and solved by either OpenFOAM or deal.II. For OpenFOAM, a first-order upwind scheme is used for the spatial discretization of Eq. (111), whereas the deal.II implementation uses first- and second-order discontinuous Lagrange elements (DG-QpQ_p, with polynomial degree pp) combined with an upwind flux. The goal of this section is not to compare finite-volume and DG methods, but to highlight the capacity of QMOMKit to be readily coupled to both frameworks.

Figure 11 illustrates the results obtained after 2 s, corresponding to the transport of the NDF over the full periodic domain. Quasi-identical results are obtained with the first-order upwind finite-volume and DG-Q0Q_0 discretizations. The results obtained with the formally second-order accurate DG-Q1Q_1 discretization exhibits a much better agreement with the analytical solution, even for the coarsest mesh considered. Figure 12 shows the evolution of the L2\mathcal{L}^2 norm of the error of the moments M0M_0 and M9M_9 as the mesh is progressively refined from 50 to 800 cells, while the CFL is kept constant at a value of 0.005. Even though Lie splitting is applied, the nature of the problem allows DG-Q1Q_1 elements to reach second-order convergence, whereas DG-Q0Q_0 and OpenFOAM with an upwind discretization exhibit first-order convergence.

Figure 11. Representation of selected moments in physical space for the coupling of QMOMKit with two types of host applications: OpenFOAM and a deal.II-based DG solver. The moments are normalized by Mmax⁡M_{\max}, which is the maximum value of the analytical solution. Mesh convergence yields very similar results for the finite-volume discretization of OpenFOAM and the DG-Q0Q_0 discretization for all mesh resolutions. The solution obtained with the DG-Q1Q_1 discretization is in excellent agreement with the analytical solution, even for the coarsest mesh.

Figure 12. L2L^2 norm of the error for selected moments normalized by Mmax⁡M_{\max} (maximum value of the analytical solution). The solution errors obtained with the finite-volume discretization of OpenFOAM as well as the DG-Q0Q_0 discretization of deal.II converge asymptotically with first order. In contrast, the DG-Q1Q_1 discretization achieves second-order convergence.

Conclusions

In this work, we have presented QMOMKit, an open-source C++ library for quadrature-based moment methods. While the implemented QMOM and CQMOM formulations are well established, QMOMKit introduces a general numerical framework that removes several restrictions commonly encountered in application-specific implementations. In particular, the recursive formulation of CQMOM permits quadrature reconstruction in phase spaces of arbitrary dimension, whereby a common evolution framework is used for phasespace advection, moment-source evolution, and their operator-split combination. Together with configurable inversion algorithms, realizability checks, and robust treatment of degenerate or weakly populated quadratures, this provides a common computational framework for problems ranging from one-dimensional to high-dimensional conditional quadrature formulations.

QMOMKit separates the quadrature-based phase-space evolution from the surrounding physical model and spatial discretization. The host application supplies phase-space velocities, source terms, and boundary contributions through callbacks, whereas QMOMKit controls the quadrature reconstruction and evaluation of the callbacks during time integration. The resulting software implementation allows the same numerical algorithms to be used for spatially homogeneous population models or locally within finite-volume, finite-element, or other host solvers, without embedding application-specific assumptions in the library. The numerical implementation is supported by complementary unit, regression, and verification tests and by application examples spanning increasingly complex phase spaces and physical processes.

The present implementation also provides a foundation for future extensions of QMOMKit. In particular, the modular reconstruction framework can accommodate additional quadrature formulations, such as generalized QMOM (GQMOM) and hyperbolic or conditional hyperbolic quadrature methods (HyQMOM or CHyQMOM) [38, 39], while preserving the same application-facing interfaces for phase-space evolution. Preliminary work on incorporating GQMOM and HyQMOM is already under way. Additional inversion algorithms, procedures to preserve realizability, and time-integration schemes can likewise be incorporated within the existing framework. QMOMKit therefore provides not only a reusable implementation of the methods considered here, but also a common numerical and verification framework for the continued development of quadrature-based moment methods.

Acknowledgements

We acknowledge the support of the Natural Sciences and Engineering Research Council of Canada (NSERC), funding reference numbers RGPIN-2020-04510 and RGPIN-2024-04805, the Canada Research Chair CRC-2022-00340, and the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation), grant number 458610925. We also wish to thank Mohamed Amine Bouguezzioul for fruitful discussions.

Declaration of generative AI and AI-assisted technologies

During the preparation of this work the authors used ChatGPT (OpenAI) and Claude (Anthropic) in order to improve the readability of this manuscript. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the published article.

Monte Carlo companion code

QMOMKit is distributed with an optional Monte Carlo companion package for constructing numerical reference solutions, which is built separately and links against QMOMKit. The Monte Carlo companion initializes a finite ensemble of phase-space samples from prescribed distributions, such as univariate distributions, mixtures, and independent products of univariate distributions, and evolves each sample according to application-defined phase-space dynamics [102]. Moments are then evaluated directly from the ensemble.

Let nMC(t,ξ)n^{\mathrm{MC}}(t,\boldsymbol{\xi}) denote the Monte Carlo representation of the NDF. For NsN_s samples with phase-space coordinates ξj(t)\boldsymbol{\xi}_j(t) and equal representative weight n0/Nsn_0/N_s,

nMC(t,ξ)=n0Ns∑j=1Nsδ(ξ−ξj(t)).(113)n^{\mathrm{MC}}(t,\boldsymbol{\xi}) = \frac{n_0}{N_s}\sum_{j=1}^{N_s}\delta(\boldsymbol{\xi}-\boldsymbol{\xi}_j(t)). \tag*{(113)}

The raw moments are obtained directly from the ensemble as

M^αMC=n0Ns∑j=1Ns∏d=1Dξj,dαd.(114)\widehat{M}^{\mathrm{MC}}_{\boldsymbol{\alpha}} = \frac{n_0}{N_s}\sum_{j=1}^{N_s}\prod_{d=1}^{D}\xi_{j,d}^{\alpha_d}. \tag*{(114)}

In particular, M^0MC=n0\widehat{M}^{\mathrm{MC}}_{\boldsymbol{0}}=n_0. Because the ensemble is finite, the moment estimates contain a sampling error, which decreases with 1/Ns1/\sqrt{N_s}.

With ξ˙\dot{\boldsymbol{\xi}} supplied by the application through the same callback as for QMOMKit, each sample evolves independently according to

dξjdt=ξ˙(t,ξj),j=1,…,Ns.(115)\frac{\mathrm{d}\boldsymbol{\xi}_j}{\mathrm{d}t}=\dot{\boldsymbol{\xi}}(t,\boldsymbol{\xi}_j),\qquad j=1,\ldots,N_s. \tag*{(115)}

The function evolve_ensemble() advances these trajectories using the embedded RK23 scheme [89], with an adaptive step size for each sample. Unlike QMOMKit, which evolves quadrature abscissas, the Monte Carlo companion advances every sample explicitly.

Processes that change the population are represented by changes to the population ensemble. Population additions are supported directly through inject_population(), which draws a Poisson-distributed number of new samples from an application-supplied distribution. The new samples receive the existing representative weight, so that the requested increase of the number density is reproduced in expectation. Other processes, such as breakage, are defined by the application by sampling the corresponding population events [103]. In the breakup examples of § 7.4 and § 7.5, the time until breakup is drawn from an exponential distribution for each particle, and the daughters keep the representative weight, so that the ensemble grows. These operations provide the Monte Carlo counterpart to moment-source and boundary contributions in the QMOMKit calculations. Sampling, injection, and breakup use std::mt19937_64 generators with fixed seeds, so that calculations can be reproduced with the same compiler and standard library. In this work, the Monte Carlo calculations use the same physical models, time step, operator splitting, and RK23 tolerances as the QMOMKit simulations. Moreover, the QMOMKit simulations are initialized with the moments of the Monte Carlo ensemble, so that both calculations start from the same population. The comparisons in § 7 therefore measure the error of the employed quadrature-based moment methods. Without population sources, as in § 7.1 and § 7.2, the Monte Carlo calculation is deterministic and simply evolves the population used to initialize the corresponding QMOMKit simulation. Randomly sampled events, such as breakup or nucleation, add a statistical error that decreases with 1/Ns1/\sqrt{N_{\mathrm{s}}}.

References

  1. [1]D. L. Marchisio, R. O. Fox, Computational Models for Polydisperse Particulate and Multiphase Systems, Cambridge University Press, 1 edition, 2013.DOI
  2. [2]S. Balachandar, Fundamentals of Dispersed Multiphase Flows, Cambridge University Press, 1 edition, 2024.DOI
  3. [3]D. Ramkrishna, Population balances: theory and applications to particulate systems in engineering, Academic Press, San Diego, CA, 2000.
  4. [4]S. Rigopoulos, Population Balance of Particles in Flows: From Aerosols to Crystallisation, Cambridge University Press, 1 edition, 2024.
  5. [5]M. Shiea, A. Buffo, M. Vanni, D. Marchisio, Numerical Methods for the Solution of Population Balance Equations Coupled with Computational Fluid Dynamics, Annual Review of Chemical and Biomolecular Engineering 11 (2020) 339–366.DOI
  6. [6]H. Hulburt, S. Katz, Some problems in particle technology, Chemical Engineering Science 19 (1964) 555–574.DOI
  7. [7]H. Struchtrup (Ed.), Macroscopic Transport Equations for Rarefied Gas Flows: Approximation Methods in Kinetic Theory, Interaction of Mechanics and Mathematics, Springer-Verlag Berlin Heidelberg, Berlin, Heidelberg, 2005.
  8. [8]D. Li, D. Marchisio, Implementation of CHyQMOM in OpenFOAM for the simulation of non-equilibrium gas-particle flows under one-way and two-way coupling, Powder Technology 396 (2022) 765–784.DOI
  9. [9]A. Passalacqua, R. O. Fox, Quadrature-based moment methods for particle-laden flows, in: Modeling Approaches and Computational Methods for Particle-Laden Turbulent Flows, Elsevier, 2023, pp. 419–447.DOI
  10. [10]R. O. Fox, Recent advances in well-posed Eulerian models for polydisperse multiphase flows, International Journal of Multiphase Flow 172 (2024) 104715.DOI
  11. [11]C. P. T. Groth, J. G. McDonald, Towards physically realizable and hyperbolic moment closures for kinetic theory, Continuum Mechanics and Thermodynamics 21 (2009) 467–493.DOI
  12. [12]M. Torrilhon, Modeling Nonequilibrium Gas Flow Based on Moment Equations, Annual Review of Fluid Mechanics 48 (2016) 429–458.DOI
  13. [13]W. Morin, F. Giroux, J. G. McDonald, M. I. Radulescu, Non-equilibrium structure of triple points using the 10-moment model, Journal of Fluid Mechanics 1042 (2026) A17.DOI
  14. [14]R. Fan, D. L. Marchisio, R. O. Fox, Application of the direct quadrature method of moments to polydisperse gas–solid fluidized beds, Powder Technology 139 (2004) 7–20.DOI
  15. [15]L. Mazzei, D. L. Marchisio, P. Lettieri, Direct Quadrature Method of Moments for the Mixing of Inert Polydisperse Fluidized Powders and the Role of Numerical Diffusion, Industrial & Engineering Chemistry Research 49 (2010) 5141–5152.DOI
  16. [16]J. C. Heylmun, R. O. Fox, A. Passalacqua, A quadrature-based moment method for the evolution of the joint size-velocity number density function of a particle population, Computer Physics Communications 267 (2021) 108072.DOI
  17. [17]R. McGraw, Description of Aerosol Dynamics by the Quadrature Method of Moments, Aerosol Science and Technology 27 (1997) 255–265.DOI
  18. [18]R. R. Upadhyay, Evaluation of the use of the Chebyshev algorithm with the quadrature method of moments for simulating aerosol dynamics, Journal of Aerosol Science 44 (2012) 11–23.DOI
  19. [19]C. Darren Christianson, M. Zabihi, A. Ajay, V. Komisar, R. Li, J. Brinkerhoff, An open-source finite-volume LES code for indoor ventilation and aerosol transport simulations, Computers & Fluids 312 (2026) 107049.
  20. [20]V. Vikas, C. Yuan, Z. Wang, R. Fox, Modeling of bubble-column flows with quadrature-based moment methods, Chemical Engineering Science 66 (2011) 3058–3070.DOI
  21. [21]C. Yuan, B. Kong, A. Passalacqua, R. O. Fox, An extended quadrature-based mass-velocity moment model for polydisperse bubbly flows, The Canadian Journal of Chemical Engineering 92 (2014) 2053–2066.DOI
  22. [22]D. Li, D. Marchisio, C. Hasse, D. Lucas, Comparison of Eulerian QBMM and classical Eulerian–Eulerian method for the simulation of polydisperse bubbly flows, AIChE Journal 65 (2019) e16732.DOI
  23. [23]S. H. Bryngelson, R. O. Fox, T. Colonius, Conditional moment methods for polydisperse cavitating flows, Journal of Computational Physics 477 (2023) 111917.DOI
  24. [24]S. Salenbauch, M. Signano, D. L. Marchisio, M. Pollack, A. D’Anna, C. Hasse, Detailed particle nucleation modeling in a sooting ethylene flame using a Conditional Quadrature Method of Moments (CQMM), Proceedings of the Combustion Institute 36 (2017) 771–779.DOI
  25. [25]J. Xin, C. Groth, J. Hu, On the Use of Fractional-Order Quadrature-Based Moment Closures for Predicting Soot Formation in Lam, Combustion Science and Technology 194 (2022) 22–44.
  26. [26]V. B. Stephens, J. Bedwell, A. J. Josephson, K. Oldham, D. O. Lignell, SootLib: A soot model library for combustion simulation, SoftwareX 22 (2023) 101375.DOI
  27. [27]D. Marchisio, A. Querio, A. Raponi, Computational flow models for crystallization processes, Current Opinion in Chemical Engineering 52 (2026) 101246.DOI
  28. [28]D. Li, Z. Li, Z. Gao, Quadrature-based moment methods for the population balance equation: An algorithm review, Chinese Journal of Chemical Engineering 27 (2019) 483–500.
  29. [29]R. G. Gordon, Error Bounds in Equilibrium Statistical Mechanics, Journal of Mathematical Physics 9 (1968) 655–663.DOI
  30. [30]D. L. Marchisio, R. O. Fox, Solution of population balance equations using the direct quadrature method of moments, Journal of Aerosol Science 36 (2005) 43–73.DOI
  31. [31]P. J. Attar, P. Vedula, Direct quadrature method of moments solution of the Fokker–Planck equation, Journal of Sound and Vibration 317 (2008) 265–272.DOI
  32. [32]B. Selma, R. Bannari, P. Proulx, Simulation of bubbly flows: Comparison between direct quadrature method of moments (DQMOM) and method of classes (CM), Chemical Engineering Science 65 (2010) 1925–1941.DOI
  33. [33]R. O. Fox, Optimal Moment Sets for Multivariate Direct Quadrature Method of Moments, Industrial & Engineering Chemistry Research 48 (2009) 9686–9696.DOI
  34. [34]C. Yuan, F. Laurent, R. Fox, An extended quadrature method of moments for population balance equations, Journal of Aerosol Science 51 (2012) 1–23.
  35. [35]E. Madadi-Kandjani, A. Passalacqua, An extended quadrature-based moment method with log-normal kernel density functions, Chemical Engineering Science 131 (2015) 323–339.
  36. [36]C. Chalons, R. O. Fox, F. Laurent, M. Massot, A. Vié, Multivariate Gaussian Extended Quadrature Method of Moments for Turbulent Disperse Multiphase Flow, Multiscale Modeling & Simulation 15 (2017) 1553–1583.DOI
  37. [37]M. Pigou, J. Morchain, P. Fede, M.-I. Penet, G. Laronze, New developments of the Extended Quadrature Method of Moments to solve Population Balance Equations, Journal of Computational Physics 365 (2018) 243–268.DOI
  38. [38]R. O. Fox, F. Laurent, A. Vié, Conditional hyperbolic quadrature method of moments for kinetic equations, Journal of Computational Physics 365 (2018) 269–293.DOI
  39. [39]R. O. Fox, F. Laurent, Hyperbolic Quadrature Method of Moments for the One-Dimensional Kinetic Equation, SIAM Journal on Applied Mathematics 82 (2022) 750–771.arxiv.org/abs/2103.10138
  40. [40]S. H. Bryngelson, R. O. Fox, F. Laurent, Fourth-order HyQMOM closures for multidimensional kinetic equations, Journal of Computational Physics 566 (2026) 115242.DOI
  41. [41]W. Morin, J. G. McDonald, Development of globally hyperbolic one-dimensional moment closures based on orthogonal polynomials, Journal of Computational Physics 523 (2025) 113659.DOI
  42. [42]R. O. Fox, F. Laurent, A. Passalacqua, The generalized quadrature method of moments, Journal of Aerosol Science 167 (2023) 106096.DOI
  43. [43]J. C. Cheng, R. O. Fox, Kinetic Modeling of Nanoprecipitation using CFD Coupled with a Population Balance, Industrial & Engineering Chemistry Research 49 (2010) 10651–10662.DOI
  44. [44]C. Yuan, R. Fox, Conditional quadrature method of moments for kinetic equations, Journal of Computational Physics 230 (2011) 8216–8246.
  45. [45]M. Pütz, Numerical investigation and extension of quadrature-based moment methods for population balances, Ph.D. thesis, Brandenburgische Technischen Universität, Cottbus-Senftenberg, Germany, 2024.DOI
  46. [46]M. A. Bouguezzoul, Conditional Quadrature Method of Moments for Populations of Non-Spherical Particles, Master’s thesis, Polytechnique Montréal, Montréal, Canada, 2026.
  47. [47]R. G. Patel, O. Desjardins, R. O. Fox, Three-dimensional conditional hyperbolic quadrature method of moments, Journal of Computational Physics: X 1 (2019) 100006.DOI
  48. [48]R. O. Fox, J. W. Posey, R. W. Houim, F. Laurent, A kinetic-based model for polydisperse, high-speed, fluid–particle flows, International Journal of Multiphase Flow 171 (2024) 104698.DOI
  49. [49]J. W. Posey, R. O. Fox, R. W. Houim, A robust high-resolution algorithm for quadrature-based moment methods applied to high-speed polydisperse multiphase flows, 2026. ArXiv:2603.13697 [physics].arxiv.org/abs/2603.13697
  50. [50]T. Nguyen, F. Laurent, R. Fox, M. Massot, Solution of population balance equations in applications with fine particles: Mathematical modeling and numerical schemes, Journal of Computational Physics 325 (2016) 129–156.DOI
  51. [51]A. Passalacqua, F. Laurent, E. Madadi-Kandjani, J. Heylmun, R. Fox, An open-source quadrature-based population balance solver for OpenFOAM, Chemical Engineering Science 176 (2018) 306–318.DOI
  52. [52]M. Karimi, H. Droghetti, D. Marchisio, PUFoam : A novel open-source CFD solver for the simulation of polyurethane foams, Computer Physics Communications 217 (2017) 138–148.DOI
  53. [53]Y. Feng, D. Li, D. Marchisio, M. Vanni, A. Buffo, A computational fluid dynamics—Population balance equation approach for evaporating cough droplets transport, International Journal of Multiphase Flow 165 (2023) 104500.
  54. [54]B. Wilfong, H. A. Le Berre, A. Radhakrishnan, A. Gupta, D. J. Vickers, D. Vaca-Revelo, D. Adam, H. Yu, H. Lee, J. R. Chreim, M. Carcana Barbosa, Y. Zhang, E. Cisneros-Garibay, A. Gnanaskandan, M. Rodriguez Jr, R. D. Budi-ardja, S. Abbott, T. Colonius, S. H. Bryngelson, MFC 5.0: An exascale many-physics flow solver, Computer Physics Communications 322 (2026) 110055.
  55. [55]D. R. Davies, C. R. Wilson, S. C. Kramer, Fluidity: A fully unstructured anisotropic adaptive mesh computational modeling framework for geodynamics, Geochemistry, Geophysics, Geosystems 12 (2011) n/a–n/a.DOI
  56. [56]A. Passalacqua, R. Fox, R. Garg, S. Subramaniam, A fully coupled quadrature-based moment method for dilute to moderately dilute fluid–particle flows, Chemical Engineering Science 65 (2010) 2267–2283.DOI
  57. [57]A. Passalacqua, R. Fox, Advanced continuum modelling of gas-particle flows beyond the hydrodynamic limit, Applied Mathematical Modelling 35 (2011) 1616–1627.DOI
  58. [58]R. R. Upadhyay, O. A. Ezakoye, libMom : a library for stochastic simulations in engineering using statistical moments, Engineering with Computers 28 (2012) 83–94.DOI
  59. [59]S. H. Bryngelson, T. Colonius, R. O. Fox, QBMMLib: A library of quadrature-based moment methods, SoftwareX 12 (2020) 100615.
  60. [60]M. Pütz, M. Overmann, Performance and accuracy of the basic closure algorithm of quadrature-based moment methods, Journal of Computational Physics 494 (2023) 112514.DOI
  61. [61]OpenFOAM-Foundation, OpenFOAM v14, https://openfoam.org/14, 2026.
  62. [62]D. Arndt, W. Bangerth, B. Blais, M. Fehling, R. Gassmöller, T. Heister, L. Heltai, V. Ivannikov, M. Kronbichler, M. Maier, P. Munch, A. Steger, D. Still, B. Turcksin, D. Wells, The deal.II library, version 9.8, Journal of Numerical Mathematics 23 (2026).DOI
  63. [63]R. Fox, F. Laurent, M. Massot, Numerical simulation of spray coalescence in an Eulerian framework: Direct quadrature method of moments and multi-fluid method, Journal of Computational Physics 227 (2008) 3058–3088.DOI
  64. [64]D. L. Marchisio, R. Vigil, R. O. Fox, Quadrature method of moments for aggregation–breakage processes, Journal of Colloid and Interface Science 258 (2003) 322–334.pubmed.ncbi.nlm.nih.gov/12618102
  65. [65]J. C. Wheeler, Modified moments and Gaussian quadratures, Rocky Mountain Journal of Mathematics 4 (1974).DOI
  66. [66]W. Gautschi, Orthogonal polynomials: computation and approximation, Numerical mathematics and scientific computation, Oxford university press, Oxford New York, 2004.
  67. [67]R. Grosch, H. Briesen, W. Marquardt, M. Wulkow, Generalization and numerical investigation of QMOM, AIChE Journal 53 (2007) 207–227.DOI
  68. [68]L. A. Barba, Reproducibility in the Age of Agentic AI: Context Engineering at the Timescale of a Codebase, 2026. ArXiv:2609.11728 [cs.SE].arxiv.org/abs/2609.11728
  69. [69]W. Gautschi, On the Construction of Gaussian Quadrature Rules from Modified Moments, Mathematics of Computation 24 (1970) 245.DOI
  70. [70]W. H. Press, S. A. Teukolsky, Orthogonal Polynomials and Gaussian Quadrature with Nonclassical Weight Functions, Computers in Physics 4 (1990) 423–426.DOI
  71. [71]G. H. Golub, J. H. Welsch, Calculation of Gauss quadrature rules, Mathematics of Computation 23 (1969) 221–230.DOI
  72. [72]G. H. Golub, C. F. Van Loan, Matrix computations, Johns Hopkins studies in mathematical sciences 7, The Johns Hopkins University Press, Baltimore, fourth edition edition, 2013.
  73. [73]N. J. Higham, Accuracy and stability of numerical algorithms, Society for Industrial and Applied Mathematics, Philadelphia, 2002. OCLC: 313553678.DOI
  74. [74]R. A. Sack, A. F. Donovan, An algorithm for Gaussian quadrature given modified moments, Numerische Mathematik 18 (1971) 465–478.DOI
  75. [75]V. John, F. Thein, On the efficiency and robustness of the core routine of the quadrature method of moments (QMOM), Chemical Engineering Science 75 (2012) 327–333.
  76. [76]K. Schmüdgen, The Moment Problem, volume 277 of Graduate Texts in Mathematics, Springer International Publishing, Cham, 2017.DOI
  77. [77]F. Laurent, T. Nguyen, Realizable second-order finite-volume schemes for the advection of moment sets of the particle size distribution, Journal of Computational Physics 337 (2017) 309–338.
  78. [78]T. Plath, S. Luding, T. Weinhart, Non-dimensionalisation of quadrature method of moments for wet granulation, Powder Technology 437 (2024) 119490.
  79. [79]J. L. Favero, L. F. L. Silva, P. L. Lage, Comparison of methods for multivariate moment inversion—Introducing the independent component analysis, Computers & Chemical Engineering 60 (2014) 41–56.DOI
  80. [80]A. Björck, V. Pereyra, Solution of Vandermonde systems of equations, Mathematics of Computation 24 (1970) 893–903.DOI
  81. [81]N. J. Higham, Error analysis of the Björck-Pereyra algorithms for solving Vandermonde systems, Numerische Mathematik 50 (1987) 613–632.DOI
  82. [82]W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery, Numerical Recipes in Fortran 77: The art of scientific computing, Cambridge University Press, Cambridge, UK, second edition, 1992.
  83. [83]W. Gautschi, On inverses of Vandermonde and confluent Vandermonde matrices, Numerische Mathematik 4 (1962) 117–123.DOI
  84. [84]A. Marco, J.-J. Martínez, Accurate computation of the Moore–Penrose inverse of strictly totally positive matrices, Journal of Computational and Applied Mathematics 350 (2019) 299–308.DOI
  85. [85]S. Descombes, T. Dumont, V. Louvet, M. Massot, On the local and global errors of splitting approximations of reaction–diffusion equations with high spatial gradients, International Journal of Computer Mathematics 84 (2007) 749–765.DOI
  86. [86]G. Strang, On the Construction and Comparison of Difference Schemes, SIAM Journal on Numerical Analysis 5 (1968) 506–517.DOI
  87. [87]R. J. Spiteri, S. Wei, An enumeration of second-order N-split operator-splitting methods, Journal of Computational Physics 566 (2026) 115271.DOI
  88. [88]B. Kong, R. O. Fox, H. Feng, J. Capece­lato, R. Patel, O. Desjardins, R. O. Fox, Euler–euler anisotropic gaussian mesoscale simulation of homogeneous cluster-induced gas–particle turbulence, AIChE Journal 63 (2017) 2630–2643.DOI
  89. [89]P. Bogacki, L. Shampine, A 3(2) pair of Runge-Kutta formulas, Applied Mathematics Letters 2 (1989) 321–325.DOI
  90. [90]J. Dormand, P. Prince, A family of embedded Runge-Kutta formulae, Journal of Computational and Applied Mathematics 6 (1980) 19–26.DOI
  91. [91]C.-W. Shu, S. Osher, Efficient implementation of essentially non-oscillatory shock-capturing schemes, Journal of Computational Physics 77 (1988) 439–471.DOI
  92. [92]S. Gottlieb, C.-W. Shu, Total variation diminishing Runge-Kutta schemes, Mathematics of Computation of the American Mathematical Society 67 (1998) 73–85.DOI
  93. [93]J. Sylvester, A demonstration of the theorem that every homogeneous quadratic polynomial is reducible by real orthogonal substitutions to the form of a sum of positive and negative squares, The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 4 (1852) 138–142.DOI
  94. [94]G. Johnson, L. Morawska, Z. Ristovski, M. Hargreaves, K. Mengersen, C. Chao, M. Wan, Y. Li, X. Xie, D. Katoshevski, S. Corbett, Modality of human expired aerosol size distributions, Journal of Aerosol Science 42 (2011) 839–851.DOI
  95. [95]I. Langmuir, The Evaporation of Small Spheres, Physical Review 12 (1918) 368–370.DOI
  96. [96]F. Dalla Barba, J. Wang, F. Picano, Revisiting D2-law for the evaporation of dilute droplets, Physics of Fluids 33 (2021) 051701.DOI
  97. [97]F. Denner, Water droplet dynamics and evaporation in airtanker firefighting, International Journal of Multiphase Flow 199 (2026) 105696.
  98. [98]K. V. Beard, H. R. Pruppacher, A Wind Tunnel Investigation of the Rate of Evaporation of Small Water Drops Falling at Terminal Velocity in Air, Journal of the Atmospheric Sciences 28 (1971) 1455–1464.doi.org/10.1175/1520-0469(1971)028<1455:awtiot>2.0.co;2
  99. [99]R. Clift, W. H. Gauvin, Motion of entrained particles in gas streams, The Canadian Journal of Chemical Engineering 49 (1971) 439–448.DOI
  100. [100]L. Schiller, A. Naumann, Über die grundlegenden Berechnungen bei der Schwerkraftaufbereitung, Zeitschrift des Vereines Deutscher Ingenieure 77 (1933) 318–320.
  101. [101]W. Ranz, W. Marshall, Evaporation from Drops, Chemical Engineering Progress 48 (1952) 141–146.
  102. [102]R. Irizarry, Fast Monte Carlo methodology for multivariate particulate systems—I: Point ensemble Monte Carlo, Chemical Engineering Science 63 (2008) 95–110.DOI
  103. [103]K. F. Lee, R. I. Patterson, W. Wagner, M. Kraft, Stochastic weighted particle methods for population balance equations with coagulation, fragmentation and spatial inhomogeneity, Journal of Computational Physics 303 (2015) 1–18.DOI

Paper details

vlnc:W_s98xwzaq
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

ChatGPT (OpenAI), Claude (Anthropic)

View statement
Looking for related papers…
Contents