source: trunk/eml/pressure_changers/compressor.mso @ 351

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

Adding some symbols for latex.

  • Property svn:keywords set to Id
File size: 3.6 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* Author: Marcos L. Alencastro,  Estefane S. Horn
17* $Id: compressor.mso 351 2007-08-30 01:00:58Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model centrifugal_compressor
23        ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/CentrifugalCompressor";
26        Brief           = "Model of a centrifugal compressor.";
27        Info            =
28        "Assumptions:
29         * Steady State;
30         * Only Vapor;
31         * Adiabatic.
32       
33        Specify:
34         * the inlet stream;
35         * the outlet pressure (Outlet.P);
36         * the Isentropic efficiency (Effs).
37        ";
38       
39        PARAMETERS
40outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
41outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
42        R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K');
43        Mw(NComp)       as molweight    (Brief = "Molar Weight");
44
45        VARIABLES
46        n                       as positive             (Brief = "Politropic Coefficient", Lower=0);
47        k                       as positive     (Brief = "Isentropic Coefficient", Lower=0);
48        Cp              as cp_mol               (Brief = "Heat Capacity");
49        Cv                      as cv_mol               (Brief = "Heat Capacity");
50        Pdiff           as press_delta  (Brief = "Pressure Increase", DisplayUnit='kPa');
51        Pratio          as positive             (Brief = "Pressure Ratio");     
52        Wp                      as energy_mol   (Brief = "Politropic Head");
53        Ws                      as energy_mol   (Brief = "Isentropic Head");
54        Tiso            as temperature  (Brief = "Isentropic Temperature");
55        Effp            as positive     (Brief = "Politropic efficiency");
56        Effs            as efficiency   (Brief = "Isentropic efficiency");
57        FPower          as power                (Brief = "Fluid Power");
58        Mwm                     as molweight    (Brief = "Mixture Molar Weight");
59in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.5086, Symbol="_{in}");
60out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.5022, Symbol="_{out}");
61
62        SET
63        Mw = PP.MolecularWeight();
64       
65        EQUATIONS
66       
67        "Calculate Mwm for Inlet Mixture"
68        Mwm = sum(Mw*Inlet.z);
69
70        "Calculate Outlet Stream Pressure"
71        Outlet.P = Inlet.P + Pdiff;
72       
73        "Pratio Definition"
74        Outlet.P = Inlet.P * Pratio;
75       
76        "Calculate Cp Using a External Physical Properties Routine"
77        Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z);
78       
79        "Calculate Cv Using a External Physical Properties Routine"
80        Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z);
81       
82        "Calculate Isentropic Coeficient"
83        k * Cv = Cp;
84       
85        "Calculate Isentropic Head"
86        Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1);
87       
88        "Calculate Isentropic Outlet Temperature"
89#       Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k);
90        PP.VapourEntropy(Tiso, Outlet.P, Outlet.z) =
91                PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z);
92
93        "Calculate Real Outlet Temperature"
94        Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T);
95       
96        "Calculate Politropic Coefficient"
97        n*(ln(Outlet.T/Inlet.T)) = (n-1)*(ln(Outlet.P/Inlet.P));
98       
99        "Calculate Politropic Efficiency"
100        Effp * (n-1) * k = n * (k-1);
101       
102        "Calculate Politropic Head"
103        Ws*Effp = Wp*Effs;
104
105        "Calculate Fluid Power"
106        FPower*Effs = Inlet.F*Ws;
107       
108        "Molar Balance"
109        Outlet.F = Inlet.F;
110       
111        Outlet.z = Inlet.z;
112end
Note: See TracBrowser for help on using the repository browser.