From d9a99e869e981b8288f43b689a56ff69cc3c212b Mon Sep 17 00:00:00 2001
From: Michael Wetter
Date: Sat, 30 Sep 2023 01:27:58 -0700
Subject: [PATCH 1/4] Merged IBPSA, issue1793_steamDocumentation (#3542)
---
Buildings/.copiedFiles.txt | 4 +-
.../BoundaryConditions/WeatherData/Bus.mo | 12 +-
Buildings/Examples/SimpleHouse.mo | 379 ++++++++++++++++++
.../Tutorial/SimpleHouse/SimpleHouse2.mo | 2 +-
.../Tutorial/SimpleHouse/SimpleHouse4.mo | 18 +-
Buildings/Examples/package.order | 1 +
Buildings/Fluid/Examples/SimpleHouse.mo | 349 ----------------
Buildings/Fluid/Examples/package.order | 1 -
.../BaseClasses/IndirectTankHeatExchanger.mo | 20 +-
.../BaseClasses/PartialTwoPortInterface.mo | 4 +-
.../Fluid/Storage/Examples/Stratified.mo | 10 +-
Buildings/Fluid/Storage/StratifiedEnhanced.mo | 16 +-
.../Storage/StratifiedEnhancedInternalHex.mo | 20 +-
Buildings/Media/Steam.mo | 32 +-
.../Dymola/Buildings_Examples_SimpleHouse.txt | 19 +
.../{Fluid => }/Examples/SimpleHouse.mos | 4 +-
...mos => Buildings.Examples.SimpleHouse.mos} | 2 +-
17 files changed, 483 insertions(+), 410 deletions(-)
create mode 100644 Buildings/Examples/SimpleHouse.mo
delete mode 100644 Buildings/Fluid/Examples/SimpleHouse.mo
create mode 100644 Buildings/Resources/ReferenceResults/Dymola/Buildings_Examples_SimpleHouse.txt
rename Buildings/Resources/Scripts/Dymola/{Fluid => }/Examples/SimpleHouse.mos (62%)
rename Buildings/Resources/Scripts/OpenModelica/compareVars/{Buildings.Fluid.Examples.SimpleHouse.mos => Buildings.Examples.SimpleHouse.mos} (86%)
diff --git a/Buildings/.copiedFiles.txt b/Buildings/.copiedFiles.txt
index b4fa559eb64..301e07caab1 100644
--- a/Buildings/.copiedFiles.txt
+++ b/Buildings/.copiedFiles.txt
@@ -747,6 +747,7 @@ Buildings/Electrical/Utilities/package.mo
Buildings/Electrical/Utilities/package.order
Buildings/Electrical/package.mo
Buildings/Electrical/package.order
+Buildings/Examples/SimpleHouse.mo
Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse0.mo
Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse1.mo
Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo
@@ -918,7 +919,6 @@ Buildings/Fluid/Examples/Performance/PressureDrop/package.order
Buildings/Fluid/Examples/Performance/package.mo
Buildings/Fluid/Examples/Performance/package.order
Buildings/Fluid/Examples/ResistanceVolumeFlowReversal.mo
-Buildings/Fluid/Examples/SimpleHouse.mo
Buildings/Fluid/Examples/package.mo
Buildings/Fluid/Examples/package.order
Buildings/Fluid/FMI/Adaptors/Examples/ThermalZoneHVACNoExhaust.mo
@@ -2355,6 +2355,7 @@ Buildings/Resources/Scripts/Dymola/Electrical/DC/Sources/Examples/VoltageSource.
Buildings/Resources/Scripts/Dymola/Electrical/Transmission/Functions/Validation/SelectCable_low.mos
Buildings/Resources/Scripts/Dymola/Electrical/Transmission/Functions/Validation/SelectCable_med.mos
Buildings/Resources/Scripts/Dymola/Electrical/Utilities/Examples/TestVoltageCTRL.mos
+Buildings/Resources/Scripts/Dymola/Examples/SimpleHouse.mos
Buildings/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse0.mos
Buildings/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse1.mos
Buildings/Resources/Scripts/Dymola/Examples/Tutorial/SimpleHouse/SimpleHouse2.mos
@@ -2425,7 +2426,6 @@ Buildings/Resources/Scripts/Dymola/Fluid/Examples/Performance/PressureDrop/Serie
Buildings/Resources/Scripts/Dymola/Fluid/Examples/Performance/PressureDrop/SeriesParallelFlow.mos
Buildings/Resources/Scripts/Dymola/Fluid/Examples/Performance/PressureDrop/SeriesParallelFlowOptimised.mos
Buildings/Resources/Scripts/Dymola/Fluid/Examples/ResistanceVolumeFlowReversal.mos
-Buildings/Resources/Scripts/Dymola/Fluid/Examples/SimpleHouse.mos
Buildings/Resources/Scripts/Dymola/Fluid/FMI/Adaptors/Examples/ThermalZoneHVACNoExhaust.mos
Buildings/Resources/Scripts/Dymola/Fluid/FMI/Adaptors/Examples/ThermalZoneHVACWithExhaust.mos
Buildings/Resources/Scripts/Dymola/Fluid/FMI/Conversion/Validation/AirToOutlet.mos
diff --git a/Buildings/BoundaryConditions/WeatherData/Bus.mo b/Buildings/BoundaryConditions/WeatherData/Bus.mo
index a0227ee8fae..3bdeae30d40 100644
--- a/Buildings/BoundaryConditions/WeatherData/Bus.mo
+++ b/Buildings/BoundaryConditions/WeatherData/Bus.mo
@@ -2,14 +2,10 @@ within Buildings.BoundaryConditions.WeatherData;
expandable connector Bus "Data bus that stores weather data"
extends Modelica.Icons.SignalBus;
- Modelica.Units.SI.Temperature TDryBul(displayUnit="degC")
- "Dry bulb temperature";
- Modelica.Units.SI.Temperature TWetBul(displayUnit="degC")
- "Wet bulb temperature";
- Modelica.Units.SI.Temperature TDewPoi(displayUnit="degC")
- "Dew point temperature";
- Modelica.Units.SI.Temperature TBlaSky(displayUnit="degC")
- "Black-body sky temperature";
+ Modelica.Units.SI.Temperature TDryBul "Dry bulb temperature";
+ Modelica.Units.SI.Temperature TWetBul "Wet bulb temperature";
+ Modelica.Units.SI.Temperature TDewPoi "Dew point temperature";
+ Modelica.Units.SI.Temperature TBlaSky "Black-body sky temperature";
Real relHum(final unit="1") "Relative humidity";
diff --git a/Buildings/Examples/SimpleHouse.mo b/Buildings/Examples/SimpleHouse.mo
new file mode 100644
index 00000000000..e43108a631e
--- /dev/null
+++ b/Buildings/Examples/SimpleHouse.mo
@@ -0,0 +1,379 @@
+within Buildings.Examples;
+model SimpleHouse
+ "Illustrative example of a simple heating, ventilation and room model"
+ extends Modelica.Icons.Example;
+
+ package MediumAir = Buildings.Media.Air;
+ package MediumWater = Buildings.Media.Water;
+
+ parameter Modelica.Units.SI.Area AWall=100 "Wall area";
+ parameter Modelica.Units.SI.Area AWin=5 "Window area";
+ parameter Real gWin(min=0, max=1, unit="1") = 0.3 "Solar heat gain coefficient of window";
+ parameter Modelica.Units.SI.Volume VZone=AWall*3 "Wall area";
+ parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=700
+ "Nominal capacity of heating system";
+ parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=QHea_flow_nominal/
+ 10/4200 "Nominal mass flow rate for water loop";
+ parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=VZone*2*1.2/3600
+ "Nominal mass flow rate for air loop";
+
+ parameter Modelica.Units.SI.PressureDifference dpAir_nominal=200
+ "Pressure drop at nominal mass flow rate for air loop";
+ parameter Boolean allowFlowReversal=false
+ "= false because flow will not reverse in these circuits";
+
+ Modelica.Thermal.HeatTransfer.Components.HeatCapacitor walCap(
+ T(fixed=true),
+ C=10*AWall*0.05*1000*1000)
+ "Thermal mass of walls"
+ annotation (Placement(transformation(extent={{-10,-10},{10,10}},
+ rotation=270,
+ origin={170,0})));
+ Fluid.MixingVolumes.MixingVolume zon(
+ redeclare package Medium = MediumAir,
+ V=VZone,
+ nPorts=2,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ m_flow_nominal=mAir_flow_nominal,
+ massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial)
+ "Very based zone air model"
+ annotation (Placement(transformation(extent={{160,50},{180,30}})));
+ Modelica.Thermal.HeatTransfer.Components.ThermalResistor conRes(R=1/2/AWall)
+ "Thermal resistance for convective heat transfer with h=2" annotation (
+ Placement(transformation(
+ extent={{-10,-10},{10,10}},
+ rotation=270,
+ origin={110,20})));
+ Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad(
+ redeclare package Medium = MediumWater,
+ T_a_nominal=273.15 + 50,
+ T_b_nominal=273.15 + 40,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ allowFlowReversal=allowFlowReversal,
+ Q_flow_nominal=QHea_flow_nominal)
+ "Radiator"
+ annotation (Placement(transformation(extent={{120,-140},{140,-120}})));
+
+ Fluid.Sources.Boundary_pT bouAir(
+ redeclare package Medium = MediumAir,
+ nPorts=2,
+ use_T_in=true) "Air boundary with constant temperature" annotation (
+ Placement(transformation(extent={{-10,-10},{10,10}}, origin={-110,140})));
+ Fluid.Sources.Boundary_pT bouWat(redeclare package Medium = MediumWater,
+ nPorts=1) "Pressure bound for water circuit" annotation (Placement(
+ transformation(extent={{-10,-10},{10,10}}, origin={20,-180})));
+ BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
+ filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
+ "Weather data reader"
+ annotation (Placement(transformation(extent={{-180,-10},{-160,10}})));
+ BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
+ annotation (Placement(transformation(extent={{-140,-10},{-120,10}}),
+ iconTransformation(extent={{-160,-10},{-140,10}})));
+ Modelica.Thermal.HeatTransfer.Components.ThermalResistor walRes(R=0.25/AWall/
+ 0.04) "Thermal resistor for wall: 25 cm of rockwool"
+ annotation (Placement(transformation(extent={{60,-10},{80,10}})));
+ Buildings.HeatTransfer.Sources.PrescribedTemperature TOut
+ "Exterior temperature boundary condition"
+ annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
+ Fluid.HeatExchangers.HeaterCooler_u heaWat(
+ redeclare package Medium = MediumWater,
+ m_flow_nominal=mWat_flow_nominal,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
+ allowFlowReversal=allowFlowReversal,
+ dp_nominal=5000,
+ Q_flow_nominal=QHea_flow_nominal)
+ "Heater for water circuit"
+ annotation (Placement(transformation(extent={{60,-140},{80,-120}})));
+
+ Fluid.Movers.FlowControlled_m_flow pum(
+ redeclare package Medium = MediumWater,
+ use_inputFilter=false,
+ m_flow_nominal=mWat_flow_nominal,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
+ allowFlowReversal=allowFlowReversal,
+ nominalValuesDefineDefaultPressureCurve=true,
+ inputType=Buildings.Fluid.Types.InputType.Stages,
+ massFlowRates=mWat_flow_nominal*{1}) "Pump"
+ annotation (Placement(transformation(extent={{140,-190},{120,-170}})));
+ Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemZonAir
+ "Zone air temperature sensor"
+ annotation (Placement(transformation(extent={{120,170},{100,190}})));
+ Fluid.Actuators.Dampers.Exponential vavDam(
+ redeclare package Medium = MediumAir,
+ from_dp=true,
+ m_flow_nominal=mAir_flow_nominal,
+ dpDamper_nominal=10,
+ dpFixed_nominal=dpAir_nominal - 10) "Damper" annotation (Placement(
+ transformation(extent={{-10,10},{10,-10}}, origin={110,130})));
+
+ Fluid.Movers.FlowControlled_dp fan(
+ redeclare package Medium = MediumAir,
+ dp_nominal=dpAir_nominal,
+ use_inputFilter=false,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
+ nominalValuesDefineDefaultPressureCurve=true,
+ m_flow_nominal=mAir_flow_nominal,
+ show_T=true) "Constant head fan" annotation (Placement(transformation(
+ extent={{-10,10},{10,-10}}, origin={-10,130})));
+ Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow win
+ "Very simple window model"
+ annotation (Placement(transformation(extent={{60,-50},{80,-30}})));
+ Fluid.HeatExchangers.ConstantEffectiveness hexRec(
+ redeclare package Medium1 = MediumAir,
+ redeclare package Medium2 = MediumAir,
+ dp1_nominal=0,
+ dp2_nominal=0,
+ m1_flow_nominal=mAir_flow_nominal,
+ m2_flow_nominal=mAir_flow_nominal,
+ eps=0.85) "Heat exchanger for heat recuperation"
+ annotation (Placement(transformation(extent={{-45,124},{-75,156}})));
+ Modelica.Blocks.Logical.Hysteresis hysRad(uLow=273.15 + 20, uHigh=273.15 + 22)
+ "Hysteresis controller for radiator"
+ annotation (Placement(transformation(extent={{-80,-120},{-60,-100}})));
+ Modelica.Blocks.Logical.Not not1
+ "negation for enabling heating when temperatur is low"
+ annotation (Placement(transformation(extent={{-40,-120},{-20,-100}})));
+ Modelica.Blocks.Math.BooleanToReal booToRea "Boolean to real"
+ annotation (Placement(transformation(extent={{0,-120},{20,-100}})));
+ Modelica.Blocks.Sources.Constant con_dp(k=dpAir_nominal) "Pressure head"
+ annotation (Placement(transformation(extent={{-50,90},{-30,110}})));
+
+ Modelica.Blocks.Math.Gain gaiWin(k=AWin*gWin)
+ "Gain for window solar transmittance and area as HGloHor is in W/m2"
+ annotation (Placement(transformation(extent={{20,-50},{40,-30}})));
+ Modelica.Blocks.Math.BooleanToInteger booToInt "Boolean to integer"
+ annotation (Placement(transformation(extent={{0,-160},{20,-140}})));
+ Controls.Continuous.LimPID conDam(
+ controllerType=Modelica.Blocks.Types.SimpleController.P,
+ yMin=0.25) "Controller for damper"
+ annotation (Placement(transformation(extent={{80,90},{100,110}})));
+ Modelica.Blocks.Sources.Constant TSetRoo(k=273.15 + 24)
+ "Room temperature set point for air system"
+ annotation (Placement(transformation(extent={{40,90},{60,110}})));
+ Fluid.HeatExchangers.SensibleCooler_T cooAir(
+ energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
+ allowFlowReversal=allowFlowReversal,
+ m_flow_nominal=mAir_flow_nominal,
+ dp_nominal=0,
+ redeclare package Medium = MediumAir) "Cooling for supply air"
+ annotation (Placement(transformation(extent={{30,140},{50,120}})));
+ Modelica.Blocks.Sources.Constant TSupAirCoo(k=273.15 + 20)
+ "Cooling setpoint for supply air"
+ annotation (Placement(transformation(extent={{0,90},{20,110}})));
+equation
+ connect(conRes.port_a, zon.heatPort)
+ annotation (Line(points={{110,30},{110,40},{160,40}}, color={191,0,0}));
+ connect(weaDat.weaBus, weaBus) annotation (Line(
+ points={{-160,0},{-130,0}},
+ color={255,204,51},
+ thickness=0.5));
+ connect(walRes.port_b, walCap.port) annotation (Line(points={{80,0},{122,0},{122,
+ 1.77636e-15},{160,1.77636e-15}},
+ color={191,0,0}));
+ connect(TOut.T, weaBus.TDryBul)
+ annotation (Line(points={{-82,0},{-130,0}}, color={0,0,127}));
+ connect(TOut.port, walRes.port_a)
+ annotation (Line(points={{-60,0},{60,0}}, color={191,0,0}));
+ connect(heaWat.port_b, rad.port_a) annotation (Line(points={{80,-130},{120,-130}},
+ color={0,127,255}));
+ connect(bouWat.ports[1], heaWat.port_a) annotation (Line(points={{30,-180},{42,
+ -180},{42,-130},{60,-130}}, color={0,127,255}));
+ connect(rad.port_b, pum.port_a) annotation (Line(points={{140,-130},{150,-130},
+ {150,-180},{140,-180}},color={0,127,255}));
+ connect(senTemZonAir.port, zon.heatPort) annotation (Line(points={{120,180},{160,
+ 180},{160,40}}, color={191,0,0}));
+ connect(bouAir.ports[1], hexRec.port_b1) annotation (Line(points={{-100,139},{
+ -100,149.6},{-75,149.6}},
+ color={0,127,255}));
+ connect(rad.heatPortCon, zon.heatPort) annotation (Line(points={{128,-122.8},{
+ 128,40},{160,40}}, color={191,0,0}));
+ connect(not1.y, booToRea.u) annotation (Line(points={{-19,-110},{-2,-110}},
+ color={255,0,255}));
+ connect(not1.u, hysRad.y) annotation (Line(points={{-42,-110},{-59,-110}},
+ color={255,0,255}));
+ connect(booToRea.y, heaWat.u) annotation (Line(points={{21,-110},{40,-110},{40,
+ -124},{58,-124}}, color={0,0,127}));
+ connect(heaWat.port_a, pum.port_b) annotation (Line(points={{60,-130},{42,-130},
+ {42,-180},{120,-180}}, color={0,127,255}));
+ connect(con_dp.y, fan.dp_in) annotation (Line(points={{-29,100},{-10,100},{-10,
+ 118}}, color={0,0,127}));
+ connect(gaiWin.y, win.Q_flow) annotation (Line(points={{41,-40},{60,-40}},
+ color={0,0,127}));
+ connect(gaiWin.u, weaBus.HGloHor) annotation (Line(points={{18,-40},{-130,-40},
+ {-130,0}}, color={0,0,127}));
+ connect(booToInt.u, not1.y) annotation (Line(points={{-2,-150},{-11,-150},{-11,
+ -110},{-19,-110}}, color={255,0,255}));
+ connect(booToInt.y, pum.stage) annotation (Line(points={{21,-150},{130,-150},{
+ 130,-168}}, color={255,127,0}));
+ connect(hexRec.port_b2, fan.port_a) annotation (Line(points={{-45,130.4},{-30,
+ 130.4},{-30,130},{-20,130}}, color={0,127,255}));
+ connect(vavDam.port_b, zon.ports[1])
+ annotation (Line(points={{120,130},{140,130},{140,50},{169,50}},
+ color={0,127,255}));
+ connect(senTemZonAir.T, hysRad.u) annotation (Line(points={{99,180},{-209.25,180},
+ {-209.25,-110},{-82,-110}}, color={0,0,127}));
+ connect(senTemZonAir.T,conDam. u_s) annotation (Line(points={{99,180},{74,180},
+ {74,100},{78,100}}, color={0,0,127}));
+ connect(conDam.y, vavDam.y) annotation (Line(points={{101,100},{110,100},{110,
+ 118}},color={0,0,127}));
+ connect(TSetRoo.y,conDam. u_m) annotation (Line(points={{61,100},{70,100},{70,
+ 82},{90,82},{90,88}},
+ color={0,0,127}));
+ connect(fan.port_b, cooAir.port_a)
+ annotation (Line(points={{0,130},{30,130}}, color={0,127,255}));
+ connect(cooAir.port_b, vavDam.port_a)
+ annotation (Line(points={{50,130},{100,130}}, color={0,127,255}));
+ connect(TSupAirCoo.y, cooAir.TSet) annotation (Line(points={{21,100},{24,100},
+ {24,122},{28,122}},color={0,0,127}));
+ connect(bouAir.T_in, weaBus.TDryBul) annotation (Line(points={{-122,144},{
+ -130,144},{-130,0}}, color={0,0,127}));
+ connect(bouAir.ports[2], hexRec.port_a2) annotation (Line(points={{-100,141},{
+ -100,130.4},{-75,130.4}}, color={0,127,255}));
+ connect(hexRec.port_a1, zon.ports[2]) annotation (Line(points={{-45,149.6},{171,
+ 149.6},{171,50}}, color={0,127,255}));
+ connect(conRes.port_b, walCap.port) annotation (Line(points={{110,10},{110,0},
+ {122,0},{122,1.77636e-15},{160,1.77636e-15}}, color={191,0,0}));
+ connect(win.port, walCap.port) annotation (Line(points={{80,-40},{110,-40},{110,
+ 0},{132,0},{132,1.77636e-15},{160,1.77636e-15}}, color={191,0,0}));
+ connect(rad.heatPortRad, walCap.port) annotation (Line(points={{132,-122.8},{132,
+ 1.77636e-15},{160,1.77636e-15}}, color={191,0,0}));
+ annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-220,
+ -220},{220,220}}), graphics={
+ Rectangle(
+ extent={{-200,200},{200,80}},
+ fillColor={238,238,238},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Rectangle(
+ extent={{-200,-80.25},{200,-199.75}},
+ fillColor={238,238,238},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Rectangle(
+ extent={{-199.75,60},{-20.25,-60}},
+ fillColor={238,238,238},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Text(
+ extent={{-63,182},{-197,198}},
+ textColor={0,0,127},
+ fillColor={255,213,170},
+ fillPattern=FillPattern.Solid,
+ textString="Cooling and ventilation"),
+ Rectangle(
+ extent={{0,60},{200,-60}},
+ fillColor={238,238,238},
+ fillPattern=FillPattern.Solid,
+ pattern=LinePattern.None),
+ Text(
+ extent={{64.5,40.5},{-4.5,59.5}},
+ textColor={0,0,127},
+ fillColor={255,213,170},
+ fillPattern=FillPattern.Solid,
+ textString="Building"),
+ Text(
+ extent={{-137,-99},{-203,-81}},
+ textColor={0,0,127},
+ fillColor={255,213,170},
+ fillPattern=FillPattern.Solid,
+ textString="Heating"),
+ Text(
+ extent={{-141,41},{-199,59}},
+ textColor={0,0,127},
+ fillColor={255,213,170},
+ fillPattern=FillPattern.Solid,
+ textString="Weather")}),
+ experiment(Tolerance=1e-06, StopTime=3.1536e+07),
+ Documentation(revisions="
+
+-
+September 15, 2023, by Jelger Jansen:
+Move the example model to Buildings.Examples,
+update the information section, and revise lay-out.
+This is for
+IBPSA, #1791.
+
+-
+June 15, 2022, by Hongxiang Fu:
+Changed conDam.yMin
from 0.1 to 0.25.
+This is for
+IBPSA, #1624.
+
+-
+May 8, 2017, by Michael Wetter:
+Updated heater model.
+This is for
+IBPSA, #763.
+
+-
+November 10, 2016, by Michael Wetter:
+Connected supply air temperature to outdoor air temperature,
+added cooling to supply air,
+changed capacity of heating system, switched heating pump off when heater is off,
+and added proportional controller for the air damper.
+This is
+for IBPSA, #584.
+
+-
+September 9, 2016, by Michael Wetter:
+Corrected error in window model, as the solar heat gain was
+not multiplied with the window area. Dymola 2017 reported this
+error due to mismatching units of W/m2
and W
.
+
+-
+June 23, 2016, by Michael Wetter:
+Changed graphical annotation.
+
+-
+March 11, 2016, by Michael Wetter:
+Corrected wrong limits for hysAir
so that
+uLow < uHigh
.
+This is
+for IBPSA, #429.
+
+-
+January 22, 2016, by Michael Wetter:
+Corrected type declaration of pressure difference.
+This is
+for IBPSA, #404.
+
+-
+September 19, 2015, by Filip Jorissen:
+First implementation.
+
+
+", info="
+
+This model contains a simple model of a house
+with a heating system, ventilation, and weather boundary conditions.
+It serves as a demonstration case of how the Buildings
library can be used.
+
+
+A step-by-step tutorial on how to build up this model can be found in
+
+Buildings.Examples.Tutorial.SimpleHouse.
+There are however some minor differences between this model and the models in the tutorial:
+
+
+-
+Different numerical values are used for almost all model parameters.
+
+-
+The solar irradiation (in W/m2) is calculated as
+the global horizontal irradiation multiplied with a solar heat gain coefficient
+instead of the direct normal irradiation.
+
+-
+The ventilation system is equiped with a cooler that sets the temperature
+of the air flow entering the zone equal to a constant value of 20°C.
+
+-
+The damper in the ventilation system is operated by
+a proportional-controller instead of a hysteresis controller.
+
+
+"),
+ __Dymola_Commands(file=
+ "modelica://Buildings/Resources/Scripts/Dymola/Examples/SimpleHouse.mos"
+ "Simulate and plot"));
+end SimpleHouse;
diff --git a/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo b/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo
index a33420a6d8f..de94ada2294 100644
--- a/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo
+++ b/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo
@@ -53,7 +53,7 @@ Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow
To be able to use the value of the outdoor solar irradiance
you will need to access the weather data reader.
To do this, make a connection to the weaBus
.
-In the dialog box select <New Variable> and here type HDirNor
,
+In the dialog box, select HDirNor
,
which is the direct solar irradiance on a surface of 1 m2,
perpendicular to the sun rays.
Set the gain factor k
to 2,
diff --git a/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo b/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo
index 6d547e7f17f..25222373c98 100644
--- a/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo
+++ b/Buildings/Examples/Tutorial/SimpleHouse/SimpleHouse4.mo
@@ -2,12 +2,14 @@ within Buildings.Examples.Tutorial.SimpleHouse;
model SimpleHouse4 "Heating model"
extends SimpleHouse3;
+ constant Boolean use_constantHeater=true
+ "To enable/disable the connection between the constant source and heater and circulation pump";
+
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=3000
"Nominal capacity of heating system";
parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=0.1
"Nominal mass flow rate for water loop";
- parameter Boolean use_constantHeater=true
- "To enable/disable the connection between the constant source and heater and circulation pump";
+
Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad(
redeclare package Medium = MediumWater,
@@ -121,7 +123,17 @@ Pressure difference modelling may be disregarded in the heating circuit
since the chosen pump sets a fixed mass flow rate regardless of the pressure drop.
-Set the heater input to 1, meaning that it will produce 1 times its nominal power.
+Set the heater input to 1, meaning that it will produce 1 times its nominal power.
+
+Implementation
+
+The pump and the heater need a control input, which we set here to a constant
+of 1.
+However, in the next version of this model, we want to connect an actual controller to these models.
+We can therefore introduce a Boolean constant
(or a Boolean parameter
+would also work), and use this to conditionally remove the Modelica block
+that outputs the control signal. When Modelica removes such a block, then all
+connections to it will also be removed.
Reference result
diff --git a/Buildings/Examples/package.order b/Buildings/Examples/package.order
index 9a791ee5b35..0868ef46ece 100644
--- a/Buildings/Examples/package.order
+++ b/Buildings/Examples/package.order
@@ -1,4 +1,5 @@
Tutorial
+SimpleHouse
ChillerPlant
DualFanDualDuct
HydronicHeating
diff --git a/Buildings/Fluid/Examples/SimpleHouse.mo b/Buildings/Fluid/Examples/SimpleHouse.mo
deleted file mode 100644
index 8c187d6fc92..00000000000
--- a/Buildings/Fluid/Examples/SimpleHouse.mo
+++ /dev/null
@@ -1,349 +0,0 @@
-within Buildings.Fluid.Examples;
-model SimpleHouse
- "Illustrative example of a simple heating, ventilation and room model"
- extends Modelica.Icons.Example;
-
- package MediumAir = Buildings.Media.Air;
- package MediumWater = Buildings.Media.Water;
-
- parameter Modelica.Units.SI.Area A_wall=100 "Wall area";
- parameter Modelica.Units.SI.Area A_win=5 "Window area";
- parameter Real g_win(min=0, max=1, unit="1") = 0.3 "Solar heat gain coefficient of window";
- parameter Modelica.Units.SI.Volume V_zone=A_wall*3 "Wall area";
- parameter Modelica.Units.SI.HeatFlowRate QHea_nominal=700
- "Nominal capacity of heating system";
- parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=QHea_nominal/10/
- 4200 "Nominal mass flow rate for water loop";
- parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=V_zone*2*1.2/3600
- "Nominal mass flow rate for air loop";
-
- parameter Modelica.Units.SI.PressureDifference dpAir_nominal=200
- "Pressure drop at nominal mass flow rate for air loop";
- parameter Boolean allowFlowReversal=false
- "= false because flow will not reverse in these circuits";
-
- Modelica.Thermal.HeatTransfer.Components.HeatCapacitor walCap(
- T(fixed=true),
- C=10*A_wall*0.05*1000*1000)
- "Thermal mass of walls"
- annotation (Placement(transformation(extent={{-10,-10},{10,10}},
- rotation=270,
- origin={142,-8})));
- MixingVolumes.MixingVolume zone(
- redeclare package Medium = MediumAir,
- V=V_zone,
- nPorts=2,
- energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
- m_flow_nominal=mAir_flow_nominal,
- massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial)
- "Very based zone air model"
- annotation (Placement(transformation(extent={{102,140},{82,160}})));
- Modelica.Thermal.HeatTransfer.Components.ThermalResistor convRes(R=1/2/A_wall)
- "Thermal resistance for convective heat transfer with h=2"
- annotation (Placement(transformation(extent={{-10,-10},{10,10}},
- rotation=270,
- origin={132,22})));
- HeatExchangers.Radiators.RadiatorEN442_2 rad(
- redeclare package Medium = MediumWater,
- T_a_nominal=273.15 + 50,
- T_b_nominal=273.15 + 40,
- energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
- allowFlowReversal=allowFlowReversal,
- Q_flow_nominal=QHea_nominal) "Radiator"
- annotation (Placement(transformation(extent={{104,-116},{124,-96}})));
-
- Sources.Boundary_pT bouAir(redeclare package Medium = MediumAir, nPorts=2,
- use_T_in=true) "Air boundary with constant temperature"
- annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- origin={-112,140})));
- Sources.Boundary_pT bouWat(redeclare package Medium = MediumWater, nPorts=1)
- "Pressure bound for water circuit" annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- origin={-8,-170})));
- BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
- filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
- "Weather data reader"
- annotation (Placement(transformation(extent={{-200,-18},{-180,2}})));
- BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
- annotation (Placement(transformation(extent={{-162,-18},{-142,2}})));
- Modelica.Thermal.HeatTransfer.Components.ThermalResistor wallRes(R=0.25/
- A_wall/0.04) "Thermal resistor for wall: 25 cm of rockwool"
- annotation (Placement(transformation(extent={{66,-10},{86,10}})));
- Buildings.HeatTransfer.Sources.PrescribedTemperature Tout
- "Exterior temperature boundary condition"
- annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
- HeatExchangers.HeaterCooler_u heaWat(
- redeclare package Medium = MediumWater,
- m_flow_nominal=mWat_flow_nominal,
- energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
- allowFlowReversal=allowFlowReversal,
- dp_nominal=5000,
- Q_flow_nominal=QHea_nominal) "Heater for water circuit"
- annotation (Placement(transformation(extent={{44,-116},{64,-96}})));
-
- Movers.FlowControlled_m_flow pump(
- redeclare package Medium = MediumWater,
- use_inputFilter=false,
- m_flow_nominal=mWat_flow_nominal,
- energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
- allowFlowReversal=allowFlowReversal,
- nominalValuesDefineDefaultPressureCurve=true,
- inputType=Buildings.Fluid.Types.InputType.Stages,
- massFlowRates=mWat_flow_nominal*{1}) "Pump"
- annotation (Placement(transformation(extent={{80,-180},{60,-160}})));
- Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemZonAir
- "Zone air temperature sensor"
- annotation (Placement(transformation(extent={{80,170},{60,190}})));
- Actuators.Dampers.Exponential vavDam(
- redeclare package Medium = MediumAir,
- from_dp=true,
- m_flow_nominal=mAir_flow_nominal,
- dpDamper_nominal=10,
- dpFixed_nominal=dpAir_nominal - 10)
- "Damper" annotation (Placement(transformation(extent={{-10,10},{10,
- -10}}, origin={72,120})));
-
- Movers.FlowControlled_dp fan(
- redeclare package Medium = MediumAir,
- dp_nominal=dpAir_nominal,
- use_inputFilter=false,
- energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
- nominalValuesDefineDefaultPressureCurve=true,
- m_flow_nominal=mAir_flow_nominal,
- show_T=true) "Constant head fan" annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},
- origin={-22,120})));
- Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow window
- "Very simple window model"
- annotation (Placement(transformation(extent={{-20,-36},{0,-16}})));
- HeatExchangers.ConstantEffectiveness hexRec(
- redeclare package Medium1 = MediumAir,
- redeclare package Medium2 = MediumAir,
- dp1_nominal=0,
- dp2_nominal=0,
- m1_flow_nominal=mAir_flow_nominal,
- m2_flow_nominal=mAir_flow_nominal,
- eps=0.85) "Heat exchanger for heat recuperation"
- annotation (Placement(transformation(extent={{-54,114},{-84,146}})));
- Modelica.Blocks.Logical.Hysteresis hysRad(uLow=273.15 + 20, uHigh=273.15 + 22)
- "Hysteresis controller for radiator"
- annotation (Placement(transformation(extent={{-74,-110},{-54,-90}})));
- Modelica.Blocks.Math.BooleanToReal booleanToReal1 "Boolean to real"
- annotation (Placement(transformation(extent={{-16,-110},{4,-90}})));
- Modelica.Blocks.Logical.Not not1
- "negation for enabling heating when temperatur is low"
- annotation (Placement(transformation(extent={{-46,-110},{-26,-90}})));
- Modelica.Blocks.Sources.Constant const_dp(k=dpAir_nominal) "Pressure head"
- annotation (Placement(transformation(extent={{-52,150},{-32,170}})));
-
- Modelica.Blocks.Math.Gain gaiWin(k=A_win*g_win)
- "Gain for window solar transmittance and area as HGloHor is in W/m2"
- annotation (Placement(transformation(extent={{-60,-36},{-40,-16}})));
- Modelica.Blocks.Math.BooleanToInteger booleanToInt "Boolean to integer"
- annotation (Placement(transformation(extent={{-16,-144},{4,-124}})));
- Controls.Continuous.LimPID conDam(
- controllerType=Modelica.Blocks.Types.SimpleController.P,
- yMin=0.25) "Controller for damper"
- annotation (Placement(transformation(extent={{-20,80},{0,100}})));
- Modelica.Blocks.Sources.Constant TSetRoo(k=273.15 + 24)
- "Room temperature set point for air system"
- annotation (Placement(transformation(extent={{-60,60},{-40,80}})));
- HeatExchangers.SensibleCooler_T cooAir(
- energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
- allowFlowReversal=allowFlowReversal,
- m_flow_nominal=mAir_flow_nominal,
- dp_nominal=0,
- redeclare package Medium = MediumAir) "Cooling for supply air"
- annotation (Placement(transformation(extent={{30,110},{50,130}})));
- Modelica.Blocks.Sources.Constant TSupAirCoo(k=273.15 + 20)
- "Cooling setpoint for supply air"
- annotation (Placement(transformation(extent={{-12,150},{8,170}})));
-equation
- connect(convRes.port_b, walCap.port)
- annotation (Line(points={{132,12},{132,12},{132,-8}}, color={191,0,0}));
- connect(convRes.port_a, zone.heatPort) annotation (Line(points={{132,32},{132,
- 150},{102,150}}, color={191,0,0}));
- connect(weaDat.weaBus, weaBus) annotation (Line(
- points={{-180,-8},{-180,-8},{-152,-8}},
- color={255,204,51},
- thickness=0.5));
- connect(wallRes.port_b, walCap.port) annotation (Line(points={{86,0},{132,0},{
- 132,-6},{132,-8}}, color={191,0,0}));
- connect(Tout.T, weaBus.TDryBul)
- annotation (Line(points={{-22,0},{-152,0},{-152,-8}}, color={0,0,127}));
- connect(Tout.port, wallRes.port_a)
- annotation (Line(points={{0,0},{0,0},{66,0}}, color={191,0,0}));
- connect(heaWat.port_b, rad.port_a) annotation (Line(points={{64,-106},{84,-106},
- {104,-106}}, color={0,127,255}));
- connect(bouWat.ports[1], heaWat.port_a) annotation (Line(points={{2,-170},{40,
- -170},{40,-106},{44,-106}}, color={0,127,255}));
- connect(rad.port_b, pump.port_a) annotation (Line(points={{124,-106},{130,-106},
- {130,-170},{80,-170}}, color={0,127,255}));
- connect(senTemZonAir.port, zone.heatPort) annotation (Line(points={{80,180},{80,
- 180},{112,180},{112,150},{102,150}},
- color={191,0,0}));
- connect(window.port, walCap.port) annotation (Line(points={{0,-26},{132,-26},{
- 132,-12},{132,-8}},
- color={191,0,0}));
- connect(bouAir.ports[1], hexRec.port_b1) annotation (Line(points={{-102,142},{
- -102,139.6},{-84,139.6}},
- color={0,127,255}));
- connect(hexRec.port_a1, zone.ports[1]) annotation (Line(points={{-54,139.6},{85,
- 139.6},{85,140},{94,140}}, color={0,127,255}));
- connect(rad.heatPortCon, zone.heatPort) annotation (Line(points={{112,-98.8},{
- 112,-98.8},{112,48},{112,150},{102,150}}, color={191,0,0}));
- connect(rad.heatPortRad, walCap.port) annotation (Line(points={{116,-98.8},{116,
- -98.8},{116,-70},{116,-26},{132,-26},{132,-8}},
- color={191,0,0}));
- connect(not1.y, booleanToReal1.u) annotation (Line(points={{-25,-100},{-22,-100},
- {-18,-100}}, color={255,0,255}));
- connect(not1.u, hysRad.y) annotation (Line(points={{-48,-100},{-52,-100},{-53,
- -100}}, color={255,0,255}));
- connect(booleanToReal1.y, heaWat.u) annotation (Line(points={{5,-100},{16,-100},
- {26,-100},{42,-100}}, color={0,0,127}));
- connect(heaWat.port_a, pump.port_b) annotation (Line(points={{44,-106},{40,-106},
- {40,-112},{40,-170},{60,-170}}, color={0,127,255}));
- connect(const_dp.y, fan.dp_in) annotation (Line(points={{-31,160},{-22,160},{
- -22,132},{-22,132}}, color={0,0,127}));
- connect(gaiWin.y, window.Q_flow) annotation (Line(points={{-39,-26},{-34,-26},
- {-30,-26},{-20,-26}}, color={0,0,127}));
- connect(gaiWin.u, weaBus.HGloHor) annotation (Line(points={{-62,-26},{-90,-26},
- {-152,-26},{-152,-8}}, color={0,0,127}));
- connect(booleanToInt.u, not1.y) annotation (Line(points={{-18,-134},{-22,-134},
- {-22,-100},{-25,-100}}, color={255,0,255}));
- connect(booleanToInt.y, pump.stage) annotation (Line(points={{5,-134},{32,-134},
- {70,-134},{70,-158}}, color={255,127,0}));
- connect(bouAir.ports[2], hexRec.port_a2) annotation (Line(points={{-102,138},{
- -102,142},{-90,142},{-90,120.4},{-84,120.4}}, color={0,127,255}));
- connect(hexRec.port_b2, fan.port_a) annotation (Line(points={{-54,120.4},{-44,
- 120.4},{-44,120},{-32,120}}, color={0,127,255}));
- connect(vavDam.port_b, zone.ports[2])
- annotation (Line(points={{82,120},{90,120},{90,140}}, color={0,127,255}));
- connect(senTemZonAir.T, hysRad.u) annotation (Line(points={{60,180},{60,180},{
- -132,180},{-132,-100},{-76,-100}}, color={0,0,127}));
- connect(senTemZonAir.T,conDam. u_s) annotation (Line(points={{60,180},{60,180},
- {-132,180},{-132,90},{-62,90},{-22,90}},
- color={0,0,127}));
- connect(conDam.y, vavDam.y) annotation (Line(points={{1,90},{26,90},{72,90},{72,
- 108}},color={0,0,127}));
- connect(TSetRoo.y,conDam. u_m) annotation (Line(points={{-39,70},{-40,70},{-36,
- 70},{-40,70},{-10,70},{-10,78}},
- color={0,0,127}));
- connect(fan.port_b, cooAir.port_a)
- annotation (Line(points={{-12,120},{30,120}}, color={0,127,255}));
- connect(cooAir.port_b, vavDam.port_a)
- annotation (Line(points={{50,120},{50,120},{62,120}}, color={0,127,255}));
- connect(TSupAirCoo.y, cooAir.TSet) annotation (Line(points={{9,160},{20,160},{
- 20,128},{28,128}}, color={0,0,127}));
- connect(bouAir.T_in, weaBus.TDryBul) annotation (Line(points={{-124,144},{
- -152,144},{-152,-8}}, color={0,0,127}));
- annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-240,
- -220},{200,220}}), graphics={
- Rectangle(
- extent={{-222,200},{180,50}},
- fillColor={238,238,238},
- fillPattern=FillPattern.Solid,
- pattern=LinePattern.None),
- Rectangle(
- extent={{-220,-60},{180,-200}},
- fillColor={238,238,238},
- fillPattern=FillPattern.Solid,
- pattern=LinePattern.None),
- Rectangle(
- extent={{-220,40},{20,-48}},
- fillColor={238,238,238},
- fillPattern=FillPattern.Solid,
- pattern=LinePattern.None),
- Text(
- extent={{-78,182},{-212,198}},
- textColor={0,0,127},
- fillColor={255,213,170},
- fillPattern=FillPattern.Solid,
- textString="Cooling and ventilation"),
- Rectangle(
- extent={{40,40},{180,-46}},
- fillColor={238,238,238},
- fillPattern=FillPattern.Solid,
- pattern=LinePattern.None),
- Text(
- extent={{98,20},{32,38}},
- textColor={0,0,127},
- fillColor={255,213,170},
- fillPattern=FillPattern.Solid,
- textString="Wall"),
- Text(
- extent={{-148,-86},{-214,-68}},
- textColor={0,0,127},
- fillColor={255,213,170},
- fillPattern=FillPattern.Solid,
- textString="Heating"),
- Text(
- extent={{-154,20},{-212,38}},
- textColor={0,0,127},
- fillColor={255,213,170},
- fillPattern=FillPattern.Solid,
- textString="Weather")}),
- experiment(Tolerance=1e-06, StopTime=3.1536e+07),
- Documentation(revisions="
-
--
-June 15, 2022, by Hongxiang Fu:
-Changed conDam.yMin
from 0.1 to 0.25.
-This is for
-IBPSA, #1624.
-
--
-May 8, 2017, by Michael Wetter:
-Updated heater model.
-This is for
-IBPSA, #763.
-
--
-November 10, 2016, by Michael Wetter:
-Connected supply air temperature to outdoor air temperature,
-added cooling to supply air,
-changed capacity of heating system, switched heating pump off when heater is off,
-and added proportional controller for the air damper.
-This is
-for #584.
-
--
-September 9, 2016, by Michael Wetter:
-Corrected error in window model, as the solar heat gain was
-not multiplied with the window area. Dymola 2017 reported this
-error due to mismatching units of W/m2
and W
.
-
--
-June 23, 2016, by Michael Wetter:
-Changed graphical annotation.
-
--
-March 11, 2016, by Michael Wetter:
-Corrected wrong limits for hysAir
so that
-uLow < uHigh
.
-This is
-for #429.
-
--
-January 22, 2016, by Michael Wetter:
-Corrected type declaration of pressure difference.
-This is
-for #404.
-
--
-September 19, 2015, by Filip Jorissen:
-First implementation.
-
-
-", info="
-
-This model contains a simple model of a house
-with a heating system, ventilation and weather boundary conditions.
-It serves as a demonstration case of how the Buildings
library can be used.
-
-"),
- __Dymola_Commands(file=
- "modelica://Buildings/Resources/Scripts/Dymola/Fluid/Examples/SimpleHouse.mos"
- "Simulate and plot"));
-end SimpleHouse;
diff --git a/Buildings/Fluid/Examples/package.order b/Buildings/Fluid/Examples/package.order
index dfba118b86a..3aca7c2d917 100644
--- a/Buildings/Fluid/Examples/package.order
+++ b/Buildings/Fluid/Examples/package.order
@@ -1,4 +1,3 @@
ResistanceVolumeFlowReversal
-SimpleHouse
FlowSystem
Performance
diff --git a/Buildings/Fluid/Storage/BaseClasses/IndirectTankHeatExchanger.mo b/Buildings/Fluid/Storage/BaseClasses/IndirectTankHeatExchanger.mo
index 7d3f3183276..65c9e5ff605 100644
--- a/Buildings/Fluid/Storage/BaseClasses/IndirectTankHeatExchanger.mo
+++ b/Buildings/Fluid/Storage/BaseClasses/IndirectTankHeatExchanger.mo
@@ -169,7 +169,7 @@ equation
color={191,0,0},
smooth=Smooth.None));
connect(vol[1].ports[1],senMasFlo.port_b) annotation (Line(
- points={{-24,-40},{-24,-50},{-60,-50}},
+ points={{-23,-40},{-23,-50},{-60,-50}},
color={0,127,255},
smooth=Smooth.None));
connect(cap.port,HexToTan.solid) annotation (Line(
@@ -185,7 +185,7 @@ equation
color={191,0,0},
smooth=Smooth.None));
connect(temSenHex.T, hAPipIns.T) annotation (Line(
- points={{-10,-70},{0,-70},{0,-76},{9,-76}},
+ points={{-9,-70},{0,-70},{0,-76},{9,-76}},
color={0,0,127},
smooth=Smooth.None));
connect(hAPipIns.hA, htfToHex.Gc) annotation (Line(
@@ -202,12 +202,12 @@ equation
smooth=Smooth.None));
connect(temSenSur.T, hANatCyl.TSur)
annotation (Line(
- points={{20,52},{20,70},{-40,70},{-40,114},{-2,114}},
+ points={{20,53},{20,70},{-40,70},{-40,114},{-2,114}},
color={0,0,127},
smooth=Smooth.None));
connect(hANatCyl.TFlu, temSenWat.T)
annotation (Line(
- points={{-2,106},{-36,106},{-36,76},{68,76},{68,50}},
+ points={{-2,106},{-36,106},{-36,76},{68,76},{68,51}},
color={0,0,127},
smooth=Smooth.None));
connect(port_a, senMasFlo.port_a) annotation (Line(
@@ -215,7 +215,7 @@ equation
color={0,127,255},
smooth=Smooth.None));
connect(vol[nSeg].ports[2], res.port_a) annotation (Line(
- points={{-20,-40},{-20,-50},{46,-50}},
+ points={{-21,-40},{-21,-50},{46,-50}},
color={0,127,255},
smooth=Smooth.None));
connect(res.port_b, port_b) annotation (Line(
@@ -238,7 +238,7 @@ equation
-150},{100,150}}), graphics), Icon(coordinateSystem(
preserveAspectRatio=false, extent={{-100,-150},{100,150}}), graphics={
Rectangle(
- extent={{-66,64},{74,-96}},
+ extent={{-70,64},{70,-96}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={95,95,95},
@@ -250,25 +250,25 @@ equation
fillColor={0,0,255},
fillPattern=FillPattern.Solid),
Rectangle(
- extent={{-66,-12},{74,-18}},
+ extent={{-70,-12},{70,-18}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
- extent={{-36,64},{-32,-96}},
+ extent={{-40,64},{-36,-96}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
- extent={{2,64},{6,-96}},
+ extent={{-2,64},{2,-96}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Rectangle(
- extent={{40,64},{44,-96}},
+ extent={{36,64},{40,-96}},
lineColor={0,0,255},
pattern=LinePattern.None,
fillColor={0,0,0},
diff --git a/Buildings/Fluid/Storage/BaseClasses/PartialTwoPortInterface.mo b/Buildings/Fluid/Storage/BaseClasses/PartialTwoPortInterface.mo
index 484e402ced4..ba99559b260 100644
--- a/Buildings/Fluid/Storage/BaseClasses/PartialTwoPortInterface.mo
+++ b/Buildings/Fluid/Storage/BaseClasses/PartialTwoPortInterface.mo
@@ -86,8 +86,8 @@ protected
Documentation(info="
This partial class implements the same functionality as
-
-Buildings.Fluid.Interfaces.StaticTwoPortHeatMassExchanger,
+
+Buildings.Fluid.Interfaces.PartialTwoPortInterface,
except that port_a
and port_b
are placed at the top and bottom
of the component.
diff --git a/Buildings/Fluid/Storage/Examples/Stratified.mo b/Buildings/Fluid/Storage/Examples/Stratified.mo
index 868a1f488ad..61a8c030363 100644
--- a/Buildings/Fluid/Storage/Examples/Stratified.mo
+++ b/Buildings/Fluid/Storage/Examples/Stratified.mo
@@ -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,-70},{2,-50}})));
+ annotation (Placement(transformation(extent={{-20,-70},{0,-50}})));
Buildings.Fluid.FixedResistances.PressureDrop res_2(
from_dp=true,
redeclare package Medium = Medium,
@@ -92,7 +92,7 @@ equation
connect(HOut_flow.port_b, res_1.port_a)
annotation (Line(points={{20,-8},{34,-8}}, color={0,127,255}));
connect(tanEnh.port_b, HOut_flow1.port_a)
- annotation (Line(points={{-8,-70},{-8,-80},{20,-80}},
+ annotation (Line(points={{-10,-70},{-10,-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}));
@@ -114,9 +114,9 @@ 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,-12},{-2,-12},{-2,-60},{-2.4,-60}}, color={191,0,0}));
+ -24,56},{-24,-12},{-4.4,-12},{-4.4,-60}}, color={191,0,0}));
connect(TBCTop2.port, tanEnh.heaPorTop) annotation (Line(points={{-28,38},{
- -26,38},{-26,-14},{-6,-14},{-6,-52.6}}, color={191,0,0}));
+ -26,38},{-26,-14},{-8,-14},{-8,-52.6}}, color={191,0,0}));
connect(sin_1.ports[1], res_1.port_b) annotation (Line(
points={{70,-9},{64,-9},{64,-8},{54,-8}},
color={0,127,255},
@@ -130,7 +130,7 @@ equation
color={0,127,255},
smooth=Smooth.None));
connect(sou_1.ports[2], tanEnh.port_a) annotation (Line(
- points={{-40,9},{-30,9},{-30,-40},{-8,-40},{-8,-50}},
+ points={{-40,9},{-30,9},{-30,-40},{-10,-40},{-10,-50}},
color={0,127,255},
smooth=Smooth.None));
connect(TBCSid1.port, tanSim.heaPorSid) annotation (Line(
diff --git a/Buildings/Fluid/Storage/StratifiedEnhanced.mo b/Buildings/Fluid/Storage/StratifiedEnhanced.mo
index 14a3f6d690c..84b0c90cef1 100644
--- a/Buildings/Fluid/Storage/StratifiedEnhanced.mo
+++ b/Buildings/Fluid/Storage/StratifiedEnhanced.mo
@@ -43,16 +43,16 @@ equation
{-40,-80},{14,-80},{14,-16},{16,-16}},color={0,127,255}));
connect(vol[nSeg].ports[2], H_b_flow.port_a) annotation (Line(points={{16,-16},
{14,-16},{14,-80},{50,-80}}, color={0,127,255}));
- connect(H_b_flow.port_b, port_b) annotation (Line(points={{70,-80},{80,-80},{80,
- 0},{100,0}}, color={0,127,255}));
+ connect(H_b_flow.port_b, port_b) annotation (Line(points={{70,-80},{80,-80},{
+ 80,-100},{0,-100}}, color={0,127,255}));
for i in 1:(nSeg-1) loop
connect(vol[i].ports[2], H_vol_flow[i].port_a) annotation (Line(points={{16,
-16},{16,-20},{-28,-20},{-28,-40},{-20,-40}}, color={0,127,255}));
connect(H_vol_flow[i].port_b, vol[i + 1].ports[1]) annotation (Line(points={{0,-40},
{4,-40},{4,-16},{16,-16}}, color={0,127,255}));
end for;
- connect(port_a, H_a_flow.port_a) annotation (Line(points={{-100,0},{
- -80,0},{-80,-80},{-60,-80}}, color={0,127,255}));
+ connect(port_a, H_a_flow.port_a) annotation (Line(points={{0,100},{-96,100},{
+ -96,-80},{-60,-80}}, color={0,127,255}));
connect(vol[1:nSeg].ports[3], str.fluidPort[2:nSeg+1])
annotation (Line(points={{16,-16},{16,-18},{-66,-18},{-66,-40},{-60,-40}},
@@ -69,10 +69,10 @@ equation
color={0,0,127}));
connect(str.heatPort, vol.heatPort) annotation (Line(points={{-40,-40},{
-32,-40},{-32,10},{6,10},{6,-6}}, color={191,0,0}));
- connect(port_a, str.fluidPort[1]) annotation (Line(points={{-100,5.55112e-16},
- {-100,0},{-72,0},{-72,-40},{-60,-40}}, color={0,127,255}));
- connect(port_b, str.fluidPort[nSeg + 2]) annotation (Line(points={{100,
- 5.55112e-16},{100,0},{80,0},{80,-88},{-72,-88},{-72,-40},{-60,-40}},
+ connect(port_a, str.fluidPort[1]) annotation (Line(points={{0,100},{0,92},{
+ -72,92},{-72,-40},{-60,-40}}, color={0,127,255}));
+ connect(port_b, str.fluidPort[nSeg + 2]) annotation (Line(points={{0,-100},{
+ -72,-100},{-72,-40},{-60,-40}},
color={0,127,255}));
connect(mTan_flow.y, str.m_flow) annotation (Line(points={{-73,-32},{-68.5,
-32},{-68.5,-31.8},{-62,-31.8}}, color={0,0,127}));
diff --git a/Buildings/Fluid/Storage/StratifiedEnhancedInternalHex.mo b/Buildings/Fluid/Storage/StratifiedEnhancedInternalHex.mo
index 49f13f43ebe..95691eec02a 100644
--- a/Buildings/Fluid/Storage/StratifiedEnhancedInternalHex.mo
+++ b/Buildings/Fluid/Storage/StratifiedEnhancedInternalHex.mo
@@ -95,13 +95,13 @@ model StratifiedEnhancedInternalHex
redeclare final package Medium =MediumHex,
m_flow(min=if allowFlowReversalHex then -Modelica.Constants.inf else 0))
"Heat exchanger inlet"
- annotation (Placement(transformation(extent={{-110,-48},{-90,-28}}),
+ annotation (Placement(transformation(extent={{-150,-30},{-130,-10}}),
iconTransformation(extent={{-110,-48},{-90,-28}})));
Modelica.Fluid.Interfaces.FluidPort_b portHex_b(
redeclare final package Medium = MediumHex,
m_flow(max=if allowFlowReversalHex then Modelica.Constants.inf else 0))
"Heat exchanger outlet"
- annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}),
+ annotation (Placement(transformation(extent={{-150,-90},{-130,-70}}),
iconTransformation(extent={{-110,-90},{-90,-70}})));
BaseClasses.IndirectTankHeatExchanger indTanHex(
@@ -126,11 +126,10 @@ model StratifiedEnhancedInternalHex
final allowFlowReversal=allowFlowReversalHex,
final m_flow_small=1e-4*abs(mHex_flow_nominal))
"Heat exchanger inside the tank"
- annotation (Placement(
- transformation(
- extent={{-10,-15},{10,15}},
+ annotation (Placement(transformation(
+ extent={{10,-15},{-10,15}},
rotation=180,
- origin={-87,32})));
+ origin={-120,-20})));
Modelica.Units.SI.HeatFlowRate QHex_flow=-sum(indTanHex.port.Q_flow)
"Heat transferred from the heat exchanger to the tank";
@@ -173,17 +172,17 @@ equation
for i in 1:hexSegMult loop
connect(indTanHex.port[j*hexSegMult+i], heaPorVol[segHex_a + (if hHex_a > hHex_b then j else -j)])
annotation (Line(
- points={{-87,41.8},{-20,41.8},{-20,-2.22045e-16},{0,-2.22045e-16}},
+ points={{-120,-10.2},{-120,0},{0,0}},
color={191,0,0},
smooth=Smooth.None));
end for;
end for;
connect(portHex_a, indTanHex.port_a) annotation (Line(
- points={{-100,-38},{-68,-38},{-68,32},{-77,32}},
+ points={{-140,-20},{-130,-20}},
color={0,127,255},
smooth=Smooth.None));
connect(indTanHex.port_b, portHex_b) annotation (Line(
- points={{-97,32},{-98,32},{-98,18},{-70,18},{-70,-80},{-100,-80}},
+ points={{-110,-20},{-100,-20},{-100,-80},{-140,-80}},
color={0,127,255},
smooth=Smooth.None));
@@ -337,5 +336,6 @@ January 29, 2013 by Peter Grant:
First implementation.
-"));
+