Changeset 1940
- Timestamp:
- 12/03/2008 08:52:48 AM (5 weeks ago)
- Location:
- Modelica_Fluid/branches/StreamConnector/Modelica_Fluid
- Files:
-
- 18 modified
-
Examples/AST_BatchPlant.mo (modified) (7 diffs)
-
Interfaces.mo (modified) (6 diffs)
-
Junctions.mo (modified) (5 diffs)
-
Pipes.mo (modified) (10 diffs)
-
PressureLosses.mo (modified) (2 diffs)
-
Pumps.mo (modified) (1 diff)
-
Test/TestComponents/Junctions/TestJunctionIdeal.mo (modified) (1 diff)
-
Test/TestComponents/Junctions/TestJunctionVolume.mo (modified) (1 diff)
-
Test/TestComponents/Pipes/TestDistributedPipe01.mo (modified) (15 diffs)
-
Test/TestComponents/Sensors/TestOnePortSensors1.mo (modified) (2 diffs)
-
Test/TestComponents/Sensors/TestOnePortSensors2.mo (modified) (4 diffs)
-
Test/TestComponents/Sensors/TestTemperatureSensor.mo (modified) (1 diff)
-
Test/TestComponents/Volumes/TestClosedVolume.mo (modified) (1 diff)
-
Test/TestComponents/Volumes/TestMixingVolumes.mo (modified) (2 diffs)
-
Test/TestComponents/Volumes/TestMixingVolumesPressureStates.mo (modified) (2 diffs)
-
Test/TestCriticalCases.mo (modified) (10 diffs)
-
Test/TestOverdeterminedSteadyStateInit.mo (modified) (2 diffs)
-
Volumes.mo (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Modelica_Fluid/branches/StreamConnector/Modelica_Fluid/Examples/AST_BatchPlant.mo
r1927 r1940 149 149 annotation (Placement(transformation(extent={{-114,210},{-134,230}}, 150 150 rotation=0))); 151 Junctions.JunctionIdealvolume2(151 Modelica_Fluid.Junctions.IdealTJunction volume2( 152 152 redeclare package Medium = BatchMedium) 153 153 annotation (Placement(transformation( … … 161 161 annotation (Placement(transformation(extent={{112,210},{132,230}}, 162 162 rotation=0))); 163 Junctions.JunctionIdealvolume8(163 Modelica_Fluid.Junctions.IdealTJunction volume8( 164 164 redeclare package Medium = BatchMedium) 165 165 annotation (Placement(transformation( … … 191 191 extent={{-10,10},{10,-10}}, 192 192 rotation=90))); 193 Modelica_Fluid.Volumes. ClosedVolume volume1(193 Modelica_Fluid.Volumes.Volume volume1( 194 194 redeclare package Medium = BatchMedium, 195 195 initType=Modelica_Fluid.Types.Init.InitialValues, … … 226 226 extent={{10,-10},{-10,10}}, 227 227 rotation=270))); 228 Modelica_Fluid.Volumes. ClosedVolume volume7(228 Modelica_Fluid.Volumes.Volume volume7( 229 229 redeclare package Medium = BatchMedium, 230 230 initType=Modelica_Fluid.Types.Init.InitialValues, … … 279 279 extent={{10,10},{-10,-10}}, 280 280 rotation=180))); 281 Modelica_Fluid.Examples.AST_BatchPlant.BaseClasses.JunctionVolume volume5(281 BaseClasses.JunctionVolume volume5( 282 282 redeclare package Medium = BatchMedium, 283 283 initType=Modelica_Fluid.Types.Init.InitialValues, … … 2357 2357 SI.Mass[Medium.nXi] mXi "Independent masses"; 2358 2358 2359 Interfaces.Fluid StatePorts_a[nPorts_a] ports_a(2359 Interfaces.FluidPorts_a[nPorts_a] ports_a( 2360 2360 redeclare each package Medium=Medium, 2361 2361 m_flow(each min=if allowFlowReversal then -Constants.inf else 0)) … … 2363 2363 annotation (Placement( 2364 2364 transformation(extent={{-110,40},{-90,-40}}, rotation=0))); 2365 Interfaces.Fluid StatePorts_b[nPorts_b] ports_b(2365 Interfaces.FluidPorts_b[nPorts_b] ports_b( 2366 2366 redeclare each package Medium=Medium, 2367 2367 m_flow(each max=if allowFlowReversal then +Constants.inf else 0)) -
Modelica_Fluid/branches/StreamConnector/Modelica_Fluid/Interfaces.mo
r1706 r1940 116 116 end FluidPort_b; 117 117 118 connector FluidStatePort_a119 "Fluid connector at design inlet with potential pressure state"120 extends FluidPort;121 annotation (defaultComponentName="port_a",122 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,123 -100},{100,100}}), graphics={Ellipse(124 extent={{-40,40},{40,-40}},125 lineColor={0,0,255},126 fillColor={0,127,255},127 fillPattern=FillPattern.Solid), Text(extent={{-150,110},{150,50}},128 textString="%name")}),129 Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{130 100,100}}), graphics={131 Ellipse(132 extent={{-100,100},{100,-100}},133 lineColor={0,127,255},134 fillColor={0,127,255},135 fillPattern=FillPattern.Solid),136 Ellipse(137 extent={{-100,100},{100,-100}},138 lineColor={0,0,0},139 fillColor={0,127,255},140 fillPattern=FillPattern.Solid),141 Ellipse(142 extent={{-18,20},{22,-20}},143 lineColor={0,0,0},144 fillColor={0,0,0},145 fillPattern=FillPattern.Solid)}));146 end FluidStatePort_a;147 148 connector FluidStatePort_b149 "Fluid connector at design outlet with potential pressure state"150 extends FluidPort;151 annotation (defaultComponentName="port_b",152 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,153 -100},{100,100}}), graphics={154 Ellipse(155 extent={{-40,40},{40,-40}},156 lineColor={0,0,255},157 fillColor={0,127,255},158 fillPattern=FillPattern.Solid),159 Ellipse(160 extent={{-30,30},{30,-30}},161 lineColor={0,127,255},162 fillColor={255,255,255},163 fillPattern=FillPattern.Solid),164 Text(extent={{-150,110},{150,50}}, textString="%name")}),165 Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{166 100,100}}), graphics={167 Ellipse(168 extent={{-100,100},{100,-100}},169 lineColor={0,127,255},170 fillColor={0,127,255},171 fillPattern=FillPattern.Solid),172 Ellipse(173 extent={{-100,100},{100,-100}},174 lineColor={0,0,0},175 fillColor={0,127,255},176 fillPattern=FillPattern.Solid),177 Ellipse(178 extent={{-80,80},{80,-80}},179 lineColor={0,127,255},180 fillColor={255,255,255},181 fillPattern=FillPattern.Solid),182 Ellipse(183 extent={{-18,20},{22,-20}},184 lineColor={0,0,0},185 fillColor={0,0,0},186 fillPattern=FillPattern.Solid)}));187 end FluidStatePort_b;188 189 118 connector FluidPorts_a 190 119 "Fluid connector with filled, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)" … … 331 260 end FluidPorts_b; 332 261 333 connector FluidStatePorts_a334 "Fluid connector with filled, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)"335 extends FluidPort;336 annotation (defaultComponentName="ports_a",337 Diagram(coordinateSystem(338 preserveAspectRatio=false,339 extent={{-50,-200},{50,200}},340 grid={1,1},341 initialScale=0.2), graphics={342 Text(extent={{-75,130},{75,100}}, textString="%name"),343 Rectangle(344 extent={{-25,100},{25,-100}},345 lineColor={0,127,255},346 fillColor={255,255,255},347 fillPattern=FillPattern.Solid),348 Ellipse(349 extent={{-25,90},{25,40}},350 lineColor={0,0,0},351 fillColor={0,127,255},352 fillPattern=FillPattern.Solid),353 Ellipse(354 extent={{-25,25},{25,-25}},355 lineColor={0,0,0},356 fillColor={0,127,255},357 fillPattern=FillPattern.Solid),358 Ellipse(359 extent={{-25,-40},{25,-90}},360 lineColor={0,0,0},361 fillColor={0,127,255},362 fillPattern=FillPattern.Solid)}),363 Icon(coordinateSystem(364 preserveAspectRatio=false,365 extent={{-50,-200},{50,200}},366 grid={1,1},367 initialScale=0.2), graphics={368 Rectangle(369 extent={{-50,200},{50,-200}},370 lineColor={0,127,255},371 fillColor={255,255,255},372 fillPattern=FillPattern.Solid),373 Ellipse(374 extent={{-50,180},{50,80}},375 lineColor={0,0,0},376 fillColor={0,127,255},377 fillPattern=FillPattern.Solid),378 Ellipse(379 extent={{-50,50},{50,-50}},380 lineColor={0,0,0},381 fillColor={0,127,255},382 fillPattern=FillPattern.Solid),383 Ellipse(384 extent={{-50,-80},{50,-180}},385 lineColor={0,0,0},386 fillColor={0,127,255},387 fillPattern=FillPattern.Solid),388 Ellipse(389 extent={{-20,150},{20,110}},390 lineColor={0,0,0},391 fillColor={0,0,0},392 fillPattern=FillPattern.Solid),393 Ellipse(394 extent={{-20,20},{20,-20}},395 lineColor={0,0,0},396 fillColor={0,0,0},397 fillPattern=FillPattern.Solid),398 Ellipse(399 extent={{-19,-111},{21,-151}},400 lineColor={0,0,0},401 fillColor={0,0,0},402 fillPattern=FillPattern.Solid)}));403 end FluidStatePorts_a;404 405 connector FluidStatePorts_b406 "Fluid connector with outlined, large icon to be used for vectors of FluidPorts (vector dimensions must be added after dragging)"407 extends FluidPort;408 annotation (defaultComponentName="ports_b",409 Diagram(coordinateSystem(410 preserveAspectRatio=false,411 extent={{-50,-200},{50,200}},412 grid={1,1},413 initialScale=0.2), graphics={414 Text(extent={{-75,130},{75,100}}, textString="%name"),415 Rectangle(416 extent={{-25,100},{25,-100}},417 lineColor={0,127,255},418 fillColor={255,255,255},419 fillPattern=FillPattern.Solid),420 Ellipse(421 extent={{-25,90},{25,40}},422 lineColor={0,0,0},423 fillColor={0,127,255},424 fillPattern=FillPattern.Solid),425 Ellipse(426 extent={{-25,25},{25,-25}},427 lineColor={0,0,0},428 fillColor={0,127,255},429 fillPattern=FillPattern.Solid),430 Ellipse(431 extent={{-25,-40},{25,-90}},432 lineColor={0,0,0},433 fillColor={0,127,255},434 fillPattern=FillPattern.Solid),435 Ellipse(436 extent={{-15,-50},{15,-80}},437 lineColor={0,127,255},438 fillColor={255,255,255},439 fillPattern=FillPattern.Solid),440 Ellipse(441 extent={{-15,15},{15,-15}},442 lineColor={0,127,255},443 fillColor={255,255,255},444 fillPattern=FillPattern.Solid),445 Ellipse(446 extent={{-15,50},{15,80}},447 lineColor={0,127,255},448 fillColor={255,255,255},449 fillPattern=FillPattern.Solid)}),450 Icon(coordinateSystem(451 preserveAspectRatio=false,452 extent={{-50,-200},{50,200}},453 grid={1,1},454 initialScale=0.2), graphics={455 Rectangle(456 extent={{-50,200},{50,-200}},457 lineColor={0,127,255},458 fillColor={255,255,255},459 fillPattern=FillPattern.Solid),460 Ellipse(461 extent={{-50,180},{50,80}},462 lineColor={0,0,0},463 fillColor={0,127,255},464 fillPattern=FillPattern.Solid),465 Ellipse(466 extent={{-50,50},{50,-50}},467 lineColor={0,0,0},468 fillColor={0,127,255},469 fillPattern=FillPattern.Solid),470 Ellipse(471 extent={{-50,-80},{50,-180}},472 lineColor={0,0,0},473 fillColor={0,127,255},474 fillPattern=FillPattern.Solid),475 Ellipse(476 extent={{-45,44},{45,-44}},477 lineColor={0,127,255},478 fillColor={255,255,255},479 fillPattern=FillPattern.Solid),480 Ellipse(481 extent={{-43,88},{43,172}},482 lineColor={0,127,255},483 fillColor={255,255,255},484 fillPattern=FillPattern.Solid),485 Ellipse(486 extent={{-43,-84},{45,-175}},487 lineColor={0,127,255},488 fillColor={255,255,255},489 fillPattern=FillPattern.Solid),490 Ellipse(491 extent={{-20,151},{20,111}},492 lineColor={0,0,0},493 fillColor={0,0,0},494 fillPattern=FillPattern.Solid),495 Ellipse(496 extent={{-20,21},{20,-19}},497 lineColor={0,0,0},498 fillColor={0,0,0},499 fillPattern=FillPattern.Solid),500 Ellipse(501 extent={{-19,-110},{21,-150}},502 lineColor={0,0,0},503 fillColor={0,0,0},504 fillPattern=FillPattern.Solid)}));505 end FluidStatePorts_b;506 507 262 connector HeatPorts_a 508 263 "HeatPort connector with filled, large icon to be used for vectors of HeatPorts (vector dimensions must be added after dragging)" … … 570 325 import Modelica.Constants; 571 326 outer Modelica_Fluid.System system "System wide properties"; 327 572 328 replaceable package Medium = 573 329 Modelica.Media.Interfaces.PartialMedium "Medium in the component" 574 330 annotation (choicesAllMatching = true); 575 331 576 // Assumptions577 332 parameter Boolean allowFlowReversal = system.allowFlowReversal 578 333 "= true to allow flow reversal, false restricts to design direction (port_a -> port_b)" … … 591 346 annotation (Placement(transformation(extent={{110,-10},{90,10}}, rotation= 592 347 0), iconTransformation(extent={{110,-10},{90,10}}))); 593 594 348 // Model structure, e.g. used for visualization 595 349 protected … … 598 352 parameter Boolean port_b_exposesState = false 599 353 "= true if port_b.p exposes the state of a fluid volume"; 354 600 355 annotation ( 601 356 Diagram(coordinateSystem( … … 607 362 This partial model defines an interface for components with two ports. 608 363 The components may transport fluid and have internal storage. 609 The treatment of design flow direction and flow reversal are predefined. 364 The treatment of design flow direction and flow reversal are predefined. The variable 610 365 </p> 366 <ul> 367 <li><tt>m_flow</tt> defines the mass flow rate in design direction, which is port_a.m_flow.</li> 368 </ul> 611 369 <p> 612 370 A derived component providing direct access to internal storage of mass or energy through port_a or port_b -
Modelica_Fluid/branches/StreamConnector/Modelica_Fluid/Junctions.mo
r1927 r1940 3 3 extends Modelica_Fluid.Icons.VariantLibrary; 4 4 5 model JunctionIdeal5 model IdealTJunction 6 6 "Splitting/joining component with static balances for an infinitesimal control volume" 7 import Modelica_Fluid.Types; 8 import Modelica_Fluid.Types.PortFlowDirection; 9 10 replaceable package Medium=Modelica.Media.Interfaces.PartialMedium 11 "Fluid medium model" 12 annotation (choicesAllMatching=true); 13 14 Modelica_Fluid.Interfaces.FluidPort_a port_1(redeclare package Medium = 15 Medium, m_flow(min=if (portFlowDirection_1 == PortFlowDirection.Entering) then 16 0.0 else -Modelica.Constants.inf, max=if (portFlowDirection_1 17 == PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 18 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, 19 rotation=0))); 20 Modelica_Fluid.Interfaces.FluidPort_b port_2(redeclare package Medium = 21 Medium, m_flow(min=if (portFlowDirection_2 == PortFlowDirection.Entering) then 22 0.0 else -Modelica.Constants.inf, max=if (portFlowDirection_2 23 == PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 24 annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation= 25 0))); 26 Modelica_Fluid.Interfaces.FluidPort_a port_3( 27 redeclare package Medium=Medium, 28 m_flow(min=if (portFlowDirection_3==PortFlowDirection.Entering) then 0.0 else -Modelica.Constants.inf, 29 max=if (portFlowDirection_3==PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 30 annotation (Placement(transformation(extent={{-10,90},{10,110}}, rotation= 31 0))); 7 extends BaseClasses.PartialTJunction; 8 9 equation 10 connect(port_1, port_2) annotation (Line( 11 points={{-100,0},{100,0}}, 12 color={0,127,255}, 13 smooth=Smooth.None)); 14 connect(port_1, port_3) annotation (Line( 15 points={{-100,0},{0,0},{0,100}}, 16 color={0,127,255}, 17 smooth=Smooth.None)); 32 18 33 19 annotation(Documentation(info="<html> … … 44 30 preserveAspectRatio=false, 45 31 extent={{-100,-100},{100,100}}, 46 grid={1,1}), graphics={ 47 Rectangle( 48 extent={{-100,41},{100,-47}}, 49 lineColor={0,0,0}, 50 fillPattern=FillPattern.HorizontalCylinder, 51 fillColor={192,192,192}), 52 Rectangle( 53 extent={{-100,37},{100,-43}}, 54 lineColor={0,0,0}, 55 fillPattern=FillPattern.HorizontalCylinder, 56 fillColor={0,127,255}), 57 Rectangle( 58 extent={{-34,100},{34,37}}, 59 lineColor={0,0,0}, 60 fillPattern=FillPattern.VerticalCylinder, 61 fillColor={192,192,192}), 62 Rectangle( 63 extent={{-30,100},{30,35}}, 64 lineColor={0,0,0}, 65 fillPattern=FillPattern.VerticalCylinder, 66 fillColor={0,127,255}), 67 Text( 68 extent={{-150,-60},{150,-100}}, 69 lineColor={0,0,255}, 70 textString="%name")}), 32 grid={1,1}), graphics), 71 33 Diagram(coordinateSystem( 72 34 preserveAspectRatio=false, 73 35 extent={{-100,-100},{100,100}}, 74 36 grid={1,1}), graphics)); 75 76 protected 77 parameter PortFlowDirection portFlowDirection_1=PortFlowDirection.Bidirectional 78 "Flow direction for port_1" 79 annotation(Dialog(tab="Advanced")); 80 parameter PortFlowDirection portFlowDirection_2=PortFlowDirection.Bidirectional 81 "Flow direction for port_2" 82 annotation(Dialog(tab="Advanced")); 83 parameter PortFlowDirection portFlowDirection_3=PortFlowDirection.Bidirectional 84 "Flow direction for port_3" 85 annotation(Dialog(tab="Advanced")); 86 87 equation 88 connect(port_1, port_2) annotation (Line( 89 points={{-100,0},{100,0}}, 90 color={0,127,255}, 91 smooth=Smooth.None)); 92 connect(port_1, port_3) annotation (Line( 93 points={{-100,0},{0,0},{0,100}}, 94 color={0,127,255}, 95 smooth=Smooth.None)); 96 end JunctionIdeal; 37 end IdealTJunction; 97 38 98 39 annotation (Documentation(info="<html> 99 40 100 41 </html>")); 101 model JunctionVolume42 model TJunctionVolume 102 43 "Splitting/joining component with static balances for a dynamic control volume" 44 extends BaseClasses.PartialTJunction; 103 45 extends Volumes.BaseClasses.PartialLumpedVolume; 104 import Modelica_Fluid.Types; 105 import Modelica_Fluid.Types.PortFlowDirection; 106 107 parameter SI.Volume V "Volume"; 108 109 Modelica_Fluid.Interfaces.FluidPort_a port_1( 110 redeclare package Medium=Medium, 111 m_flow(min=if (portFlowDirection_1==PortFlowDirection.Entering) then 0.0 else -Modelica.Constants.inf, 112 max=if (portFlowDirection_1==PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 113 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, 114 rotation=0))); 115 Modelica_Fluid.Interfaces.FluidPort_b port_2( 116 redeclare package Medium=Medium, 117 m_flow(min=if (portFlowDirection_2==PortFlowDirection.Entering) then 0.0 else -Modelica.Constants.inf, 118 max=if (portFlowDirection_2==PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 119 annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation= 120 0))); 121 Modelica_Fluid.Interfaces.FluidPort_a port_3( 122 redeclare package Medium=Medium, 123 m_flow(min=if (portFlowDirection_3==PortFlowDirection.Entering) then 0.0 else -Modelica.Constants.inf, 124 max=if (portFlowDirection_3==PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 125 annotation (Placement(transformation(extent={{-10,90},{10,110}}, rotation= 126 0))); 127 128 protected 129 parameter PortFlowDirection portFlowDirection_1=PortFlowDirection.Bidirectional 130 "Flow direction for port_1" 131 annotation(Dialog(tab="Advanced")); 132 parameter PortFlowDirection portFlowDirection_2=PortFlowDirection.Bidirectional 133 "Flow direction for port_2" 134 annotation(Dialog(tab="Advanced")); 135 parameter PortFlowDirection portFlowDirection_3=PortFlowDirection.Bidirectional 136 "Flow direction for port_3" 137 annotation(Dialog(tab="Advanced")); 138 139 annotation (Icon(coordinateSystem( 140 preserveAspectRatio=true, 141 extent={{-100,-100},{100,100}}, 142 grid={1,1}), graphics={ 143 Rectangle( 144 extent={{-100,41},{100,-47}}, 145 lineColor={0,0,0}, 146 fillPattern=FillPattern.HorizontalCylinder, 147 fillColor={192,192,192}), 148 Rectangle( 149 extent={{-100,37},{100,-43}}, 150 lineColor={0,0,0}, 151 fillPattern=FillPattern.HorizontalCylinder, 152 fillColor={0,127,255}), 153 Rectangle( 154 extent={{-34,100},{34,37}}, 155 lineColor={0,0,0}, 156 fillPattern=FillPattern.VerticalCylinder, 157 fillColor={192,192,192}), 158 Rectangle( 159 extent={{-30,100},{30,35}}, 160 lineColor={0,0,0}, 161 fillPattern=FillPattern.VerticalCylinder, 162 fillColor={0,127,255}), 163 Ellipse( 164 extent={{-9,10},{11,-10}}, 165 lineColor={0,0,0}, 166 fillColor={0,0,0}, 167 fillPattern=FillPattern.Solid), 168 Text( 169 extent={{-150,-60},{150,-100}}, 170 lineColor={0,0,255}, 171 textString="%name")}), 172 Diagram(coordinateSystem( 173 preserveAspectRatio=false, 174 extent={{-100,-100},{100,100}}, 175 grid={1,1}), graphics)); 46 47 parameter SI.Volume V "Mixing volume inside junction"; 176 48 177 49 equation … … 208 80 fluidVolume = V; 209 81 ms_flow = port_1.m_flow + port_2.m_flow + port_3.m_flow "Mass balance"; 210 m Xis_flow = port_1.m_flow*actualStream(port_1.Xi_outflow)82 msXi_flow = port_1.m_flow*actualStream(port_1.Xi_outflow) 211 83 + port_2.m_flow*actualStream(port_2.Xi_outflow) 212 84 + port_3.m_flow*actualStream(port_3.Xi_outflow) … … 229 101 Ws_flow = 0; 230 102 Qs_flow = 0; 231 end JunctionVolume; 103 104 annotation (Documentation(info="<html> 105 This model introduces a mixing volume into a junction. 106 This might be useful to examine the non-ideal mixing taking place in a real junction.</html>"), 107 Icon(coordinateSystem( 108 preserveAspectRatio=true, 109 extent={{-100,-100},{100,100}}, 110 grid={1,1}), graphics={Ellipse( 111 extent={{-9,10},{11,-10}}, 112 lineColor={0,0,0}, 113 fillColor={0,0,0}, 114 fillPattern=FillPattern.Solid)}), 115 Diagram(coordinateSystem( 116 preserveAspectRatio=false, 117 extent={{-100,-100},{100,100}}, 118 grid={1,1}), graphics)); 119 end TJunctionVolume; 232 120 233 121 model MultiPort … … 323 211 end MultiPort; 324 212 213 package BaseClasses "Base classes for junctions" 214 extends Modelica_Fluid.Icons.BaseClassLibrary; 215 216 partial model PartialTJunction 217 "Base class for a splitting/joining component with three ports" 218 import Modelica_Fluid.Types; 219 import Modelica_Fluid.Types.PortFlowDirection; 220 221 replaceable package Medium=Modelica.Media.Interfaces.PartialMedium 222 "Fluid medium model" 223 annotation (choicesAllMatching=true); 224 225 Modelica_Fluid.Interfaces.FluidPort_a port_1(redeclare package Medium = 226 Medium, m_flow(min=if (portFlowDirection_1 == PortFlowDirection.Entering) then 227 0.0 else -Modelica.Constants.inf, max=if (portFlowDirection_1 228 == PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 229 annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, 230 rotation=0))); 231 Modelica_Fluid.Interfaces.FluidPort_b port_2(redeclare package Medium = 232 Medium, m_flow(min=if (portFlowDirection_2 == PortFlowDirection.Entering) then 233 0.0 else -Modelica.Constants.inf, max=if (portFlowDirection_2 234 == PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 235 annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation= 236 0))); 237 Modelica_Fluid.Interfaces.FluidPort_a port_3( 238 redeclare package Medium=Medium, 239 m_flow(min=if (portFlowDirection_3==PortFlowDirection.Entering) then 0.0 else -Modelica.Constants.inf, 240 max=if (portFlowDirection_3==PortFlowDirection.Leaving) then 0.0 else Modelica.Constants.inf)) 241 annotation (Placement(transformation(extent={{-10,90},{10,110}}, rotation= 242 0))); 243 244 annotation(Icon(coordinateSystem( 245 preserveAspectRatio=false, 246 extent={{-100,-100},{100,100}},
