source: mso/eml/pressure_changers/compressor.mso @ 57

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

Added new pressure_changers models

File size: 2.8 KB
Line 
1#*----------------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2002-2006  the author
6*-----------------------------------------------------------------------------
7* Author: Marcos L. Alencastro   Date:03/03/2006
8* $Id:$   Estefane da S. Horn
9*-----------------------------------------------------------------------------
10* -> Steady State
11* -> Only Vapour
12* -> Adiabatic
13*#
14
15using "streams";
16using "pressure_changers/flux_machine_basic";
17
18Model centrifugal_compressor as flux_machine_basic_TP
19       
20        PARAMETERS
21ext PP                  as CalcObject   (Brief = "External Physical Properties");
22ext NComp       as Integer              (Brief = "Number of chemical components", Lower = 1);
23        Effs            as positive     (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 1);
24        R                       as positive     (Default = 8.31451, Brief = "Constant of Gases", Unit= "kJ/kmol/K");
25        Mw(NComp)       as molweight    (Brief = "Molar Weight");
26       
27        VARIABLES
28        n                       as positive             (Brief = "Politropic Coefficient");
29        k                       as positive     (Brief = "Isentropic Coefficient");
30        Cp              as cp_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");
31        Cv                      as cv_mol               (Brief = "Heat Capacity", Unit = "kJ/(kmol*K)");       
32        Pdiff           as press_delta  (Brief = "Pressure Increase", Unit="kPa");
33        Pratio          as positive             (Brief = "Pressure Ratio");     
34        Wp                      as energy_mol   (Brief = "Politropic Head", Unit = "kJ/kmol");
35        Ws                      as energy_mol   (Brief = "Isentropic Head", Unit = "kJ/kmol");
36        Tiso            as temperature  (Brief = "Isentropic Temperature");
37        Effp            as positive     (Brief = "Politropic efficiency", Lower = 0, Upper = 1);
38        FPower          as power                (Brief = "Fluid Power", Unit="kW");
39        Mwm                     as molweight    (Brief = "Mixture Molar Weight");
40       
41        SET
42        Mw = PP.MolecularWeight();
43       
44        EQUATIONS
45       
46        "Calculate Mwm for Inlet Mixture"
47        Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
48
49        "Calculate Outlet Stream Pressure"
50        Outlet.P = Inlet.P + Pdiff;
51       
52        "Pratio Definition"
53        Outlet.P = Inlet.P * Pratio;
54       
55        "Calculate Cp Using a External Physical Properties Routine"
56        Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z);
57       
58        "Calculate Cv Using a External Physical Properties Routine"
59        Cv = PP.VapourCv(Inlet.T,Inlet.P,Inlet.z);
60       
61        "Calculate Isentropic Coeficient"
62        k = Cp/Cv;
63       
64        "Calculate Isentropic Head"
65        Ws = (k/(k-1))*R*Inlet.T*((Outlet.P/Inlet.P)^((k-1)/k) - 1);
66       
67        "Calculate Isentropic Outlet Temperature"
68        Tiso = Inlet.T * (Outlet.P/Inlet.P)^((k-1)/k);
69       
70        "Calculate Real Outlet Temperature"
71        Effs * (Outlet.T- Inlet.T) = (Tiso - Inlet.T);
72       
73        "Calculate Politropic Coefficient"
74        Outlet.T = Inlet.T * (Outlet.P/Inlet.P)^((n-1)/n);
75       
76        "Calculate Politropic Efficiency"
77        Effp = (n/(n-1))/(k/(k-1));
78       
79        "Calculate Politropic Head"
80        Ws*Effp = Wp*Effs;
81
82        "Calculate Fluid Power"
83        FPower*Effs = Inlet.F*Ws;
84       
85        "Molar Balance"
86        Outlet.F = Inlet.F;
87       
88        Outlet.z = Inlet.z;
89
90
91end
Note: See TracBrowser for help on using the repository browser.