source: branches/newlanguage/eml/pressure_changers/compressor.mso @ 147

Last change on this file since 147 was 77, checked in by Paula Bettio Staudt, 16 years ago

Added propset "Id" property and updated reactors files header

  • Property svn:keywords set to Id
File size: 3.3 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 centrifugal compressor
17*--------------------------------------------------------------------
18*       - Assumptions
19*               * Steady State
20*               * Only Vapour
21*               * Adiabatic
22*
23*----------------------------------------------------------------------
24* Author: Marcos L. Alencastro,  Estefane S. Horn
25* $Id: compressor.mso 77 2006-12-08 19:21:59Z paula $
26*--------------------------------------------------------------------*#
27
28using "pressure_changers/flux_machine_basic";
29
30Model centrifugal_compressor as flux_machine_basic_TP
31       
32        PARAMETERS
33ext PP                  as CalcObject   (Brief = "External Physical Properties");
34ext NComp       as Integer              (Brief = "Number of chemical components", Lower = 1);
35        Effs            as positive     (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 1);
36        R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= "kJ/kmol/K");
37        Mw(NComp)       as molweight    (Brief = "Molar Weight");
38       
39        VARIABLES
40        n                       as positive             (Brief = "Politropic Coefficient");
41        k                       as positive     (Brief = "Isentropic Coefficient");
42        Cp              as cp_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");
43        Cv                      as cv_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");       
44        Pdiff           as press_delta  (Brief = "Pressure Increase", Unit="kPa");
45        Pratio          as positive             (Brief = "Pressure Ratio");     
46        Wp                      as energy_mol   (Brief = "Politropic Head", Unit = "kJ/kmol");
47        Ws                      as energy_mol   (Brief = "Isentropic Head", Unit = "kJ/kmol");
48        Tiso            as temperature  (Brief = "Isentropic Temperature");
49        Effp            as positive     (Brief = "Politropic efficiency", Lower = 0, Upper = 1);
50        FPower          as power                (Brief = "Fluid Power", Unit="kW");
51        Mwm                     as molweight    (Brief = "Mixture Molar Weight");
52       
53        SET
54        Mw = PP.MolecularWeight();
55       
56        EQUATIONS
57       
58        "Calculate Mwm for Inlet Mixture"
59        Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
60
61        "Calculate Outlet Stream Pressure"
62        Outlet.P = Inlet.P + Pdiff;
63       
64        "Pratio Definition"
65        Outlet.P = Inlet.P * Pratio;
66       
67        "Calculate Cp Using a External Physical Properties Routine"
68        Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z);
69       
70        "Calculate Cv Using a External Physical Properties Routine"
71        Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z);
72       
73        "Calculate Isentropic Coeficient"
74        k = Cp/Cv;
75       
76        "Calculate Isentropic Head"
77        Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1);
78       
79        "Calculate Isentropic Outlet Temperature"
80        Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k);
81       
82        "Calculate Real Outlet Temperature"
83        Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T);
84       
85        "Calculate Politropic Coefficient"
86        Outlet.T = Inlet.T * (Outlet.P/Inlet.P)^((n-1)/n);
87       
88        "Calculate Politropic Efficiency"
89        Effp = (n/(n-1))/(k/(k-1));
90       
91        "Calculate Politropic Head"
92        Ws*Effp = Wp*Effs;
93
94        "Calculate Fluid Power"
95        FPower*Effs = Inlet.F*Ws;
96       
97        "Molar Balance"
98        Outlet.F = Inlet.F;
99       
100        Outlet.z = Inlet.z;
101
102
103end
Note: See TracBrowser for help on using the repository browser.