1 |
REQUIRE "clfr-models/thermo_types.a4c"; |
2 |
REQUIRE "atoms.a4l"; |
3 |
|
4 |
MODEL pump; |
5 |
(* Ignore and changes in enthalpy, just model pressure changes *) |
6 |
|
7 |
S1, S2 |
8 |
in WILL_BE steam_stream; |
9 |
out WILL_BE steam_stream; |
10 |
)WHERE( |
11 |
in.cd, out.cd WILL_BE_THE_SAME; |
12 |
in.pd, out.pd WILL_BE_THE_SAME; |
13 |
in.flow, out.flow WILL_BE_THE_SAME; |
14 |
in.f[in.components], out.f[out.components] WILL_BE_THE_SAME; |
15 |
); |
16 |
isen IS_A stream(in.cd, in.pd, in.equilibrated); |
17 |
|
18 |
isen.f[in.components] = in.f[out.components]; |
19 |
isen.flow = in.flow; |
20 |
|
21 |
H_max IS_A distance; |
22 |
H_2 IS_A distance; |
23 |
H_1 IS_A distance; |
24 |
Q_ref IS_A volume_rate; |
25 |
Q_2 IS_A volume_rate; |
26 |
Q_1 IS_A volume_rate; |
27 |
N IS_A frequency; |
28 |
N_ref IS_A frequency; |
29 |
N_r IS_A factor; |
30 |
|
31 |
C_0 IS_A factor; |
32 |
C_1 IS_A factor; |
33 |
C_2 IS_A factor; |
34 |
eta IS_A factor; |
35 |
|
36 |
V IS_A volume; |
37 |
|
38 |
M IS_A mass; |
39 |
DP IS_A pressure; |
40 |
|
41 |
h_is IS_A specific_enthalpy; |
42 |
T_is IS_A temperature; |
43 |
rho_is IS_A mass_density; |
44 |
|
45 |
(* Pump curve, pressure decreases as flow rate increases *) |
46 |
VolFlowRate: Q_2 / in.V_flow = in.flow; |
47 |
VolFlowRate1: Q_1 = Q_2 / N_r; (* vol flow rate at equivalent conditions at reference speed *) |
48 |
Head1: H_1 = C_0 + C_1*Q_1 + C_2*Q_1^2; (* head at equivalent conditions' speed. C0, C1, C2 are pump curve params (const) *) |
49 |
Head2: H_2 = H_1 * N_r; (* head in metres at actual speed *) |
50 |
|
51 |
PressureRise: DP = (in.rho * gravity_constant * H_2); |
52 |
PressureRise2: out.p = (in.P + DP); |
53 |
|
54 |
MassHoldUp: M = V / (0.5*(1/in.rho + 1/out.rho)); |
55 |
|
56 |
(* Isentropic exit state *) |
57 |
isen.S = in.S; |
58 |
isen.P = out.P; |
59 |
|
60 |
(* Pump efficiency *) |
61 |
out.h - in.h = (in.h - isen.h)/eta; |
62 |
|
63 |
END pump; |
64 |
|
65 |
MODEL pump_test; |
66 |
cd IS_A components_data(['water'], 'water'); |
67 |
pd IS_A phases_data('V', 'Pitzer_vapor_mixture','none', 'none'); |
68 |
equilibrated IS_A boolean; |
69 |
|
70 |
S1 IS_A stream(cd, pd, equilibrated); |
71 |
S2 IS_A stream(cd, pd, equilibrated); |
72 |
|
73 |
PU IS_A pump(S1,S2); |
74 |
|
75 |
METHODS |
76 |
METHOD ClearAll; |
77 |
END ClearAll; |
78 |
|
79 |
METHOD specify; |
80 |
END specify; |
81 |
|
82 |
METHOD values; |
83 |
END values; |
84 |
|
85 |
END pump_test; |