Sunteți pe pagina 1din 53

Introduction to OpenQBMM and quadrature-based

moment methods
A L B E R TO PA S S A L A C Q U A
Department of Mechanical Engineering
Department of Chemical and Biological Engineering
Iowa State University, Ames, Iowa 50011-2161, USA

11th OpenFOAM Workshop


June 28th, 2016, Guimarães, Portugal

OPENQBMM - 11TH OPENFOAM WORKSHOP 1


Outline
What is OpenQBMM?
Example problems we aim at solving
Population balance equations
Models for turbulent mixing
The structure of OpenQBMM
Some example applications

OPENQBMM - 11TH OPENFOAM WORKSHOP 2


What is OpenQBMM?
An open-source implementation Where do I find OpenQBMM?
of quadrature-based moment ◦ Website: www.openqbmm.org
◦ On GitHub:
methods into OpenFOAM® https://github.com/OpenQBMM
◦ Population balance equations ◦ On Twitter: @OpenQBMM
◦ Turbulent reacting flows Who is behind OpenQBMM?
◦ Polydisperse multiphase flows ◦ Principal investigators:
◦ Gas-liquid flows ◦ Alberto Passalacqua (lead)
◦ Rodney O. Fox
◦ Gas-particle flows
◦ Simanta Mitra

Project details ◦ Post-docs: Xiaofei Hu


◦ Students: Ehsan Madadi, Jeffrey
◦ Funded by the US National Science Heylmun, David Williams
Foundation ◦ External contributors: Frederique
◦ ACI – SI2 – SSE program Laurent (UP Saclay), James Guthrie
(U. of Strathclyde), Matteo Icardi (U.
◦ Funding period of Warwick), Daniele Marchisio and
◦ Oct. 1st, 2014 – Sep. 30th 2017
Dongyue Li (Politecnico di Torino)

OPENQBMM - 11TH OPENFOAM WORKSHOP 3


Example problems
Chemical reactors
◦ Mixing
◦ Reaction
◦ Particle formation and evolution
◦ Precipitation and nucleation
◦ Aggregation and breakup
◦ Growth

Soot formation
◦ Flames
◦ Engines
Gas-liquid flows
◦ Stirred tanks Mixing and reaction
◦ Bubble columns in multi-inlet vortex
Gas-particle flows reactor (drug
◦ Fluidized beds production)
◦ Risers
Gas-liquid-solid flow
in stirred tank

OPENQBMM - 11TH OPENFOAM WORKSHOP 4


