Skip to content

Commit a73d8f1

Browse files
committed
no message
1 parent ee24e09 commit a73d8f1

File tree

5 files changed

+986
-0
lines changed

5 files changed

+986
-0
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
within FluidSystemComponents.Compressible.Examples.Test;
2+
3+
model ComplexFlowNetwork_02_v01_temp04
4+
extends Modelica.Icons.Example;
5+
//-------------------------
6+
import units = Modelica.SIunits;
7+
//-------------------------
8+
parameter units.Volume volStd = 0.1;
9+
package fluid1 = Modelica.Media.Air.DryAirNasa;
10+
//redeclare package Medium= fluid1,
11+
//-------------------------
12+
inner Modelica.Fluid.System system(T_start(displayUnit = "K") = 500, energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_start = 0.1, massDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, p_start = 10 * 100 * 1000) annotation(
13+
Placement(visible = true, transformation(origin = {-50, 186}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
14+
Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = fluid1, T = 500, nPorts = 1, p = 30 * 100 * 1000, use_p_in = true) annotation(
15+
Placement(visible = true, transformation(origin = {-174, 162}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
16+
Modelica.Fluid.Vessels.ClosedVolume volume(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 3) annotation(
17+
Placement(visible = true, transformation(origin = {-164, 53}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
18+
Modelica.Fluid.Sources.Boundary_pT boundary1(redeclare package Medium = fluid1, T = 550, nPorts = 1, p = 28 * 100 * 1000, use_p_in = true) annotation(
19+
Placement(visible = true, transformation(origin = {-100, 156}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
20+
Modelica.Fluid.Sources.Boundary_pT boundary2(redeclare package Medium = fluid1, T = 1200, nPorts = 2, p = 10 * 100 * 1000, use_p_in = true) annotation(
21+
Placement(visible = true, transformation(origin = {54, 150}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
22+
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)));
24+
Modelica.Fluid.Vessels.ClosedVolume volume2(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 2) annotation(
25+
Placement(visible = true, transformation(origin = {-73, -55}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
26+
Modelica.Fluid.Vessels.ClosedVolume volume3(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 5) annotation(
27+
Placement(visible = true, transformation(origin = {5, -45}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
28+
Modelica.Fluid.Vessels.ClosedVolume volume4(redeclare package Medium = fluid1, V = volStd, use_portsData = false, nPorts = 3) annotation(
29+
Placement(visible = true, transformation(origin = {-84, 55}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
30+
Modelica.Blocks.Sources.Ramp ramp_p_bc(duration = 1, height = 2 * 100 * 1000, offset = 40 * 100 * 1000, startTime = 10) annotation(
31+
Placement(visible = true, transformation(origin = {-202, 170}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
32+
Modelica.Blocks.Sources.Ramp ramp_p_bc1(duration = 1, height = 2 * 100 * 1000, offset = 38 * 100 * 1000, startTime = 13) annotation(
33+
Placement(visible = true, transformation(origin = {-128, 164}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
34+
Modelica.Blocks.Sources.Ramp ramp_p_bc2(duration = 1, height = -1 * 100 * 1000, offset = 10 * 100 * 1000, startTime = 11) annotation(
35+
Placement(visible = true, transformation(origin = {46, 182}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
36+
Modelica.Fluid.Vessels.ClosedVolume volume5(redeclare package Medium = fluid1, V = volStd, nPorts = 3, use_portsData = false) annotation(
37+
Placement(visible = true, transformation(origin = {24, 55}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
38+
Modelica.Fluid.Sensors.Pressure p(redeclare package Medium = fluid1) annotation(
39+
Placement(visible = true, transformation(origin = {-174, 50}, extent = {{-4, 4}, {4, -4}}, rotation = 180)));
40+
Modelica.Blocks.Interaction.Show.RealValue realValue(significantDigits = 6) annotation(
41+
Placement(visible = true, transformation(origin = {-170, 40}, extent = {{-7, -4}, {7, 4}}, rotation = 0)));
42+
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)));
44+
Modelica.Blocks.Interaction.Show.RealValue realValue1(significantDigits = 6) annotation(
45+
Placement(visible = true, transformation(origin = {-132, -70}, extent = {{-7, -4}, {7, 4}}, rotation = 0)));
46+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
47+
Placement(visible = true, transformation(origin = {-164, 92}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
48+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction1(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.005 ^ 2) annotation(
49+
Placement(visible = true, transformation(origin = {-164, 2}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
50+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction2(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
51+
Placement(visible = true, transformation(origin = {-100, -60}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
52+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction3(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
53+
Placement(visible = true, transformation(origin = {-40, -60}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
54+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction4(redeclare package Medium = fluid1, AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
55+
Placement(visible = true, transformation(origin = {-66, -10}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
56+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction5(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.02 ^ 2) annotation(
57+
Placement(visible = true, transformation(origin = {-84, 98}, extent = {{-8, -8}, {8, 8}}, rotation = -90)));
58+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction6(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.001 ^ 2) annotation(
59+
Placement(visible = true, transformation(origin = {-56, 50}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
60+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction7(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
61+
Placement(visible = true, transformation(origin = {24, 88}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
62+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction8(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.005 ^ 2) annotation(
63+
Placement(visible = true, transformation(origin = {54, 56}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
64+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction9(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
65+
Placement(visible = true, transformation(origin = {24, 2}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
66+
Modelica.Fluid.Sources.Boundary_pT boundary3(redeclare package Medium = fluid1,T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
67+
Placement(visible = true, transformation(origin = {100, 150}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
68+
Modelica.Blocks.Sources.Ramp ramp_p_bc3(duration = 1, height = -1 * 100 * 1000, offset = 9 * 100 * 1000, startTime = 11) annotation(
69+
Placement(visible = true, transformation(origin = {92, 180}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
70+
Modelica.Fluid.Vessels.ClosedVolume volume6(redeclare package Medium = fluid1,V = volStd, nPorts = 3, use_portsData = false) annotation(
71+
Placement(visible = true, transformation(origin = {54, 93}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
72+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction10(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.02 ^ 2) annotation(
73+
Placement(visible = true, transformation(origin = {54, 118}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
74+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction11(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.001 ^ 2) annotation(
75+
Placement(visible = true, transformation(origin = {78, 88}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
76+
Modelica.Fluid.Vessels.ClosedVolume volume7(redeclare package Medium = fluid1,V = volStd, nPorts = 3, use_portsData = false) annotation(
77+
Placement(visible = true, transformation(origin = {100, 93}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
78+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction12(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.02 ^ 2) annotation(
79+
Placement(visible = true, transformation(origin = {100, 118}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
80+
Modelica.Blocks.Sources.Ramp ramp_p_bc4(duration = 1, height = -1 * 100 * 1000, offset = 8.5 * 100 * 1000, startTime = 11) annotation(
81+
Placement(visible = true, transformation(origin = {140, 180}, extent = {{6, -6}, {-6, 6}}, rotation = 90)));
82+
Modelica.Fluid.Sources.Boundary_pT boundary4(redeclare package Medium = fluid1,T = 1200, nPorts = 1, p = 10 * 100 * 1000, use_p_in = true) annotation(
83+
Placement(visible = true, transformation(origin = {148, 150}, extent = {{10, -10}, {-10, 10}}, rotation = 90)));
84+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction13(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.001 ^ 2) annotation(
85+
Placement(visible = true, transformation(origin = {148, 12}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
86+
Modelica.Fluid.Vessels.ClosedVolume volume8(redeclare package Medium = fluid1,V = volStd, nPorts = 3, use_portsData = false) annotation(
87+
Placement(visible = true, transformation(origin = {100, 39}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
88+
Modelica.Fluid.Vessels.ClosedVolume volume9(redeclare package Medium = fluid1,V = volStd, nPorts = 3, use_portsData = false) annotation(
89+
Placement(visible = true, transformation(origin = {148, 39}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
90+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction14(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
91+
Placement(visible = true, transformation(origin = {100, 68}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
92+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction15(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
93+
Placement(visible = true, transformation(origin = {76, 34}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
94+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction16(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
95+
Placement(visible = true, transformation(origin = {148, 74}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
96+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction17(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.02 ^ 2) annotation(
97+
Placement(visible = true, transformation(origin = {124, 34}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
98+
Modelica.Fluid.Vessels.ClosedVolume volume10(redeclare package Medium = fluid1,V = volStd, nPorts = 3, use_portsData = false) annotation(
99+
Placement(visible = true, transformation(origin = {54, 19}, extent = {{-5, -5}, {5, 5}}, rotation = 0)));
100+
FluidSystemComponents.Compressible.Components.NozzleFlowEquation03 restriction18(redeclare package Medium = fluid1,AmechTot_par = Modelica.Constants.pi / 4 * 0.01 ^ 2) annotation(
101+
Placement(visible = true, transformation(origin = {54, -4}, extent = {{-8, -8}, {8, 8}}, rotation = 90)));
102+
equation
103+
connect(ramp_p_bc.y, boundary.p_in) annotation(
104+
Line(points = {{-195, 170}, {-186, 170}}, color = {0, 0, 127}));
105+
connect(ramp_p_bc1.y, boundary1.p_in) annotation(
106+
Line(points = {{-121, 164}, {-111.4, 164}}, color = {0, 0, 127}));
107+
connect(p.port, volume.ports[1]) annotation(
108+
Line(points = {{-174, 46}, {-169, 46}, {-169, 48}, {-164, 48}}, color = {0, 127, 255}));
109+
connect(p.p, realValue.numberPort) annotation(
110+
Line(points = {{-178.4, 50}, {-178.4, 40}}, color = {0, 0, 127}));
111+
connect(p1.port, volume1.ports[1]) annotation(
112+
Line(points = {{-138, -66}, {-132, -66}, {-132, -60}}, color = {0, 127, 255}));
113+
connect(p1.p, realValue1.numberPort) annotation(
114+
Line(points = {{-142.4, -62}, {-144.4, -62}, {-144.4, -70}, {-140.4, -70}}, color = {0, 0, 127}));
115+
connect(restriction.port_a, boundary.ports[1]) annotation(
116+
Line(points = {{-164, 100}, {-164, 162}}, color = {0, 127, 255}));
117+
connect(restriction.port_b, volume.ports[2]) annotation(
118+
Line(points = {{-164, 84}, {-164, 48}}, color = {0, 127, 255}));
119+
connect(restriction1.port_a, volume.ports[3]) annotation(
120+
Line(points = {{-164, 10}, {-164, 48}}, color = {0, 127, 255}));
121+
connect(restriction1.port_b, volume1.ports[2]) annotation(
122+
Line(points = {{-164, -6}, {-164, -60}, {-132, -60}}, color = {0, 127, 255}));
123+
connect(restriction2.port_b, volume2.ports[1]) annotation(
124+
Line(points = {{-92, -60}, {-72, -60}}, color = {0, 127, 255}));
125+
connect(restriction2.port_a, volume1.ports[3]) annotation(
126+
Line(points = {{-108, -60}, {-132, -60}}, color = {0, 127, 255}));
127+
connect(restriction3.port_a, volume2.ports[2]) annotation(
128+
Line(points = {{-48, -60}, {-72, -60}}, color = {0, 127, 255}));
129+
connect(restriction3.port_b, volume3.ports[1]) annotation(
130+
Line(points = {{-32, -60}, {6, -60}, {6, -50}}, color = {0, 127, 255}));
131+
connect(restriction4.port_a, volume4.ports[1]) annotation(
132+
Line(points = {{-74, -10}, {-84, -10}, {-84, 50}}, color = {0, 127, 255}));
133+
connect(restriction4.port_b, volume3.ports[2]) annotation(
134+
Line(points = {{-58, -10}, {-18, -10}, {-18, -50}, {5, -50}}, color = {0, 127, 255}));
135+
connect(restriction5.port_b, volume4.ports[2]) annotation(
136+
Line(points = {{-84, 90}, {-84, 50}}, color = {0, 127, 255}));
137+
connect(restriction5.port_a, boundary1.ports[1]) annotation(
138+
Line(points = {{-84, 106}, {-84, 156}, {-90, 156}}, color = {0, 127, 255}));
139+
connect(restriction6.port_a, volume4.ports[3]) annotation(
140+
Line(points = {{-64, 50}, {-84, 50}}, color = {0, 127, 255}));
141+
connect(restriction6.port_b, volume5.ports[1]) annotation(
142+
Line(points = {{-48, 50}, {24, 50}}, color = {0, 127, 255}));
143+
connect(restriction7.port_a, volume5.ports[2]) annotation(
144+
Line(points = {{24, 80}, {24, 50}}, color = {0, 127, 255}));
145+
connect(restriction7.port_b, boundary2.ports[1]) annotation(
146+
Line(points = {{24, 96}, {24, 140}, {54, 140}}, color = {0, 127, 255}));
147+
connect(volume3.ports[3], restriction9.port_a) annotation(
148+
Line(points = {{5, -50}, {23, -50}, {23, -6}}, color = {0, 127, 255}));
149+
connect(restriction9.port_b, volume5.ports[3]) annotation(
150+
Line(points = {{24, 10}, {24, 50}}, color = {0, 127, 255}));
151+
connect(ramp_p_bc2.y, boundary2.p_in) annotation(
152+
Line(points = {{46, 176}, {46, 162}}, color = {0, 0, 127}));
153+
connect(ramp_p_bc3.y, boundary3.p_in) annotation(
154+
Line(points = {{92, 173}, {92, 161.4}}, color = {0, 0, 127}));
155+
connect(restriction8.port_b, volume6.ports[1]) annotation(
156+
Line(points = {{54, 64}, {54, 88}}, color = {0, 127, 255}));
157+
connect(restriction10.port_a, volume6.ports[2]) annotation(
158+
Line(points = {{54, 110}, {54, 88}}, color = {0, 127, 255}));
159+
connect(restriction10.port_b, boundary2.ports[2]) annotation(
160+
Line(points = {{54, 126}, {54, 140}}, color = {0, 127, 255}));
161+
connect(restriction11.port_a, volume6.ports[3]) annotation(
162+
Line(points = {{70, 88}, {54, 88}}));
163+
connect(restriction11.port_b, volume7.ports[1]) annotation(
164+
Line(points = {{86, 88}, {100, 88}}, color = {0, 127, 255}));
165+
connect(restriction12.port_b, boundary3.ports[1]) annotation(
166+
Line(points = {{100, 126}, {100, 140}}, color = {0, 127, 255}));
167+
connect(restriction12.port_a, volume7.ports[2]) annotation(
168+
Line(points = {{100, 110}, {100, 88}}, color = {0, 127, 255}));
169+
connect(ramp_p_bc4.y, boundary4.p_in) annotation(
170+
Line(points = {{140, 173.4}, {140, 161.4}}, color = {0, 0, 127}));
171+
connect(restriction13.port_a, volume3.ports[4]) annotation(
172+
Line(points = {{148, 4}, {148, -50}, {5, -50}}, color = {0, 127, 255}));
173+
connect(restriction14.port_b, volume7.ports[3]) annotation(
174+
Line(points = {{100, 76}, {100, 88}}, color = {0, 127, 255}));
175+
connect(restriction14.port_a, volume8.ports[1]) annotation(
176+
Line(points = {{100, 60}, {100, 34}}, color = {0, 127, 255}));
177+
connect(restriction15.port_b, volume8.ports[2]) annotation(
178+
Line(points = {{84, 34}, {100, 34}}, color = {0, 127, 255}));
179+
connect(restriction18.port_a, volume3.ports[5]) annotation(
180+
Line(points = {{54, -12}, {54, -50}, {5, -50}}, color = {0, 127, 255}));
181+
connect(restriction18.port_b, volume10.ports[1]) annotation(
182+
Line(points = {{54, 4}, {54, 14}}, color = {0, 127, 255}));
183+
connect(volume10.ports[2], restriction8.port_a) annotation(
184+
Line(points = {{54, 14}, {54, 48}}, color = {0, 127, 255}));
185+
connect(restriction15.port_a, volume10.ports[3]) annotation(
186+
Line(points = {{68, 34}, {54, 34}, {54, 14}}, color = {0, 127, 255}));
187+
connect(restriction17.port_a, volume8.ports[3]) annotation(
188+
Line(points = {{116, 34}, {100, 34}}, color = {0, 127, 255}));
189+
connect(restriction17.port_b, volume9.ports[1]) annotation(
190+
Line(points = {{132, 34}, {148, 34}}, color = {0, 127, 255}));
191+
connect(restriction13.port_b, volume9.ports[2]) annotation(
192+
Line(points = {{148, 20}, {148, 34}}));
193+
connect(restriction16.port_a, volume9.ports[3]) annotation(
194+
Line(points = {{148, 66}, {148, 34}}, color = {0, 127, 255}));
195+
connect(restriction16.port_b, boundary4.ports[1]) annotation(
196+
Line(points = {{148, 82}, {148, 140}}, color = {0, 127, 255}));
197+
annotation(
198+
Diagram(coordinateSystem(extent = {{-200, -100}, {200, 200}})),
199+
experiment(StartTime = 0, StopTime = 50, Tolerance = 1e-06, Interval = 0.01),
200+
__OpenModelica_commandLineOptions = "--matchingAlgorithm=PFPlusExt --indexReductionMethod=dynamicStateSelection -d=initialization,NLSanalyticJacobian,nonewInst -d=nonewInst -d=nonewInst -d=nonewInst -d=nonewInst",
201+
__OpenModelica_simulationFlags(lv = "LOG_STATS", s = "dassl"));
202+
end ComplexFlowNetwork_02_v01_temp04;

0 commit comments

Comments
 (0)