Rational Thermodynamics

quaggahooliganInternet and Web Development

Feb 5, 2013 (4 years and 6 months ago)

92 views

Research activities

Volker Siepmann (dr.ing.)
Flowsheet modul
Automatic differentiation
Matrix-library
Geir Arne Evjen (dr.ing.)
Phase diagram modul
Scientific unit modul
Thermo-server
Tore Haug-Warberg (assoc.prof.)
Exergy analysis
Solid state mixtures
Rational thermodynamics
Project focus
Computer-aided thermodynamics
Rational Thermodynamics


Physical chemistry is the ancestor of
chemical engineering thermodynamics:

=> Lots of definitions inherited from
laboratory work.

=> Theory is adequate for hand calculations,
but not for general computer programming.



Rational Thermodynamics


Let the following VLE condition serve as an
example:


Equation of state:


Activity coefficient model:


Unsymmetric reference:


i
i
i
x
K
y

v
i
l
i
i
K


/



P
P
i
i
v
i
i
i
i
i
v
P
P
K
*
*
*
*








P
P
i
i
i
v
i
i
i
i
i
dP
v
P
H
K
*




Rational Thermodynamics


There is now a bewildering number of
symbols and indices:







.
,
,
0
,
,
,
,
,
,
,
,
,
,
*
*
*
2
*
1
*
2
1
etc
x
x
x
x
p
T
x
x
x
p
T
n
i
i
i
i
n
i
v
i











Rational Thermodynamics


Complex notation! Model errors are likely
at two levels:

1) Inconsistencies made during the
implementation (semantic bugs).

2) Inconsistencies in the user interface
(syntactic bugs).



Rational Thermodynamics


In both cases errors will be hard to capture.
Typically, the presence of an expert
(programmer) will be required.


Conclusion: Thermodynamic modelling is
an old subject ready for a thorough face
-
lift.



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
,
,
P
T
G


n
,
,
V
T
A
ex
ig
G
G
G
G




:
Rational Thermodynamics


The standard state contribution can be split
into new (sub)contributions following the
same rules:














i
i
i
f
i
T
T
i
P
i
T
i
P
P
i
T
i
TP
i
TP
i
i
s
T
h
dT
c
dP
v
N
G
i
i











:
:
:
:
,






Rational Thermodynamics


Proposition: Only three algebraic operators
are needed for a general thermodynamic
framework!


1) The
chain

operator for doing things like:


2) The
patch

operator for defining sub
-
graphs:



G
G
id


TP
i
i
N

n
C
B
A
*

Rational Thermodynamics


Operator precedence:
patch
(*) >
chain
(+)


The equation of state VLE model can now
be written:


Where the standard state is defined as:



A
A
A
ig
eos
*








n
T
n
T
T
A






*
,
,
*
,
*
2
2
1
1

Rational Thermodynamics


The operators are type safe:








cmp
B
cmp
A
chainclass
B
class
A
B
A
.
.
.
.






























k
i
n
i
i
n
i
i
j
i
i
n
cmp
B
cmp
C
cmp
B
cmp
C
n
j
i
class
C
class
C
n
i
es
patchclass
B
class
C
C
C
C
B
,
1
,
1
,
1
2
1
.
.
.
.
,
,
2
,
1
,

.
.
,
,
2
,
1

.
.
,
,
,
*



Rational Thermodynamics


Note that a list operator has been
introduced to make the expression more
legible.


Similar, albeit more complex, expressions
can be written for Gibbs energy models.






,
Rational Thermodynamics


An equivalent calculation graph is:


ig
A
T
1

eos
A
,
,


1

T
n


n

+

*

*

*

Rational Thermodynamics

n =

[‘Nitrogen’,’Oxygen’,’Argon’]

G =

Surface.new(n) *



Gibbs.new(n) * (






Poynting.new(n) *







MuTP.new(n,:idealgas,’ig’) *








MuT_cp.new(n,:poly3,’ig’) *









MuT_hg.new(n,:hogo,’ig’) +







Residual.new(n) *







ModTPN.new(n,:srk,’gas’) +






Activity.new(n) *







ModTN_ideal.new(n,:molmix,’ig’))

Rational Thermodynamics


The thermodynamic object G is explicit in
(T,p,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’) *





G

Rational Thermodynamics


Use of operators => thermodynamic
frameworks can be broken down into small,
manageable, expressions.


Model description is not tied to any
particular implementation => easy to
export, exchange and update model info.


Export formats are Matlab, LaTeX, XML

Rational Thermodynamics


Example: Propane
-
butane splitter with
multiple coordinate specifications.


T

P

H

H

Rational Thermodynamics


Thermodynamic surface transformations =>
canonical (and aesthetically pleasing)
equation system.



.
.
.
6
5
4
2
1
S
H
R
x
z
y
x








































































































x
x
x
z
z
y
y
x
x
I
H
I
H
I
I
I
T
T
I
H
I
I
T
T
I
H
I
I
T
T
I
H
I
I
I
I
4
3
3
2