Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
0RGHOOLQJ7KHUPRG\QDPLF6\VWHPVZLWK&KDQJLQJ*DV0L[WXUHV Eilif Pedersen The Norwegian University of Science and Technology Faculty of Marine Technology N-7034 TRONDHEIM, Norway E-mail: [email protected] .(<:25'6 Modeling, Bond Graph, Thermodynamics, Gas Mixtures $%675$&7 Modelling complex thermofluid processes often require models capable of handling working media that are changing its composition due to introduction of new constituents into the volume of interest. Mixing different constituents also changes the thermodynamic properties of the mixture which must be included in the models. This paper presents an extension to the classical pseudo bond graph concept. The extensions introduced extend the ability of the pseudo bond graphs concept to also include mixtures. The proposed extension is pictured after the classical pseudo bond graph representation and preserves this representation only by adding the required features. The proposed extension is illustrated by modelling a gas mixing experimental rig using the basic component models developed. ,1752'8&7,21 Thermofluid processes are found in most engineering systems and the number of applications has been increasing where a thorough analysis of both the steady-state and dynamic behavior of a system is of vital interest . The rapid development of computer power has also made it possible to analyze real problems with a reasonable use of resources. The result is that there nowadays exists computer programs for almost any analysis of interest to the engineer. However, often the required flexibility necessary to analyze a specific problem is not available using a specific tool. It is therefore, mandatory to be able to develop new or modified models and to integrate them easily into a total model. A modelling technique which answers most of the requirements put forward by modelers is bond graphs. The technique have since its invention by H. M. Paynter proved itself within different applications such as in mechanical, electric and hydraulic systems. Within thermofluid systems the research and applications has been more scarce. Despite the fact that the research on bond graph representation and applications to thermofluid systems is somewhat limited, some important contributions deserve to be mentioned. One of the first researchers to model thermodynamic systems by the way of bond graphs was Thoma [1]. He proposed to use temperature as the effort variable and entropy flow as the flow variable, a natural choice since their product gives power just as true bond graphs. Later Thoma extended this to systems with variable mass [2]. Although this approach has many advantages especially when systems of different energy domains are present, thermodynamic relations are complex and entropy flow and accumulation is not very well understood by engineers. Other suggestions for modelling thermofluid systems is given by Brown [3]. He proposes to include a convection bond for the flow of a pure substance with two effort variables, stagnation enthalpy and stagnation pressure, and one flow variable, mass flow. His motivation for introducing this additional convection bond is that two variables, as in true bond graphs, is not sufficient to define the thermodynamic state of the fluid. The result of this new representation is a notation that differs significantly from conventional bond graphs and are not easily incorporated into most bond graph modelling environments. Yet another contribution is given by Shoureshi [4]. He proposes a bond graph notation for modelling two-phase variable density systems using the same effort and flow variables as Thoma. The result of the choice of variables is a very complicated bond graph with several signal bonds, modulated transformers and gyrators. In addition to a complex bond graph the choice of variables led to additional complications computing the state of the fluid from known thermodynamic tables. He solved his problem by developing a computer program which transformed the known thermodynamic tables to comply to his selection of state variables in the bond graph. The work involved in developing such transformations are in general not straight forward. It would be nice if the selection of state variables were such that thermodynamic property tables or software packages could be used directly as they are published. However, such a choice would lead to selections of effort and flow variables that do not multiply to yield power as required for true bond graphs. This selection of variables have although been suggested by Karnopp [5] in his concept called: pseudo bond graphs. The effort and flow variables he proposes are: at the end using the basic models developed to simulated a gas mixing experimental setup. 02'(//,1* Modelling a gas tank as shown in Fig. 2a, which in general can be looked upon as a compressible fluid accumulator, using the pseudo bond concept is shown in Fig. V m· in h in • Efforts: temperature pressure T p h out (a) · Q • Flows: m· · E · Q · V mass flow rate & total energy flow rate p m· · T E heat energy flow rate p m· in rate of change of volume • State variables: mass m total energy E p m· T · E % Figure 1. Energy exchange between system A and B. Pseudo bond graph representation. Despite the fact that pseudo bond graphs do not comply with true bond graphs, they have been applied in a number of engineering systems. Examples of use are in modelling of complete diesel engine systems by Engja [6], Granda [7] and Pedersen [8], one-dimensional compressible fluid flow by Strand [9], building simulation by Thoma [10] et.al. and two-phase systems by Moksnes [11]. Looking at the list of applications mentioned, a natural next step would be to extend the technique to include systems where the working medium is a mixture of different constituents, and where the composition is changing. The next sections of this paper introduces the classical pseudo bond graph concept and describes the extensions developed to handle mixtures. An example are included p m· out T · E in (b) Following his proposition, the exchange of energy between two systems can be represented schematically as shown in Fig. 1, using a double bond representation. $ · m out p, T T · E out · Q 6I Figure 2. Accumulator, (a) sketch, (b) pseudo bond graph 2b. The pseudo bond graph consists of a 0-junction structure representing the continuity of mass and energy, the two state variables selected, and a C-field giving the relations between the displacements and the efforts. The fixed causality caused by the selection of variables on the bonds in the pseudo bond graph concept, is shown on the bond graph. This fixed causality is one of the prices we have to pay for the selection of variables. The constitutive laws of the C-field is given by p = Φ p ( m, E, V ) T = Φ T ( m, E, V ) (1) where m and E are the state variables mass and energy and V is the volume of the accumulator. For a perfect gas the relations can be deduced from the thermodynamic equation of state and the relation between the temperature and internal energy, E = mc v T . 1E T = ---- ---cv m RE mRT p = ------------ = ---- --cv V V (2) For situations where the gas can be said to follow an ideal gas law, i.e. to follow the ideal equation of state and where the specific internal energy is a function of temperature only, the solution of Eq. 2 involves an iterative solution. For the ideal gas assumption the equations are easily solvable by iteration due to its monotone properties. Also for real gas assumptions the states p and T can be found from Eq. 2 although the iterative solution in such cases requires more computer power. 0RGHOOLQJZLWKPL[WXUHV The number of independent intensive variables F necessary to calculate the thermodynamic state of a fluid in equilibrium is given by the Gibbs phase rule [12] as F = n+2–r (6) i=1 In Fig. 3a a gas mixture accumulator is shown with an inflow and outflow ports. The mixture entering the accumulator at the inflow port is given as a function of time, producing changes in the composition of the mixture in the accumulator. The energy entering or leaving the accumulator through the ports is given by N m i · E = m· h = m· ∑ ----- h i m (7) i=1 where the mass fractions and enthalpies used are calculated based on upstream parameter values. The number of independent thermodynamic variables necessary to specify the state of a gas consisting of N constituents is N+1. The extended pseudo bond graph of the (3) V m· 1, in …m· N, in m· 1, out …m· N, out p, T c 1 …c N h in (a) h out · Q & p m· · 2 p N m· p2 m N ... p N, out m· N, ou t T in · Ein .... p m· ou t p 2, out m· 2, o ut . p N, in m· N, in · TE ... p m· in p 2, in m· 2, in .... where n is the smallest number of variables necessary to describe the composition of the mixture at equilibrium conditions and r is the number of phases present in the volume of interest. In addition one extensive variable must be available to calculate the amount of matter in the control volume. For a gas mixture consisting of two constituents the number of intensive variables necessary to calculate the state of the mixture is : F = 2 + 2 – 1 = 3 . Specifying the volume adds the fourth extensive variable. In modelling the gas accumulator using the pseudo bond graph concept as described above, we have available two state variables for calculation of the thermodynamic state of the fluid. This is not enough for a mixture, and a third state variable has to be introduced. The equation of state for a mixture of ideal gases is given by pV = mRT N m i E = mu = m ∑ ----- u i m T out · Eou t (4) where the gas constant R for the mixture is calculated (b) by · Q 6I N R = ∑ m -----i R i m (5) i=1 m where Ri and -----i are the gas constant and mass fracm tion of the individual constituents of the mixture. N is the number of constituents of the mixture. The relation for the total internal energy, E , of the mixture can be expressed in i similar way by neglecting some minor important energy contributions like kinetic and potential energy together with chemical potential. Figure 3. Gas mixture accumulator, (a) sketch and (b) pseudo bond graph. gas mixture accumulator is shown in Fig 3b using N+1 pseudo bonds. The new pseudo bond graph for mixtures are closely related to the version proposed by Karnopp [5]. The effort and flow variables proposed for the extended pseudo bond graph are: • Efforts ( e ): 10 for calculation of the temperature, pressure partial pressure of constituent 2 p p2 … … E T = ---------------------------------N m i m ∑ ----- u i ( T ) m pN partial pressure of constituent N T temperature i=1 but with an explicit evaluation of the total and partial pressures as given by the last two equations in Eq. 9. Assuming real gases not obeying the ideal gas law assumption the constitutive laws for the C-field given in Eq. 8 are still valid. With the use of available thermodynamic property libraries the solution of Eq. 8 is possible in a general way, but still is costly and in most cases an overkill. • Flows ( f ): m· total mass flow rate m· 2 mass flow rate of constituent 2 … … m· N · E mass flow rate of constituent N total energy flow rate • State variables (displacements) ( q ): m m2 total mass total mass of constituent 2 … … mN total mass of constituent N E total energy and the constitutive laws for the C-field are now expressed as: p = Φ p ( m, m 2 …m N, E, V ) p i = Φ ( m, m 2 …m N, E, V ) (10) i = 1…N (8) T = Φ T ( m, m 2 …m N, E, V ) $GGLWLRQDOHOHPHQWV An important and fundamental element in fluid flow is the pipe junction or restrictor. In bond graph notation this can be represented by a R-field with continuity conditions on the flow variables mass and energy. For gas flow the restrictor can be modeled as an ideal nozzle where the mass flow depends not only on the pressure difference, but also on the pressure ratio. Extending the model to handle mixtures is straight forward following the same ideas as for the accumulator described above. In Fig. 4 the extended pseudo bond graph for the ideal nozzle is shown for the case where the number of constituents present is 2. The effort and flow variables on the left and right hand side of the R-field are named with subscripts a and b .The bond graph indicates appropriate causality required by the law-set for the R-field. which for a perfect gas assumption gives: pa m· E T = ----------------------------N m i m ∑ ----- c v, i m 2 i=1 N m T i p = m ∑ ----- R i --m V i = 1 p 2a m· (9) ni mi N mi 1 p i = ---- p = ----- ∑ ----- ------ p n m m M i i = 1 The selection of the partial pressure as an additional effort variable is only one of several possible choices. Any variable fixing the mixture composition is possible, and another option is to use the mass fraction of the i -th constituent directly. For an ideal gas law assumption, i.e. when c v , c p are functions of temperature only, the constitutive laws for the C-field in general requires an iterative solution of Eq. Ta · E R pb m· p2 b m· 2 Tb · E Figure 4. Pseudo bond graph model of gas flow restructure or nozzle for mixtures. The constitutive laws for the R-field assuming ideal gas conditions is given by pu m· a = m· b = Cd A ---------------- ψ ( π u )sign ( p a – p b ) RuTu m· 2a = m· 2b = m· c 2u · E·a = E b = m· h ( p u, p 2u, T u ) p 2u M 2u , c 2u = -------- --------p u M u (11) 2 p M i i , h= ∑ ---- ------ h i ( T ) pM i=1 where 2 κ ------------ κ + 1 = κ+1 -----------κ–1 1 --2 1 --2 2 , 1 ≥ π ≥ ------------ κ+1 κ -----------κ–1 the thermodynamic properties necessary are [12].: Properties [KC/kg] R [KC/Kg] cv κ ------------ 2 κ–1 , π ≤ ------------ κ + 1 and where π = p d ⁄ p u , and all the thermodynamic variables including κ , c p , h , R and M are calculated based on the conditions on the upstream side of the nozzle. For real gases this set of equations can be replaced with real gas thermodynamic calculations. The initial conditions in the mixing chamber is 1 bar C :B2 C :B1 2 3 C :MC A1 4 5 6 13 7 8 9 R 16 17 12 18 Mixing valves 25 26 27 22 23 24 A2 15 11 19 R 20 21 28 Methane bottle B1 14 10 29 Air bottle Methane 518.35 1735.4 The total pressure and temperature in the bottles are initially between 100 and 300 bar and 300 K. The partial pressure p 2 in the air and methane bottles is 0 and 300 bars respectively. 1 02'(//,1*$6,03/(*$60,;(5 A simplified gas mixer found in a combustion experimental rig for testing combustion properties of various natural gases is shown in Fig 5. The two bottles contain methane and air, delivered through non-return valves to a mixing chamber. The resulting gas composition are leaving the mixing chamber through an exit valve. The mix- Air 287.0 716.5 30 31 R B2 32 S f κ+1 2 -------------- 2κ κ - ⋅ π – π κ ψ ( π ) = ----------κ–1 A3 33 34 Se :atm Mixing chamber:MC Exit valve Figure 6. Complete pseudo bond graph model for the simple gas mixer. Figure 5. Gas mixing system ture which is produced is observed to be dependent on the pressure in the bottles. For combustion purposes a fixed composition is required. To better understand the process and to develop a control system which will ensure a fixed mixture, a model was build based on the basic elements developed earlier. The pseudo bond graph for the system in Fig. 5 is shown in Fig. 6. The bottles and the mixing chamber are modeled using the accumulator developed and the valves at the mixing chamber inlet and outlet are modeled using the ideal nozzle model developed. The opening area of the mixing valves are 0.785 10-4 m2. The area of the exit valve of the mixing chamber is 1.0 10-4 m2. In this example no heat loss from the bottles or from the mixing chamber is assumed. The nozzle flow coefficient for all the valves are set to unity. Using a perfect gas assumption for the working media and 300 K, completely filled with air, i.e. the partial pressure p 2 is 0. The volume of the air bottle is 2 m3 and the volume of the methane bottle is 0.5 m3. 0RGHOHTXDWLRQV Deriving the model equations from the bond graph in Fig 6 is shown next, although this is a process which efficiently can be given to computer programs like MS1 [13] or 20Sim [15]. Here we only give an outline of the equation generation process utilizing standard bond graph techniques. The state variables of the model are the displacements q 1 , q 2 , q 3 , q 13 , q 14 , q 15 , q 25 , q 26 and q 27 , or m B1 , m 2, B1 , EB1 , m MC , m 2, MC , E MC , m B2 , m 2, B1 and EB2 as named in the text above. Using the constitutive laws for the mixing chamber or C-field MC, the efforts of each bond can be evaluated using (12) where the methane bottle initially is at 100 bar. The molar fraction of methane in the gas leaving the mixing chamber is also shown in the same figure. The results show that Pressure B1 Pressure B2 Pressure MC Pressure [Pa] 107 where PCT is a function returning the efforts on each power bond of the C-field, i.e. the pressure, the partial pressure of methane and the temperature, and Y is a vector identifying the constituents of the mixture. Repeating the use of the PCT-function on C-field B1 and B2 gives the efforts e 1 , e 2 , e 3 , e 25 , e 26 and e 27 . The effort source Se sets the total pressure, the partial pressure of methane and temperature using atmospheric conditions. Using the information present in the bond graph all efforts can now be assigned. The state equations for the mixing chamber are: Mass fraction CH4. in mixing chamber Molar fraction CH4 [-] e 13 e 14 = PCT ( q 13, q 14, q 15, V, Y ) e 15 Time [s] · q 13 = f13 = f 10 + f 16 – f 29 · q 14 = f14 = f 11 + f 17 – f 30 · q 15 = f15 = f 12 + f 18 – f 31 – f 28 Figure 7. Pressure in the bottles and mixing chamber, and mass fraction of methane leaving the mixing chamber for an initial pressure of bottle B2 of 100 bar. (13) and the flows of each bond is calculated using f10 f11 f12 = Nozzle A1 ( e 7, e 10, e 8, e 11, e 9, e 12, A, C d, Y ) the lowered total pressure of the methane bottle results in a cut-off period where pure air is delivered and no ignition of the mixture delivered will be possible. In Fig. 8 the simulated molar fraction of methane leav0.6 f17 f18 f29 f30 = Nozzle A3 ( e 29, e 32, e 30, e 33, e 31, e 34, A, C d, Y ) f31 where Nozzle A1 , A2 and A3 is a function implementing Eq. 12 returning the total mass flow, the 2nd constituent mass flow and the total energy flow. Writing the state equations for the bottles B1 and B2 similar to Eq. 14 closes the equation writing process. 5HVXOWV The model is implemented and simulated using the modeling and simulation tools MS1 [13] and ACSL [14]. Fig. 7 shows the simulated pressures in the bottles and in the mixing chamber as a function of time for the case Pressure : 100 bar InitialPressure pressure : 200300 bar bar : 300200 bar bar InitialPressure pressure Initial pressure 100 bar 0.5 Molarfraction fraction [-]CH4 [-] Molar f16 = Nozzle A2 ( e 19, e 16, e 20, e 17, e 21, e 18, A, C d, Y ) 0.4 0.3 0.2 0.1 0 0 20 40 60 80 100 120 140 160 180 200 Time [s] Figure 8. Mixture composition in mixing chamber for methane bottle initial pressure of 100, 200 and 300 bar. ing the mixing chamber is shown as a function of time for initial pressure of the methane bottle of 100, 200 and 300 bars respectively. The mixture compositions dependence on the pressure in the bottles are clearly documented with the use of the model developed, and the methane cut-off period is captured for the low initial pressure case. &21&/86,216 The proposed extension of the pseudo bond graph concept for mixtures has several advantages.: • • • • The extension fits nicely into the pseudo bond graph concept and simply adds the required feature without changing the structure of bond graph. The extension can be generalized to any number of mixture components and both ideal and real gas thermodynamics. The selection of state variables, efforts and flows are such that thermodynamic property tables or computer libraries can be used directly. Although the proposed extension also inherits the disadvantages of the pseudo bond graph concept, the resemblance to traditionally used modelling approaches for thermofluid systems together with the advantages of the bond graph technique makes it a powerful tool for modelling such systems. The extended pseudo bond graph proposed for modeling thermofluid systems with changing fluid composition opens new applications for modeling using the powerful bond graph technique. c 1 …c N cv cp Cd E h m M n N p R T u| V · Q κ - - constitutive law of C-field returning pressure Φp ( ) - constitutive law of C-field returning partial pressure i ΦT ( ) - constitutive law of C-field returning temperature i 6XEDQGVXSHUVFULSWV a a, a b - effort, flow, variables or properties to the left or right side of the bond graph element. a1 - constituent number 1 of the gas mixture - effort, flow, variable or properties at the upstream/ downstream end of the flow, i.e. changes with flow direction a 2 …a N au , ad constituent number 2 ... N of the gas mixture a in, a out ai a· effort, flow, variable or properties at the inflow port of an element - effort, flow, variable or property i - rate of change of any variable a B1, a B2 - variables related to the bottles and mixing chamber 5()(5(1&(6 [1] Jean U. Thoma, (QWURS\DQGPDVVIORZIRUHQHUJ\FRQYHUVLRQJournal of the Franklin Institute, 299(2), p 89-96, February 1975. [2] Jean U. Thoma, 1HWZRUN WKHUPRG\QDPLFV ZLWK HQWURS\ VWULSSLQJ Journal of the Franklin Institute, 303(4), p 319-328, 1977. [3] F. T. Brown, &RQYHFWLRQ ERQGV DQG ERQG JUDSKV -RXUQDO RI WKH )UDQNOLQ,QVWLWXWHS [4] R. Shoureshi and K. McLaughlin, $SSOLFDWLRQ RI ERQG JUDSK WR Trans. ASMA., J. Dynamic Syst. Measure. Control, 107, p 241-245, December 1985. WKHUPRIOXLG SURFHVVHV DQG V\VWHPV [5] Dean C. Karnopp, 6WDWHYDULDEOHVDQGSVHXGRERQGJUDSKVIRUFRP SUHVVLEOH WKHUPRIOXLG V\VWHPV Transactions of ASME, Journal of Dynamic Systems, Measurement and Control, 101(3), Sept. 1979. 120(1&/$785( A Φp ( ) nozzle area [m2] [6] H. Engja and K. Strand, 0RGHOLQJIRUWUDQVLHQWSHUIRUPDQFHRIGLH VHOHQJLQHVXVLQJERQGJUDSKV In ISME, Tokyo, 1983. mass fraction of constituent 1…N - specific heat capacity at constant volume [ J ⁄ ( kgK ) ] - specific - nozzle flow coefficient - total energy of fluid ( = mu ) [ J ] - enthalpy [ J ⁄ ( kg ) ] - mass [ kg ] - molecular weight [ kg ⁄ kmol ] heat [ J ⁄ ( kgK ) ] capacity - number of kmol - number of constituents - pressure [ Pa ] - gas constant [ J ⁄ ( kgK ) ] - termperature [ K ] - internal energy [ J ⁄ ( kg ) ] - volume [ m ] at constant pressure 3 - heat flow [ J ⁄ s ] - ratio of specific heats c p ⁄ c v - thermodynamic function returning enthalpy given the pressure, temperature and composition of the mixture. [7] Jose J. Granda and G. R. Channel, 9,QWHUQDO&RPEXVWLRQ(QJLQH ERQGJUDSKPRGHO$'HWDLOHG0RGHOLQJ3URFHGXUHIn proc. of the ICBGM’97 conference, Editors J. J. Granda and G. Dauphin-Tanguy, Simulation Series, Volume 29, no. 1, 1997 [8] E. Pedersen and Ø. Bunes,0RGHOLQJDQG6LPXODWLRQRIWKH8OVWHLQ %HUJHQ %5 (QJLQH &RPSDULVRQ ZLWK PHDVXUHG GDWD MARINTEK Report MT222502, June 1998. [9] K. Strand and H. Engja, %RQG JUDSK LQWHUSUHWDWLRQ RI RQHGLPHQ VLRQDOIOXLGIORZ Journal of the Franklin Institute, 328(5/6), p 781793, 1991. [10] Jean Thoma et.al, %XLOGLQJ 6LPXODWLRQ ZLWK &RQYHFWLRQ DQG &RQ GXFWLRQ In ICBGM’97, Simulation Series Vol. 29, no. 1, SCS 97. [11] Paul Ove Moksnes,0RGHOLQJWZRSKDVHWKHUPRIOXLGV\VWHPVXVLQJ ERQGJUDSK Dr.ing thesis, Department of Marine Engineering, Norwegian University of Science and Technology. [12] R. E. Sonntag and G. J. Van Wylen, ,QWURGXFWLRQRW7KHUPRG\QDP LFV&ODVVLFDO6WDWLVWLFDOJoh Wiley & Sons, 3rd. edition, 1991. [13] Lorenz Simulation, SOCRAN Centre, Scientific Park, Avenue PreAily, B-4031, Liebe, Belgium [14] MGA Software, 200 Baker Avenue, Concord, MA. 01742, USA h( ) [15] 20Sim Reference Manual, Controllabs Products Inc., P.O.Box 217, 7500 AE Enshede, The Netherlands