---
title: 'OpenLB-UQ: Uncertainty Quantification Framework'
url: https://www.emergentmind.com/topics/openlb-uq-framework
type: topic
---

# OpenLB-UQ: Uncertainty Quantification Framework

Searching arXiv for the cited OpenLB-UQ papers and adjacent framework papers to ground the article.
arXiv search query: OpenLB-UQ uncertainty quantification framework incompressible fluid flow simulations 2025
OpenLB-UQ is a modular uncertainty quantification framework built around the OpenLB lattice Boltzmann solver and, in its integrated form, a fully integrated, open-source uncertainty quantification framework built on top of OpenLB. Its stated purpose is to make uncertainty quantification practical for incompressible computational fluid dynamics by wrapping the deterministic OpenLB solver in a non-intrusive stochastic layer that propagates uncertain inputs through repeated lattice Boltzmann solves and reconstructs statistical outputs such as mean flow fields, standard deviations, confidence intervals, probe-based vertical profiles, and uncertainty maps [2508.13867], [2508.18202].

## 1. Definition, scope, and design rationale

OpenLB-UQ is motivated by two claims made explicit in the framework paper. First, uncertainty quantification is essential in CFD because real flows depend on uncertain inputs such as inflow conditions, viscosity, geometry tolerances, and material properties. Second, OpenLB is already strong on HPC and complex fluid physics, but until this work it lacked a native UQ capability [2508.13867]. The framework therefore introduces a dedicated and integrated UQ module for OpenLB, with an emphasis on non-intrusive stochastic collocation methods based on generalized polynomial chaos and Monte Carlo sampling.

The defining design principle is non-intrusiveness. Instead of reformulating the governing equations in stochastic form at the solver level, OpenLB-UQ keeps OpenLB deterministic at the core and adds a lightweight orchestration layer that injects sampled parameters into the application and extracts quantities of interest afterward. Each uncertainty realization is treated as one deterministic simulation with fixed parameters. This permits reuse of existing OpenLB applications with minimal or no modification to solver internals, while preserving the modularity and scalability of the original CFD code [2508.13867].

In the urban-wind study, this design is described operationally as a non-intrusive stochastic collocation pipeline: measured wind data are read, an uncertainty model is defined, a quadrature or collocation rule is built, the deterministic LBM is run at each stochastic node, and outputs are postprocessed into mean, variance, confidence intervals, and field statistics [2508.18202]. The framework is therefore both a software architecture and a methodological stance: uncertainty is handled outside the deterministic solver.

## 2. Software architecture and execution workflow

The integrated framework is organized as two loosely coupled layers. The UQ layer is responsible for defining uncertainty distributions, generating samples or quadrature nodes, selecting the UQ strategy, running solver realizations, collecting outputs, and computing moments and surrogate models. The OpenLB layer remains the deterministic simulation layer, including `SuperLattice`, `BlockLattice`, geometry and boundary-condition setup, time stepping, collision-streaming, and application-specific quantities of interest [2508.13867].

Several software abstractions are named explicitly. The framework includes `Distribution`, `SamplingStrategy`, `QuadratureRule`, and `UncertaintyQuantification` as central classes or managers. It also includes `PolynomialBasis`, with `LegendreBasis` for uniform variables and `HermiteBasis` for Gaussian variables, and sampling strategies such as `MonteCarloSampling`, `QuasiMonteCarloSampling`, `LatinHypercubeSampling`, and `StochasticCollocation` [2508.13867]. The distribution-basis pairing is automated, which is essential for correct generalized polynomial chaos expansions.

The runtime is described as a three-phase process. In the first phase, the framework draws samples from the uncertain input distribution $h(\mathbf{Z})$ or generates collocation and quadrature points. In the second phase, each sample $\mathbf{Z}^{(i)}$ is passed to the OpenLB solver, which returns a scalar or field-based quantity of interest $\mathcal{M}(\mathbf{Z}^{(i)})$. In the third phase, Monte Carlo methods compute statistics directly from the sample ensemble, while SC-gPC computes polynomial-chaos coefficients and derives moments from them [2508.13867].

The urban-wind application instantiates this general workflow with measured hourly wind speed $U_H(t)$ and direction $\Theta(t)$ from Reutlingen, Germany, followed by uncertain inflow construction, stochastic-node generation, deterministic LBM execution, and postprocessing into field and probe statistics [2508.18202]. This concretizes the framework’s intended use: data-driven boundary uncertainty is propagated through a black-box deterministic OpenLB simulation.

## 3. Deterministic solver formulations and stochastic inputs

