diff --git a/IBPSA/Fluid/Storage/Examples/Stratified.mo b/IBPSA/Fluid/Storage/Examples/Stratified.mo index ffe1f040ce..93e8b36590 100644 --- a/IBPSA/Fluid/Storage/Examples/Stratified.mo +++ b/IBPSA/Fluid/Storage/Examples/Stratified.mo @@ -11,30 +11,30 @@ model Stratified "Test model for stratified tank" nSeg=10, m_flow_nominal=0.1, VTan=3) "Tank" - annotation (Placement(transformation(extent={{-20,-10},{0,10}}))); + annotation (Placement(transformation(extent={{-20,0},{0,20}}))); Modelica.Blocks.Sources.TimeTable TWat(table=[0,273.15 + 40; 3600,273.15 + 40; 3600,273.15 + 20; 7200,273.15 + 20]) "Water temperature" - annotation (Placement(transformation(extent={{-100,-6},{-80,14}}))); + annotation (Placement(transformation(extent={{-100,2},{-80,22}}))); IBPSA.Fluid.Sources.Boundary_pT sou_1( p=300000 + 5000, T=273.15 + 50, redeclare package Medium = Medium, use_T_in=true, - nPorts=2) annotation (Placement(transformation(extent={{-60,-10}, - {-40,10}}))); + nPorts=2) annotation (Placement(transformation(extent={{-60,-2}, + {-40,18}}))); IBPSA.Fluid.Sources.Boundary_pT sin_1( redeclare package Medium = Medium, T=273.15 + 20, use_p_in=true, p=300000, - nPorts=2) annotation (Placement(transformation(extent={{90,-10}, - {70,10}}))); + nPorts=2) annotation (Placement(transformation(extent={{90,-18}, + {70,2}}))); IBPSA.Fluid.FixedResistances.PressureDrop res_1( from_dp=true, redeclare package Medium = Medium, dp_nominal=5000, m_flow_nominal=0.1) - annotation (Placement(transformation(extent={{34,-10},{54,10}}))); + annotation (Placement(transformation(extent={{34,-18},{54,2}}))); IBPSA.Fluid.Storage.StratifiedEnhanced tanEnh( redeclare package Medium = Medium, hTan=3, @@ -42,7 +42,7 @@ model Stratified "Test model for stratified tank" nSeg=10, m_flow_nominal=0.1, VTan=3) "Tank" - annotation (Placement(transformation(extent={{-18,-90},{2,-70}}))); + annotation (Placement(transformation(extent={{-18,-70},{2,-50}}))); IBPSA.Fluid.FixedResistances.PressureDrop res_2( from_dp=true, redeclare package Medium = Medium, @@ -52,7 +52,7 @@ model Stratified "Test model for stratified tank" IBPSA.Fluid.Sensors.EnthalpyFlowRate HOut_flow(redeclare package Medium = Medium, m_flow_nominal=0.1) "Enthalpy flow rate" annotation (Placement(transformation( - extent={{4,-8},{20,8}}))); + extent={{4,-16},{20,0}}))); IBPSA.Fluid.Sensors.EnthalpyFlowRate HOut_flow1(redeclare package Medium = Medium, m_flow_nominal=0.1) "Enthalpy flow rate" annotation (Placement(transformation( @@ -85,24 +85,25 @@ model Stratified "Test model for stratified tank" {-40,32},{-28,44}}))); equation connect(TWat.y, sou_1.T_in) annotation (Line( - points={{-79,4},{-62,4}}, + points={{-79,12},{-62,12}}, color={0,0,127})); - connect(tanSim.port_b, HOut_flow.port_a) annotation (Line(points={{0,0},{4,0}}, - color={0,127,255})); + connect(tanSim.port_b, HOut_flow.port_a) annotation (Line(points={{-10,0},{ + -10,-8},{4,-8}}, color={0,127,255})); connect(HOut_flow.port_b, res_1.port_a) - annotation (Line(points={{20,0},{34,0}}, color={0,127,255})); + annotation (Line(points={{20,-8},{34,-8}}, color={0,127,255})); connect(tanEnh.port_b, HOut_flow1.port_a) - annotation (Line(points={{2,-80},{20,-80}},color={0,127,255})); + annotation (Line(points={{-8,-70},{-8,-80},{20,-80}}, + color={0,127,255})); connect(HOut_flow1.port_b, res_2.port_a) annotation (Line(points={{36,-80},{ 40,-80}}, color={0,127,255})); connect(add.y, dH.u) annotation (Line(points={{53,40},{66,40}}, color={0,0,127})); - connect(HOut_flow.H_flow, add.u1) annotation (Line(points={{12,8.8},{12,46},{ + connect(HOut_flow.H_flow, add.u1) annotation (Line(points={{12,0.8},{12,46},{ 30,46}}, color={0,0,127})); connect(HOut_flow1.H_flow, add.u2) annotation (Line(points={{28,-71.2},{28,34}, {30,34}}, color={0,0,127})); connect(P.y, sin_1.p_in) annotation (Line( - points={{41,70},{100,70},{100,8},{92,8}}, + points={{41,70},{100,70},{100,0},{92,0}}, color={0,0,127})); connect(sine.y, TBCSid1.T) annotation (Line(points={{-69,72},{-55.5,72},{ -55.5,90},{-41.2,90}}, color={0,0,127})); @@ -113,31 +114,31 @@ equation connect(sine.y, TBCTop2.T) annotation (Line(points={{-69,72},{-56,72},{-56,38}, {-41.2,38}}, color={0,0,127})); connect(TBCSid2.port, tanEnh.heaPorSid) annotation (Line(points={{-28,56},{ - -24,56},{-24,-38},{-2,-38},{-2,-80},{-2.4,-80}}, color={191,0,0})); + -24,56},{-24,-12},{-2,-12},{-2,-60},{-2.4,-60}}, color={191,0,0})); connect(TBCTop2.port, tanEnh.heaPorTop) annotation (Line(points={{-28,38},{ - -26,38},{-26,-40},{-6,-40},{-6,-72.6}}, color={191,0,0})); + -26,38},{-26,-14},{-6,-14},{-6,-52.6}}, color={191,0,0})); connect(sin_1.ports[1], res_1.port_b) annotation (Line( - points={{70,-1},{64,-1},{64,0},{54,0}}, + points={{70,-9},{64,-9},{64,-8},{54,-8}}, color={0,127,255}, smooth=Smooth.None)); connect(sin_1.ports[2], res_2.port_b) annotation (Line( - points={{70,1},{64,1},{64,-80},{60,-80}}, + points={{70,-7},{64,-7},{64,-80},{60,-80}}, color={0,127,255}, smooth=Smooth.None)); connect(sou_1.ports[1], tanSim.port_a) annotation (Line( - points={{-40,-1},{-30,-1},{-30,0},{-20,0}}, + points={{-40,7},{-30,7},{-30,20},{-10,20}}, color={0,127,255}, smooth=Smooth.None)); connect(sou_1.ports[2], tanEnh.port_a) annotation (Line( - points={{-40,1},{-30,1},{-30,-80},{-18,-80}}, + points={{-40,9},{-30,9},{-30,-40},{-8,-40},{-8,-50}}, color={0,127,255}, smooth=Smooth.None)); connect(TBCSid1.port, tanSim.heaPorSid) annotation (Line( - points={{-28,90},{-4.4,90},{-4.4,0}}, + points={{-28,90},{-4.4,90},{-4.4,10}}, color={191,0,0}, smooth=Smooth.None)); connect(TBCTop1.port, tanSim.heaPorTop) annotation (Line( - points={{-28,72},{-8,72},{-8,7.4}}, + points={{-28,72},{-8,72},{-8,17.4}}, color={191,0,0}, smooth=Smooth.None)); annotation(experiment(Tolerance=1e-08, StopTime=10800), diff --git a/IBPSA/Fluid/Storage/Examples/StratifiedEnhancedInternalHex.mo b/IBPSA/Fluid/Storage/Examples/StratifiedEnhancedInternalHex.mo index da67106c7e..11bf4b6e2c 100644 --- a/IBPSA/Fluid/Storage/Examples/StratifiedEnhancedInternalHex.mo +++ b/IBPSA/Fluid/Storage/Examples/StratifiedEnhancedInternalHex.mo @@ -142,12 +142,13 @@ equation 41.3333},{-6,41.3333},{-6,-66.08},{6,-66.08}}, color={0, 127,255})); connect(bouWat.ports[1], tanSte.port_b) annotation (Line(points={{62,-79.3333}, - {52,-79.3333},{52,72},{40,72}}, color={0,127,255})); + {52,-79.3333},{52,40},{22,40},{22,56},{23,56}}, + color={0,127,255})); connect(bouWat.ports[2], tanDyn.port_b) - annotation (Line(points={{62,-78},{52,-78},{52,-12},{38,-12}}, + annotation (Line(points={{62,-78},{52,-78},{52,-36},{21,-36},{21,-28}}, color={0,127,255})); connect(bouWat.ports[3], tanDynSol.port_b) annotation (Line(points={{62, - -76.6667},{58,-76.6667},{58,-76},{52,-76},{52,-60},{40,-60}}, + -76.6667},{24,-76.6667},{24,-76},{23,-76}}, color={0,127,255})); connect(step.y, solColSup.p_in) annotation (Line(points={{-59,48},{-52,48},{-42,48}}, color={0,0,127})); diff --git a/IBPSA/Fluid/Storage/Examples/StratifiedUnloadAtMinimumTemperature.mo b/IBPSA/Fluid/Storage/Examples/StratifiedUnloadAtMinimumTemperature.mo index f28c6e07df..ca8107a058 100644 --- a/IBPSA/Fluid/Storage/Examples/StratifiedUnloadAtMinimumTemperature.mo +++ b/IBPSA/Fluid/Storage/Examples/StratifiedUnloadAtMinimumTemperature.mo @@ -20,7 +20,7 @@ model StratifiedUnloadAtMinimumTemperature energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nSeg=nSeg, T_start=353.15) "Hot water storage tank" - annotation (Placement(transformation(extent={{-120,-130},{-100,-110}}))); + annotation (Placement(transformation(extent={{-120,-128},{-100,-108}}))); IBPSA.Fluid.Sources.Boundary_pT loa(redeclare package Medium = Medium, nPorts=1) "Load (imposed by a constant pressure boundary condition and the flow of masSou)" @@ -103,13 +103,14 @@ model StratifiedUnloadAtMinimumTemperature "Boolean to real conversion for valve at bottom" annotation (Placement(transformation(extent={{80,30},{100,50}}))); equation - connect(masSou.ports[1], tan.port_b) annotation (Line(points={{222,-120},{ - -100,-120}}, color={0,127,255})); + connect(masSou.ports[1], tan.port_b) annotation (Line(points={{222,-120},{56, + -120},{56,-128},{-110,-128}}, + color={0,127,255})); connect(TMid.port, tan.heaPorVol[3]) - annotation (Line(points={{-100,80},{-100,-12},{-110,-12},{-110,-120}}, + annotation (Line(points={{-100,80},{-100,-118},{-110,-118}}, color={191,0,0})); connect(TBot.port, tan.heaPorVol[5]) - annotation (Line(points={{-100,40},{-110,40},{-110,-119.76}}, + annotation (Line(points={{-100,40},{-100,-117.76},{-110,-117.76}}, color={191,0,0})); connect(valTop.port_b, senTem.port_a) annotation (Line(points={{132,-20},{182, -20},{182,-60},{190,-60}}, @@ -124,13 +125,13 @@ equation annotation (Line(points={{210,-60},{222,-60}}, color={0,127,255})); connect(valTop.port_a, tan.fluPorVol[1]) annotation (Line(points={{112,-20},{ - -116,-20},{-116,-118},{-115,-118},{-115,-121.6}}, + -116,-20},{-116,-118},{-112.6,-118},{-112.6,-118.4}}, color={0,127,255})); connect(valMid.port_a, tan.fluPorVol[3]) annotation (Line(points={{132,-60},{ - -116,-60},{-116,-120},{-115,-120}}, + -116,-60},{-116,-118},{-112.6,-118}}, color={0,127,255})); connect(valBot.port_a, tan.fluPorVol[5]) annotation (Line(points={{150,-100}, - {-116,-100},{-116,-118},{-115,-118},{-115,-118.4}}, + {-116,-100},{-116,-118},{-112.6,-118},{-112.6,-117.6}}, color={0,127,255})); connect(onOffMid.y, and2.u1) annotation (Line(points={{-29,80},{8,80}}, color={255,0,255})); @@ -153,10 +154,10 @@ equation connect(not1.y, and2.u2) annotation (Line(points={{1,60},{4,60},{4,72},{8,72}}, color={255,0,255})); connect(hea.port, tan.heaPorVol[5]) annotation (Line(points={{-130,-124},{ - -110,-124},{-110,-119.76}}, + -110,-124},{-110,-117.76}}, color={191,0,0})); connect(TTop.port, tan.heaPorVol[1]) annotation (Line(points={{-160,-90},{ - -110,-90},{-110,-120.24}}, + -120,-90},{-120,-120},{-110,-120},{-110,-118.24}}, color={191,0,0})); connect(onOffHea.u, TTop.T) annotation (Line(points={{-212,-124},{-230,-124}, {-230,-90},{-181,-90}},color={0,0,127})); diff --git a/IBPSA/Fluid/Storage/Validation/HeatExchangerDynamics.mo b/IBPSA/Fluid/Storage/Validation/HeatExchangerDynamics.mo index 5339f1820c..0a49f201ae 100644 --- a/IBPSA/Fluid/Storage/Validation/HeatExchangerDynamics.mo +++ b/IBPSA/Fluid/Storage/Validation/HeatExchangerDynamics.mo @@ -87,11 +87,11 @@ model HeatExchangerDynamics IBPSA.Fluid.Sources.MassFlowSource_T mWatTanDyn_flow( redeclare package Medium = Medium, nPorts=1) "Mass flow rate through the tank" - annotation (Placement(transformation(extent={{80,20},{60,40}}))); + annotation (Placement(transformation(extent={{82,10},{62,30}}))); IBPSA.Fluid.Sources.MassFlowSource_T mWatTanSte_flow( redeclare package Medium = Medium, nPorts=1) "Mass flow rate through the tank" - annotation (Placement(transformation(extent={{80,-20},{60,0}}))); + annotation (Placement(transformation(extent={{82,-30},{62,-10}}))); equation connect(mHex_flow_in.y, mHex_flow1.m_flow_in) annotation (Line( points={{-79,20},{-70,20},{-70,28},{-62,28}}, @@ -102,12 +102,11 @@ equation connect(mHex_flow2.ports[1], tanSte.portHex_a) annotation (Line(points={{-40,-10}, {-32,-10},{-30,-10},{-30,-13.8},{32,-13.8}}, color={0,127,255})); connect(watInTan.ports[1], tanSte.port_a) annotation (Line(points={{-40,59},{ - -40,59},{-22,59},{-22,-10},{32,-10}}, - color={0,127,255})); + -40,59},{-22,59},{-22,0},{42,0}}, color={0,127,255})); connect(mHex_flow1.ports[1], tanDyn.portHex_a) annotation (Line(points={{-40, 20},{-30,20},{-30,26.2},{32,26.2}}, color={0,127,255})); connect(watInTan.ports[2], tanDyn.port_a) annotation (Line(points={{-40,61},{ - -30,61},{-20,61},{-20,30},{32,30}}, + -30,61},{-20,61},{-20,40},{42,40}}, color={0,127,255})); connect(senTanDyn.port_a, tanDyn.portHex_b) annotation (Line(points={{10,10},{ 20,10},{20,22},{32,22}}, color={0,127,255})); @@ -120,9 +119,9 @@ equation -42,-40},{-42,-37}}, color={0,127,255})); connect(mWatTanDyn_flow.ports[1], tanDyn.port_b) - annotation (Line(points={{60,30},{52,30}}, color={0,127,255})); + annotation (Line(points={{62,20},{42,20}}, color={0,127,255})); connect(mWatTanSte_flow.ports[1], tanSte.port_b) - annotation (Line(points={{60,-10},{52,-10}}, color={0,127,255})); + annotation (Line(points={{62,-20},{42,-20}}, color={0,127,255})); annotation ( __Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/Fluid/Storage/Validation/HeatExchangerDynamics.mos" "Simulate and plot"),