Upload
geoffrey-marshall
View
215
Download
0
Tags:
Embed Size (px)
Citation preview
Thermodynamic R&E
V o lker S iep m a nn (d r. in g .)F lo w sh e e t m o d u l
A u tom atic d iffe re n tia tionM a trix -lib ra ry
G e ir A rn e E v je n (d r. in g .)P h a se d ia g ram m o d u lS c ie n tif ic un it m o d u l
T h e rm o-se rver
5 th . ye ar S tu de n tsP ro gra m m ing lan g ua g es
C o m p u ter a ss is ted a lge b raT h e rm o d yn a m ic m o de lling
T o re H a u g -W a rb e rg (a ssoc .p ro f.)E xe rg y a n a lys is
S o lid s ta te m ixtu resR a tion a l the rm o d yna m ics
P ro je ct fo cusC o m p u ter-a id ed the rm od yn am ics
Rational Thermodynamics
• Identify the canonical variables of the
model. In practice either
or
• These are homogeneous functions which can be added to yield a total contribution:
n,, PTG
n,,VTA
eosig AAAA :
Rational Thermodynamics
• The standard state contribution can be split into new (sub)contributions:
iiifi
T
T iPiTi
P
P iTi
TPi
TPii
sTh
dTc
dPv
NA
i
i
:
:
:
:
,
Rational Thermodynamics
• Proposition: Only 3 algebraic operators are needed for a thermodynamic setup!
1) The chain operator for doing things like:
2) The patch operator for defining sub-graphs:
eosig AA
TPiiN
nCBA *
Rational Thermodynamics
• Operator precedence: patch (*) > chain (+)
• An equation of state VLE model can now be written:
• Where the standard state is defined as:
AAA igeos *
nTn
TTA *,,*,* 2211
Rational Thermodynamics
• An equivalent calculation graph is:
igAT1
eosA
,,
1
Tn
n
+
* *
*
Rational Thermodynamics
• The object is stored in an “onion-structure”:
1
TnT
1
igAeosA
n
Rational Thermodynamics
n = [‘Nitrogen’,’O2’,’ARGON’]
A = Surface.new(n) * (
Helmholtz.new(n) * (
StandardState.new(n) * (
MuT_cp.new(n,:poly3,’ig’,:reid77) * (
MuT_hs.new(n,:h0,’ig’,:reid87) +
MuT_hs.new(n,:s0,’ig’,:dippr96) ) ) +
EquationOfState.new(n) * (
ModTVN_ideal.new(n,:idealgas,’ig’) ) +
EquationOfState.new(n) * (
ModTVN.new(n,:srk,’fl’,:reid77).tell(:m_gd,[‘fl’,’a’,’mfac’],:reid87) ) ) )
Rational Thermodynamics
• Helmholtz is explicit in (T,V,N). For practical use the output needs to be transformed into (H,P,N), (S,P,N), (T,V,N), etc:
• Legendre: extensive <=> intensive variable.
• Massieu: function <=> extensive variable.
• A new object is required to take care of the transformations.
Rational Thermodynamics
More Ruby code => air=f(H,V/T,N)
air = Surface.new(n,:legendre,’p’) *
Surface.new(n,:massieu,’s’) *
Surface.new(n,:legendre,’-t’) *
A
Rational Thermodynamics
• Use of operators => thermodynamic frameworks can be described by small, manageable, expressions.
• The algebra is not tied to any particular implementation => easy to export, exchange and update model info.
• Export formats are Matlab, LaTeX, XML, etc.
Flowsheet calculations
• Example: Propane-butane splitter with multiple coordinate specifications.
TPH H
Flowsheet calculations
• Proposition: Networks of thermodynamic nodes can be described in terms of U(S,V,N) and f(H,V/T,N).
• The functions A(T,V,N), H(S,p,N), S(H,p,N) are obtained by Legendre and Massieu transformations.
• Constraints in the extensive coordinates = Euler integration.
Flowsheet calculations
• Flash block:
• Transformation block:
• Mixer block:
2
12
1
g
g
0
λ
x
x
IH
IH
II
x
0y
xTT
2
1yx
0
x
x
x
III
3
2
1
Flowsheet calculations
• Thermodynamic surface transformations => canonical (and aesthetically pleasing) equation system.
...
6
5
4
2
1
SHR
x
z
y
x
x
x
x
z
z
y
y
x
x
IH
IH
III
TT
IH
II
TT
IH
II
TT
IH
III
I
4
3
3
2
Truths and myths I
• Thermodynamics will play an increasingly important role in e.g. model predictive control and fluid dynamics.
• Monolithic thermodynamic software has no future (ASPEN, FACT, etc.)
• The future lies in distributed & modular software communicating through open protocols (e.g. XML).
Truths and myths II
• There will be increased focus on complex systems like acetic acid + HC, urea, formaldehyde, electrolytes, etc.
• Statistical mechanics models will replace old work-horses like SRK, PR, etc.
• The newer models will be incredibly complex compared to the old ones.
Truths and myths III
• Physicists master field theory (e.g. Maxwell’s equations).
• Mechanical engineers master turbulence theory (e.g. combustion).
• Chemical engineers master multi-component phase theory (e.g. VLLE) => if we don’t succeed in this respect we will be extinct in <10 years.
Challenges for the classroom
• Physical chemistry.
• Statistical mechanics.
• Multi-component phase theory.
• Numerical mathematics.
• Programming.
• Measurements.
Challenges for the future
• Phase modeling (reliable & flexible model, predictable cost, fast delivery).
• Distributed & modular programming (no waste of time writing & maintaining proprietary program interfaces).
• Thermodynamics made easy (high level modeling based on physical insight without numerical fuss).
Things I have not mentioned
• TABBE = den Termodynamiske ArBeidsBokEn.
• Matlab exercises for SIK2005, SIK2010, SIK2015, SIK2025, SIK3035.
• Sublattice NRTL:
mKp
pG
pT
cp
lnexp
1
T
mT
m
mT
mm
TEs
b
cb
GN