/[ascend]/trunk/models/johnpye/pump.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/pump.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 90 - (show annotations) (download) (as text)
Wed Dec 7 16:03:44 2005 UTC (14 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1902 byte(s)
Adding some more (under development) models...
1 REQUIRE "clfr-models/thermo_types.a4c";
2 REQUIRE "atoms.a4l";
3
4 MODEL pump(
5 in WILL_BE steam_stream;
6 out WILL_BE steam_stream;
7 )WHERE(
8 in.cd, out.cd WILL_BE_THE_SAME;
9 in.pd, out.pd WILL_BE_THE_SAME;
10 in.flow, out.flow WILL_BE_THE_SAME;
11 in.f[in.components], out.f[out.components] WILL_BE_THE_SAME;
12 );
13 isen IS_A stream(in.cd, in.pd, in.equilibrated);
14
15 isen.f[in.components] = in.f[out.components];
16 isen.flow = in.flow;
17
18 H_max IS_A distance;
19 H_2 IS_A distance;
20 H_1 IS_A distance;
21 Q_ref IS_A volume_rate;
22 Q_2 IS_A volume_rate;
23 Q_1 IS_A volume_rate;
24 N IS_A frequency;
25 N_ref IS_A frequency;
26 N_r IS_A factor;
27
28 C_0 IS_A factor;
29 C_1 IS_A factor;
30 C_2 IS_A factor;
31 eta IS_A factor;
32
33 V IS_A volume;
34
35 M IS_A mass;
36 DP IS_A pressure;
37
38 h_is IS_A specific_enthalpy;
39 T_is IS_A temperature;
40 rho_is IS_A mass_density;
41
42 (* Pump curve, pressure decreases as flow rate increases *)
43 VolFlowRate: Q_2 / in.V_flow = in.flow;
44 VolFlowRate1: Q_1 = Q_2 / N_r; (* vol flow rate at equivalent conditions at reference speed *)
45 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) *)
46 Head2: H_2 = H_1 * N_r; (* head in metres at actual speed *)
47
48 PressureRise: DP = (in.rho * gravity_constant * H_2);
49 PressureRise2: out.p = (in.P + DP);
50
51 MassHoldUp: M = V / (0.5*(1/in.rho + 1/out.rho));
52
53 (* Isentropic exit state *)
54 isen.S = in.S;
55 isen.P = out.P;
56
57 (* Pump efficiency *)
58 out.h - in.h = (in.h - isen.h)/eta;
59
60 END pump;
61
62 MODEL pump_test;
63 cd IS_A components_data(['water'], 'water');
64 pd IS_A phases_data('V', 'Pitzer_vapor_mixture','none', 'none');
65 equilibrated IS_A boolean;
66
67 S1 IS_A stream(cd, pd, equilibrated);
68 S2 IS_A stream(cd, pd, equilibrated);
69
70 PU IS_A pump(S1,S2);
71
72 METHODS
73 METHOD ClearAll;
74 END ClearAll;
75
76 METHOD specify;
77 END specify;
78
79 METHOD values;
80 END values;
81
82 END pump_test;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22