Skip to content

Commit fa89db3

Browse files
committed
no message
1 parent 5cb2f79 commit fa89db3

14 files changed

+1257
-7
lines changed

Compressible/Examples/AssyComponents/ComplexFNW_ex02_v01.mo

Lines changed: 423 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
within FluidSystemComponents.Compressible.Examples.AssyComponents;
2+
3+
model ComplexFNW_ex03_v01
4+
//-------------------------
5+
import units = Modelica.SIunits;
6+
//-------------------------
7+
parameter units.Volume volStd = 0.1;
8+
//-------------------------
9+
replaceable package fluid1 = Modelica.Media.Interfaces.PartialMedium annotation(
10+
choicesAllMatching = true);
11+
//redeclare package Medium= fluid1,
12+
//-------------------------
13+
inner Modelica.Fluid.System system(T_start(displayUnit = "K") = 288.15, energyDynamics = Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, m_flow_start = 0, massDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, p_start = 100 * 1000) annotation(
14+
Placement(visible = true, transformation(origin = {-74, 170}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
15+
Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = fluid1, T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
16+
Placement(visible = true, transformation(origin = {-95, 93}, extent = {{9, -9}, {-9, 9}}, rotation = 0)));
17+
Modelica.Blocks.Sources.Ramp ramp_p_bc(duration = 1, height = 2.5 * 100 * 1000 - 100 * 1000, offset = 100 * 1000, startTime = 11) annotation(
18+
Placement(visible = true, transformation(origin = {-53, 100}, extent = {{6, -6}, {-6, 6}}, rotation = 0)));
19+
Modelica.Blocks.Sources.Ramp ramp_p_bc1(duration = 1, height = 2.0 * 100 * 1000 - 100 * 1000, offset = 100 * 1000, startTime = 11) annotation(
20+
Placement(visible = true, transformation(origin = {-199, 91}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
21+
Modelica.Fluid.Sources.Boundary_pT boundary1(redeclare package Medium = fluid1, T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
22+
Placement(visible = true, transformation(origin = {-155, 84}, extent = {{-9, -9}, {9, 9}}, rotation = 0)));
23+
Modelica.Fluid.Vessels.ClosedVolume volume(redeclare package Medium = fluid1, V = volStd, nPorts = 3, use_portsData = false) annotation(
24+
Placement(visible = true, transformation(origin = {-73, -25}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
25+
Modelica.Fluid.Vessels.ClosedVolume volume1(redeclare package Medium = fluid1, V = volStd, nPorts = 3, use_portsData = false) annotation(
26+
Placement(visible = true, transformation(origin = {-130, 23}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
27+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
28+
Placement(visible = true, transformation(origin = {-130, 48}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
29+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction1(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
30+
Placement(visible = true, transformation(origin = {-104, 52}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
31+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction2(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
32+
Placement(visible = true, transformation(origin = {-104, -8}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
33+
Modelica.Fluid.Vessels.ClosedVolume volume2(redeclare package Medium = fluid1, V = volStd, nPorts = 2, use_portsData = false) annotation(
34+
Placement(visible = true, transformation(origin = {-164, -50}, extent = {{-7, -7}, {7, 7}}, rotation = -90)));
35+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction3(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
36+
Placement(visible = true, transformation(origin = {-92, -50}, extent = {{8, -8}, {-8, 8}}, rotation = 0)));
37+
Modelica.Fluid.Vessels.ClosedVolume volume3(redeclare package Medium = fluid1, V = volStd, nPorts = 3, use_portsData = false) annotation(
38+
Placement(visible = true, transformation(origin = {-10, -25}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
39+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction4(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
40+
Placement(visible = true, transformation(origin = {-40, -32}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
41+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction5(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
42+
Placement(visible = true, transformation(origin = {-204, -84}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
43+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction6(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
44+
Placement(visible = true, transformation(origin = {26, -32}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
45+
Modelica.Fluid.Vessels.ClosedVolume volume4(redeclare package Medium = fluid1, V = volStd, nPorts = 3, use_portsData = false) annotation(
46+
Placement(visible = true, transformation(origin = {60, -25}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
47+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction7(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
48+
Placement(visible = true, transformation(origin = {94, -32}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
49+
Modelica.Blocks.Sources.Ramp ramp_p_bc4(duration = 1, height = 2.6 * 100 * 1000 - 100 * 1000, offset = 100 * 1000, startTime = 11) annotation(
50+
Placement(visible = true, transformation(origin = {-17, 146}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
51+
Modelica.Fluid.Sources.Boundary_pT boundary4(redeclare package Medium = fluid1, T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
52+
Placement(visible = true, transformation(origin = {-10, 99}, extent = {{9, -9}, {-9, 9}}, rotation = 90)));
53+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction8(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
54+
Placement(visible = true, transformation(origin = {-10, 70}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
55+
Modelica.Fluid.Sources.Boundary_pT boundary5(redeclare package Medium = fluid1, T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
56+
Placement(visible = true, transformation(origin = {60, 103}, extent = {{9, -9}, {-9, 9}}, rotation = 90)));
57+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction9(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
58+
Placement(visible = true, transformation(origin = {60, 74}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
59+
Modelica.Blocks.Sources.Ramp ramp_p_bc41(duration = 1, height = 2.8 * 100 * 1000 - 100 * 1000, offset = 100 * 1000, startTime = 11) annotation(
60+
Placement(visible = true, transformation(origin = {53, 146}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
61+
Modelica.Fluid.Vessels.ClosedVolume volume5(redeclare package Medium = fluid1, V = volStd, nPorts = 2, use_portsData = false) annotation(
62+
Placement(visible = true, transformation(origin = {-166, -124}, extent = {{-7, -7}, {7, 7}}, rotation = -90)));
63+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction10(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
64+
Placement(visible = true, transformation(origin = {-132, -124}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
65+
Modelica.Fluid.Interfaces.FluidPort_a port_3(redeclare package Medium= fluid1) annotation(
66+
Placement(visible = true, transformation(origin = {196, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {100, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
67+
Modelica.Fluid.Interfaces.FluidPort_a port_2(redeclare package Medium= fluid1) annotation(
68+
Placement(visible = true, transformation(origin = {-100, -198}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-20, -100}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
69+
Modelica.Blocks.Continuous.FirstOrder firstOrder1(T = 1, initType = Modelica.Blocks.Types.Init.SteadyState) annotation(
70+
Placement(visible = true, transformation(origin = {-180, 91}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
71+
Modelica.Blocks.Continuous.FirstOrder firstOrder(T = 1, initType = Modelica.Blocks.Types.Init.SteadyState) annotation(
72+
Placement(visible = true, transformation(origin = {-72, 100}, extent = {{6, -6}, {-6, 6}}, rotation = 0)));
73+
Modelica.Blocks.Continuous.FirstOrder firstOrder4(T = 1, initType = Modelica.Blocks.Types.Init.SteadyState) annotation(
74+
Placement(visible = true, transformation(origin = {-17, 125}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
75+
Modelica.Blocks.Continuous.FirstOrder firstOrder5(T = 1, initType = Modelica.Blocks.Types.Init.SteadyState) annotation(
76+
Placement(visible = true, transformation(origin = {53, 127}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
77+
equation
78+
connect(restriction.port_a, boundary1.ports[1]) annotation(
79+
Line(points = {{-130, 56}, {-130, 84}, {-146, 84}}, color = {0, 127, 255}));
80+
connect(restriction.port_b, volume1.ports[1]) annotation(
81+
Line(points = {{-130, 40}, {-130, 16}}, color = {0, 127, 255}));
82+
connect(restriction1.port_b, boundary.ports[1]) annotation(
83+
Line(points = {{-104, 60}, {-104, 93}}, color = {0, 127, 255}));
84+
connect(volume1.ports[2], restriction1.port_a) annotation(
85+
Line(points = {{-130, 16}, {-104, 16}, {-104, 44}}, color = {0, 127, 255}));
86+
connect(restriction2.port_a, volume1.ports[3]) annotation(
87+
Line(points = {{-112, -8}, {-130, -8}, {-130, 16}}, color = {0, 127, 255}));
88+
connect(restriction2.port_b, volume.ports[1]) annotation(
89+
Line(points = {{-96, -8}, {-73, -8}, {-73, -32}}, color = {0, 127, 255}));
90+
connect(restriction4.port_a, volume.ports[2]) annotation(
91+
Line(points = {{-48, -32}, {-73, -32}}, color = {0, 127, 255}));
92+
connect(restriction4.port_b, volume3.ports[1]) annotation(
93+
Line(points = {{-32, -32}, {-10, -32}}, color = {0, 127, 255}));
94+
connect(restriction3.port_a, volume.ports[3]) annotation(
95+
Line(points = {{-84, -50}, {-73, -50}, {-73, -32}}, color = {0, 127, 255}));
96+
connect(restriction3.port_b, volume2.ports[1]) annotation(
97+
Line(points = {{-100, -50}, {-171, -50}}, color = {0, 127, 255}));
98+
connect(restriction5.port_a, volume2.ports[2]) annotation(
99+
Line(points = {{-204, -76}, {-204, -50}, {-171, -50}}, color = {0, 127, 255}));
100+
connect(restriction6.port_a, volume3.ports[2]) annotation(
101+
Line(points = {{18, -32}, {-10, -32}}, color = {0, 127, 255}));
102+
connect(restriction6.port_b, volume4.ports[1]) annotation(
103+
Line(points = {{34, -32}, {60, -32}}, color = {0, 127, 255}));
104+
connect(restriction7.port_a, volume4.ports[2]) annotation(
105+
Line(points = {{86, -32}, {60, -32}}, color = {0, 127, 255}));
106+
connect(restriction8.port_a, boundary4.ports[1]) annotation(
107+
Line(points = {{-10, 78}, {-10, 90}}, color = {0, 127, 255}));
108+
connect(restriction8.port_b, volume3.ports[3]) annotation(
109+
Line(points = {{-10, 62}, {-10, -32}}, color = {0, 127, 255}));
110+
connect(restriction9.port_a, boundary5.ports[1]) annotation(
111+
Line(points = {{60, 82}, {60, 94}}, color = {0, 127, 255}));
112+
connect(restriction9.port_b, volume4.ports[3]) annotation(
113+
Line(points = {{60, 66}, {60, -32}}, color = {0, 127, 255}));
114+
connect(restriction5.port_b, volume5.ports[1]) annotation(
115+
Line(points = {{-204, -92}, {-204, -124}, {-173, -124}}, color = {0, 127, 255}));
116+
connect(restriction10.port_a, volume5.ports[2]) annotation(
117+
Line(points = {{-140, -124}, {-173, -124}}, color = {0, 127, 255}));
118+
connect(restriction7.port_b, port_3) annotation(
119+
Line(points = {{102, -32}, {196, -32}}, color = {0, 127, 255}));
120+
connect(restriction10.port_b, port_2) annotation(
121+
Line(points = {{-124, -124}, {-100, -124}, {-100, -198}}, color = {0, 127, 255}));
122+
connect(ramp_p_bc1.y, firstOrder1.u) annotation(
123+
Line(points = {{-192, 91}, {-187, 91}}, color = {0, 0, 127}));
124+
connect(firstOrder1.y, boundary1.p_in) annotation(
125+
Line(points = {{-173, 91}, {-166, 91}}, color = {0, 0, 127}));
126+
connect(boundary.p_in, firstOrder.y) annotation(
127+
Line(points = {{-84, 100}, {-78, 100}}, color = {0, 0, 127}));
128+
connect(firstOrder.u, ramp_p_bc.y) annotation(
129+
Line(points = {{-64, 100}, {-60, 100}}, color = {0, 0, 127}));
130+
connect(firstOrder4.u, ramp_p_bc4.y) annotation(
131+
Line(points = {{-17, 132}, {-17, 139}}, color = {0, 0, 127}));
132+
connect(firstOrder4.y, boundary4.p_in) annotation(
133+
Line(points = {{-17, 118}, {-17, 110}}, color = {0, 0, 127}));
134+
connect(ramp_p_bc41.y, firstOrder5.u) annotation(
135+
Line(points = {{53, 139}, {53, 134}}, color = {0, 0, 127}));
136+
connect(firstOrder5.y, boundary5.p_in) annotation(
137+
Line(points = {{53, 120}, {53, 114}}, color = {0, 0, 127}));
138+
annotation(
139+
Diagram(coordinateSystem(extent = {{-240, -200}, {200, 200}})));
140+
end ComplexFNW_ex03_v01;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
within FluidSystemComponents.Compressible.Examples;
2+
3+
package AssyComponents
4+
extends Modelica.Icons.ExamplesPackage;
5+
end AssyComponents;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ComplexFNW_ex02_v01
2+
ComplexFNW_ex03_v01

Compressible/Examples/Test/ComplexFlowNetwork_02_v01_temp07.mo

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ model ComplexFlowNetwork_02_v01_temp07
2020
Modelica.Fluid.Sources.Boundary_pT boundary2(redeclare package Medium = fluid1, T = 1200, nPorts = 4, p = 10 * 100 * 1000, use_p_in = true) annotation(
2121
Placement(visible = true, transformation(origin = {63, 231}, extent = {{9, -9}, {-9, 9}}, rotation = 0)));
2222
Modelica.Fluid.Vessels.ClosedVolume volume1(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 3) annotation(
23-
Placement(visible = true, transformation(origin = {-127, -60}, extent = {{-5, -5}, {5, 5}}, rotation = -90)));
23+
Placement(visible = true, transformation(origin = {-159, -60}, extent = {{-5, -5}, {5, 5}}, rotation = -90)));
2424
Modelica.Fluid.Vessels.ClosedVolume volume2(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 2) annotation(
2525
Placement(visible = true, transformation(origin = {-73, -55}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
2626
Modelica.Fluid.Vessels.ClosedVolume volume3(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 5) annotation(
@@ -40,9 +40,9 @@ model ComplexFlowNetwork_02_v01_temp07
4040
Modelica.Blocks.Interaction.Show.RealValue realValue(significantDigits = 6) annotation(
4141
Placement(visible = true, transformation(origin = {-170, 40}, extent = {{-7, -4}, {7, 4}}, rotation = 0)));
4242
Modelica.Fluid.Sensors.Pressure p1(redeclare package Medium = fluid1) annotation(
43-
Placement(visible = true, transformation(origin = {-138, -62}, extent = {{-4, 4}, {4, -4}}, rotation = 180)));
43+
Placement(visible = true, transformation(origin = {-170, -62}, extent = {{-4, 4}, {4, -4}}, rotation = 180)));
4444
Modelica.Blocks.Interaction.Show.RealValue realValue1(significantDigits = 6) annotation(
45-
Placement(visible = true, transformation(origin = {-132, -70}, extent = {{-7, -4}, {7, 4}}, rotation = 0)));
45+
Placement(visible = true, transformation(origin = {-164, -70}, extent = {{-7, -4}, {7, 4}}, rotation = 0)));
4646
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
4747
Placement(visible = true, transformation(origin = {-164, 92}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
4848
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction1(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.005 ^ 2) annotation(
@@ -185,21 +185,21 @@ equation
185185
connect(p.p, realValue.numberPort) annotation(
186186
Line(points = {{-178.4, 50}, {-178.4, 40}}, color = {0, 0, 127}));
187187
connect(p1.port, volume1.ports[1]) annotation(
188-
Line(points = {{-138, -66}, {-132, -66}, {-132, -60}}, color = {0, 127, 255}));
188+
Line(points = {{-170, -66}, {-164, -66}, {-164, -60}}, color = {0, 127, 255}));
189189
connect(p1.p, realValue1.numberPort) annotation(
190-
Line(points = {{-142.4, -62}, {-144.4, -62}, {-144.4, -70}, {-140.4, -70}}, color = {0, 0, 127}));
190+
Line(points = {{-174.4, -62}, {-176.4, -62}, {-176.4, -70}, {-172.4, -70}}, color = {0, 0, 127}));
191191
connect(restriction.port_a, boundary.ports[1]) annotation(
192192
Line(points = {{-164, 100}, {-164, 163}}, color = {0, 127, 255}));
193193
connect(restriction.port_b, volume.ports[2]) annotation(
194194
Line(points = {{-164, 84}, {-164, 48}}, color = {0, 127, 255}));
195195
connect(restriction1.port_a, volume.ports[3]) annotation(
196196
Line(points = {{-164, 10}, {-164, 48}}, color = {0, 127, 255}));
197197
connect(restriction1.port_b, volume1.ports[2]) annotation(
198-
Line(points = {{-164, -6}, {-164, -60}, {-132, -60}}, color = {0, 127, 255}));
198+
Line(points = {{-164, -6}, {-164, -60}}, color = {0, 127, 255}));
199199
connect(restriction2.port_b, volume2.ports[1]) annotation(
200200
Line(points = {{-92, -60}, {-72, -60}}, color = {0, 127, 255}));
201201
connect(restriction2.port_a, volume1.ports[3]) annotation(
202-
Line(points = {{-108, -60}, {-132, -60}}, color = {0, 127, 255}));
202+
Line(points = {{-108, -60}, {-164, -60}}, color = {0, 127, 255}));
203203
connect(restriction3.port_a, volume2.ports[2]) annotation(
204204
Line(points = {{-48, -60}, {-72, -60}}, color = {0, 127, 255}));
205205
connect(restriction3.port_b, volume3.ports[1]) annotation(

0 commit comments

Comments
 (0)