Skip to content

Commit 635da4c

Browse files
🔖 Release v3.7.0 (#459)
* Update CHANGELOG.md * change release number in package * added condenser Qv cold decrease fault Signed-off-by: pepmts <[email protected]> * Update CHANGELOG.md * Update package.mo * corrected Qv_cold def Signed-off-by: pepmts <[email protected]> * added l/min unit in flow sensor Signed-off-by: pepmts <[email protected]> --------- Signed-off-by: pepmts <[email protected]>
1 parent 1831228 commit 635da4c

File tree

9 files changed

+48
-30
lines changed

9 files changed

+48
-30
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@ Use [gitmoji](https://gitmoji.dev/) to identify your changes.
99

1010
### ✨ Added <!--Make sure to add a link to the PR and issues related to your change-->
1111

12-
- Added compressor and gas turbine internal faults, and missing Fuel and FlueGases pipes, with all corresponding tests [PR#457](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/457)
13-
1412
### 🐛 Fixed <!--Make sure to add a link to the PR and issues related to your change-->
1513

1614
### 💥 Changed <!--Make sure to add a link to the PR and issues related to your change-->
17-
- Pressure losses equations in Pipe, ControlValve and SlidingValve now use inlet density instead of mean density. This change can affect calibrated models. [PR#450](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/450)
1815

1916
### 🔥 Removed <!--Make sure to add a link to the PR and issues related to your change-->
2017

2118

19+
## MML - v3.7.0
20+
21+
### ✨ Added <!--Make sure to add a link to the PR and issues related to your change-->
22+
23+
- Added compressor and gas turbine internal faults, condenser `Qv_cold_in` decrease fault, and missing Fuel and FlueGases pipes, with all corresponding tests [PR#457](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/457)
24+
25+
### 💥 Changed <!--Make sure to add a link to the PR and issues related to your change-->
26+
- Pressure losses equations in Pipe, ControlValve and SlidingValve now use inlet density instead of mean density. This change can affect calibrated models. [PR#450](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/450)
27+
28+
2229
## MML - v3.6.1
2330

2431
### ✨ Added <!--Make sure to add a link to the PR and issues related to your change-->

MetroscopeModelingLibrary/Examples/CCGT/MetroscopiaCCGT/MetroscopiaCCGT_faulty.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ model MetroscopiaCCGT_faulty "Metroscopia CCGT faulty"
2020
input Real Fault_economiser_fouling(start=0);
2121
input Real Fault_condenser_fouling(start=0);
2222
input Real Fault_condenser_air_intake(start=0);
23+
input Real Fault_condenser_Qv_cold_in_decrease(start=0);
2324

2425
// Leaks
2526
input Real Fault_bypass_HP_turbine_to_condenser_leak_Q(start=0);
@@ -69,6 +70,7 @@ equation
6970
//Condenser
7071
condenser.fouling = Fault_condenser_fouling;
7172
condenser.air_intake = Fault_condenser_air_intake;
73+
condenser.Qv_cold_in_decrease = Fault_condenser_Qv_cold_in_decrease;
7274

7375
//Reheater
7476
Reheater.fouling = Fault_Reheater_fouling;

MetroscopeModelingLibrary/Examples/Nuclear/MetroscopiaNPP/MetroscopiaNPP_faulty.mo

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ model MetroscopiaNPP_faulty
1515
input Real Fault_superheater_closed_vent(start=0);
1616
input Real Fault_condenser_fouling(start=0);
1717
input Real Fault_condenser_air_intake(start=0);
18+
input Real Fault_condenser_Qv_cold_in_decrease(start=0);
1819
input Real Fault_LP_heater_fouling(start=0);
1920
input Real Fault_HP_heater_fouling(start=0);
2021
input Real Fault_water_level_rise(start=0);
@@ -55,6 +56,7 @@ equation
5556
// Condenser
5657
condenser.fouling = Fault_condenser_fouling;
5758
condenser.air_intake = Fault_condenser_air_intake;
59+
condenser.Qv_cold_in_decrease = Fault_condenser_Qv_cold_in_decrease;
5860

5961
// LP reheater
6062
LP_heater.fouling = Fault_LP_heater_fouling;
@@ -77,30 +79,24 @@ equation
7779
bypass_HP_heater_drains_to_condenser.Q = Fault_bypass_HP_heater_drains_to_condenser_Q + 1e-3;
7880

7981
connect(bypass_HP_turbine_to_condenser.C_out, bypass_HP_control_valve_to_condenser.C_out) annotation (Line(points={{-113,42},{-113,32},{-147,32},{-147,42}}, color={217,67,180}));
80-
connect(bypass_HP_turbine_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-113,42},
81-
{-113,32},{320,32},{320,100},{392.5,100},{392.5,74.2864}}, color={217,67,180}));
82-
connect(bypass_LP_turbine_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{139,100},
83-
{140,100},{140,86},{158,86},{158,32},{320,32},{320,100},{392.5,100},{
84-
392.5,74.2864}}, color={217,67,180}));
85-
connect(bypass_superheater_to_condenser.C_in, superheater_control_valve.C_out) annotation (Line(points={{-113,
86-
134},{-113,112.182},{-126,112.182}}, color={217,67,180}));
87-
connect(bypass_superheater_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-113,
88-
152},{-112,152},{-112,192},{392.5,192},{392.5,74.2864}}, color={217,67,180}));
89-
connect(bypass_HP_turbine_ext_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-2,49},
90-
{4,49},{4,32},{320,32},{320,100},{392.5,100},{392.5,74.2864}}, color={217,67,180}));
91-
connect(bypass_LP_heater_drains_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{277,
92-
-150},{278,-150},{278,-162},{472,-162},{472,100},{392.5,100},{392.5,
93-
74.2864}}, color={217,67,180}));
94-
connect(bypass_HP_heater_drains_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-16,
95-
-153},{-16,-162},{472,-162},{472,100},{392.5,100},{392.5,74.2864}}, color={217,67,180}));
82+
connect(bypass_HP_turbine_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-113,42},{-113,32},{320,32},{320,100},{392.5,100},{392.5,74.2864}},
83+
color={217,67,180}));
84+
connect(bypass_LP_turbine_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{139,100},{140,100},{140,86},{158,86},{158,32},{320,32},{320,100},{392.5,100},{392.5,74.2864}},
85+
color={217,67,180}));
86+
connect(bypass_superheater_to_condenser.C_in, superheater_control_valve.C_out) annotation (Line(points={{-113,134},{-113,112.182},{-126,112.182}}, color={217,67,180}));
87+
connect(bypass_superheater_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-113,152},{-112,152},{-112,192},{392.5,192},{392.5,74.2864}},
88+
color={217,67,180}));
89+
connect(bypass_HP_turbine_ext_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-2,49},{4,49},{4,32},{320,32},{320,100},{392.5,100},{392.5,74.2864}},
90+
color={217,67,180}));
91+
connect(bypass_LP_heater_drains_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{277,-150},{278,-150},{278,-162},{472,-162},{472,100},{392.5,100},{392.5,74.2864}},
92+
color={217,67,180}));
93+
connect(bypass_HP_heater_drains_to_condenser.C_out, condenser.C_hot_in) annotation (Line(points={{-16,-153},{-16,-162},{472,-162},{472,100},{392.5,100},{392.5,74.2864}},
94+
color={217,67,180}));
9695
connect(bypass_LP_turbine_to_condenser.C_in, LPT1.C_in) annotation (Line(points={{139,118},{140,118},{140,130},{151,130}}, color={217,67,180}));
9796
connect(bypass_HP_turbine_ext_to_condenser.C_in, HP_extract_P_sensor.C_in) annotation (Line(points={{-20,49},{-28,49},{-28,58},{-40,58},{-40,54}}, color={28,108,200}));
98-
connect(bypass_HP_control_valve_to_condenser.C_in, HP_control_valve.C_in) annotation (Line(points={{-147,60},
99-
{-148,60},{-148,72},{-135,72}}, color={28,108,200}));
97+
connect(bypass_HP_control_valve_to_condenser.C_in, HP_control_valve.C_in) annotation (Line(points={{-147,60},{-148,60},{-148,72},{-135,72}}, color={28,108,200}));
10098
connect(bypass_HP_turbine_to_condenser.C_in, HPT_P_in_sensor.C_in) annotation (Line(points={{-113,60},{-113,72},{-106,72}}, color={28,108,200}));
101-
connect(bypass_LP_heater_drains_to_condenser.C_in, LP_reheater_drains_control_valve.C_in) annotation (Line(points={{277,
102-
-132},{276,-132},{276,-119.818},{288,-119.818}}, color={217,67,180}));
103-
connect(bypass_HP_heater_drains_to_condenser.C_in, HP_reheater_drains_control_valve.C_in) annotation (Line(points={{-16,
104-
-135},{-16,-121.818},{6,-121.818}}, color={28,108,200}));
99+
connect(bypass_LP_heater_drains_to_condenser.C_in, LP_reheater_drains_control_valve.C_in) annotation (Line(points={{277,-132},{276,-132},{276,-119.818},{288,-119.818}}, color={217,67,180}));
100+
connect(bypass_HP_heater_drains_to_condenser.C_in, HP_reheater_drains_control_valve.C_in) annotation (Line(points={{-16,-135},{-16,-121.818},{6,-121.818}}, color={28,108,200}));
105101
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
106102
end MetroscopiaNPP_faulty;

