Skip to content

Commit f30931e

Browse files
Remove pump adiabatic compression (#289)
* removed adiabatic compression Signed-off-by: pepmts <pierre-elie.personnaz@metroscope.tech> * corrected and simplified pump's test Signed-off-by: pepmts <pierre-elie.personnaz@metroscope.tech> * Update CHANGELOG.md * corrected values of unit tests Signed-off-by: pepmts <pierre-elie.personnaz@metroscope.tech> Co-authored-by: Valentin Drouet <valentin.drouet@metroscope.tech> Co-authored-by: valentindrou <74238586+valentindrou@users.noreply.github.com>
1 parent 624a70b commit f30931e

File tree

4 files changed

+30
-47
lines changed

4 files changed

+30
-47
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3737
- Added Example/ReheaterLine, direct and reverse, [PR#216](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/216)
3838

3939
### Removed <!--Make sure to add a link to the PR and issues related to your change-->
40-
40+
- Removed `adiabatic_compression` parameter in `Pump`, since it was not used [288](https://github.com/Metroscope-dev/metroscope-modeling-library/issues/288) : [PR #289](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/289)
4141

4242
## MML3-DTG-V2
4343

MetroscopeModelingLibrary/Partial/Machines/Pump.mo

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ partial model Pump
33
extends BaseClasses.FlowModel(P_out_0=10e5) annotation(IconMap(primitivesVisible=false));
44
extends MetroscopeModelingLibrary.Icons.Machines.PumpIcon;
55

6-
parameter Boolean adiabatic_compression=false
7-
"true: compression at constant enthalpy - false: compression with varying enthalpy";
8-
96
import MetroscopeModelingLibrary.Units;
107
import MetroscopeModelingLibrary.Units.Inputs;
118
import MetroscopeModelingLibrary.Constants;
@@ -45,26 +42,22 @@ partial model Pump
4542
rotation=-90,
4643
origin={0,108})));
4744
equation
48-
Qv_in = Q / Medium.density(state_in);
49-
DP = rho*Constants.g*hn;
50-
51-
if adiabatic_compression then
52-
W = 0;
53-
else
54-
h_out-h_in = Constants.g*hn/rh;
55-
end if;
56-
57-
// Reduced rotational speed
58-
R = VRot/VRotn;
45+
// internal variables
46+
Qv_in = Q / rho; // Volumic flow rate
47+
R = VRot/VRotn; // Reduced rotational speed
5948

6049
// Pump characteristics
6150
hn = a1*Qv_in^2 + a2*Qv_in*R + a3*R^2;
6251
rh = noEvent(max(if (R > 1e-5) then b1*Qv_in^2/R^2 + b2*Qv_in/R + b3 else b3, rhmin));
6352

53+
// Outlet variation
54+
DP = rho*Constants.g*hn;
55+
h_out-h_in = Constants.g*hn/rh;
56+
6457
// Mechanical power
6558
Wm = C_power.W; // C_power.W is positive since it is power fed to the component
6659
Wm = W/rm; // Wm is positive since it is the power produced by the pump
6760

6861
// Hydraulic power
69-
Wh = Qv_in * DP / rh;
62+
Wh = Qv_in * DP / rh; // = Qv_in*rho * g*hn/rh = Q * (h_out - h_in) = W
7063
end Pump;

MetroscopeModelingLibrary/Tests/WaterSteam/Machines/Pump_direct.mo

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,15 @@ model Pump_direct
33
extends MetroscopeModelingLibrary.Icons.Tests.WaterSteamTestIcon;
44

55
// Boundary conditions
6-
input Units.Pressure source_P(start=2e5);
7-
input Units.Temperature source_T(start=20 + 273.15);
8-
input Units.NegativeMassFlowRate source_Q(start=-100);
6+
input Units.Pressure source_P(start=20e5);
7+
input Units.Temperature source_T(start= 150 + 273.15);
8+
input Units.NegativeMassFlowRate source_Q(start=-1000);
99
input Real pump_VRot(start=1400);
1010

