source: branches/newlanguage/eml/pressure_changers/turbine.mso @ 210

Last change on this file since 210 was 210, checked in by Argimiro Resende Secchi, 16 years ago

Remove convergence problems of some samples.

  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* Model of a Hidraulic Turbine
17*--------------------------------------------------------------------
18*
19*       - Assumptions
20*               * Steady State
21*               * Only Liquid
22*               * Adiabatic
23*               * Isentropic
24*
25*----------------------------------------------------------------------
26* Authors: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
27* $Id: turbine.mso 210 2007-03-15 12:52:28Z arge $
28*--------------------------------------------------------------------*#
29
30using "streams";
31using "pressure_changers/flux_machine_basic";
32
33Model Hidraulic_Turbine as flux_machine_basic
34
35        PARAMETERS
36outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
37outer PP                as Plugin                       (Brief = "External Physical Properties", Type="PP");
38        Mw(NComp)       as molweight            (Brief = "Molar Weight");
39       
40        VARIABLES
41        Eff     as efficiency           (Brief = "Pump efficiency");
42        Meff    as efficiency           (Brief = "Brake efficiency");
43        Beta    as positive             (Brief = "Volumetric expansivity", Unit = '1/K');
44        Head    as head                         (Brief = "Head Developed");
45        FPower  as power                        (Brief = "Fluid Power");
46        BPower  as power                        (Brief = "Brake Power");
47        EPower  as power                        (Brief = "Eletrical Potency");
48        Pdiff   as press_delta          (Brief = "Pressure Increase");
49        Pratio  as positive                     (Brief = "Pressure Ratio");     
50        Mwm     as molweight            (Brief = "Mixture Molar Weight");
51        rho             as dens_mass            (Brief = "Specific Mass");
52        Cp              as cp_mol                       (Brief = "Heat Capacity");
53       
54        SET
55        Mw = PP.MolecularWeight();     
56       
57        EQUATIONS
58        #Mixtures Properties
59        "Calculate Mwm for Inlet Mixture"
60        Mwm = sum(Mw*Inlet.z);
61
62        "Calculate rho using a External Physical Properties Routine"
63        rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
64       
65        "Calculate Outlet Vapour Fraction"
66        Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);
67       
68        "Calculate Cp Using a External Physical Properties Routine"
69        Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z);
70       
71        #Mass and Energy Balance and Turbine Equations
72        "Calculate Outlet Stream Pressure"
73        Outlet.P = Inlet.P + Pdiff;
74       
75        "Pratio Definition"
76        Outlet.P = Inlet.P * Pratio;
77       
78        "Calculate Fluid Power"
79        FPower * rho = Pdiff * Inlet.F * Mwm;
80       
81        "Calculate Brake Power"
82        BPower = FPower * Eff;
83       
84        "Calculate Eletric Power"
85        EPower = BPower * Meff;
86       
87        "Calculate Outlet Temperature"
88        (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho
89        -  Pdiff * Mwm * (1-Beta*Inlet.T);
90       
91        "Calculate Outlet Enthalpy"
92        (Outlet.h - Inlet.h) * rho =  Pdiff * Mwm;
93       
94        "Molar Balance"
95        Outlet.F = Inlet.F;
96       
97        "Calculate Outlet Composition"
98        Outlet.z = Inlet.z;
99
100        "Calculate Head"
101        Head * rho = Pdiff;
102end
Note: See TracBrowser for help on using the repository browser.