|
| 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; |
0 commit comments