From 161050ccd627550e66f355ffb2cde53e741eedd1 Mon Sep 17 00:00:00 2001 From: Philip Groesdonk Date: Wed, 10 May 2023 11:10:42 +0200 Subject: [PATCH 1/3] Added an option for non-constant ground temperature from an input connector in ThermalZones.ReducedOrder.EquivalentAirTemperature. --- .../BaseClasses/PartialVDI6007.mo | 31 ++++++++++++++++++- .../EquivalentAirTemperature/VDI6007.mo | 8 ++++- .../VDI6007WithWindow.mo | 8 ++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo b/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo index f83dc4253f..fab8bdedc7 100644 --- a/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo +++ b/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo @@ -10,7 +10,8 @@ partial model PartialVDI6007 parameter Real wfGro(unit="1") "Weight factor of the ground (0 if not considered)"; parameter Modelica.Units.SI.Temperature TGro - "Temperature of the ground in contact with floor plate"; + "Constant temperature of the ground in contact with floor plate" + annotation(Dialog(enable=not TGroundFromInput)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hConWallOut "Exterior walls convective coefficient of heat transfer (outdoor)"; parameter Modelica.Units.SI.CoefficientOfHeatTransfer hRad @@ -18,6 +19,9 @@ partial model PartialVDI6007 parameter Boolean withLongwave=true "Set to true to include longwave radiation exchange" annotation(choices(checkBox = true)); + parameter Boolean TGroundFromInput=false + "Set to true to use TGro_in input connector instead of TGro constant" + annotation(choices(checkBox = true)); Modelica.Units.SI.Temperature TEqWall[n] "Equivalent wall temperature"; Modelica.Units.SI.Temperature TEqWin[n] "Equivalent window temperature"; @@ -61,6 +65,20 @@ partial model PartialVDI6007 extent={{-20,-20},{20,20}}, rotation=-90, origin={0,120}))); + Modelica.Blocks.Interfaces.RealInput TGro_in( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC") if TGroundFromInput + "Temperature of the ground in contact with floor plate" + annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-120}))); + +protected + Modelica.Units.SI.Temperature TGroundUsed + "Used value for temperature of the ground in contact with floor plate"; initial equation assert(noEvent(abs(sum(wfWall) + sum(wfWin) + wfGro) > 0.1), @@ -70,6 +88,11 @@ initial equation irrelevant.", level=AssertionLevel.warning); equation + if TGroundFromInput then + TGroundUsed=TGro_in; + else + TGroundUsed=TGro; + end if; delTEqLW=(TBlaSky - TDryBul)*hRad/(hRad + hConWallOut); delTEqSW=HSol*aExt/(hRad + hConWallOut); if withLongwave then @@ -120,6 +143,12 @@ equation revisions="