1 Name, title of the presentation Canonical Thermodynamics & Modelling Tore Haug-Warberg Bjørn Tore Løvfall Olaf Trygve Berglihn Cybernetica 21 June 2006.

Slides:



Advertisements
Similar presentations
Opening new doors with Chemistry THINK SIMULATION! 24 th Conference October 23-24, 2007 ESP and the OLI Engine Updates Robert Young.
Advertisements

Example Project and Numerical Integration Computational Neuroscience 03 Lecture 11.
Enter. Looking for modelling software? Need ways to understand your process better? Looking for specialist to develop process.
Fixed point iterations and solution of non-linear functions

System Analysis through Bond Graph Modeling Robert McBride May 3, 2005.
Level set based Image Segmentation Hang Xiao Jan12, 2013.
Computational Modeling for Engineering MECN 6040
A Discrete Adjoint-Based Approach for Optimization Problems on 3D Unstructured Meshes Dimitri J. Mavriplis Department of Mechanical Engineering University.
However, some functions are defined implicitly. Some examples of implicit functions are: x 2 + y 2 = 25 x 3 + y 3 = 6xy.
Basic FEA Procedures Structural Mechanics Displacement-based Formulations.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2013 – 12269: Continuous Solution for Boundary Value Problems.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2014 – 35148: Continuous Solution for Boundary Value Problems.
Trellis: A Framework for Adaptive Numerical Analysis Based on Multiparadigm Programming in C++ Jean-Francois Remacle, Ottmar Klaas and Mark Shephard Scientific.
WinSim Inc. Advanced Engineering Software
Lecture 16 Symbolic Mathematics Symbolic mathematics: algebraezplotcalculus © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Development of Dynamic Models Illustrative Example: A Blending Process
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Gaussian Information Bottleneck Gal Chechik Amir Globerson, Naftali Tishby, Yair Weiss.
EE 685 presentation Optimization Flow Control, I: Basic Algorithm and Convergence By Steven Low and David Lapsley Asynchronous Distributed Algorithm Proof.
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Computer Aided Modeling Tool - ModDev Rafiqul Gani CAPEC Department of Chemical Engineering, Technical University of Denmark, DK-2800 Lyngby, Denmark.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Ordinary Differential Equations (ODEs)
1 Operation of heat pump cycles Jørgen Bauck Jensen & Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Technology.
THEORETICAL MODELS OF CHEMICAL PROCESSES
ME451 Kinematics and Dynamics of Machine Systems Review of Elements of Calculus – 2.5 Vel. and Acc. of a Point fixed in a Ref Frame – 2.6 Absolute vs.
Implementation of 2D FDTD
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Network Analysis - Introduction Transmission Planning Code Workshop 2 1 st May 2008.
COMPUTER AIDED MODELLING USING COMPUTER SCIENCE METHODS E. Németh 1,2, R. Lakner 2, K. M. Hangos 1,2, A. Leitold 3 1 Systems and Control Laboratory, Computer.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 19.
Scientific Computing Partial Differential Equations Poisson Equation.
Research activities. Rational Thermodynamics Physical chemistry is the ancestor of chemical engineering thermodynamics: => Lots of definitions inherited.
GraphLab: how I understood it with sample code Aapo Kyrola, Carnegie Mellon Univ. Oct 1, 2009.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Chapter 2 Mathematical Modeling of Chemical Processes Mathematical Model (Eykhoff, 1974) “a representation of the essential aspects of an existing system.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 26.
Common Set of Tools for Assimilation of Data COSTA Data Assimilation Summer School, Sibiu, 6 th August 2009 COSTA An Introduction Nils van Velzen
Module 4 Multi-Dimensional Steady State Heat Conduction.
© 2014 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 23.
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
Silesian University of Technology in Gliwice Inverse approach for identification of the shrinkage gap thermal resistance in continuous casting of metals.
EE 685 presentation Optimization Flow Control, I: Basic Algorithm and Convergence By Steven Low and David Lapsley.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
The Power Flow Problem Scott Norr For EE 4501 April, 2015.
Thermodynamic R&E. Rational Thermodynamics Identify the canonical variables of the model. In practice either or These are homogeneous functions which.
A Non-iterative Hyperbolic, First-order Conservation Law Approach to Divergence-free Solutions to Maxwell’s Equations Richard J. Thompson 1 and Trevor.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
1 CHEM-E7130 Process Modeling Exercise. 2 Exercises 1&2, 3&4 and 5&6 are related. Start with one of the packages and then continue to the others. You.
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #8 Roots of Equations: Systems of Equations.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
ERT 210/4 Process Control & Dynamics DYNAMIC BEHAVIOR OF PROCESSES :
© 2015 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 37.
Evaluation of a rate form of the equation of state L.H. Fick, P.G. Rousseau, C.G. du Toit North-West University Energy Postgraduate Conference 2013.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Searching a Linear Subspace Lecture VI. Deriving Subspaces There are several ways to derive the nullspace matrix (or kernel matrix). ◦ The methodology.
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
© 2016 Carl Lund, all rights reserved A First Course on Kinetics and Reaction Engineering Class 40.
The General Mole Balance & Ideal Reactors
Manipulator Dynamics 1 Instructor: Jacob Rosen
ECE 476 POWER SYSTEM ANALYSIS
Symbolic mathematics: algebra ezplot calculus
The Power Flow Problem Scott Norr For EE 4501 April, 2017.
LPSAT: A Unified Approach to RTL Satisfiability
Research activities.
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Presentation transcript:

1 Name, title of the presentation Canonical Thermodynamics & Modelling Tore Haug-Warberg Bjørn Tore Løvfall Olaf Trygve Berglihn Cybernetica 21 June 2006

2 Programme 1.Executive summary (THW) 2.Symbolic differentiation (BTL) 3.Thermodynamic algebra (THW) 4.Dynamic simulation (OTB) Name, title of the presentation

3 What is thermodynamic modelling? Thermodynamic modelling is about physical state models. In the current context only simple systems shall be considered. Thus, the models assume uniform states (no gradients), and they are insensitive to geometry, to external fields, and to the previous history. In practice f (x) can be G(T, p, n), A(T, V, n) or (T, V, µ ). Name, title of the presentation

4 When is it important? Thermodynamic modelling is important when there is a significant coupling between two or more of the system variables. This includes unit operations such as: Valves, compressors, expanders, reactors and separation units. Specialized units like hydraulic networks or heat exchanger networks are on the side-line of what we shall talk about. Name, title of the presentation

5 Why bother? If done awkwardly, thermodynamic calculations require a lot of man-power and occupy excess CPU-time. One of the most difficult questions to ask is about standard states. As soon as two or more engineers are playing around with different simulators the result is quite often a big mess. Controlling the thermodynamic calculations means better modularity, increased re-usability and reduced maintenance costs. Name, title of the presentation

6 Where does it fit in? Good question, and this is why we are here to listen to your problems. For many people in industry it is tempting to claim that ”the proof of the pudding lies in its eating”. However, we are talking about new technology and new thinking patterns here, and the biggest obstacle is maybe that people will not even taste the pudding because they do not recognize it as proper food. Name, title of the presentation

7 Thermodynamic formalism Name, title of the presentation

8 Newton-Raphson Name, title of the presentation

9 Newton-Lagrange-Euler Name, title of the presentation

10 Additional constraints Name, title of the presentation

11 Canonical block structure (reactive flash) Name, title of the presentation

12 Name, title of the presentation

13 Conclusions Canonical representation implies a highly structured equation system. Intensive and extensive variables are solved simultanously. The updated state is solved for explicitly. Equilibrium and balance equations are solved only once (linear functional) while iterating the transport equations many times. Name, title of the presentation

14 Symbolic differentiation Traditional coding requires that all functions derivatives are implemented by hand. By collecting the function in a computer graph symbolic operations are possible. The derivatives can then be calculated by automatic procedures and exported to e.g. C. Higher order (>2) derivatives are feasible. Name, title of the presentation

15 Declarations d1= Dim.new t= Variable.new(’T’) dg= Parameter.new(’deltag’, d1, d1) nrtl = Model.new(’nrtl’, t, n, r, dg, al) Name, title of the presentation