The general OpenLB-UQ framework paper uses the incompressible Navier–Stokes equations in stochastic form by making selected inputs random, and implements the deterministic fluid model with a D2Q9 BGK lattice Boltzmann scheme [2508.13867]. The lattice Boltzmann equation is written as
$$
f_i(\mathbf{x} + \mathbf{c}_i \Delta t,\, t+\Delta t) - f_i(\mathbf{x},t) = \Omega_i(\mathbf{f}(\mathbf{x},t)),
$$
with BGK collision
$$
\Omega_i(\mathbf{f}) = -\frac{1}{\tau}\left(f_i - f_i^{\mathrm{eq}}\right),
$$
and macroscopic fields recovered by moments
$$
\rho(\mathbf{x},t)=\sum_{i=0}^{q-1} f_i(\mathbf{x},t),\qquad
\rho(\mathbf{x},t)\mathbf{u}(\mathbf{x},t)=\sum_{i=0}^{q-1}\mathbf{c}_i f_i(\mathbf{x},t).
$$
This is the deterministic core that the UQ layer repeatedly interrogates [2508.13867].

The urban-wind study employs a different deterministic configuration: a recursive regularized LBM with a D3Q19 discrete velocity set, a third-order Hermite equilibrium expansion, and a Smagorinsky–Lilly subgrid-scale model [2508.18202]. The uncertain incompressible Navier–Stokes equations are written as
$$
\partial_t \mathbf{u}(\mathbf{Z}) + (\mathbf{u}(\mathbf{Z})\cdot \nabla) \mathbf{u}(\mathbf{Z}) - \nu \nabla^2 \mathbf{u}(\mathbf{Z}) = -\frac{1}{\rho} \nabla p(\mathbf{Z}),
$$
$$
\nabla \cdot \mathbf{u}(\mathbf{Z}) = 0.
$$
Here $\mathbf{Z}$ denotes the vector of random inputs [2508.18202].

A central application-specific contribution is the relative measurement-error model for inflow wind speed and direction. The uncertain inflow is defined by
$$
\widehat{U}_H(t,\zeta_1)=U_H(t)\zeta_1,\qquad \zeta_1\sim\mathcal{N}(1,0.1^2),
$$
$$
\widehat{\Theta}(t,\zeta_2)=\Theta(t)+\zeta_2,\qquad \zeta_2\sim\mathcal{N}(0,6^2).
$$
The resulting logarithmic wind profile on the horizontal boundaries is
$$
\hat{\mathbf{u}}(\mathbf{x}, t, \mathbf{Z}) =
\dfrac{\widehat{U}_{H}(t,\zeta_{1})}{\ln\left(\dfrac{H + z_0}{z_0}\right)}
\ln\left(\dfrac{h + z_0}{z_0}\right)
\begin{pmatrix}
\cos\bigl(\widehat{\Theta}(t,\zeta_{2})\bigr) \\
\sin\bigl(\widehat{\Theta}(t,\zeta_{2})\bigr) \\
0
\end{pmatrix},
$$
with roughness length $z_0=0.1$ m [2508.18202]. The framework therefore supports stochasticity both in abstract parametric form and in measurement-driven inflow models.

## 4. Uncertainty quantification machinery

OpenLB-UQ implements two principal non-intrusive UQ families: Monte Carlo or quasi-Monte Carlo sampling, and generalized polynomial chaos via stochastic collocation [2508.13867]. For a random input vector $\mathbf{Z}\in\mathbb{R}^{d_Z}$ and scalar response $\mathcal{M}(\mathbf{Z})$, Monte Carlo estimates the mean and variance by
$$
\mathbb{E}[\mathcal{M}(\mathbf{Z})] \approx \frac{1}{N_q}\sum_{n=1}^{N_q}\mathcal{M}(\mathbf{Z}^{(n)}),
$$
$$
\mathrm{Var}[\mathcal{M}(\mathbf{Z})] \approx \frac{1}{N_q-1}\sum_{n=1}^{N_q}\left( \mathcal{M}(\mathbf{Z}^{(n)}) - \frac{1}{N_q}\sum_{m=1}^{N_q}\mathcal{M}(\mathbf{Z}^{(m)}) \right)^2.
$$
Its convergence is reported as approximately $\mathcal{O}(N_q^{-1/2})$ [2508.13867].

Quasi-Monte Carlo uses low-discrepancy sequences such as Sobol or Halton and is stated to converge approximately as
$$
\mathcal{O}\!\left((\log N_q)^{d_Z}N_q^{-1}\right),
$$
which is often better than MCS in low or moderate dimension but can degrade as stochastic dimension increases [2508.13867].