MetroscopeModelingLibrary/Partial/Sensors/FlowSensor.mo

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ partial model FlowSensor
1010
parameter Units.VolumeFlowRate Qv_0 = Q_0/1000;
1111

1212
Units.VolumeFlowRate Qv(start=Qv_0, nominal=Qv_0);
13+
Real Q_lm(start=Qv_0*Constants.m3s_to_lm, nominal=Qv_0*Constants.m3s_to_lm); // Flow rate in liter per minute;
14+
1315
Real Q_th(start=Q_0*Constants.kgs_to_th, nominal=Q_0*Constants.kgs_to_th); // Flow rate in tons per hour
1416
Real Q_lbs(start=Q_0*Constants.kgs_to_lbs, nominal=Q_0*Constants.kgs_to_lbs); // Flow rate in pounds per second;
1517
Real Q_Mlbh(start=Q_0*Constants.kgs_to_Mlbh, nominal=Q_0*Constants.kgs_to_Mlbh); // Flow rate in pounds per second;
@@ -18,7 +20,8 @@ partial model FlowSensor
1820
parameter Boolean faulty = false;
1921
equation
2022
Qv = Q / Medium.density(state);
21-
Q_th = Q *Constants.kgs_to_th;
22-
Q_lbs = Q *Constants.kgs_to_lbs;
23-
Q_Mlbh = Q *Constants.kgs_to_Mlbh;
23+
Q_lm = Qv * Constants.m3s_to_lm;
24+
Q_th = Q * Constants.kgs_to_th;
25+
Q_lbs = Q * Constants.kgs_to_lbs;
26+
Q_Mlbh = Q * Constants.kgs_to_Mlbh;
2427
end FlowSensor;

