Open-source software for computational engineering

Transcription

Open-source software for computational engineering
OpenQBMM – An open-source implementation of
quadrature-based moment methods. Application to
population balances and turbulent mixing
A L B E R TO PA S S A L A C Q U A 1 , 2 , R O D N E Y O . F OX 2
1Department
2Department
of Mechanical Engineering, Iowa State University
of Chemical and Biological Engineering, Iowa State University
1ère journée française des utilisateurs de OpenFOAM
May 18th, 2016, Rouen, Normandie, France
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
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 - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
2
What is OpenQBMM?
An open-source implementation
of quadrature-based moment
methods into OpenFOAM®
◦ Population balance equations
◦ Turbulent reacting flows
◦ Polydisperse multiphase flows
Where do I find OpenQBMM?
◦ Website: www.openqbmm.org
◦ On GitHub:
https://github.com/OpenQBMM
◦ On Twitter: @OpenQBMM
Who is behind OpenQBMM?
◦ Principal investigators:
◦ Alberto Passalacqua (lead)
◦ Rodney O. Fox
◦ Simanta Mitra
◦ Gas-liquid flows
◦ Gas-particle flows
Project details
◦ Funded by the US National Science
Foundation
◦ ACI – SI2 – SSE program
◦ Funding period
◦ Oct. 1st, 2014 – Sep. 30th 2017
◦ Post-docs: Xiaofei Hu
◦ Students: Ehsan Madadi, Jeffrey
Heylmun, David Williams
◦ External contributors: Frederique
Laurent (UP Saclay), James Guthrie
(U. of Strathclyde), Matteo Icardi (U.
of Warwick), Daniele Marchisio and
Dongyue Li (Politecnico di Torino)
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
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
◦ Bubble columns
Mixing and reaction
in multi-inlet vortex
reactor (drug
production)
Gas-particle flows
◦ Fluidized beds
◦ Risers
Gas-liquid-solid flow
in stirred tank
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
4
Population balance equation
Univariate population balance
𝜕𝑛(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑛 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑛 𝜉, 𝐱, 𝑡
𝜕𝑡
Advection in
physical space
Diffusion in
physical space
+ 𝛻𝜉 ⋅ G 𝜉 𝑛 𝜉, 𝐱, 𝑡
Advection in space
of internal coordinate
ഥ 𝑎 𝜉, 𝐱, 𝑡 +𝐵ത 𝑏 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑏 𝜉, 𝐱, 𝑡 + 𝑁 𝐱, 𝑡
= 𝐵ത 𝑎 𝜉, 𝐱, 𝑡 − 𝐷
Birth and death
due to aggregation
Birth and death
due to breakup
Nucleation
Number density function (NDF) - 𝑛(𝜉, 𝐱, 𝑡)
◦ 𝜉: internal coordinate (size, length, surface area, …)
◦ 𝜉 ∈ ℜ+ = [0, +∞[
◦ 𝐱: position vector in physical space
◦ t: time
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
5
Turbulent mixing
Turbulent mixing
𝜕𝑓(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑓 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑓 𝜉, 𝐱, 𝑡
𝜕𝑡
Diffusion in
physical space
Advection in
physical space
= 𝑆(𝜉, 𝐱, 𝑡)
Turbulent mixing
model
Probability distribution
function of the mixture
fraction (NDF) 𝑓(𝜉, 𝐱, 𝑡)
◦ 𝜉: 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)
◦ 𝑆 𝜉, 𝑥, 𝑡 = −𝛻𝜉 ⋅
𝜀𝜉
𝜉 ′2
1
𝜉 − 𝜉 𝑓 + 2 𝛻𝜉2 𝜀|𝜉 𝑓
◦ Scale similarity model (Fox, 2003):
𝜀𝜉
𝜉 ′2
𝜀
𝜅
= 𝑐𝜑 ; 𝑐𝜑 = 2
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
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 - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
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
distribution
◦ N quadrature nodes
◦ 2N conserved moments
◦ Discrete representation of the
distribution
Moment inversion
Quadrature
weights 𝑤𝑖 and
abscissae 𝜉𝑖
Problem
◦ How do we evaluate the
distribution at arbitrary values of
𝜉?
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
8
The extended quadrature method of moments
In QMOM, the distribution is
“discrete”:
◦ Represented by a sum of few Dirac
delta functions
𝑛 𝜉
In some problems (evaporation,
condensation, …), we would like a
smooth representation
𝑛 𝜉
𝜉
𝜉
At similar computational cost!
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
9
The extended quadrature method of moments
Approximate the NDF with a
weighted sum of non-negative
kernel density functions (Yuan et al.,
2012)
N
𝑛 𝜉, 𝑥, 𝑡 = ෍ 𝑤𝑖 𝛿𝜎 (𝜉, 𝜉𝑖 )
𝑖=1
Choose kernel density function
based on:
The parameter 𝜎 is shared among
the kernel density functions
◦ Only one additional moment needs
to be transported with respect to
standard QMOM
◦ Only one non-linear equation has to
be solved to find 𝜎, instead of a
system of non-linear equations
◦ A suitable value of 𝜎 may not exist!
◦ Support (range of 𝜉)
◦ ℜ Gaussian
◦ ℜ+ Gamma, lognormal
◦ 0, 1  Beta
◦ Known recurrence relation for
orthogonal polynomials to the kernel
density:
◦ Used to determine Gaussian quadrature
Remember that the final
objective is to accurately
integrate the source terms of
the PDF evolution equation to
find their moments
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
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:
𝜕𝑛(𝜉, 𝐱, 𝑡)
+ 𝛻𝐱 ⋅ 𝑛 𝜉, 𝐱, 𝑡 𝐔 − 𝛻𝐱 ⋅ Γ𝛻𝐱 𝑛 𝜉, 𝐱, 𝑡
𝜕𝑡
Advection in
physical space
Realizable
advection scheme
Diffusion in
physical space
+ 𝛻𝜉 ⋅ G 𝜉 𝑛 𝜉, 𝐱, 𝑡
Advection in the
space of internal
coordinate
Traditional FVM
implementation
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
= 𝑆 𝜉, 𝐱, 𝑡
Source
terms
Realizable ODE
solver
11
Requirements
Smooth integration into
OpenFOAM®
◦ Same user experience
◦ Same pre- and post-processing
features
◦ Re-uses the existing infrastructure as
much as possible
Must interface to
◦ Incompressible and compressible
solvers
◦ Reaction module
◦ Single/multi-phase solvers
The solution algorithm
◦ Must maximize the number of
preserved moments in the
transported moment set
◦ We transport 2N + 1
◦ NDF may degenerate: QMOM
◦ Must ensure, verify and preserve the
realizability of the moment set
◦ Must be sufficiently accurate for the
target applications
◦ Order of schemes
◦ Realizable schemes for advection
Run-time selection for
◦ Models
◦ Quadrature setup (number of
moments, accuracy, …)
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
12
Moment inversion and realizability
univariateMomentSet object
◦ A single moment vector
◦ Set of moments to be inverted in each
computational cell or face
◦ Verifies a set of moments is
realizable based on the support of
the distribution
◦ Determines the maximum number
of invertible moments
◦ Computes the quadrature weights
and abscissae for the moment set
◦ Stores the quadrature formula
◦ Can compute moments from the
quadrature
◦ Manages the cases of degenerate
moment sets
◦ Different for different quadrature formulae
◦ Even for Gauss
◦ Odd for Gauss-Radau
The core of basic
quadrature operations and
moment realizability check
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
13
Realizability of a moment set
We say that a moment vector
𝐦 = 𝑚 0 , … , 𝑚𝑀
is realizable when a measure 𝜇(𝜉)
exists on a support Ω, so that
𝑚𝑘 = න 𝜉 𝑘 𝑑𝜇
Ω
𝑃𝑚 𝜉 are the orthogonal
polynomials to 𝜇(𝜉) over Ω,
defined by the recurrence relation
Realizability depends on the
support of 𝜇 𝜉 . If Ω is
◦ The real line
◦ Realizability condition: 𝛽𝑘 ≻ 0
◦ The positive real line
◦ Realizability condition:
◦ 𝜁𝑘 =
𝐻𝑘 𝐻𝑘−3
𝐻𝑘−2 𝐻𝑘−1
> 0, 𝑘 = 0, 1 …
◦ 𝐻𝑘 are the Hankel determinants
◦ The compact interval 0,1
◦ 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 - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
14
Extended moment inversion
extendedMomentInversion
◦ Computes the secondary
quadrature
◦ Acts on an individual moment
vector
◦ Maintains independence from
fields, as univariateMomentSet
Performs the EQMOM
reconstruction of the NDF
Principle of the procedure:
1. Start from a guess for the
parameter 𝜎
◦ From realizability conditions on the first
few moments
2. Compute quadrature weights and
abscissae
3. Enforce the conservation of the
last moment 𝑚2𝑁
4. Solve the non-linear equation
obtained at point 3 to find sigma
5. Repeat from 1 until convergence
6. If 𝜎 is not found, minimize
moment error
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
15
An overview of other key classes
univariateQuadratureApproximation
PDFTransportModel
univariatePDFTransportModel
Stores moment and
quadrature fields, and
takes care of
initialization and
quadrature update
populationBalanceModel
mixingModel
univariatePopulationBalanceModel
turbulentMixing
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
16
Verification and validation - PBE
We validated the implementation
against rigorous solution of
population balance equations
(Vanni, 2000)
◦ Zero-dimensional problem
◦ Aggregation and breakup with
different kernels
◦ EQMOM with log-normal kernel
density function
Simplified form of the PBE
𝜕𝑛(𝜉,𝐱,𝑡)
𝜕𝑡
ഥ 𝑎 𝜉, 𝐱, 𝑡
= 𝐵ത 𝑎 𝜉, 𝐱, 𝑡 − 𝐷
ഥ 𝑏 𝜉, 𝐱, 𝑡
+𝐵ത 𝑏 𝜉, 𝐱, 𝑡 − 𝐷
Five cases
◦ Different aggregation and breakup
kernels
◦ Different daughter distribution
functions
Comparison to
◦ Rigorous solution of Vanni (2000).
◦ EQMOM solution in MATLAB®
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
17
PBE kernels
Aggregation kernels
◦ Constant
◦ Constant
◦ 𝛽 𝜉, 𝜉 ′ = 1
◦ 𝑎 𝜉 =1
◦ Sum
◦ Power law
◦ 𝑎 𝜉 = 𝜉𝛼
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 3 + 𝜉 ′3
◦ Hydrodynamic:
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 + 𝜉 ′
Breakup kernels
◦ Exponential
3
◦ 𝑎 𝜉 = 𝑒 𝛿𝜉
◦ Differential force
◦ 𝛽 𝜉, 𝜉 ′ = 𝜉 + 𝜉 ′ 2 |𝜉 + 𝜉 ′ |
3
Daughter distribution functions
◦ Symmetric fragmentation
◦ Uniform
◦ Mass ratio 1 to 4
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
18
Results – Case 1
Submodels
Initial moments:
◦ Constant aggregation and breakup
◦ Symmetric fragmentation
◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
Zero-order moment
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
𝑑43 = 𝑚4 /𝑚3
19
Results – Case 2
Submodels
◦ Sum aggregation
◦ Power law breakup
◦ Symmetric fragmentation
Initial moments:
◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
Zero-order moment
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
𝑑43 = 𝑚4 /𝑚3
20
Results – Case 3
Submodels
◦ Hydrodynamic aggregation
◦ Exponential breakup
◦ Symmetric fragmentation
Initial moments:
◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
Zero-order moment
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
𝑑43 = 𝑚4 /𝑚3
21
Results – Case 4
Submodels
Initial moments:
◦ Differential force aggregation
◦ Power law breakup
◦ Uniform fragmentation
◦ 𝑚1 = 1, 𝑚2 = 1.13, 𝑚2 = 1.294
◦ 𝑚3 = 1.5, 𝑚4 = 1.76, 𝑚5 = 2.09237
◦ 𝑚6 = 2.51269
Zero-order moment
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
𝑑43 = 𝑚4 /𝑚3
22
Results – Case 5
Submodels
◦ Hydrodynamic aggregation
◦ Exponential breakup
◦ 1 to 4 mass ratio fragmentation
Initial moments:
◦ 𝑚𝑘 = 1, 𝑘 = 0, … , 6
Zero-order moment
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
𝑑43 = 𝑚4 /𝑚3
23
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.
We study mixing inside the MIVR:
◦ Turbulent (RANS) flow field solution
◦ Mixing model with OpenQBMM
J. C. Cheng and R. O. Fox, "Kinetic Modeling of
Nanoprecipitation using CFD Coupled with a Population
Balance," Industrial & Engineering Chemistry Research, vol.
49, pp. 10651-10662, Nov 3 2010
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
24
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.
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
25
Simulation workflow
A sequential workflow is used to investigate the MIVR:
Flow field
Fields of U,
k, epsilon
Mixing
Mixture
fraction
field
Population
balance
Particle size
distribution
Assumptions
◦ Particles have small Stokes number and do not affect the fluid motion
◦ The flash nano-precipitation does not significantly affect mixing
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
26
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.
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
27
Reactive mixing modeling
We consider the evolution equation for the joint composition PDF
𝑓(𝝓, 𝐱, 𝑡):
rate of change
ฐ
𝜕𝑓
𝜙
𝜕𝑡
𝜕
=−
𝜕𝜓𝑖
macromixing
+
𝜀𝜙
𝜙 ′2
mesomixing
𝜕𝑓𝜙
𝜕𝑓𝜙
𝜕
𝑈𝑖
−
Γ
𝜕𝑥𝑖
𝜕𝑥𝑖 𝑇 𝜕𝑥𝑖
𝜙𝑖 − 𝜓𝑖 + 𝑆𝑖 𝜓
𝑓𝜙
Closed by
gradient-diffusion
model
where
◦
◦
◦
◦
◦
◦
𝜙 is the passive scalar
𝜙 ′2 is the scalar variance
𝜀𝜙 is the dissipation factor
𝑈𝑖 is the mean velocity
Γ𝑇 is the turbulent diffusivity
𝑡 is time
Interaction by Exchange
with the Mean mixing
model (Fox, 2003)
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
Source term due to
reaction
29
Chemical kinetics
We consider a simple case of two competitive consecutive reactions to study
mixing efficiency in the MIVR
Fast reaction
𝑘1
𝐴 + 𝐵՜𝑅
Slower reaction
𝑘2
𝐵 + 𝑅՜𝑆
where
◦ 𝑅 is the desired product
◦ 𝐵 is the byproduct
◦
𝑘1
𝑘2
= 𝑂(103 )
Rewrite PDF in terms of
◦ Mixture fraction 𝜉
◦ Reaction progress variables 𝑌1 , 𝑌2
𝑓(𝛟, 𝐱, 𝑡) ՜ 𝑓(𝜉, 𝑌1 , 𝑌2 , 𝐱, 𝑡)
𝑐𝐴0
𝜉𝑠𝑡 =
𝑐𝐴0 + 𝑐𝐵0
𝑐𝐴 = 𝑐𝐴0 1 − 𝜉 − 1 − 𝜉st 𝑌1
𝑐𝐵 = 𝑐𝐵0 𝜉 − 𝜉st 𝑌1 + 𝑌2
𝑐𝑅 = 𝑐𝐵0 𝜉st 𝑌1 − 𝑌2
𝑐𝑆 = 𝑐𝐵0 𝜉st 𝑌2
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
30
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
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
31
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 𝜉
direction
◦ One quadrature node for the 𝑌1
direction
◦ One quadrature node for the 𝑌2
direction
𝑀000 , 𝑀100 , 𝑀200 , 𝑀300
𝑀010 , 𝑀110
𝑀001 , 𝑀011
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
32
Moment transport equations in CQMOM
𝜕𝑀𝑛𝑗𝑘
+ 𝛻 ⋅ 𝐔𝑀𝑛𝑗𝑘 − 𝛻 ⋅ Γ𝑇 𝛻𝑀𝑛𝑗𝑘
𝜕𝑡
𝑛𝜀𝜉
= ′2 𝑀𝑛−1𝑗𝑘 𝑀100 − 𝑀𝑛𝑗𝑘
𝜉
N
Scale similarity
𝜀𝜉
𝜀
=
𝐶
𝜉
𝜉 ′2
𝑘
N
𝑗−1
𝑗
+ ෍ 𝑤𝛼 𝑅1𝛼 𝑗𝜉𝛼𝑛 𝑌1𝛼 𝑌2𝑘𝛼 + ෍ 𝑤𝛼 𝑅2𝛼 𝑘𝜉𝛼𝑛 𝑌1𝛼 𝑌2𝑘−1
𝛼
𝛼=1
𝛼=1
1 − 𝜉𝛼
− 𝑌1𝛼
1 − 𝜉𝑠𝑡
𝜉𝛼
− 𝑌1𝛼 − 𝑌2𝛼
𝜉𝑠𝑡
𝑅2𝛼 𝜉𝛼 , 𝑌1𝛼 , 𝑌2𝛼 = 𝜉𝑠𝑡 𝑘2 𝑐𝐵0 𝑌1𝛼 − 𝑌2𝛼
𝜉𝛼
− 𝑌1𝛼 − 𝑌2𝛼
𝜉𝑠𝑡
𝑅1𝛼 𝜉𝛼 , 𝑌1𝛼 , 𝑌2𝛼 = 𝜉𝑠𝑡 𝑘1 𝑐𝐵0
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
33
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
Mixing and reaction fields are
obtained using OpenQBMM
(www.openqbmm.org)
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
𝑀000 = 1
𝑀100 = 0
𝑀200 = 0
𝑀300 = 0
𝑀010 = 0
𝑀110 = 1
𝑀001 = 0
𝑀101 = 0
34
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).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
35
Mixture fraction and concentrations
The mixture fraction (left), concentration A (middle), and concentration B (right).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
36
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).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
37
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
variation of mixture fraction is
not big
Variance inside the mixing chamber
shown at three planes, middle, top
quarter (q2t) and bottom quarter (q2b).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
38
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).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
39
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)
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
40
Mixing with competitive consecutive reaction
Concentration of 𝐶𝐴 , 𝐶𝐵 for competitive consecutive reaction (Middle plane
displayed for the chamber).
PASSALACQUA ET AL. - ICMF 2016 - IOWA STATE UNIVERSITY
41
Next steps
Realizable ODE solvers with
adaptive stepping
◦ Implemented
◦ Being validated
Applications to
◦ Bubbly flows
◦ Poly-celerity (size-conditioned velocity)
◦ Velocity + size distribution
High-order realizable advection
schemes
◦ Gas-particle flows
◦ Anisotropic Gaussian
◦ Infrastructure implemented
◦ Schemes coming “soon” 
Multi-dimensional inversion
algorithm
◦ Velocity distributions
◦ Joint distributions
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
44
What if I want to contribute?
You can contact us:
Pull requests on GitHub
◦ E-mail: [email protected]
◦ IRC: Freenode, #openqbmm
◦ Twitter: @openqbmm
Types of contribution
◦
◦
◦
◦
Code
Documentation
Test cases
Bug reports
◦ Stable releases are made using GitHub tag/release
mechanism
◦ Follow the OpenFOAM coding style guide
◦ Make sure things work
◦ Very simple approach
◦ No build = no merge
◦ Break master = no merge
◦ Regression in tests and validation = no merge (well… it
happened )
Two ways of contributing code:
◦ A contribution repository
◦
◦
◦
◦
◦ Must be against master (which is our dev)
Large code contributions
Contributions of specific interest
Example applications
Prototypes
◦ Provide a test-case demonstrating the
functionality
◦ Put references and document
◦ Be ready to maintain your contribution, if it’s
large
◦ Unused to date 
◦ Pull requests seem to be the favorite way
◦ Contributors don’t feel their work will be left to itself
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
45
Acknowledgments
The support of the US National Science Foundation under the SI2 – SSE
award NSF – ACI 1440443 is gratefully acknowledged.
The precious support of Henry Weller (CFD Direct/OpenFOAM Foundation)
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 (UP 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 (Politcnico di Torino)
◦ PBE kernels for liquid-liquid systems
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
46
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 - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
47
Thank you!
.
OPENQBMM - JOURNÉE FRANÇAISE DES UTILISATEURS DE OPENFOAM
48