16 Modelling sumn = nrtl.expr(’sumn’, n).sum x = nrtl.expr(’x’, n,sumn[nil]){|q,w| q/w} etc. (5 more lines) dgex = nrtl.expr(’DeltaGex’,r[nil,nil],t[nil,nil], x[nil,d1],x[d1,nil], tmp3){|q,w,e,y,u| e*y*u*q*w}.sum Name, title of the presentation

17 Ruby vs Matlab tmp1 = nrtl.expr(’tmp1’,x[nil,d1], expG,x[d1,nil]){|q,w,e| q + w*e} The same code written in MATLAB is: tmp1 = repmat(x,1,3) + expg.*repmat(x’,3,1); Name, title of the presentation

18 [x11, x21][nil,d1], [[G11, G12], [G21, G22]], [x12, x22][d1,nil] [x11, x21][d1], [G11, G12], [x12][nil] [x11, x21][d1], [G21, G22], [x22][nil] [[ (x11, G11, x12), (x21, G12, x12)], [ (x11, G21, x22), (x21, G22, x22)]] Name, title of the presentation

19 Instantiation d1.init(3) r.init([8.314]) dg.init([[0, ,285.39], [ ,0, ], [754.56,11.362,0]]) al.init([[0, 0.2, 0.2],[0.2, 0, 0.2],[0.2, 0.2, 0]]) Name, title of the presentation

20 API Require ´rbct´ c,d = SRKmodule::init([0,0,1]) SRKmodule::set(d,SRKmodule::N,[4.3]) SRKmodule::set(d,SRKmodule::T,[298.15]) SRKmodule::set(d,SRKmodule::V,[5.0e-4]) SRKmodule::srk(c,d) Name, title of the presentation

21 Name, title of the presentation

22 Name, title of the presentation

23 Name, title of the presentation

24 Name, title of the presentation

25 Thermodynamic frameworks Thermodynamic process models consist of several sub-models (heat capacity, ideal gas, equation of state, etc.). Different frameworks are needed for metallurgy, oil & gas, polymers, etc. It would be great to represent all frameworks into one generic structure rather than programming several chains of explicit function calls. Name, title of the presentation

26 Text book example Name, title of the presentation

27 Ruby interface n = [’nitrogen’,’methane’,’ethane’, ’propane’,’n-butane’] A = Surface * Helmholtz * StandardState * [ MuTcp.extend(:poly3) * MuThs.fun(:h0) + MuThs.extend(:s0).mix(n)] + EquationOfState * [ ModTVNideal.extend(:idealgas).mix(n) ] + EquationOfState * [ ModTVN.extend(:srk).mix(n) ] Name, title of the presentation

28 Conclusions Thermodynamic frameworks can be captured in computer graphs using simple algebra. The graph acts as a wrapper and exports the entire model framework into C. Symbolic differentiation (gradients) is available to arbitrary order. Automatic documentation eliminates a common source of error. Name, title of the presentation

29 Dynamic simulation using YASIM One-step solver with steplength control. Newton-Lagrange-Euler formulation. Thermodynamic state-estimator Modularized, flexible interface. Aggregation of simple units into complex units. Export to simplified/linearlized models in Taylor- expansion manifold for process control analysis. Plug-flow and transport delay Name, title of the presentation

30 Canonical representation A full thermodynamic problem is always stated. Solve for both intensive and extensive variables. Additional constraints are implemented as lambda functions: Analytical inverse is possible for the thermo- dynamic coefficient matrix (at fixed topology). Name, title of the presentation

31 Dynamic 2-phase flash Name, title of the presentation

32 Name, title of the presentation

33 Simulation factory Node factory. Thermo surface import. Thermo model propagator (graph coloring algorithm). Species propagator (graph coloring algorithm). Node aggregator. Injects flowsheet constitutive equations (flow relations) and handles DOF- assignment. Name, title of the presentation

34 Name, title of the presentation

35 Executive conclusions Name, title of the presentation YASIM ≠ ASPEN (simulation vs design) DASIM = YASIM + PFR + CSTR

36 High priority development Name, title of the presentation Transport delay (PFR) Dynamic reactive flash (multiphase reactor) Stirred tank (CSTR) Electrolyte handling ATLAS-binding in Ruby Simulation API Automatic documentation