Conference 2008 Thermo Bond Lib A New Modelica
Conference 2008 Thermo. Bond. Lib – A New Modelica Library for Modeling Convective Flows François E. Cellier ETH Zürich, Switzerland Jürgen Greifeneder University of Kaiserslautern, Germany March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Properties of Bond Graphs • Bond graphs represent the power flowing through a physical system. • Since every physical system must observe the laws of energy conservation, all such systems can be represented topologically by means of the power flows between neighboring energy storages. • In most physical systems, power can be expressed as a product of two adjugate variables, an effort (e) and a flow (f). March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Properties of Bond Graphs II e f P=e·f e: Effort f: Flow Representation of a bond • Since a bond references two variables, we need two equations to evaluate them. • In all systems, the effort and flow variables are evaluated at opposite ends of the bond. • The side that evaluates the flow variable is often marked with a small vertical bar, the causality stroke. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Effort Generalized Momentum Flow e f Generalized Position p q Electrical Circuits Voltage u (V) Current i (A) Magnetic Flux (V·sec) Charge q (A·sec) Translational Systems Force F (N) Velocity v (m / sec) Momentum M (N·sec) Position x (m) Rotational Systems Torque T (N·m) Angular Velocity (rad / sec) Torsion T (N·m·sec) Angle (rad) Hydraulic Systems Pressure p (N / m 2) Volume Flow q (m 3 / sec) Pressure Momentum Γ (N·sec / m 2) Volume V (m 3) Chemical Systems Chem. Potential (J / mol) Molar Flow (mol/sec) - Number of Moles n (mol) Thermodynamic Systems Entropy Flow S’ (W / K) - Entropy S (J / K ) March 3, 2008 Temperature T (K) © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Example: Bond Graph of Electrical Circuit v 0 i. L v 1 i. L i 0 i. L v 2 i 1 i 2 u. L v 1 i. L i. C v 1 i 0 U 0 u 2 v 1 v 2 i 1 i. C v 2 i. C i 2 v 0 i 2 v 2 u. C i 0 v 0 March 3, 2008 u 1 i 0 © Prof. Dr. François E. Cellier i. C v 0 Start Presentation
Conference 2008 Example: Bond Graph of Electrical Circuit II i. L v 0 i. L v 1 i. L u. L v 1 i 1 U 0 v 1 i 0 u 1 i 1 u 2 v 2 i 1 i. C v 2 i. C v 0 i 2 u. C i 0 v 0 = 0 March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Example: Bond Graph of Electrical Circuit III u. L U 0 March 3, 2008 i. L u 1 i 1 v 2 u 2 i 1 i 2 i 0 © Prof. Dr. François E. Cellier i. C u. C Start Presentation
Conference 2008 R 1. e R 1. f U 0. e L 1. f Example: Bond Graph of Electrical Circuit IV March 3, 2008 C 1. e R 1. f C 1. e R 2. f C 1. e C 1. f U 0. e U 0. f U 0. e R 1. f © Prof. Dr. François E. Cellier U 0. e = f(t) U 0. f = L 1. f + R 1. f d. L 1. f /dt = U 0. e / L 1 R 1. e = U 0. e – C 1. e R 1. f = R 1. e / R 1 C 1. f = R 1. f – R 2. f d. C 1. e /dt = C 1. f / C 1 R 2. f = C 1. e / R 2 Start Presentation
Conference 2008 Convective Flows • When mass moves macroscopically from one place to another, it always carries its volume and its heat along. These are inseparably properties of the material representing the mass. • Consequently, a single bond no longer suffices to describe convective flows. • Each convective flow is described by two independent variables, e. g. temperature and pressure, or temperature and volume, and therefore, we require at least two parallel bonds. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Convective Flows II • Since the internal energy of material has three components: U=T·S - p·V+ g·M . . U=T·S - p·V+ g·M • we chose to represent the convective flow by three parallel bonds. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Convective Flows III March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Thermo-bond Connectors } } efforts, e flows, f } generalized positions, q directional variable, d indicator variable March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Heat Dissipation Wrapper models March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Heat Dissipation II March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Volume Work March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Capacitive Fields Linear capacitive field: der(e) = inv(C) · f By integration: der(q) = f e = inv(C) · q Nonlinear capacitive field: der(q) = f e = e(q) March 3, 2008 } e = e(q) der(q) = f { © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Capacitive Fields II Equation of state Caloric equation of state Gibbs energy of formation March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Capacitive Fields III p = T·R·M/V p·V = T·R·M T = T 0·exp((s–s 0 - R·(ln(v)-ln(v 0 )))/cv) T/T 0 = exp((s–s 0 - R·(ln(v/v 0 )))/cv) ln(T/T 0 ) = (s–s 0 - R·ln(v/v 0 ))/cv cv·ln(T/T 0 ) = s–s 0 - R·ln(v/v 0 ) March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Capacitive Fields IV g = T·(cp – s) h = cp·T g = h - T·s for ideal gases March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Pressure Cooker SE: 393 K PVE HE (t) Water Air HE C/E HE PVE HE Steam PVE March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Pressure Cooker II SE: HE (t) HE 393 K PVE HE (t) Air HE Air in boundary layer HE (t) RF: Dp HE Water HE PVE C/E HE PVE SE: 293 K HE HE Steam C/E PVE HE HE (t) March 3, 2008 RF: Dp HE (t) Steam in boundary layer © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation of Pressure Cooker • We are now ready to compile and simulate the model. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation Results March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation Results II Heating is sufficiently slow that the temperature values of the different media are essentially indistinguishable. The heat exchangers have a smaller time constant than the heating. During the cooling phase, the picture is very different. When cold water is poured over the pressure cooker, air and steam in the small boundary layer cool down almost instantly. Air and steam in the bulk cool down more slowly, and the liquid water cools down last. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation Results III The pressure values are essentially indistinguishable throughout the simulation. During the heating phase, the pressures rise first due to rising temperature. After about 150 seconds, the liquid water begins to boil, after which the pressure rises faster, because more steam is produced (water vapor occupies more space at the same temperature than liquid water). The difference between boundary layer and bulk pressure values in the cooling phase is a numerical artifact. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation Results IV The relative humidity decreases at first, because the saturation pressure rises with temperature, i. e. , more humidity can be stored at higher temperatures. As boiling begins, the humidity rises sharply, since additional vapor is produced. In the cooling phase, the humidity quickly goes into saturation, and stays there, because the only way to ever get out of saturation again would be by reheating the water. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Simulation Results V The mass fraction defines the percentage of water vapor contained in the air/steam mixture. Until the water begins to boil, the mass fraction is constant. It then rises rapidly until it reaches a new equilibrium, where evaporation and condensation balance out. During the cooling phase, the boundary layer cools down quickly, and can no longer hold the water vapor contained. Some falls out as water, whereas other steam gets pushed into the bulk, temporarily increasing the mass fraction there even further. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Air Balloon • We got a problem. Whereas the air balloon operates under conditions of constant pressure (isobaric conditions), the gas bottle operates under conditions of constant volume (isochoric conditions). • Our air model so far is an isobaric model. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Air Balloon II • We measure the volumetric flow leaving the gas bottle and generate a volumetric flow of equal size in the modulated flow source. The energy for that flow comes out of thermal domain (the gas bottle cools down. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Air Balloon III March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Air Balloon: Simulation Results March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Water Loop March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 The Water Loop: Simulation Results March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Conclusions • Modeling convective flows correctly using the bond graph approach to modeling, i. e. , taking into account volumetric flows, mass flows, and heat flows, requires a new class of bonds, called thermo-bonds. • A new bond graph library was introduced that operates on this new class of vector bonds. • At the top level, the user may frequently notice any “black” bonds or “black” component models. The entire model seems to be located at the higher, more abstract thermo-bond graph layer. • Yet internally, the “red” thermo-bond graphs are being resolved into the “black” regular bond graphs. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 Conclusions II • The new approach to dealing with mass flows offers a compact and fairly intuitive vehicle for describing convective flows in an object-oriented, physically correct manner. • Model wrapping techniques shall be introduced at a later time to offer a yet more intuitive user interface. • The capacitive fields describe the properties of fluids. As of now, the only fluids that have been described are air, water, and water vapor. • In the future, more capacitive fields shall be added to the library, e. g. for the description of different classes of industrial oils as well as different types of glycols. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 References I • Greifeneder, J. and F. E. Cellier (2001), “Modeling convective flows using bond graphs, ” Proc. ICBGM’ 01, Intl. Conference on Bond Graph Modeling and Simulation, Phoenix, Arizona, pp. 276 – 284. • Greifeneder, J. and F. E. Cellier (2001), “Modeling multiphase systems using bond graphs, ” Proc. ICBGM’ 01, Intl. Conference on Bond Graph Modeling and Simulation, Phoenix, Arizona, pp. 285 – 291. • Greifeneder, J. and F. E. Cellier (2001), “Modeling multielement systems using bond graphs, ” Proc. ESS’ 01, European Simulation Symposium, Marseille, France, pp. 758 – 766. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
Conference 2008 References II • Greifeneder, J. (2001), Modellierung thermodynamischer Phänomene mittels Bondgraphen, Diploma Project, Institut für Systemdynamik und Regelungstechnik, University of Stuttgart, Germany. • Cellier, F. E. and A. Nebot (2005), “The Modelica Bond Graph Library, ” Proc. 4 th Intl. Modelica Conference, Hamburg, Germany, Vol. 1, pp. 57 -65. • Zimmer, D. and F. E. Cellier (2006), “The Modelica Multibond Graph Library, ” Proc. 5 th Intl. Modelica Conference, Vienna, Austria, Vol. 2, pp. 559 -568. March 3, 2008 © Prof. Dr. François E. Cellier Start Presentation
- Slides: 38