1111
// Component parameters
1212
parameter Real pump_VRotn = 1400;
13-
parameter Real pump_rm = 0.85;
14-
parameter Real pump_a1 = -88.67;
15-
parameter Real pump_a2 = 0;
16-
parameter Real pump_a3 = 43.15;
17-
parameter Real pump_b1 = -3.7751;
18-
parameter Real pump_b2 = 3.61;
19-
parameter Real pump_b3 = -0.0075464;
13+
parameter Real pump_a3 = 444;
14+
parameter Real pump_b3 = 0.93;
2015
parameter Units.Yield pump_rhmin = 0.20;
2116

2217
.MetroscopeModelingLibrary.WaterSteam.Machines.Pump pump annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
@@ -39,12 +34,12 @@ equation
3934

4035
// Component parameters
4136
pump.VRotn = pump_VRotn;
42-
pump.rm = pump_rm;
43-
pump.a1 = pump_a1;
44-
pump.a2 = pump_a2;
37+
pump.rm = 0.85;
38+
pump.a1 = 0;
39+
pump.a2 = 0;
4540
pump.a3 = pump_a3;
46-
pump.b1 = pump_b1;
47-
pump.b2 = pump_b2;
41+
pump.b1 = 0;
42+
pump.b2 = 0;
4843
pump.b3 = pump_b3;
4944
pump.rhmin = pump_rhmin;
5045

MetroscopeModelingLibrary/Tests/WaterSteam/Machines/Pump_reverse.mo

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,22 @@ model Pump_reverse
33
extends MetroscopeModelingLibrary.Icons.Tests.WaterSteamTestIcon;
44

55
// Boundary conditions
6-
input Units.Pressure source_P(start=2.3e5);
7-
input Units.Temperature source_T(start=7.8 + 273.15);
8-
input Units.NegativeMassFlowRate source_Q(start=-30);
6+
input Units.Pressure source_P(start=20e5);
7+
input Units.Temperature source_T(start=150 + 273.15);
8+
input Units.NegativeMassFlowRate source_Q(start=-1000);
99

1010
// Component parameters
1111
parameter Real pump_VRot = 1400;
1212
parameter Real pump_VRotn = 1400;
13-
parameter Real pump_rm = 0.85;
14-
parameter Real pump_a1 = -88.67;
15-
parameter Real pump_a2 = 0;
16-
parameter Real pump_b1 = -3.7751;
17-
parameter Real pump_b2 = 3.61;
1813
parameter Units.Yield pump_rhmin = 0.20;
1914

2015
// Calibrated parameters
2116
output Real pump_a3;
2217
output Real pump_b3;
2318

2419
// Calibration inputs
25-
input Units.Pressure pump_P_out(start=2.31e5);
26-
input Units.Temperature pump_T_out(start=7.801+ 273.15);
20+
input Units.Pressure pump_P_out(start=60e5);
21+
input Units.Temperature pump_T_out(start=150.5 + 273.15);
2722

2823
.MetroscopeModelingLibrary.WaterSteam.Machines.Pump pump annotation (Placement(transformation(extent={{-10,-10},{10,10}}, origin={-30,0})));
2924
.MetroscopeModelingLibrary.WaterSteam.BoundaryConditions.Source source annotation (Placement(transformation(extent={{-10,-10},{10,10}}, origin={-70,0})));
@@ -47,12 +42,12 @@ equation
4742

4843
// Component parameters
4944
pump.VRotn = pump_VRotn;
50-
pump.rm = pump_rm;
51-
pump.a1 = pump_a1;
52-
pump.a2 = pump_a2;
53-
pump.b1 = pump_b1;
54-
pump.b2 = pump_b2;
55-
pump.rhmin = pump_rhmin;
45+
pump.rm = 0.85;
46+
pump.a1 = 0;
47+
pump.a2 = 0;
48+
pump.b1 = 0;
49+
pump.b2 = 0;
50+
pump.rhmin = 0.2;
5651

5752
// Calibrated parameters
5853
pump.a3 = pump_a3;

0 commit comments

Comments
 (0)