source: trunk/eml/pressure_changers/turbine.mso @ 345

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

Set icons positions for most devices.

  • Property svn:keywords set to Id
File size: 3.4 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* Authors: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
17* $Id: turbine.mso 325 2007-07-29 00:41:04Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model Hidraulic_Turbine
23        ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/HidraulicTurbine";
26        Brief           = "Model of a Hidraulic Turbine.";
27        Info            =
28        "Assumptions:
29         * Steady State;
30         * Only Liquid;
31         * Adiabatic;
32         * Isentropic.
33       
34        Specify:
35         * the inlet stream;
36         * the Pressure Increase (Pdiff) OR the outlet pressure (Outlet.P);
37         * the Turbine efficiency (Eff);
38         * the Brake efficiency (Meff);
39         * the Volumetric expansivity (Beta).
40        ";
41       
42        PARAMETERS
43outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
44outer PP                as Plugin                       (Brief = "External Physical Properties", Type="PP");
45        Mw(NComp)       as molweight            (Brief = "Molar Weight");
46       
47        VARIABLES
48        Eff     as efficiency           (Brief = "Turbine efficiency");
49        Meff    as efficiency           (Brief = "Brake efficiency");
50        Beta    as positive             (Brief = "Volumetric expansivity", Unit = '1/K');
51        Head    as head                         (Brief = "Head Developed");
52        FPower  as power                        (Brief = "Fluid Power");
53        BPower  as power                        (Brief = "Brake Power");
54        EPower  as power                        (Brief = "Eletrical Potency");
55        Pdiff   as press_delta          (Brief = "Pressure Increase");
56        Pratio  as positive                     (Brief = "Pressure Ratio");     
57        Mwm     as molweight            (Brief = "Mixture Molar Weight");
58        rho             as dens_mass            (Brief = "Specific Mass");
59        Cp              as cp_mol                       (Brief = "Heat Capacity");
60in      Inlet   as stream                       (Brief = "Inlet stream", PosX=0, PosY=0.5086);
61out     Outlet  as stream                       (Brief = "Outlet stream", PosX=1, PosY=0.5022);
62
63        SET
64        Mw = PP.MolecularWeight();     
65       
66        EQUATIONS
67        #Mixtures Properties
68        "Calculate Mwm for Inlet Mixture"
69        Mwm = sum(Mw*Inlet.z);
70
71        "Calculate rho using a External Physical Properties Routine"
72        rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
73       
74        "Calculate Outlet Vapour Fraction"
75        Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);
76       
77        "Calculate Cp Using a External Physical Properties Routine"
78        Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z);
79       
80        #Mass and Energy Balance and Turbine Equations
81        "Calculate Outlet Stream Pressure"
82        Outlet.P = Inlet.P + Pdiff;
83       
84        "Pratio Definition"
85        Outlet.P = Inlet.P * Pratio;
86       
87        "Calculate Fluid Power"
88        FPower * rho = Pdiff * Inlet.F * Mwm;
89       
90        "Calculate Brake Power"
91        BPower = FPower * Eff;
92       
93        "Calculate Eletric Power"
94        EPower = BPower * Meff;
95       
96        "Calculate Outlet Temperature"
97        (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho
98        -  Pdiff * Mwm * (1-Beta*Inlet.T);
99       
100        "Calculate Outlet Enthalpy"
101        (Outlet.h - Inlet.h) * rho =  Pdiff * Mwm;
102       
103        "Molar Balance"
104        Outlet.F = Inlet.F;
105       
106        "Calculate Outlet Composition"
107        Outlet.z = Inlet.z;
108
109        "Calculate Head"
110        Head = Outlet.h - Inlet.h;
111end
Note: See TracBrowser for help on using the repository browser.