MetroscopeModelingLibrary/Tests/WaterSteam/HeatExchangers/Condenser_faulty.mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ model Condenser_faulty
55

66
Real Fault_fouling(start=0);
77
Real Fault_air_intake(start=0);
8+
Real Fault_Qv_cold_in_decrease(start=0);
89

910
equation
1011

1112
// Failure input
1213
Fault_fouling = 0 + 10*time;
1314
Fault_air_intake = 0 + 1e-3 * time;
15+
Fault_Qv_cold_in_decrease = 0 + 10 * time;
1416

1517
// Failure definition
1618
condenser.fouling = Fault_fouling;
1719
condenser.air_intake = Fault_air_intake;
20+
condenser.Qv_cold_in_decrease = Fault_Qv_cold_in_decrease;
21+
1822

1923
end Condenser_faulty;

MetroscopeModelingLibrary/Utilities/Constants/package.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ package Constants "Stores all constants used in MML"
2121
final constant Real P0_kPaG_in_kPaA(unit="bar") = 100;
2222
final constant Real P0_MPaG_in_MPaA(unit="bar") = 0.1;
2323

24+
// Volume flow conversions
25+
final constant Real m3s_to_lm = 60000;
2426
// Mass flow conversions
2527
final constant Real kgs_to_th(unit="(1/h)/(kg/s)") = 3.6;
2628
final constant Real kgs_to_lbs(unit="1/kg") = 0.453592428;
2729
final constant Real kgs_to_Mlbh(unit="(1/h)/(kg/s)") = 0.0079366414387;
2830

31+
2932
// Atomic/Molecular masses
3033
final constant Units.AtomicMass m_H = 1.00798;
3134
final constant Units.AtomicMass m_C = 12.0106;

MetroscopeModelingLibrary/Utilities/Constants/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ atmospheric_pressure_in_bar
1212
P0_psiG_in_psiA
1313
P0_kPaG_in_kPaA
1414
P0_MPaG_in_MPaA
15+
m3s_to_lm
1516
kgs_to_th
1617
kgs_to_lbs
1718
kgs_to_Mlbh

MetroscopeModelingLibrary/WaterSteam/HeatExchangers/Condenser.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ model Condenser
3535
parameter Boolean faulty = false;
3636
Units.Percentage fouling(min = 0, max=100, start=0, nominal=10); // Fouling percentage
3737
Real air_intake(unit="mol/m3", min=0, start=0, nominal=1e-3); // Air intake
38+
Units.Percentage Qv_cold_in_decrease(start=0); // Decrease of Qv_cold_in, in %
3839

3940
// Initialization parameters
4041
parameter Units.MassFlowRate Q_cold_0 = 5000;
@@ -106,14 +107,15 @@ equation
106107
if not faulty then
107108
fouling = 0;
108109
air_intake=0;
110+
Qv_cold_in_decrease=0;
109111
end if;
110112

111113

112114
// Definitions
113115
Q_cold = cold_side.Q;
114116
T_cold_in = cold_side.T_in;
115117
T_cold_out = cold_side.T_out;
116-
Qv_cold_in = cold_side.Q / cold_side.rho;
118+
cold_side.Qv = Qv_cold_in * (1 - Qv_cold_in_decrease/100);
117119

118120
Q_hot = hot_side.Q;
119121
T_hot_in = hot_side.T_in;

MetroscopeModelingLibrary/package.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44

5-
annotation (version="3.6.1",uses(Modelica(version="4.0.0")),Documentation(info="<html>
5+
annotation (version="3.7.0",uses(Modelica(version="4.0.0")),Documentation(info="<html>
66
<p>Licensed by Metroscope under the Modelica License 2 </p>
77
<p>Copyright © 2023, Metroscope.</p>
88
<p>This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the Modelica License 2. </p>

0 commit comments

Comments
 (0)