SC-gPC is presented as the high-accuracy method for smooth responses. The truncated polynomial-chaos approximation is
$$
\mathcal{M}(\mathbf{Z})\approx \mathcal{M}^{(N)}(\mathbf{Z}) = \sum_{k=0}^{P}\hat{\mathcal{M}}_k \,\Phi_k(\mathbf{Z}),
$$
with coefficients obtained by projection,
$$
\hat{\mathcal{M}}_k = \frac{1}{\gamma_k}\,\mathbb E[\mathcal{M}(\mathbf{Z})\Phi_k(\mathbf{Z})]
= \frac{1}{\gamma_k}\int_{\mathbb R^{d_Z}} \mathcal{M}(\mathbf{Z})\Phi_k(\mathbf{Z})h(\mathbf{Z})\,d\mathbf{Z},
$$
and in practice approximated through quadrature,
$$
\hat{\mathcal{M}}_k \approx \frac{1}{\gamma_k}\sum_{j=1}^{N_q} a_j\,\mathcal{M}(\mathbf{Z}^{(j)})\,\Phi_k(\mathbf{Z}^{(j)}).
$$
Because of orthogonality, the mean and variance are reconstructed as
$$
\mathbb E[\mathcal M(\mathbf Z)] \approx \hat{\mathcal M}_0,\qquad
\mathrm{Var}[\mathcal M(\mathbf Z)] \approx \sum_{k=1}^{N}\hat{\mathcal M}_k^2
$$
[2508.13867].

The urban-wind study uses the same gPC logic with Hermite polynomials for Gaussian inputs and evaluates the coefficients by quadrature. It reports a dense tensor-product Gauss–Hermite quadrature with polynomial order $N=5$, 11 quadrature points per stochastic dimension, and total $N_q=121$ collocation points for the two-dimensional input $(\zeta_1,\zeta_2)$ [2508.18202]. The same study notes that the general methodology is compatible with sparse-grid quadrature, while the integrated framework paper lists Genz–Keister, Clenshaw–Curtis, tensor-product, and Smolyak sparse grids among the implemented quadrature rules [2508.13867].

## 5. Benchmark problems, convergence behavior, and HPC performance

The framework is validated on two principal 2D test cases and one higher-dimensional test within the Taylor–Green-vortex family. These studies are used to establish convergence with respect to statistical metrics, sample efficiency, and scalability [2508.13867].

| Benchmark | Uncertainty setup | Reported findings |
|---|---|---|
| Flow past a circular cylinder | $u_{\mathrm{in}}(\xi)=0.2+0.04\xi$, $\xi\sim\mathcal U(-1,1)$ | SC-gPC converges exponentially; order $k=5$ is sufficient |
| Taylor–Green vortex | $\mathrm{Re}\sim \mathcal U(0.8\,\mathrm{Re}_0,1.2\,\mathrm{Re}_0)$, $\mathrm{Re}_0=15$ | SC-gPC shows spectral convergence; MC follows $\mathcal O(N^{-1/2})$ |
| 4D Taylor–Green perturbation | $\zeta_{d,i,j}\sim \mathcal U(-0.025,0.025)$ | Third-order, three-level Smolyak sparse grid with 137 samples |

In the cylinder benchmark, drag and lift are computed through the surface-integral formulas
$$
F_{\mathrm D}=\int_S \left(-p\,n_1 + \rho\nu\,\frac{\partial v_t}{\partial \mathbf n}n_2\right)\,dS,\qquad
F_{\mathrm L}=\int_S \left(-p\,n_2 - \rho\nu\,\frac{\partial v_t}{\partial \mathbf n}n_1\right)\,dS,
$$
with coefficients
$$
C_{\mathrm D}=\frac{2F_{\mathrm D}}{\rho u_{\mathrm{in}}^2 D},\qquad
C_{\mathrm L}=\frac{2F_{\mathrm L}}{\rho u_{\mathrm{in}}^2 D}.
$$
The reported mean drag values are 5.66731 for MC, 5.67270 for QMC, 5.67261 for SC-gPC, and 5.63208 for the deterministic reference; the reported standard deviations are 0.34896, 0.34890, and 0.34888 for MC, QMC, and SC-gPC, respectively [2508.13867].

In the Taylor–Green-vortex benchmark, the quantity of interest is the normalized kinetic energy
$$
K(t)= \frac{2}{|\Omega|u_0^2}\int_\Omega \left(u^2(x,y,t)+v^2(x,y,t)\right)\,dx\,dy.
$$
The integrated framework paper reports spectral convergence of SC-gPC with respect to polynomial order until the error reaches the floor imposed by spatial discretization, while MC follows the expected $\mathcal{O}(N^{-1/2})$ rate and QMC improves over MC in low dimensions but remains below SC-gPC in efficiency for smooth dependence [2508.13867].

