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 212 2007-03-15 19:34:37Z rafael $ |
---|
26 | *--------------------------------------------------------------------*# |
---|
27 | |
---|
28 | using "pressure_changers/flux_machine_basic"; |
---|
29 | |
---|
30 | Model centrifugal_compressor as flux_machine_basic_PH |
---|
31 | |
---|
32 | PARAMETERS |
---|
33 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
34 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
35 | R as positive (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K'); |
---|
36 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
37 | |
---|
38 | VARIABLES |
---|
39 | n as positive (Brief = "Politropic Coefficient", Lower=0); |
---|
40 | k as positive (Brief = "Isentropic Coefficient", Lower=0); |
---|
41 | Cp as cp_mol (Brief = "Heat Capacity"); |
---|
42 | Cv as cv_mol (Brief = "Heat Capacity"); |
---|
43 | Pdiff as press_delta (Brief = "Pressure Increase", DisplayUnit='kPa'); |
---|
44 | Pratio as positive (Brief = "Pressure Ratio"); |
---|
45 | Wp as energy_mol (Brief = "Politropic Head"); |
---|
46 | Ws as energy_mol (Brief = "Isentropic Head"); |
---|
47 | Tiso as temperature (Brief = "Isentropic Temperature"); |
---|
48 | Effp as efficiency (Brief = "Politropic efficiency"); |
---|
49 | Effs as efficiency (Brief = "Isentropic efficiency"); |
---|
50 | FPower as power (Brief = "Fluid Power"); |
---|
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*Inlet.z); |
---|
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 * Cv = Cp; |
---|
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 | n*(ln(Outlet.T/Inlet.T)) = (n-1)*(ln(Outlet.P/Inlet.P)); |
---|
87 | |
---|
88 | "Calculate Politropic Efficiency" |
---|
89 | Effp * (n-1) * k = n * (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 | end |
---|