190 likes | 327 Views
Research activities. 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.
E N D
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:
Rational Thermodynamics • There is now a bewildering number of symbols and indices:
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:
Rational Thermodynamics • The standard state contribution can be split into new (sub)contributions following the same rules:
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:
Rational Thermodynamics • Operator precedence: patch (*) > chain (+) • The equation of state VLE model can now be written: • Where the standard state is defined as:
Rational Thermodynamics • The operators are type safe:
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:
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
H P T H Rational Thermodynamics • Example: Propane-butane splitter with multiple coordinate specifications.
Rational Thermodynamics • Thermodynamic surface transformations => canonical (and aesthetically pleasing) equation system.