1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: pump_w.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: bomba |
---|
7 | *--------------------------------------------------------------------*# |
---|
8 | |
---|
9 | #*------------------------------------------------------------------- |
---|
10 | * |
---|
11 | * Versao 2.1 |
---|
12 | * Data: 03/2016 |
---|
13 | * Autor: Anderson R. A. Lino e Gabriel C. Fonseca |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | *Descricao: modelo da bomba para agua que sera empregado na biorrefinaria |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | |
---|
19 | *-------------------------------------------------------------------- |
---|
20 | *Notas: Foi feito o flowsheet teste para averiguar o modelo |
---|
21 | *As siglas R, L sao indicativos da posisao da corrente de saida |
---|
22 | *sendo R=right e L=legth. |
---|
23 | *--------------------------------------------------------------------*# |
---|
24 | |
---|
25 | using "water_stream"; |
---|
26 | using "energy_stream"; |
---|
27 | |
---|
28 | Model pump_wL |
---|
29 | |
---|
30 | ATTRIBUTES |
---|
31 | Pallete = true; |
---|
32 | Icon = "icon/WpumpL"; |
---|
33 | Brief = " Model of a Pump for Water"; |
---|
34 | Info = |
---|
35 | "== GENERAL == |
---|
36 | General model for a water pump. |
---|
37 | |
---|
38 | == ASSUMPTIONS == |
---|
39 | * Steady State: |
---|
40 | flow rate |
---|
41 | temperature |
---|
42 | pressure |
---|
43 | stream composition; |
---|
44 | * Only Liquid; |
---|
45 | * Adiabatic. |
---|
46 | |
---|
47 | == SPECIFY == |
---|
48 | * Inlet stream; |
---|
49 | * Outlet pressure or pressure increase; |
---|
50 | * Pump efficiency. |
---|
51 | |
---|
52 | == SET == |
---|
53 | * fluid density in the pump; |
---|
54 | * Specify the phase that comes out of the source. |
---|
55 | "; |
---|
56 | |
---|
57 | #*------------------------------------------------------------------- |
---|
58 | #Parametros |
---|
59 | *--------------------------------------------------------------------*# |
---|
60 | |
---|
61 | PARAMETERS |
---|
62 | propterm as Plugin (Brief = "IAPWS 97 properties of water", Type = "water", Symbol = "{}"); |
---|
63 | density as dens_mass (Brief = "density of Water", Default = 1000, Symbol = "\rho"); |
---|
64 | |
---|
65 | #*------------------------------------------------------------------- |
---|
66 | * Declaracao de variaveis |
---|
67 | *--------------------------------------------------------------------*# |
---|
68 | |
---|
69 | VARIABLES |
---|
70 | in Inlet as water_stream (Brief = "Inlet water", PosX=0.0, PosY=0.414, Symbol="_{in}", Protected = true); |
---|
71 | out Outlet as water_stream_vapfrac (Brief = "Outlet water", PosX=0.504, PosY=0.0, Symbol="_{out}"); |
---|
72 | PIn as press_delta (Brief = "Pressure Increase",Default=0.01, Lower=0, DisplayUnit='kPa', Symbol ="\Delta P"); |
---|
73 | Pout as pressure (Brief = "Outlet Pressure", Default=1, Lower=0, DisplayUnit='atm', Symbol ="\Outlet P"); |
---|
74 | n as fraction (Brief = "Pump Efficiency", Symbol = "\eta"); |
---|
75 | in Inlet_p as power_stream (Brief = "Pump Potency", PosX=0.5, PosY=1.0, Symbol = "_{in}"); |
---|
76 | |
---|
77 | #*------------------------------------------------------------------- |
---|
78 | * Equacoes do modelo |
---|
79 | *--------------------------------------------------------------------*# |
---|
80 | |
---|
81 | EQUATIONS |
---|
82 | |
---|
83 | "Mass Balance" |
---|
84 | Inlet.Fw = Outlet.Fw; |
---|
85 | |
---|
86 | "Pressure Delta" |
---|
87 | Outlet.P = Inlet.P + PIn; |
---|
88 | |
---|
89 | "Outlet Pressure" |
---|
90 | Outlet.P = Pout; |
---|
91 | |
---|
92 | "Energy Balance" |
---|
93 | Inlet_p.W = Inlet.Fw * (Outlet.H - Inlet.H); |
---|
94 | |
---|
95 | "Water Mass Entropy and Enthalpy, array = [Outlet.S, Outlet.T]" |
---|
96 | [Outlet.S, Outlet.T] = propterm.propPH(Outlet.P, Outlet.H); |
---|
97 | |
---|
98 | "Work" |
---|
99 | Inlet_p.W * n * density = Inlet.Fw * PIn; |
---|
100 | |
---|
101 | end |
---|
102 | |
---|
103 | Model pump_wR |
---|
104 | |
---|
105 | ATTRIBUTES |
---|
106 | |
---|
107 | Pallete = true; |
---|
108 | Icon = "icon/WpumpR"; |
---|
109 | Brief = " Model of a pump for water"; |
---|
110 | Info = |
---|
111 | "== GENERAL == |
---|
112 | General model for a water pump. |
---|
113 | |
---|
114 | == ASSUMPTIONS == |
---|
115 | * Steady State: |
---|
116 | flow rate |
---|
117 | temperature |
---|
118 | pressure |
---|
119 | stream composition; |
---|
120 | * Only Liquid; |
---|
121 | * Adiabatic. |
---|
122 | |
---|
123 | == SPECIFY == |
---|
124 | * Inlet stream; |
---|
125 | * Outlet pressure or pressure increase; |
---|
126 | * Pump efficiency. |
---|
127 | |
---|
128 | == SET == |
---|
129 | * fluid density in the pump; |
---|
130 | * Specify the phase that comes out of the source. |
---|
131 | "; |
---|
132 | |
---|
133 | #*------------------------------------------------------------------- |
---|
134 | #Parametros |
---|
135 | *--------------------------------------------------------------------*# |
---|
136 | |
---|
137 | PARAMETERS |
---|
138 | propterm as Plugin (Brief = "IAPWS 97 properties of water", Type = "water", Symbol = "{}"); |
---|
139 | density as dens_mass (Brief = "density of water", Default = 1000, Symbol = "\rho"); |
---|
140 | |
---|
141 | #*------------------------------------------------------------------- |
---|
142 | * Declaracao de variaveis |
---|
143 | *--------------------------------------------------------------------*# |
---|
144 | |
---|
145 | VARIABLES |
---|
146 | |
---|
147 | in Inlet as water_stream (Brief = "Inlet water", PosX=1.0, PosY=0.414, Symbol="_{in}", Protected = true); |
---|
148 | out Outlet as water_stream_vapfrac (Brief = "Outlet water", PosX=0.495, PosY=0.0, Symbol="_{out}"); |
---|
149 | PIn as press_delta (Brief="Pressure Increase", Default=0.01, Lower=0, DisplayUnit='kPa', Symbol ="\Delta P"); |
---|
150 | Pout as pressure (Brief = "Outlet Pressure", Default=1, Lower=0, DisplayUnit='atm', Symbol ="\Outlet P"); |
---|
151 | n as fraction (Brief = "Pump Efficiency", Symbol = "\eta"); |
---|
152 | in Inlet_p as power_stream (Brief = "Pump Potency", PosX=0.5, PosY=1.0, Symbol = "_{in}"); |
---|
153 | |
---|
154 | #*------------------------------------------------------------------- |
---|
155 | * Equacoes do modelo |
---|
156 | *--------------------------------------------------------------------*# |
---|
157 | |
---|
158 | EQUATIONS |
---|
159 | |
---|
160 | "Mass Balance" |
---|
161 | Inlet.Fw = Outlet.Fw; |
---|
162 | |
---|
163 | "Pressure Delta" |
---|
164 | Outlet.P = Inlet.P + PIn; |
---|
165 | |
---|
166 | "Outlet Pressure" |
---|
167 | Outlet.P = Pout; |
---|
168 | |
---|
169 | "Energy Balance" |
---|
170 | Inlet_p.W = Inlet.Fw * (Outlet.H - Inlet.H); |
---|
171 | |
---|
172 | "Water Mass Entropy and Enthalpy, array = [Outlet.S, Outlet.T]" |
---|
173 | [Outlet.S, Outlet.T] = propterm.propPH(Outlet.P, Outlet.H); |
---|
174 | |
---|
175 | "Work" |
---|
176 | Inlet_p.W * n * density = Inlet.Fw * PIn; |
---|
177 | end |
---|
178 | |
---|
179 | FlowSheet teste_pump_w |
---|
180 | |
---|
181 | #*------------------------------------------------------------------- |
---|
182 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
183 | *--------------------------------------------------------------------*# |
---|
184 | |
---|
185 | DEVICES |
---|
186 | S101 as water_sourceL; |
---|
187 | P101 as pump_wL; |
---|
188 | E101 as power_sourceR; |
---|
189 | |
---|
190 | #*------------------------------------------------------------------- |
---|
191 | * Especifica as conexoes entre os modelos |
---|
192 | *--------------------------------------------------------------------*# |
---|
193 | |
---|
194 | CONNECTIONS |
---|
195 | S101.Outlet to P101.Inlet; |
---|
196 | E101.Outlet_p to P101.Inlet_p; |
---|
197 | |
---|
198 | #*------------------------------------------------------------------- |
---|
199 | * Especifica variaveis definidas no modelo |
---|
200 | *--------------------------------------------------------------------*# |
---|
201 | |
---|
202 | SPECIFY |
---|
203 | |
---|
204 | S101.Fw = 100 * 'kg/h'; |
---|
205 | S101.T = 300 * 'K'; |
---|
206 | S101.P = 1 * 'atm'; |
---|
207 | |
---|
208 | P101.PIn = 20 * 'atm'; |
---|
209 | P101.n = 0.5; |
---|
210 | |
---|
211 | #*------------------------------------------------------------------- |
---|
212 | * Define o valor dos parametros declarados no modelo |
---|
213 | *--------------------------------------------------------------------*# |
---|
214 | |
---|
215 | SET |
---|
216 | |
---|
217 | P101.density = 1000 * 'kg/m^3'; |
---|
218 | S101.ValidPhases = "Liquid-Only"; |
---|
219 | |
---|
220 | #*------------------------------------------------------------------- |
---|
221 | * Condicoes iniciais e opcoes de Solver |
---|
222 | *--------------------------------------------------------------------*# |
---|
223 | |
---|
224 | OPTIONS |
---|
225 | Dynamic = false; |
---|
226 | |
---|
227 | end |
---|