Population balance equation
Univariate population balance
𝜕𝑛(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑛 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑛 𝜉, 𝐱, 𝑡 + 𝛻𝜉 ⋅ G 𝜉 𝑛 𝜉, 𝐱, 𝑡
𝜕𝑡

Advection in Diffusion in Advection in space


physical space physical space of internal coordinate

= 𝐵ത 𝑎 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑎 𝜉, 𝐱, 𝑡 +𝐵ത 𝑏 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑏 𝜉, 𝐱, 𝑡 + 𝑁 𝐱, 𝑡

Birth and death Birth and death Nucleation


due to aggregation due to breakup

Number density function (NDF) - 𝑛(𝜉, 𝐱, 𝑡)


◦ 𝜉: internal coordinate (size, length, surface area, …)
◦ 𝜉 ∈ ℜ+ = [0, +∞[
◦ 𝐱: position vector in physical space
◦ t: time

OPENQBMM - 11TH OPENFOAM WORKSHOP 5


Turbulent mixing
Turbulent mixing
𝜕𝑓(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑓 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑓 𝜉, 𝐱, 𝑡 = 𝑆(𝜉, 𝐱, 𝑡) Probability distribution
𝜕𝑡 function of the mixture
fraction (NDF) -
Advection in Diffusion in Turbulent mixing 𝑓(𝜉, 𝐱, 𝑡)
physical space physical space model ◦ 𝜉: mixture fraction
◦ 𝜉 ∈ [0,1]
◦ 𝐱: position vector in
physical space
◦ t: time
Turbulent mixing models
◦ Interaction by exchange with the mean (Villermaux and
Devillon, 1972)
𝜀𝜉
◦ 𝑆 𝜉, 𝑥, 𝑡 = −𝛻𝜉 ⋅ 𝜉 −𝜉 𝑓
𝜉 ′2
◦ Fokker-Planck (Fox, 2003)
𝜀𝜉 1
◦ 𝑆 𝜉, 𝑥, 𝑡 = −𝛻𝜉 ⋅ 𝜉 ′2
𝜉 − 𝜉 𝑓 + 2 𝛻𝜉2 𝜀|𝜉 𝑓
𝜀𝜉 𝜀
◦ Scale similarity model (Fox, 2003): = 𝑐𝜑 ; 𝑐𝜑 = 2
𝜉 ′2 𝜅

OPENQBMM - 11TH OPENFOAM WORKSHOP 6


The method of moments
𝜕𝑛(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑛 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑛 𝜉, 𝐱, 𝑡 + 𝛻𝜉 ⋅ G 𝜉 𝑛 𝜉, 𝐱, 𝑡 = 𝑆(𝜉, 𝐱, 𝑡)
𝜕𝑡

𝑚𝑘 = ‫׬‬Ω 𝜉 𝑘 𝑓 𝜉, 𝐱, 𝑡 d𝜉

𝜕𝑚𝑘
+ 𝛻𝐱 ⋅ 𝑚𝑘 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝑚𝑘 = 𝐴ҧ𝜉,𝑘 (𝐱, 𝑡) + 𝑆𝑘ҧ (𝐱, 𝑡)
𝜕𝑡

Closure problem
◦ Compute the source terms of the moment transport equations
◦ Several approaches: we use Gaussian quadrature to provide closures

OPENQBMM - 11TH OPENFOAM WORKSHOP 7


The quadrature method of moments
Approximate the distribution with a Moments are expressed in terms of
sum of Dirac delta functions the quadrature approximation:
(McGraw, 1997): 𝑁−1
N−1
𝑚𝑘 = ෍ 𝑤𝑖 𝜉 𝑘
𝑛 𝜉, 𝑥, 𝑡 = ෍ 𝑤𝑖 𝛿(𝜉 − 𝜉𝑖 )
𝑖=0
𝑖=0
Properties
Moments of the ◦ N quadrature nodes
distribution ◦ 2N conserved moments
◦ Discrete representation of the
distribution
Moment inversion

Quadrature
Problem
◦ How do we evaluate the
weights 𝑤𝑖 and distribution at arbitrary values of
abscissae 𝜉𝑖 𝜉?

OPENQBMM - 11TH OPENFOAM WORKSHOP 8


The extended quadrature method of moments
In QMOM, the distribution is In some problems (evaporation,
“discrete”: condensation, …), we would like a
◦ Represented by a sum of few Dirac smooth representation
delta functions
𝑛 𝜉 𝑛 𝜉

𝜉 𝜉
At similar computational cost!

OPENQBMM - 11TH OPENFOAM WORKSHOP 9


The extended quadrature method of moments
Approximate the NDF with a The parameter 𝜎 is shared among
weighted sum of non-negative the kernel density functions
kernel density functions (Yuan et al., ◦ Only one additional moment needs
2012) to be transported with respect to
N standard QMOM
𝑛 𝜉, 𝑥, 𝑡 = ෍ 𝑤𝑖 𝛿𝜎 (𝜉, 𝜉𝑖 ) ◦ Only one non-linear equation has to
be solved to find 𝜎, instead of a
𝑖=1 system of non-linear equations
Choose kernel density function ◦ A suitable value of 𝜎 may not exist!
based on:
◦ Support (range of 𝜉)
◦ ℜ Gaussian
◦ ℜ+ Gamma, lognormal Remember that the final
◦ 0, 1  Beta
objective is to accurately
◦ Known recurrence relation for
orthogonal polynomials to the kernel integrate the source terms of
density: the PDF evolution equation to
◦ Used to determine Gaussian quadrature
find their moments

OPENQBMM - 11TH OPENFOAM WORKSHOP 10


Code structure of OpenQBMM
We leverage the common structure of the equation for code re-use.
Both population balance and mixing problems can be recast in the form:
𝜕𝑛(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑛 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑛 𝜉, 𝐱, 𝑡 + 𝛻𝜉 ⋅ G 𝜉 𝑛 𝜉, 𝐱, 𝑡 = 𝑆 𝜉, 𝐱, 𝑡
𝜕𝑡

Advection in Diffusion in Advection in the Source


physical space physical space space of internal terms
coordinate

Realizable Traditional FVM Realizable ODE


advection scheme implementation solver

OPENQBMM - 11TH OPENFOAM WORKSHOP 11


Requirements
Smooth integration into The solution algorithm
OpenFOAM® ◦ Must maximize the number of
◦ Same user experience preserved moments in the
◦ Same pre- and post-processing transported moment set
features ◦ We transport 2N + 1
◦ NDF may degenerate: QMOM
◦ Re-uses the existing infrastructure as
much as possible ◦ Must ensure, verify and preserve the
realizability of the moment set
Must interface to ◦ Must be sufficiently accurate for the
◦ Incompressible and compressible target applications
solvers ◦ Order of schemes
◦ Reaction module ◦ Realizable schemes for advection
◦ Single/multi-phase solvers
Run-time selection for
◦ Models
◦ Quadrature setup (number of
moments, accuracy, …)

OPENQBMM - 11TH OPENFOAM WORKSHOP 12


Moment inversion and realizability
univariateMomentSet object
◦ A single moment vector ◦ Computes the quadrature weights
◦ Set of moments to be inverted in each and abscissae for the moment set
computational cell or face
◦ Stores the quadrature formula
◦ Verifies a set of moments is ◦ Can compute moments from the
realizable based on the support of quadrature
the distribution
◦ Manages the cases of degenerate
◦ Determines the maximum number moment sets
of invertible moments
◦ Different for different quadrature formulae
◦ Even for Gauss The core of basic
◦ Odd for Gauss-Radau quadrature operations and
moment realizability check

OPENQBMM - 11TH OPENFOAM WORKSHOP 13


Realizability of a moment set
We say that a moment vector Realizability depends on the
𝐦 = 𝑚0 , … , 𝑚𝑀 support of 𝜇 𝜉 . If Ω is
◦ The real line
is realizable when a measure 𝜇(𝜉) ◦ Realizability condition: 𝛽𝑘 ≻ 0
exists on a support Ω, so that ◦ The positive real line
◦ Realizability condition:
𝑚𝑘 = න 𝜉 𝑘 𝑑𝜇 𝐻𝑘 𝐻𝑘−3
Ω ◦ 𝜁𝑘 = > 0, 𝑘 = 0, 1 …
𝐻𝑘−2 𝐻𝑘−1
𝑃𝑚 𝜉 are the orthogonal ◦ 𝐻𝑘 are the Hankel determinants
polynomials to 𝜇(𝜉) over Ω, ◦ The compact interval 0,1
defined by the recurrence relation ◦ Canonical moments: 𝑝𝑘 ∈]0,1[
◦ 𝜁𝑘 = 𝑝𝑘 1 − 𝑝𝑘 , 𝑘 > 0
𝑃𝑘+1 𝜉 = 𝑥 − 𝛼𝑘 𝑃𝑘 𝜉 − 𝛽𝑘 𝑃𝑘−1 𝜉 ,
◦ 𝑝0 = 0
𝑃0 = 1
𝑃−1 = 0 Performed by univariateMomentSet before
𝛼𝑘 = 𝜁2𝑘 + 𝜁2𝑘+1 , 𝛽𝑘 = 𝜁2𝑘−1 𝜁2𝑘 each inversion, transparently to the user

OPENQBMM - 11TH OPENFOAM WORKSHOP 14


Extended moment inversion
extendedMomentInversion Principle of the procedure:
◦ Computes the secondary 1. Start from a guess for the
quadrature parameter 𝜎
◦ Acts on an individual moment ◦ From realizability conditions on the first
few moments
vector
◦ Maintains independence from 2. Compute quadrature weights and
fields, as univariateMomentSet abscissae
3. Enforce the conservation of the
last moment 𝑚2𝑁
4. Solve the non-linear equation
Performs the EQMOM obtained at point 3 to find sigma
reconstruction of the NDF
5. Repeat from 1 until convergence
6. If 𝜎 is not found, minimize
moment error

OPENQBMM - 11TH OPENFOAM WORKSHOP 15


An overview of other key classes
Stores moment and
univariateQuadratureApproximation quadrature fields, and
takes care of
initialization and
PDFTransportModel
quadrature update

univariatePDFTransportModel populationBalanceModel

mixingModel
univariatePopulationBalanceModel
turbulentMixing

OPENQBMM - 11TH OPENFOAM WORKSHOP 16


univariatePDFTransport
◦ The core class where
transport equations for the
(univariate) moments are
solved
◦ Time derivative using
OpenFOAM schemes
◦ Virtual functions for
everything else
◦ momentDiffusion
◦ Laminar diffusion
◦ Turbulent diffusion
◦ momentSource
◦ All the terms that change the
PDF due to discontinuous
phenomena
◦ phaseSpaceConvection
◦ Convection in phase space
◦ Growth

OPENQBMM - 11TH OPENFOAM WORKSHOP 17


univariatePopulationBalance
Inherits
◦ univariatePDFTransport
◦ populationBalanceModel

Redefines from
univariatePDFTranport
Run-time selectable sub-
models
◦ Aggregation
◦ Breakup
◦ Daughter distribution
◦ Growth
◦ Nucleation

OPENQBMM - 11TH OPENFOAM WORKSHOP 18


Population balance sub-models
Currently available
◦ Aggregation
◦ Breakup
◦ Daugther distribution
◦ Growth
◦ Diffusion
◦ Nucleation
Integration
◦ Currently as source term
◦ Stiff ODE solver
◦ Implemented, under validation
◦ Adaptive time-step
◦ Guaranteed realizability
◦ Reduces compute time

OPENQBMM - 11TH OPENFOAM WORKSHOP 19


pbeFoam
Homogeneous
system
◦ Zero-dimensional

Test of kernels
Useful for
verification and
validation
Demostrates
implementation

OPENQBMM - 11TH OPENFOAM WORKSHOP 20


Case structure
Standard case structure
0 folder contains initial and boundary
condition files
Note the naming convention for moments
◦ The word “moment” is fixed
◦ The order of the moment follows, separated
by a “.”
◦ The name of the instance of the
corresponding univariatePDFTransport is
appended, separated by a “.”
This is required to distinguish among
different instances, which occur in mixing-
reaction-pbe problems.
Internal file syntax is standard.

OPENQBMM - 11TH OPENFOAM WORKSHOP 21


The constant folder
Contains the dictionaries for
◦ Quadrature setup
◦ Population balance setup
◦ Other standard solver dictionaries

The naming of OpenQBMM dictionaries


follows the same logic used for moment
fields:
◦ populationBalanceProperties
◦ quadratureProperties.populationBalance

So, for mixing, for example


◦ mixingProperties
◦ quadratureProperties.mixing

OPENQBMM - 11TH OPENFOAM WORKSHOP 22


quadratureProperties
List of moment orders
◦ 𝑚1 → 0
◦ 𝑚123 → (1 2 3)

List of nodes
◦ Sub-dictionaries
◦ Number of secondary nodes
◦ Only the first nSecondaryNodes counts

Settings for EQMOM


◦ Type of NDF
◦ Max iterations to find sigma
◦ Tolerances for convergence and moment
conservation

OPENQBMM - 11TH OPENFOAM WORKSHOP 23


PBE settings
Type of PBE being solved
Submodels
◦ Diffusion
◦ Aggregation
◦ Breakup
◦ Daughter distribution function
◦ Growth
◦ Nucleation
Aggregation, breakup and nucleation
are turned off by flags
◦ Complex kernel structure
◦ Run-time selection of kernels, not of
the entire sub-model

OPENQBMM - 11TH OPENFOAM WORKSHOP 24


Verification and validation - PBE
We validated the implementation Simplified form of the PBE
against rigorous solution of 𝜕𝑛(𝜉,𝐱,𝑡)
population balance equations 𝜕𝑡
= 𝐵ത 𝑎 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑎 𝜉, 𝐱, 𝑡
(Vanni, 2000) +𝐵ത 𝑏 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑏 𝜉, 𝐱, 𝑡
◦ Zero-dimensional problem
◦ Aggregation and breakup with Five cases
different kernels ◦ Different aggregation and breakup
◦ EQMOM with log-normal kernel kernels
density function ◦ Different daughter distribution
functions

Comparison to
◦ Rigorous solution of Vanni (2000).
◦ EQMOM solution in MATLAB®

OPENQBMM - 11TH OPENFOAM WORKSHOP 25


PBE kernels
Aggregation kernels Breakup kernels
◦ Constant ◦ Constant
◦ 𝛽 𝜉, 𝜉 ′ = 1 ◦ 𝑎 𝜉 =1
◦ Sum ◦ Power law
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 3 + 𝜉 ′3 ◦ 𝑎 𝜉 = 𝜉𝛼
◦ Hydrodynamic: ◦ Exponential
3
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 + 𝜉 ′ 3
◦ 𝑎 𝜉 = 𝑒 𝛿𝜉
◦ Differential force
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 + 𝜉 ′ 2 |𝜉 + 𝜉 ′ |
Daughter distribution functions
◦ Symmetric fragmentation
◦ Uniform
◦ Mass ratio 1 to 4

OPENQBMM - 11TH OPENFOAM WORKSHOP 26


Results – Case 1
Submodels Initial moments:
◦ Constant aggregation and breakup ◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
◦ Symmetric fragmentation

Zero-order moment 𝑑43 = 𝑚4 /𝑚3

OPENQBMM - 11TH OPENFOAM WORKSHOP 27


Results – Case 2
Submodels Initial moments:
◦ Sum aggregation
◦ Power law breakup ◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
◦ Symmetric fragmentation

Zero-order moment 𝑑43 = 𝑚4 /𝑚3

OPENQBMM - 11TH OPENFOAM WORKSHOP 28


Results – Case 3
Submodels Initial moments:
◦ Hydrodynamic aggregation
◦ Exponential breakup ◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
◦ Symmetric fragmentation

Zero-order moment 𝑑43 = 𝑚4 /𝑚3

OPENQBMM - 11TH OPENFOAM WORKSHOP 29


Results – Case 4
Submodels Initial moments:
◦ Differential force aggregation ◦ 𝑚1 = 1, 𝑚2 = 1.13, 𝑚2 = 1.294
◦ Power law breakup ◦ 𝑚3 = 1.5, 𝑚4 = 1.76, 𝑚5 = 2.087
◦ Uniform fragmentation ◦ 𝑚6 = 2.0

Zero-order moment 𝑑43 = 𝑚4 /𝑚3

OPENQBMM - 11TH OPENFOAM WORKSHOP 30


Results – Case 5
Submodels Initial moments:
◦ Hydrodynamic aggregation
◦ Exponential breakup ◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
◦ 1 to 4 mass ratio fragmentation

Zero-order moment 𝑑43 = 𝑚4 /𝑚3

OPENQBMM - 11TH OPENFOAM WORKSHOP 31


Multi inlet vortex reactor (MIVR)
The multi-inlet vortex reactor
(MIVR) is used for flash
nanoprecipitation to manufacture
functional nanoparticles:
◦ Electronics: provided a powerful path
to developing small and powerful
electronic components.
◦ Drug Delivery: nano-sized micelles
accumulate in tumors via the
enhanced permeability and retention
effect.
◦ Nanoparticles doped on hydrogels for cancer
treatment

The MIVR achieves fast mixing by


inducing turbulent swirling flow
from four inlet streams.
J. C. Cheng and R. O. Fox, "Kinetic Modeling of
We study mixing inside the MIVR: Nanoprecipitation using CFD Coupled with a Population
Balance," Industrial & Engineering Chemistry Research, vol.
◦ Turbulent (RANS) flow field solution 49, pp. 10651-10662, Nov 3 2010
◦ Mixing model with OpenQBMM

OPENQBMM - 11TH OPENFOAM WORKSHOP 32


Reference Multi Inlet Vortex Reactor

All dimensions are in mm.


Y. Shi, J. C. Cheng, R. O. Fox and M. G. Olsen, "Measurements of turbulence in a microscale multi-inlet vortex
nanoprecipitation reactor" Journal of Micromechanics and Microengineering, vol. 23, 075005(10pp), 2013.

OPENQBMM - 11TH OPENFOAM WORKSHOP 33


Simulation workflow
A sequential workflow is used to investigate the MIVR:

Mixture
Fields of U, Population Particle size
Flow field Mixing fraction balance
k, epsilon distribution
field

Assumptions
◦ Particles have small Stokes number and do not affect the fluid motion
◦ The flash nano-precipitation does not significantly affect mixing

OPENQBMM - 11TH OPENFOAM WORKSHOP 34


Flow field
◦ Incompressible steady-state RANS simulation (simpleFoam solver in
OpenFOAM®)
◦ MIVR generates swirling flow, with higher turbulent intensity in the
center of the mixing chamber
◦ The turbulent dissipation rate 𝜀 is higher in the center of the
chamber: more intense mixing

Steady state solution of the velocity (left), turbulent kinetic (middle) and turbulent dissipation (right) of the flow.

OPENQBMM - 11TH OPENFOAM WORKSHOP 35


Reactive mixing modeling
We consider the evolution equation for the joint composition PDF
𝑓(𝝓, 𝐱, 𝑡):
rate of change macromixing mesomixing

𝜕𝑓𝜙 𝜕𝑓𝜙 𝜕 𝜕𝑓𝜙
+ 𝑈𝑖 − Γ
𝜕𝑡 𝜕𝑥𝑖 𝜕𝑥𝑖 𝑇 𝜕𝑥𝑖 Closed by
𝜕 𝜀𝜙 gradient-diffusion
=− 𝜙𝑖 − 𝜓𝑖 + 𝑆𝑖 𝜓 𝑓𝜙
𝜕𝜓𝑖 𝜙 ′2 model
where
◦ 𝜙 is the passive scalar
◦ 𝜙 ′2 is the scalar variance
◦ 𝜀𝜙 is the dissipation factor
◦ 𝑈𝑖 is the mean velocity Interaction by Exchange Source term due to
◦ Γ𝑇 is the turbulent diffusivity with the Mean mixing reaction
◦ 𝑡 is time model (Fox, 2003)

OPENQBMM - 11TH OPENFOAM WORKSHOP 37


Chemical kinetics
We consider a simple case of two competitive consecutive reactions to study
mixing efficiency in the MIVR
𝑘1 Fast reaction
𝐴 + 𝐵→𝑅
𝑘2 Slower reaction
𝐵 + 𝑅→𝑆

where
◦ 𝑅 is the desired product 𝑓(𝛟, 𝐱, 𝑡) → 𝑓(𝜉, 𝑌1 , 𝑌2 , 𝐱, 𝑡)
◦ 𝐵 is the byproduct 𝑐𝐴0
𝑘1 𝜉𝑠𝑡 =
◦ = 𝑂(103 ) 𝑐𝐴0 + 𝑐𝐵0
𝑘2
𝑐𝐴 = 𝑐𝐴0 1 − 𝜉 − 1 − 𝜉st 𝑌1
Rewrite PDF in terms of 𝑐𝐵 = 𝑐𝐵0 𝜉 − 𝜉st 𝑌1 + 𝑌2
◦ Mixture fraction 𝜉 𝑐𝑅 = 𝑐𝐵0 𝜉st 𝑌1 − 𝑌2
◦ Reaction progress variables 𝑌1 , 𝑌2
𝑐𝑆 = 𝑐𝐵0 𝜉st 𝑌2

OPENQBMM - 11TH OPENFOAM WORKSHOP 38


Conditional quadrature method of moments
We rewrite the joint PDF in terms of conditional PDFs:

𝑓 𝜉, 𝑌1 , 𝑌2 = 𝑓 𝑌2 𝜉, 𝑌1 𝑓 𝜉, 𝑌1 = 𝑓 𝑌2 𝜉, 𝑌1 𝑓 𝑌1 𝜉 𝑓 𝜉

we then consider the conditional moments


𝑗 𝑗
𝑌1 𝜉 ≝ න 𝑌1 𝑓 𝑌1 |𝜉 d𝑌1

𝑌2𝑘 (𝜉, 𝑌1 ) ≝ න 𝑌2𝑘 𝑓 𝑌2 |𝜉, 𝑌1 d𝑌2

and we represent the moments of PDF as


𝑗
𝑀𝑛𝑗𝑘 𝐱, 𝑡 = ම 𝜉 𝑛 𝑌1 𝑌2𝑘 𝑓 𝜉, 𝑌1 , 𝑌2 ; 𝐱, 𝑡 d𝜉 d𝑌1 d𝑌2

OPENQBMM - 11TH OPENFOAM WORKSHOP 39


Conditional quadrature method of moments
We represent the PDF as (assuming one node for 𝑌1 and 𝑌2 ):
N

𝑓 𝜉, 𝑌1 , 𝑌2 ; 𝐱, 𝑡 = ෍ 𝑤𝛼 𝛿 𝜉 − 𝜉𝛼 𝛿 𝑌1 − 𝑌1𝛼 𝛿 𝑌2 − 𝑌2𝛼
𝛼=1
and we represent the moments of the joint PDF as:
N
𝑗
𝑀𝑛𝑗𝑘 𝐱, 𝑡 = ෍ 𝑤𝛼 𝜉𝛼𝑛 𝑌1𝛼 𝑌2𝑘𝛼
𝛼=1

We consider:
◦ Two quadrature nodes for the 𝜉 𝑀000 , 𝑀100 , 𝑀200 , 𝑀300
direction
◦ One quadrature node for the 𝑌1 𝑀010 , 𝑀110
direction
◦ One quadrature node for the 𝑌2
𝑀001 , 𝑀011
direction

OPENQBMM - 11TH OPENFOAM WORKSHOP 40


Moment transport equations in CQMOM
𝜕𝑀𝑛𝑗𝑘
+ 𝛻 ⋅ 𝐔𝑀𝑛𝑗𝑘 − 𝛻 ⋅ Γ𝑇 𝛻𝑀𝑛𝑗𝑘
𝜕𝑡 Scale similarity
𝑛𝜀𝜉 𝜀𝜉 𝜀
= ′2 𝑀𝑛−1𝑗𝑘 𝑀100 − 𝑀𝑛𝑗𝑘 = 𝐶
𝜉 𝜉 ′2 𝜉
𝑘
N N
𝑗−1 𝑗
+ ෍ 𝑤𝛼 𝑅1𝛼 𝑗𝜉𝛼𝑛 𝑌1𝛼 𝑌2𝑘𝛼 + ෍ 𝑤𝛼 𝑅2𝛼 𝑘𝜉𝛼𝑛 𝑌1𝛼 𝑌2𝑘−1
𝛼
𝛼=1 𝛼=1

1 − 𝜉𝛼 𝜉𝛼
𝑅1𝛼 𝜉𝛼 , 𝑌1𝛼 , 𝑌2𝛼 = 𝜉𝑠𝑡 𝑘1 𝑐𝐵0 − 𝑌1𝛼 − 𝑌1𝛼 − 𝑌2𝛼
1 − 𝜉𝑠𝑡 𝜉𝑠𝑡

𝜉𝛼
𝑅2𝛼 𝜉𝛼 , 𝑌1𝛼 , 𝑌2𝛼 = 𝜉𝑠𝑡 𝑘2 𝑐𝐵0 𝑌1𝛼 − 𝑌2𝛼 − 𝑌1𝛼 − 𝑌2𝛼
𝜉𝑠𝑡

OPENQBMM - 11TH OPENFOAM WORKSHOP 41


Mixing - Simulation setup
Two opposing inlet streams for solvent
𝑀000 = 1 𝑀100 = 1
𝑀200 = 1 𝑀300 = 1
𝑀010 = 0 𝑀110 = 1
𝑀001 = 0 𝑀101 = 0

Two opposing inlet streams


for nonsolvent
𝑀000 = 1 𝑀100 = 0
𝑀200 = 0 𝑀300 = 0
Mixing and reaction fields are
obtained using OpenQBMM 𝑀010 = 0 𝑀110 = 1
(www.openqbmm.org) 𝑀001 = 0 𝑀101 = 0

OPENQBMM - 11TH OPENFOAM WORKSHOP 42


Mixture fraction and concentrations
◦ Mixture fraction measures the mixing
◦ Two streams have 𝜉 = 0 and two other have 𝜉 = 1
◦ Through micromixing, the mixture fraction relaxes to value 𝜉 = 0.5
◦ In FNP processes 𝜉 is key, since the solvent and non-solvent should
reach a specific ratio to precipitate

The mixture fraction (left), concentration A (middle), and concentration B (right).

OPENQBMM - 11TH OPENFOAM WORKSHOP 44


Mixture fraction and concentrations

The mixture fraction (left), concentration A (middle), and concentration B (right).

OPENQBMM - 11TH OPENFOAM WORKSHOP 45


Predicted mixture fraction
◦ The mean mixture fraction is
defined as:
𝜉 = 𝑀1

Mean mixture fraction inside the


mixing chamber shown in three planes,
middle, top quarter (q2t) and bottom
quarter (q2b).
OPENQBMM - 11TH OPENFOAM WORKSHOP 46
Predicted variation of mixture fraction
◦ The variance of the mixture
fraction an be written as:
𝜉 ′2 = 𝑀2 − 𝑀12
◦ 𝜉 ′2 decays quickly after inlet
streams enter the reactor
◦ Variance is higher in the
quarter top and quarter
bottom planes compare to
middle plate inside the mixing
chamber
◦ Higher variance is obtained at
middle plate near to inlet
streams
◦ Since the flow is turbulent, the Variance inside the mixing chamber
variation of mixture fraction is shown at three planes, middle, top
not big quarter (q2t) and bottom quarter (q2b).

OPENQBMM - 11TH OPENFOAM WORKSHOP 47


Mixing with competitive consecutive reaction
◦ Simulations show that species B is consumed mostly inside the
mixing chamber
◦ The main reaction happens between A and B since the rate of their
reaction is 𝑂 1000 higher than the secondary reaction

Concentration of 𝐶𝐴 , 𝐶𝐵 for competitive consecutive reaction (Middle plane displayed for


the chamber).
OPENQBMM - 11TH OPENFOAM WORKSHOP 48
Mixing with competitive consecutive reaction
◦ The main product R is mostly produced inside the chamber and
moves toward the exit
◦ The byproduct S is produced due to the presence of R and B, when A
is absent (mixing limitation)

The concentration of product and bi-product for competitive consecutive reaction (Middle
plane displayed for the chamber)

OPENQBMM - 11TH OPENFOAM WORKSHOP 49


Mixing with competitive consecutive reaction

Concentration of 𝐶𝐴 , 𝐶𝐵 for competitive consecutive reaction (Middle plane


displayed for the chamber).

OPENQBMM - 11TH OPENFOAM WORKSHOP 50


Next steps
Realizable ODE solvers with Applications to
adaptive stepping ◦ Bubbly flows
◦ Implemented ◦ Poly-celerity (size-conditioned velocity)
◦ Being validated ◦ Velocity + size distribution
◦ Gas-particle flows
High-order realizable advection ◦ Anisotropic Gaussian
schemes
◦ Infrastructure implemented
◦ Schemes coming “soon” 

Multi-dimensional inversion
algorithm
◦ Velocity distributions
◦ Joint distributions

OPENQBMM - 11TH OPENFOAM WORKSHOP 53


What if I want to contribute?
You can contact us: Pull requests on GitHub
◦ E-mail: openqbmm@outlook.com ◦ Must be against master (which is our dev)
◦ IRC: Freenode, #openqbmm ◦ Stable releases are made using GitHub tag/release
mechanism
◦ Twitter: @openqbmm ◦ Follow the OpenFOAM coding style guide
Types of contribution ◦ Make sure things work
◦ Code ◦ Very simple approach
◦ Documentation ◦ No build = no merge
◦ Break master = no merge
◦ Test cases
◦ Regression in tests and validation = no merge (well… it
◦ Bug reports happened )
◦ Provide a test-case demonstrating the
Two ways of contributing code: functionality
◦ A contribution repository ◦ Put references and document
◦ Large code contributions ◦ Be ready to maintain your contribution, if it’s
◦ Contributions of specific interest large
◦ Example applications
◦ Prototypes
◦ Unused to date 
◦ Pull requests seem to be the favorite way
◦ Contributors don’t feel their work will be left to itself

OPENQBMM - 11TH OPENFOAM WORKSHOP 54


Acknowledgments
The support of the US National Science Foundation under the SI2 – SSE
award NSF – ACI 1440443 is gratefully acknowledged.
The support of Henry Weller (CFD Direct) in the design of the code structure
and in the development of the implementation strategy is gratefully
acknowledged.
The following contributors are deeply thanked:
◦ Frederique Laurent (Université Paris Saclay)
◦ Moment realizability, high-order schemes
◦ James Guthrie (University of Strathclyde)
◦ Patches to allow build vs. OpenFOAM 3.x
◦ Matteo Icardi (U. of Warwick)
◦ Growth models for PBE
◦ Daniele Marchisio and Dongyue Li (Politecnico di Torino)
◦ PBE kernels for liquid-liquid systems

OPENQBMM - 11TH OPENFOAM WORKSHOP 55


Disclaimer
This presentation and its content is not approved or endorsed by
OpenCFD Limited (ESI Group), the producer of the OpenFOAM software
and owner of the OPENFOAM® and OpenCFD® trade marks.
CoMFRE, Iowa State University and the speakers are not associated to
OpenCFD Limited and ESI.

OPENQBMM - 11TH OPENFOAM WORKSHOP 56


Thank you!
.

OPENQBMM - 11TH OPENFOAM WORKSHOP 57

S-ar putea să vă placă și