thermodynamic r&e. rational thermodynamics identify the canonical variables of the model. in...

21
Thermodynamic R&E V o lke r S ie p m a n n (d r.ing .) F lo w sh e e t m odul A u to m a tic d iffe ren tiation M atrix-library G e ir A rn e E vje n (dr.in g.) P h a se d ia g ra m m odul S cie n tific u n it m odul Therm o -se rve r 5 th . ye a r S tudents P ro g ra m m in g languages C o m p u te r a ssiste d algebra T 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 na lysis S o lid sta te m ixtu res R a tio n a l th erm odynam ics P ro je ct fo cus C o m p u te r-a id e d the rm odynam ics

Upload: geoffrey-marshall

Post on 19-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

Page 2: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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 :

Page 3: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

:

:

:

:

,

Page 4: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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 *

Page 5: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

Page 6: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

Rational Thermodynamics

• An equivalent calculation graph is:

igAT1

eosA

,,

1

Tn

n

+

* *

*

Page 7: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

Rational Thermodynamics

• The object is stored in an “onion-structure”:

1

TnT

1

igAeosA

n

Page 8: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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) ) ) )

Page 9: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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.

Page 10: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

Page 11: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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.

Page 12: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

Flowsheet calculations

• Example: Propane-butane splitter with multiple coordinate specifications.

TPH H

Page 13: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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.

Page 14: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

Page 15: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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

Page 16: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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).

Page 17: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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.

Page 18: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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.

Page 19: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

Challenges for the classroom

• Physical chemistry.

• Statistical mechanics.

• Multi-component phase theory.

• Numerical mathematics.

• Programming.

• Measurements.

Page 20: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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).

Page 21: Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which

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