The four-dimensional Taylor–Green case introduces first-order harmonic perturbations through
$$
\epsilon_d(x,y)=\frac14 \sum_{(i,j)\in\{0,1\}^2}\zeta_{d,i,j}\,k_i(4x)k_j(4y),
$$
and evaluates statistical convergence using the 1-Wasserstein distance
$$
W_1(Q_1,Q_2)=\inf_{\gamma\in\Gamma(Q_1,Q_2)}\int_{X^2}|x-y|\,d\gamma(x,y).
$$
The reported convergence order trends toward about 0.5 over time, which is described as expected for MCS-based statistical approximations [2508.13867].

HPC performance is treated as a first-class property. OpenLB-UQ supports two levels of parallelism: sample-level parallelism, which distributes different UQ samples across processes or cores, and domain-level parallelism, which uses MPI domain decomposition within each sample [2508.13867]. Representative speedups are reported as 40.25 for sample-level and 44.15 for domain-level parallelization in the cylinder case at $n_x=80$, and 30.78 for sample-level and 30.97 for domain-level parallelization in the 4D Taylor–Green case at $n_x=512$. The framework is stated to scale well and to reduce UQ wall-clock time by more than a factor of 30 [2508.13867].

## 6. Urban wind data assimilation, outputs, and present limitations

The most detailed application of OpenLB-UQ in the provided literature is uncertain data assimilation for urban wind flow simulations [2508.18202]. The study uses a real urban geometry in Reutlingen, Germany at $48.4914^\circ\mathrm{N}, 9.2043^\circ\mathrm{E}$, with two buildings centered in a circular disk domain of radius $R=270$ m and height $H=40$ m, spatial resolution $\Delta x = 1$ m, and time step $\Delta t = 0.00111$ s. Wind-speed and direction measurements are taken hourly from 2024-11-07 20:00 to 2024-11-09 19:00 CET, yielding a 48-hour dataset [2508.18202].

The application computes field quantities, local diagnostics, uncertainty maps, and structural diagnostics. Reported quantities of interest include instantaneous velocity magnitude fields, time-averaged velocity magnitude fields, mean flow fields, standard deviation fields, vertical velocity profiles at three probe locations, 95% confidence intervals at probes, sample realizations at those probes, horizontal slices showing spatial localization of uncertainty, contour levels marking regions of reduced or elevated variability, and $Q$-criterion isocontours at $Q=1$ [2508.18202]. The three probe locations are P1 at the outer corner of the left building in a shear layer, P2 in the channel between buildings, and P3 at the outer corner of the right building in a shear layer.

A recurring empirical result is that uncertainty does not spread uniformly. The mean fields capture the dominant flow around buildings, while standard deviation is elevated in wakes downstream of buildings, shear layers around building edges, and open channels or corridors between buildings [2508.18202]. In the 2 m slice, the reported standard deviation ranges from 0 to about 1.63, with lower variability outside highlighted contours and higher variability inside wake and shear regions. The same study therefore presents OpenLB-UQ as a tool for identifying risk-sensitive flow zones with a specified confidence [2508.18202].

The computational cost of this application is also documented. The study reports 121 sample simulations, each about 15 hours wall-clock on 304 MPI ranks, total cost about $5.5 \times 10^5$ CPU core-hours, and postprocessing about 1 hour [2508.18202]. This supports the framework’s emphasis on efficient non-intrusive UQ, but it also delineates current constraints.

Several limitations are stated explicitly across the two OpenLB-UQ papers. SC-gPC suffers from the curse of dimensionality as stochastic dimension increases, and the current implementation is best suited to smooth dependence on uncertain inputs [2508.13867]. Very high-dimensional uncertainty, roughly $d_Z \gtrsim 5$, becomes challenging even with sparse grids [2508.13867]. In the urban study, only wind speed and direction uncertainty are modeled, the input uncertainty is Gaussian, and truly live operation remains challenging without further surrogate acceleration [2508.18202]. Planned extensions named in the framework paper include broader distribution support, more quadrature rules, multilevel Monte Carlo, and hybrid UQ strategies [2508.13867].

A plausible implication is that the framework’s non-intrusive architecture could also accommodate closure-level or model-form uncertainty modules beyond input uncertainty alone. The RANS study on eigenvalue perturbations describes a low-dimensional epistemic UQ mechanism for CFD closures that is explicitly said to be conceptually and methodologically aligned with an OpenLB-UQ-style CFD or RANS uncertainty framework, because it provides transport-based, spatially varying perturbations and a low-dimensional uncertainty space suitable for UQ propagation [1705.05354].

Source: https://www.emergentmind.com/topics/openlb-uq-framework