400 likes | 427 Views
ThermoBondLib – A New Modelica Library for Modeling Convective Flows. Fran çois E. Cellier ETH Zürich, Switzerland. J ürgen Greifeneder University of Kaiserslautern, Germany. Bond graphs represent the power flowing through a physical system.
E N D
ThermoBondLib – A New Modelica Library for Modeling Convective Flows François E. Cellier ETH Zürich, Switzerland Jürgen Greifeneder University of Kaiserslautern, Germany
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). Properties of Bond Graphs
e: Effort f: Flow e P = e · f f Properties of Bond Graphs II 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.
v0 iL iL uL iL i1 v1 u1 u2 i2 v2 v2 v1 v0 i1 i1 i2 i2 v2 iC v1 i0 iC iL v2 U0 v1 uC i1 i0 i2 i0 v0 iC i0 v0 iC Example: Bond Graph of Electrical Circuit
iL v0 iL uL v1 u2 i2 iL u1 i1 v1 v2 v2 v0 i1 i1 i2 i2 v2 iC v1 i0 iC U0 uC i0 v0 iC v0 i0 v0 = 0 Example: Bond Graph of Electrical Circuit II
uL iL u1 i1 v1 v2 u2 i2 i1 i1 uC iC i0 U0 Example: Bond Graph of Electrical Circuit III
U0 .e = f(t) U0 .f = L1 .f + R1 .f dL1 .f /dt = U0 .e / L1 R1 .e = U0 .e –C1 .e U0.e R1.e R1 .f = R1 .e / R1 C1 .f = R1 .f –R2 .f C1.e C1.e U0.e dC1 .e /dt = C1 .f / C1 R2 .f = C1 .e / R2 C1.f R1.f R1.f R1.f L1.f U0.f R2.f C1.e U0.e Example: Bond Graph of Electrical Circuit IV
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. Convective Flows
Since the internal energy of material has three components: we chose to represent the convective flow by three parallel bonds. U = T · S - p · V + g · M U = T · S - p · V + g · M . . . . Convective Flows II
} efforts,e } flows,f } generalized positions,q directional variable,d indicator variable Thermo-bond Connectors
Wrapper models Heat Dissipation
Linear capacitive field: der(e) = inv(C)· f By integration: } der(q) = f der(q) = f e = inv(C)·q { Nonlinear capacitive field: e=e(q) der(q) = f e = e(q) Capacitive Fields
Equation of state Caloric equation of state Gibbs energy of formation Capacitive Fields II
Capacitive Fields III p = T·R·M/V p·V = T·R·M T = T0·exp((s–s0- R·(ln(v)-ln(v0 )))/cv) T/T0 = exp((s–s0- R·(ln(v/v0 )))/cv) ln(T/T0 ) = (s–s0- R·ln(v/v0 ))/cv cv·ln(T/T0 ) = s–s0- R·ln(v/v0 )
Capacitive Fields IV g = T·(cp – s) h = cp·T g = h - T·s for ideal gases
SE: 393 K PVE Air HE (t) HE HE PVE C/E Water HE Steam PVE The Pressure Cooker
Air in boundary layer HE SE: 393 K HE (t) Air RF: Dp PVE HE (t) HE (t) HE HE HE PVE Water SE: 293 K HE PVE C/E HE Steam HE RF: Dp C/E HE (t) HE PVE Steam in boundary layer HE (t) The Pressure Cooker II
We are now ready to compile and simulate the model. Simulation of Pressure Cooker
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.
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.
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.
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.
The Air Balloon • We got a problem. Whereas the air balloon operates under conditions of constant pressure (isobaric conditions), the gas bottle operates under con-ditions of constant volume (isochoric conditions). • Our air model so far is an isobaric model.
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 the thermal domain (the gas bottle cools down.
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 not 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. Conclusions
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. Conclusions II
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 multi-phase 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 multi-element systems using bond graphs,” Proc. ESS’01, European Simulation Symposium, Marseille, France, pp. 758 – 766. References I
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. 4th Intl. Modelica Conference, Hamburg, Germany, Vol.1, pp. 57-65. Zimmer, D. and F.E. Cellier (2006), “The Modelica Multi-bond Graph Library,” Proc. 5th Intl. Modelica Conference, Vienna, Austria, Vol.2, pp. 559-568. References II