Upload
lymien
View
241
Download
0
Embed Size (px)
Citation preview
Maximum Entropy Analysis of Flow and Reaction Networks
MaxEnt 2014, Amboise, France
26 Sept 2014
Robert K. Niven
UNSW Canberra, ACT, AustraliaInstitut PPrime, Poitiers, France
⎧⎨⎩
[email protected] Bernd R. Noack Institut PPrime, Poitiers, France. Markus Abel Ambrosys GmbH / Univ. of Potsdam, Germany Michael Schlegel TU Berlin, Germany Hussein A. Abbass UNSW Canberra, ACT, Australia. Kamran Shafi UNSW Canberra, ACT, Australia Steven H. Waldrip UNSW Canberra, ACT, Australia Eurika Kaiser Institut PPrime, Poitiers, France
Funding from ARC, Go8/DAAD, CNRS, Region Poitou-Charentes
© R.K. Niven 2014 2
Contents 1. Introduction - background - previous work
2. Flow network - definitions; network parameters - resistance functions; Kirchhoff laws - previous attempts in literature; aims
3. Standard problem - uncertainty in flow rates + potential differences - complications - results – incl. case study of pipe flow networks
4. Extended problem - much broader uncertainties, incl. in network structure
5. Conclusions
© R.K. Niven 2014 3
Flow Network Consider generalised flow network, with nodes connected by flow paths:
Many applications: - electrical, fluid flow, communications networks - transport (road, air, shipping), chemical reaction, ecological networks - human industrial, economic, social, political networks
© R.K. Niven 2014 4
Motivation 1. Cool problem ! → general unified framework for many diverse systems 2. Has not been done (properly) 3. MaxEnt analysis of fluid flow (Niven, PRE 2009; Phil Trans B, 2010; MaxEnt 2011; 2012)
© R.K. Niven 2014 5
Analysis of Flow Systems
© R.K. Niven 2014 6
Control Volume Analysis Consider - control volume = volume through which
fluid can flow (Eulerian description), bounded by control surface
- fluid volume = contiguous body of fluid, bounded by fluid surface
Quantity B balance → Reynolds transport theorem:
DBDt FV
= ∂∂t
ρbdVCV∫∫∫ + ρbvindA
CS∫∫
Infinitesimal element: ρDb
Dt= ∂∂tρb +∇iρbv
Rate of change
of B in FV Net rate of outflowof B through CS
Rate of changeof B in CV
© R.K. Niven 2014 7
Entropy Balance Control volume analysis of S
→ thermodynamic entropy production
diSdt
Global:
σ = ∂
∂tρs dV
CV∫∫∫ + ρsvindA
CS∫∫ + js indA
FS∫∫
Local: σ̂ = ∂
∂tρs + ∇ i ρsv + js( ) with
σ = σ̂dV
CV∫∫∫
de Groot & Mazur (1984), without radiation →
σ̂ = jr iFr
r∑
js = jrλr
r∑
with jr ∈ jQ, jc ,τ,ξd{ },
Fr ∈ ∇ 1
T,−∇
μcT
,−∇vT
,−ΔGdT
⎧⎨⎩
⎫⎬⎭
, λr ∈ 1
T,−
μcT
⎧⎨⎩
⎫⎬⎭
© R.K. Niven 2014 8
Definition of Steady State Strict:
Integral:
σ = ∂
∂tρs dV
CV∫∫∫ + ρsvindA
CS∫∫ + js indA
FS∫∫
Local: σ̂ = ∂
∂tρs + ∇iρsv +∇i js
Mean: Integral:
⟨σ⟩ = ⟨ρsv⟩indA
CS∫∫ + ⟨js ⟩indA
FS∫∫
Local: ⟨σ̂⟩ = ∇i⟨ρsv⟩ +∇i⟨js ⟩
Time Average B = lim
T→∞
1T
Bdt0T∫
Ensemble Average B = lim
K→∞
1K
B(k)k=1K∑ (⇔ ergodic principle)
⎫
⎬⎪⎪
⎭⎪⎪
Must impose atall times!
⎫⎬⎪
⎭⎪
More usefuland
equivalent
dSCVdt
= 0
d ⟨S⟩dt
= 0
0
0
∂ρs∂t
= 0
∂⟨ρs⟩∂t
= 0
© R.K. Niven 2014 9
Local MaxEnt Analysis (Niven, PRE 2009; Phil Trans B 2010)
Define probability over uncertainties pI = p(jQ, jc ,τ,ξd ) →
maximise Hst = − pI ln
pIqII
∑ Flux entropy
subject to ⟨1⟩ and ⟨jr ⟩ ∈ ⟨jQ ⟩,⟨jc ⟩,⟨τ⟩,⟨ξ̂d ⟩{ }
→ pI
* = 1Z
qI exp − jrI i ζrr∑( )
Hst
* = lnZ + ⟨jr ⟩ i ζrr∑
Open system:
Φst = − lnZ = −Hst
* − 1K
σ̂⎢⎣ ⎥⎦ Flux potential
min Φst → driven by ΔΦst ≤ 0
∝Entropy production in mean, σ̂⎢⎣ ⎥⎦ ∝Mean gradients ⟨Fr ⟩
↑ Hst* , ↑ σ̂⎢⎣ ⎥⎦
↓ Hst* , ↑ σ̂⎢⎣ ⎥⎦
↑ Hst* , ↓ σ̂⎢⎣ ⎥⎦
⎧
⎨
⎪⎪
⎩
⎪⎪
⎫⎬⎪
⎭⎪pseudo MaxEP
}pseudo MinEP
© R.K. Niven 2014 10
Summary: MaxEnt analysis of local flow system → 1. “Minimum flux potential” principle:
Φst= −Hst
* − 1K
σ̂⎢⎣ ⎥⎦
based on σ̂⎢⎣ ⎥⎦ = ⟨jr ⟩i
r∑ ⟨Fr ⟩ = EP in the mean
2. Subsidiary (pseudo-) MaxEP or MinEP principles (analogue of min or max enthalpy principles)
© R.K. Niven 2014 11
Analysis of Flow Networks
© R.K. Niven 2014 12
Network Specification Network structure
- N nodes, M edges - adjacency matrix A
Flow parameters - internal flow rates
Qij ∈Q (edges)
- external flow rates θi ∈ΘΘ (nodes) - potential differences
ΔEij ∈ΔE (edges) (for Δ = init − final )
Kirchhoff’s Laws
Ki ∈K : Continuity at each node i: θi − Qij
i=1
N∑ = 0
K ∈L : No potential difference around each loop :
ΔEijij∈∑ = 0
⎫⎬⎭⇒ L loops
© R.K. Niven 2014 13
Resistance Functions Specify
ΔEij = Rij (Qij ) ∈ ΔE = R (Q )
e.g. Electrical: linear: ΔE = RQ c.f. V = RI Pipe flows: quadratic: ΔE = RQ2 power law: ΔE = RQ |Q |a−1 a ∈[0,1]
Colebrook: ΔE = 8fL
π2D5gQ |Q | with
Re = 4ρQ
πμD and
f = 64|Re|
, Re < 2100
1f= 1.14 − 2.0 log10
εD
+ 9.28|Re | f
⎛⎝⎜
⎞⎠⎟, Re ≥ 4000
⎧
⎨
⎪⎪
⎩
⎪⎪
Transport: ΔE = R(Q) with ΔE →∞ as Q →Qmax (or use other variables)
© R.K. Niven 2014 14
Deterministic Method e.g. electrical circuit analysis; hydraulic engineering: - parameters {Q,Θ,ΔE } ; equations {K ,L,R } - specify sufficient parameters → solve directly (e.g. Hardy-Cross
method) - solution sometimes ⇔ min. or max. power
© R.K. Niven 2014 15
Previous Literature (a) Transport networks e.g. Ortúzar & Willumsen (2001): “gravity model”: - define over trip counts
Tij
→ max H = − (Tij logTij −Tij )
ij∑
subject to Kirchhoff node constraints + cost function - use Lagrangian multiplier as fitting parameter (b) Hydraulic networks e.g. Awumah et al. 1990; Tanyimboh & Templeman 1993; de Schaetzen et al. 2000; Formiga
et al. 2003, Ang & Jowitt 2003; Setiadi et al. 2005
- define probabilities pij = Qij Qij
ij∑
→ MaxEnt subject to Kirchhoff node constraints - no account for Kirchhoff loop constraints or pipe resistances!
© R.K. Niven 2014 16
“Standard Problem” Define probability over uncertainties → joint pdf p(Q ,Θ,ΔE )
→ maximise
H = − ...∫ dQ dΘdΔE p(Q ,Θ,ΔE ) ln p(Q ,Θ,ΔE )
q(Q ,Θ,ΔE )∫
Constraints: - normalisation ⟨1⟩ - known moments: some of
⟨Qij ⟩ , ⟨θi ⟩ ,
⟨ΔEij ⟩ - resistance functions ⟨ΔE ⟩ = R (⟨Q ⟩) - Kirchhoff node + loop constraints f(⟨Q ⟩,⟨ΘΘ⟩) = 0, g(⟨ΔE ⟩) = 0
→ Boltzmann distribution and MaxEnt:
Entropy production σnet⎢⎣ ⎥⎦
Non-linearities!
p* = qZ
exp −λλ :Q − μ iΘ − νν : ΔE − ρρ : ⟨ΔE ⟩ −R (⟨Q ⟩)( )− αα i f − ββ i g⎡⎣ ⎤⎦
H* = − lnZ + λ : ⟨Q ⟩ + μ i ⟨ΘΘ⟩ + ν : ⟨ΔE ⟩
© R.K. Niven 2014 17
Complications 1. Constraint independence: - if resistance functions known →
⟨ΔEij ⟩ ,
⟨Qij ⟩ not independent
2. Dimensionality of integrals
...∫ dQ dΘdΔE ...∫ R (Q )⎯ →⎯⎯⎯ ...∫ dQ dΘ...∫
3. Type of constraints (what does a mean mean?)
- local
dQij p(Qij | Q¬ij ,Θ,ΔE ) ∫ Qij = Q¬ij⎡⎣ ⎤⎦(Q¬ij ,Θ,ΔE)
- global
...∫ dQ dΘdΔE p(Q ,Θ,ΔE )∫ Qij = ⟨Qij ⟩
4. Kirchhoff constraints - impose in mean:
θi − Qij
i=1
N∑ = 0 , all nodes;
ΔEijij∈∑ = 0 , all indep. loops
© R.K. Niven 2014 18
5. Nonlinear resistance functions: I.
⟨ΔEij ⟩ = ⟨Rij (Qij )⟩ → simple Lagrangian
II. ⟨ΔEij ⟩ = Rij (⟨Qij ⟩) → implicit Lagrangian
6. Prior probabilities - important for under-constrained problems - in practice, use Gaussian priors
© R.K. Niven 2014 19
Results (Waldrip et al., MaxEnt2013) e.g. 3-node network:
- 6 parameters (
⟨ΔEij ⟩ dependent)
- 3 x Ki + 1 x K - power-law resistances:
⟨ΔEij ⟩ = Kij ⟨Qij ⟩ | ⟨Qij ⟩ |
- Gaussian priors Solved numerically (multidimensional quadrature, quasi-Newton iteration for multipliers, outer implicit iteration)
Constraints ⟨θ1⟩ = 1, ⟨θ2⟩ = 0; fixed K12 = K23 = 0.5
Constraints ⟨θ1⟩ = 1; fixed K12 = K23 = 0.5
© R.K. Niven 2014 20
Real network (Waldrip et al., to appear) Water distribution network for suburb of Torrens, Australian Capital Territory 1123 nodes 1140 pipes Network data sourced from and owned by ACTEW Corporation Limited
205,500 206,000 206,500 207,000
593,50
059
4,00
059
4,50
0595,00
0
Easting (m ACT Standard Grid AGD66)
Northing(m
) 600mm450mm375mm300mm225mm150mm100mm20mmPumpPearce ReservoirTorrens Reservoir
© R.K. Niven 2014 21
Constraints: K ,L, ⟨ θi
ini∑ ⟩ , ⟨Δhres ⟩ K ,L, ⟨ θi
ini∑ ⟩ , ⟨Δhres ⟩ , ⟨Q1⟩
Prior: N (0,σ) uniform mean θiout
Constraints: 1 Group inflow 1 Head 1 Pipe Flow
Constrained pipe
Constraints: 1 Group inflow 1 Head 20 Pipe Flow
© R.K. Niven 2014 22
Jaynes’ Relations Entropy:
H* = lnZ + λr ⟨fr ⟩
r=1
R∑
Potential: Φ = − lnZ = −H* + λr ⟨fr ⟩
r=1
R∑
Derivatives:
∂H*
∂⟨fr ⟩= λr
∂2H*
∂⟨fm ⟩∂⟨fr ⟩=
∂λr∂⟨fm ⟩
= gmr ∈g
∂Φ∂λr
= ⟨fr ⟩
∂2Φ∂λm ∂λr
= −cov(fm,fr ) =∂⟨fr ⟩∂λm
= γmr ∈γγ
Legendre transform: Φ(λ1,λ2,...) ⇔ H*(⟨f1⟩,⟨f2⟩,...) with γ = g−1
∂⟨fr ⟩∂λm
=∂⟨fm ⟩∂λr
∂λm∂⟨fr ⟩
=∂λr∂⟨fm ⟩
© R.K. Niven 2014 23
“Standard Problem”
p* = qZ
exp −λλ : Q − μ iΘ − νν : ΔE − ρρ : ⟨ΔE ⟩ −R (⟨Q ⟩)( )− αα i f − ββ i g⎡⎣ ⎤⎦
Φ = − lnZ = −H* + λ : ⟨Q ⟩ + μ i ⟨ΘΘ⟩ + ν : ⟨ΔE ⟩ (constraints largely empty)
Derivatives:
∂H*
∂⟨Q ⟩, ∂H
*
∂⟨ΘΘ⟩, ∂H*
∂⟨ΔE ⟩
⎡
⎣⎢⎢
⎤
⎦⎥⎥= λ,μ,ν⎡⎣ ⎤⎦ ,
∂Φ∂λλ
,∂Φ∂μ
,∂Φ∂νν
⎡
⎣⎢
⎤
⎦⎥ = ⟨Q ⟩,⟨ΘΘ⟩,⟨ΔE ⟩⎡⎣ ⎤⎦
∂2Φ
∂λλ2∂2Φ∂λλ ∂μ
∂2Φ∂λλ ∂νν
∂2Φ∂μ ∂λλ
∂2Φ
∂μ2∂2Φ∂μ ∂νν
∂2Φ∂νν∂λλ
∂2Φ∂νν∂μ
∂2Φ
∂νν2
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥
=
∂⟨Q ⟩∂λλ
∂⟨ΘΘ⟩∂λλ
∂⟨ΔE ⟩∂λλ
∂⟨Q ⟩∂μ
∂⟨ΘΘ⟩∂μ
∂⟨ΔE ⟩∂μ
∂⟨Q ⟩∂νν
∂⟨ΘΘ⟩∂νν
∂⟨ΔE ⟩∂νν
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥
Legendre Φ⇔ H*
© R.K. Niven 2014 24
Chemical Reaction Networks Species
X =
PQAP *QA
P+QA−
⎡
⎣
⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥
=XYZ
⎡
⎣
⎢⎢⎢
⎤
⎦
⎥⎥⎥
Reactions
Π = L+ L− D+ D− B1
+ B1− B2
+ B2−⎡
⎣⎤⎦
Stoichiometric matrix:
Γ =-1 1 1 -1 0 0 1 -11 -1 -1 1 -1 1 0 00 0 0 0 1 -1 -1 1
⎡
⎣
⎢⎢⎢
⎤
⎦
⎥⎥⎥
(e.g. Juretic & Županovic, 2003)
© R.K. Niven 2014 25
Chemical Reaction Networks Thermodynamics Kinetics
ΔGL+
ΔGL−
ΔGD+
ΔGD−
ΔGB1+
ΔGB1−
ΔGB2+
ΔGB2−
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥
=
-1 1 01 -1 01 -1 0
-1 1 00 -1 10 1 -11 0 -1
-1 0 1
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥
GXGYGZ
⎡
⎣
⎢⎢⎢
⎤
⎦
⎥⎥⎥
XYZ
⎡
⎣
⎢⎢⎢
⎤
⎦
⎥⎥⎥=
-1 1 1 -1 0 0 1 -11 -1 -1 1 -1 1 0 00 0 0 0 1 -1 -1 1
⎡
⎣
⎢⎢⎢
⎤
⎦
⎥⎥⎥
νL+
νL−
νD+
νD−
νB1+
νB1−
νB2+
νB2−
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥
ΔG(Π) = Γ G(X) X = Γ ν(Π)
© R.K. Niven 2014 26
Graph Structures Closed system → steady state: X = Γνν = 0 Open system
→ augmented stoich. matrix Γtot
→ stationary state ≠ steady state Γtotν = 0
Famili & Palsson (2003)
© R.K. Niven 2014 27
Geological Reaction Systems (Ord et al. 2013 & Lester et al. 2013, Ore Geology Reviews)
e.g. metamorphic processes; ore deposit formation
Example:
X = Albite, Biot, Garnet, Musc, Qtz, [ Staur, Sill, H2O, H+, Na+, K+, M2+ ⎤
⎦
Π = A B C D[ ]
Γ =
-2 21 24 -43-2 -15 12 62 0 0 00 -2 0 16 -12 -90 910 0 -9 00 0 0 174 60 -48 -7-4 -86 90 02 -21 -24 432 17 -12 -70 45 -27 -18
⎡
⎣
⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥
© R.K. Niven 2014 28
Multimolecular stoichiometry → bipartite graph structure!
© R.K. Niven 2014 29
“Extended Problem” Many parameters, e.g.: - N nodes, M edges - connectivity (adjacency matrix A ) - flow quantities c ∈C - edge distances
Dij ∈D , volumes
Vij ∈V
- node storage capacities Si ∈S ; rates of production ξic ∈ΞΞ
- node conductivities Gi ∈G - edge resistance functions
Fij ∈F
- edge flow rates Qij
c ∈Q ; node external flow rates θic ∈ΘΘ
- node potentials Ei ∈E ; edge potential differences ΔEij ∈ΔE
→ uncertainty in {N,M,A,C ,D,V ,S,Ξ,G,F ,Q ,Θ,E ,ΔE } → joint pdf p(N,M,A,C ,D,V ,S,Ξ,G,F ,Q ,Θ,E ,ΔE | I)
© R.K. Niven 2014 30
Define probability over the uncertainties X → relative entropy
Hnet = − ...∫ dX p(X | I) ln p(X | I)
q(X | I)∫
Maximise subject to constraints → infer p * (X | I) → moments ⟨Xij ⟩
Open systems: minimise potential
Φnet = −Hnet
* − 1K
σnet⎢⎣ ⎥⎦
Work in progress: applying MaxEnt with uncertainty in graph structure
© R.K. Niven 2014 31
Conclusions 1. Flow network - definitions; network parameters - resistance functions; Kirchhoff laws - previous attempts in literature
2. Standard problem - uncertainty in flow rates + potential differences - complications - results – incl. case study of pipe flow networks - chemical reaction networks ⇒ bipartite graph structure open ⇒ stationary state ≠ steady state
3. Extended problem - much broader uncertainties, incl. in network structure
© R.K. Niven 2014 32
Thank you ! (Advertisement: now recruiting
for postdoc / PhD students)