Skip to content

Commit ef05ddc

Browse files
authored
Added a flue gases pressure cut and a leak (#355)
* Added a flue gases pressure cut and a leak Signed-off-by: Nabil Youssef <[email protected]> * Update CHANGELOG.md Signed-off-by: Nabil Youssef <[email protected]>
1 parent d804ca4 commit ef05ddc

File tree

7 files changed

+155
-0
lines changed

7 files changed

+155
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased] <!--Make sure to add a link to the PR and issues related to your change-->
99

1010
### Added
11+
[PR#355](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/355) added `PressureCut` and `Leak` components for the flue gases medium.
1112

1213
### Changed
1314

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
within MetroscopeModelingLibrary.FlueGases.Pipes;
2+
model Leak
3+
4+
Real Q;
5+
Real Q_th;
6+
Real Q_lbs;
7+
Real Q_Mlbh;
8+
9+
// Dummy input for local balance:
10+
import MetroscopeModelingLibrary.Units.Inputs;
11+
Inputs.InputDifferentialPressure DP_input(start=0);
12+
13+
Connectors.Inlet C_in annotation (Placement(transformation(extent={{-110,-10},{-90,10}})));
14+
Connectors.Outlet C_out annotation (Placement(transformation(extent={{90,-8},{110,12}})));
15+
PressureCut pressureCut annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
16+
Sensors.FlueGases.FlowSensor leak_flow annotation (Placement(transformation(extent={{18,-10},{38,10}})));
17+
equation
18+
19+
Q = leak_flow.Q;
20+
Q_th = leak_flow.Q_th;
21+
Q_lbs = leak_flow.Q_lbs;
22+
Q_Mlbh = leak_flow.Q_Mlbh;
23+
24+
// For local balance:
25+
pressureCut.DP = DP_input;
26+
27+
connect(pressureCut.C_in, C_in) annotation (Line(points={{-60,0},{-100,0}}, color={95,95,95}));
28+
connect(leak_flow.C_in, pressureCut.C_out) annotation (Line(points={{18,0},{-40,0}}, color={95,95,95}));
29+
connect(leak_flow.C_out, C_out) annotation (Line(points={{38,0},{70,0},{70,2},{100,2}}, color={95,95,95}));
30+
annotation (Icon(graphics={Rectangle(
31+
extent={{-100,40},{0,-40}},
32+
lineColor={95,95,95},
33+
fillColor={95,95,95},
34+
fillPattern=FillPattern.Solid),
35+
Rectangle(
36+
extent={{0,40},{100,-40}},
37+
lineColor={175,175,175},
38+
fillColor={175,175,175},
39+
fillPattern=FillPattern.Solid),
40+
Ellipse(
41+
extent={{12,16},{36,6}},
42+
lineColor={95,95,95},
43+
fillColor={95,95,95},
44+
fillPattern=FillPattern.Solid),
45+
Ellipse(
46+
extent={{8,0},{24,-6}},
47+
lineColor={95,95,95},
48+
fillColor={95,95,95},
49+
fillPattern=FillPattern.Solid),
50+
Ellipse(
51+
extent={{36,2},{60,-6}},
52+
lineColor={95,95,95},
53+
fillColor={95,95,95},
54+
fillPattern=FillPattern.Solid),
55+
Ellipse(
56+
extent={{56,10},{80,2}},
57+
lineColor={95,95,95},
58+
fillColor={95,95,95},
59+
fillPattern=FillPattern.Solid),
60+
Ellipse(
61+
extent={{60,-6},{84,-14}},
62+
lineColor={95,95,95},
63+
fillColor={95,95,95},
64+
fillPattern=FillPattern.Solid),
65+
Ellipse(
66+
extent={{18,-12},{42,-20}},
67+
lineColor={95,95,95},
68+
fillColor={95,95,95},
69+
fillPattern=FillPattern.Solid)}));
70+
end Leak;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
within MetroscopeModelingLibrary.FlueGases.Pipes;
2+
model PressureCut
3+
extends BaseClasses.IsoHFlowModel annotation(IconMap(primitivesVisible=false));
4+
annotation (Icon(graphics={Rectangle(
5+
extent={{-100,30},{100,-30}},
6+
lineColor={28,108,200},
7+
fillColor={95,95,95},
8+
fillPattern=FillPattern.Solid,
9+
pattern=LinePattern.None),
10+
Line(
11+
points={{-40,-60},{0,60}},
12+
color={0,0,0},
13+
thickness=1),
14+
Line(
15+
points={{0,-60},{40,60}},
16+
color={0,0,0},
17+
thickness=1)}));
18+
end PressureCut;

MetroscopeModelingLibrary/FlueGases/Pipes/package.order

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ Pipe
22
Filter
33
HeatLoss
44
ControlValve
5+
Leak
6+
PressureCut
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
within MetroscopeModelingLibrary.Tests.FlueGases.Pipes;
2+
model Leak
3+
import MetroscopeModelingLibrary.Units;
4+
extends Icons.Tests.FlueGasesTestIcon;
5+
6+
// Boundary conditions
7+
input Units.SpecificEnthalpy source_h(start=0.5e6);
8+
input Units.Pressure source_P(start=10e5, min=0, nominal=10e5) "Pa";
9+
input Units.Pressure sink_P(start=1e5, min=0, nominal=10e5) "Pa";
10+
input Units.PositiveMassFlowRate Q(start=10) "kg/s";
11+
12+
MetroscopeModelingLibrary.FlueGases.BoundaryConditions.Source source annotation (Placement(transformation(extent={{-100,-9.99996},{-80,9.99996}})));
13+
MetroscopeModelingLibrary.FlueGases.BoundaryConditions.Sink sink annotation (Placement(transformation(
14+
extent={{-10,-10},{10,10}},
15+
rotation=0,
16+
origin={90,-6.10623e-16})));
17+
18+
MetroscopeModelingLibrary.FlueGases.Pipes.Leak leak annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
19+
equation
20+
21+
// Boundary conditions
22+
source.h_out = source_h;
23+
source.P_out = source_P;
24+
source.Xi_out = {0.768,0.232,0.0,0.0,0.0};
25+
sink.P_in = sink_P;
26+
27+
// Leak:
28+
leak.Q = Q;
29+
30+
connect(source.C_out, leak.C_in) annotation (Line(points={{-85,0},{-10,0}}, color={95,95,95}));
31+
connect(leak.C_out, sink.C_in) annotation (Line(points={{10,0.2},{20,0.2},{20,0},{85,0}}, color={95,95,95}));
32+
end Leak;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
within MetroscopeModelingLibrary.Tests.FlueGases.Pipes;
2+
model PressureCut
3+
import MetroscopeModelingLibrary.Units;
4+
extends Icons.Tests.FlueGasesTestIcon;
5+
6+
// Boundary conditions
7+
input Units.SpecificEnthalpy source_h(start=0.5e6);
8+
input Units.Pressure source_P(start=10e5, min=0, nominal=10e5) "Pa";
9+
input Units.Pressure sink_P(start=1e5, min=0, nominal=10e5) "Pa";
10+
input Units.NegativeMassFlowRate source_Q(start=-100) "kg/s";
11+
12+
MetroscopeModelingLibrary.FlueGases.BoundaryConditions.Source source annotation (Placement(transformation(extent={{-100,-9.99996},{-80,9.99996}})));
13+
MetroscopeModelingLibrary.FlueGases.BoundaryConditions.Sink sink annotation (Placement(transformation(
14+
extent={{-10,-10},{10,10}},
15+
rotation=0,
16+
origin={90,-6.10623e-16})));
17+
18+
MetroscopeModelingLibrary.FlueGases.Pipes.PressureCut pressureCut annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
19+
equation
20+
21+
// Boundary conditions
22+
source.h_out = source_h;
23+
source.P_out = source_P;
24+
source.Q_out = source_Q;
25+
source.Xi_out = {0.768,0.232,0.0,0.0,0.0};
26+
sink.P_in = sink_P;
27+
28+
connect(pressureCut.C_out, sink.C_in) annotation (Line(points={{10,0},{85,0}}, color={95,95,95}));
29+
connect(pressureCut.C_in, source.C_out) annotation (Line(points={{-10,0},{-85,0}}, color={95,95,95}));
30+
end PressureCut;

MetroscopeModelingLibrary/Tests/FlueGases/Pipes/package.order

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ Filter_reverse
55
Filter_faulty
66
ControlValve_reverse
77
ControlValve_direct
8+
PressureCut
9+
Leak

0 commit comments

Comments
 (0)