diff --git a/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransfer.mo b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransfer.mo new file mode 100644 index 0000000000..e55fbece7e --- /dev/null +++ b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransfer.mo @@ -0,0 +1,9 @@ +within AixLib.ThermalZones.HighOrder.Components.Types; +type CalcMethodConvectiveHeatTransfer = enumeration( + DIN_6946 + "DIN 6946", + ASHRAE_Fundamentals + "ASHRAE Fundamentals", + Custom_hCon + "Custom hCon (constant)") + "Calculation method for convective heat transfer coefficient at outside surface"; diff --git a/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransferInsideSurface.mo b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransferInsideSurface.mo new file mode 100644 index 0000000000..7df64520e0 --- /dev/null +++ b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodConvectiveHeatTransferInsideSurface.mo @@ -0,0 +1,11 @@ +within AixLib.ThermalZones.HighOrder.Components.Types; +type CalcMethodConvectiveHeatTransferInsideSurface = enumeration( + EN_ISO_6946_Appendix_A + "EN ISO 6946 Appendix A >>Flat Surfaces<<", + Bernd_Glueck + "By Bernd Glueck", + Custom_hCon + "Custom hCon (constant)", + ASHRAE140_2017 + "ASHRAE140-2017") + "Calculation method for convective heat transfer coefficient at inside surface"; diff --git a/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodLongwaveRadiationHeatTransfer.mo b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodLongwaveRadiationHeatTransfer.mo new file mode 100644 index 0000000000..b11ba3e65c --- /dev/null +++ b/AixLib/ThermalZones/HighOrder/Components/Types/CalcMethodLongwaveRadiationHeatTransfer.mo @@ -0,0 +1,11 @@ +within AixLib.ThermalZones.HighOrder.Components.Types; +type CalcMethodLongwaveRadiationHeatTransfer = enumeration( + No_Approx + "No approx", + Linear_Wall + "Linear approx at wall temp", + Linear_Rad + "Linear approx at rad temp", + Linear_Constant_Tref + "Linear approx at constant T_ref") + "Calculation method for longwave radiation heat transfer"; diff --git a/AixLib/ThermalZones/HighOrder/Components/Types/SurfaceOrientation.mo b/AixLib/ThermalZones/HighOrder/Components/Types/SurfaceOrientation.mo new file mode 100644 index 0000000000..872c0e3d6c --- /dev/null +++ b/AixLib/ThermalZones/HighOrder/Components/Types/SurfaceOrientation.mo @@ -0,0 +1,8 @@ +within AixLib.ThermalZones.HighOrder.Components.Types; +type SurfaceOrientation = enumeration( + vertical + "vertical", + horizontal_facing_up + "horizontal facing up", + horizontal_facing_down + "horizontal facing down") "Surface Orientation"; diff --git a/AixLib/ThermalZones/HighOrder/Components/Types/package.order b/AixLib/ThermalZones/HighOrder/Components/Types/package.order index 5f1b35b639..7bf4989634 100644 --- a/AixLib/ThermalZones/HighOrder/Components/Types/package.order +++ b/AixLib/ThermalZones/HighOrder/Components/Types/package.order @@ -2,3 +2,7 @@ selectorCoefficients CoeffTableEastWestWindow CoeffTableSouthWindow PartialCoeffTable +CalcMethodConvectiveHeatTransfer +CalcMethodConvectiveHeatTransferInsideSurface +CalcMethodLongwaveRadiationHeatTransfer +SurfaceOrientation diff --git a/AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo b/AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo index 6082f6e976..e416ab0998 100644 --- a/AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo +++ b/AixLib/ThermalZones/HighOrder/Components/Walls/BaseClasses/ConvNLayerClearanceStar.mo @@ -27,20 +27,12 @@ model ConvNLayerClearanceStar "Specific heat capacity" annotation (Dialog(group="Structure of wall layers")); // which orientation of surface? - parameter Integer surfaceOrientation "Surface orientation" annotation(Dialog(descriptionLabel = true, enable = if IsHConvConstant == true then false else true), choices(choice = 1 - "vertical", choice = 2 - "horizontal facing up", choice = 3 - "horizontal facing down", radioButtons = true)); - parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient at inside surface" annotation (Dialog( - group="Convection", descriptionLabel=true), choices( - choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<", - choice=2 "By Bernd Glueck", - choice=3 "Custom hCon (constant)", - choice=4 "ASHRAE140-2017", - radioButtons=true)); + parameter AixLib.ThermalZones.HighOrder.Components.Types.SurfaceOrientation surfaceOrientation "Surface orientation" annotation(Dialog(descriptionLabel = true, enable = if IsHConvConstant == true then false else true)); + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Bernd_Glueck "Calculation method for convective heat transfer coefficient at inside surface" annotation (Dialog( + group="Convection", descriptionLabel=true)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=2 "Constant convective heat transfer coefficient" - annotation (Dialog(group="Convection", enable=calcMethod == 1)); + annotation (Dialog(group="Convection", enable=calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.EN_ISO_6946_Appendix_A)); parameter Integer radCalcMethod=1 "Calculation method for radiation heat transfer" annotation ( Evaluate=true, diff --git a/AixLib/ThermalZones/HighOrder/Components/Walls/Wall.mo b/AixLib/ThermalZones/HighOrder/Components/Walls/Wall.mo index afb650fc82..4c5ac75377 100644 --- a/AixLib/ThermalZones/HighOrder/Components/Walls/Wall.mo +++ b/AixLib/ThermalZones/HighOrder/Components/Walls/Wall.mo @@ -25,24 +25,20 @@ model Wall // Surface parameters parameter Real solar_absorptance = 0.25 "Solar absorptance coefficient of outside wall surface" annotation(Dialog(tab = "Surface Parameters", group = "Outside surface", enable = outside)); - parameter Integer calcMethodOut=1 "Calculation method for convective heat transfer coefficient at outside surface" annotation (Dialog( + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer calcMethodOut=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 "Calculation method for convective heat transfer coefficient at outside surface" annotation (Dialog( tab="Surface Parameters", group="Outside surface", enable=outside, - compact=true), choices( - choice=1 "DIN 6946", - choice=2 "ASHRAE Fundamentals", - choice=3 "Custom hCon (constant)", - radioButtons=true)); + compact=true)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hConOut_const=25 "Custom convective heat transfer coefficient (just for manual selection, not recommended)" annotation (Dialog( tab="Surface Parameters", group="Outside surface", - enable=calcMethodOut == 3 and outside)); + enable=calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.Custom_hCon and outside)); parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook surfaceType = DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster() "Surface type of outside wall" annotation(Dialog(tab = "Surface Parameters", group = "Outside surface", enable= - calcMethodOut == 2 and outside), choicesAllMatching = true); + calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals and outside), choicesAllMatching = true); parameter Integer ISOrientation = 1 "Inside surface orientation" annotation(Dialog(tab = "Surface Parameters", group = "Inside surface", compact = true, descriptionLabel = true), choices(choice = 1 "vertical wall", choice = 2 "floor", choice = 3 "ceiling", radioButtons = true)); @@ -158,7 +154,7 @@ parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook Utilities.HeatTransfer.SolarRadToHeat SolarAbsorption(coeff = solar_absorptance, A=ANet) if outside annotation(Placement(transformation(origin={-37.5,90.5},extent={{-10.5,-10.5},{10.5,10.5}}))); AixLib.Utilities.Interfaces.SolarRad_in SolarRadiationPort if outside annotation(Placement(transformation(extent = {{-116, 79}, {-96, 99}}), iconTransformation(extent = {{-36, 100}, {-16, 120}}))); Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_outside annotation(Placement(transformation(extent = {{-108, -6}, {-88, 14}}), iconTransformation(extent = {{-31, -10}, {-11, 10}}))); - Modelica.Blocks.Interfaces.RealInput WindSpeedPort if outside and (calcMethodOut == 1 or calcMethodOut == 2) + Modelica.Blocks.Interfaces.RealInput WindSpeedPort if outside and (calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 or calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals) annotation(Placement(transformation(extent = {{-113, 54}, {-93, 74}}), iconTransformation(extent = {{-31, 78}, {-11, 98}}))); Sunblinds.Sunblind Sunblind( final n=1, @@ -230,7 +226,7 @@ equation //****************************************************************** if outside then connect(SolarRadiationPort, SolarAbsorption.solarRad_in) annotation(Line(points={{-106,89},{-48,89},{-48,88.4},{-48.105,88.4}}, color = {255, 128, 0})); - if calcMethodOut == 1 or calcMethodOut == 2 then + if calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 or calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals then connect(WindSpeedPort, heatTransfer_Outside.WindSpeedPort) annotation(Line(points={{-103,64},{-68,64},{-68,51},{-46,51}}, color = {0, 0, 127})); end if; connect(heatTransfer_Outside.port_a, port_outside) annotation(Line(points = {{-47, 58}, {-56, 58}, {-56, 4}, {-98, 4}}, color = {191, 0, 0})); @@ -275,7 +271,8 @@ equation color = {255, 128, 0})); end if; connect(heatStarToComb.portConvRadComb, thermStarComb_inside) annotation (Line(points={{79,-1},{79,-1.05},{102,-1.05},{102,0}}, color={191,0,0})); - connect(tempOutAirSensor.T, Sunblind.TOutAir) annotation (Line(points={{-62,-40},{-54,-40},{-54,-38.875},{-47.4375,-38.875}}, + connect(tempOutAirSensor.T, Sunblind.TOutAir) annotation (Line(points={{-61.6, + -40},{-54,-40},{-54,-38.875},{-47.4375,-38.875}}, color={0,0,127})); connect(port_outside, tempOutAirSensor.port) annotation (Line(points={{-98,4},{-90,4},{-90,-40},{-70,-40}}, color={191,0,0})); diff --git a/AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomParams.mo b/AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomParams.mo index e4c1467448..74df7b8c6b 100644 --- a/AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomParams.mo +++ b/AixLib/ThermalZones/HighOrder/Rooms/BaseClasses/PartialRoomParams.mo @@ -26,43 +26,32 @@ partial model PartialRoomParams "Partial model with base parameters that are nec //// Inner / Interior wall parameters // Heat convection - parameter Integer calcMethodIn=1 + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface calcMethodIn=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.EN_ISO_6946_Appendix_A "Calculation method of convective heat transfer coefficient at inside surface" annotation (Dialog( tab="Inner walls", group="Heat convection", compact=true, - descriptionLabel=true), choices( - choice=1 "EN ISO 6946 Appendix A >>Flat Surfaces<<", - choice=2 "By Bernd Glueck", - choice=3 "Custom hCon (constant)", - choice=4 "ASHRAE140-2017", - radioButtons=true)); + descriptionLabel=true)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hConIn_const=2.5 "Custom convective heat transfer coefficient (just for manual selection, not recommended)" annotation (Dialog( tab="Inner walls", group="Heat convection", - enable=(calcMethodIn == 3))); + enable=(calcMethodIn == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransferInsideSurface.Custom_hCon))); - parameter Integer radLongCalcMethod=1 "Calculation method for longwave radiation heat transfer" + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodLongwaveRadiationHeatTransfer radLongCalcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodLongwaveRadiationHeatTransfer.No_Approx "Calculation method for longwave radiation heat transfer" annotation ( Evaluate=true, - Dialog(tab="Inner walls", group="Longwave radiation", compact=true), - choices( - choice=1 "No approx", - choice=2 "Linear approx at wall temp", - choice=3 "Linear approx at rad temp", - choice=4 "Linear approx at constant T_ref", - radioButtons=true)); + Dialog(tab="Inner walls", group="Longwave radiation", compact=true)); parameter Modelica.Units.SI.Temperature T_ref= Modelica.Units.Conversions.from_degC(16) "Reference temperature for optional linearization of longwave radiation" annotation (Dialog( tab="Inner walls", group="Longwave radiation", - enable=radLongCalcMethod == 4)); + enable=radLongCalcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodLongwaveRadiationHeatTransfer.Linear_Constant_Tref)); //// Outer / Exterior wall parameters //Window type @@ -81,23 +70,19 @@ partial model PartialRoomParams "Partial model with base parameters that are nec parameter Real solar_absorptance_OW(min=0, max=1)=0.6 "Solar absoptance outer walls " annotation (Dialog(tab="Outer walls", group="Solar absorptance", descriptionLabel=true)); // Heat convection - parameter Integer calcMethodOut=1 "Calculation method for convective heat transfer coefficient" + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer calcMethodOut=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 "Calculation method for convective heat transfer coefficient" annotation (Dialog( tab="Outer walls", group="Heat convection", compact=true, - descriptionLabel=true), choices( - choice=1 "DIN 6946", - choice=2 "ASHRAE Fundamentals", - choice=3 "Custom hCon (constant)", - radioButtons=true)); - replaceable parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster() "Surface type of outside wall" annotation (Dialog(tab="Outer walls", group="Heat convection", enable=(calcMethodOut == 2))); + descriptionLabel=true)); + replaceable parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook surfaceType=DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster() "Surface type of outside wall" annotation (Dialog(tab="Outer walls", group="Heat convection", enable=(calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals))); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hConOut_const=25 "Custom convective heat transfer coefficient (just for manual selection, not recommended)" annotation (Dialog( tab="Outer walls", group="Heat convection", - enable=(calcMethodOut == 3))); + enable=(calcMethodOut == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.Custom_hCon))); // Sunblind parameter Boolean use_sunblind = false "Will sunblind become active automatically?" diff --git a/AixLib/Utilities/HeatTransfer/HeatConvOutside.mo b/AixLib/Utilities/HeatTransfer/HeatConvOutside.mo index 1197ca0022..05968f6cd1 100644 --- a/AixLib/Utilities/HeatTransfer/HeatConvOutside.mo +++ b/AixLib/Utilities/HeatTransfer/HeatConvOutside.mo @@ -1,32 +1,27 @@ within AixLib.Utilities.HeatTransfer; model HeatConvOutside "Model for heat transfer at outside surfaces. Choice between multiple models" extends Modelica.Thermal.HeatTransfer.Interfaces.Element1D; - parameter Integer calcMethod=2 "Calculation method for convective heat transfer coefficient" annotation ( + parameter AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer calcMethod=AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals "Calculation method for convective heat transfer coefficient" annotation ( Evaluate=true, Dialog( group="Computational Models", compact=true, - descriptionLabel=true), - choices( - choice=1 "DIN 6946", - choice=2 "ASHRAE Fundamentals (convective + radiative)", - choice=3 "Custom hCon (constant)", - radioButtons=true)); + descriptionLabel=true)); parameter Modelica.Units.SI.Area A(min=0) "Area of surface" annotation (Dialog(group="Surface properties", descriptionLabel=true)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hCon_const=25 "Custom convective heat transfer coeffient" annotation (Dialog( group="Surface properties", descriptionLabel=true, - enable=calcMethod == 3)); + enable=calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.Custom_hCon)); parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook surfaceType = DataBase.Surfaces.RoughnessForHT.Brick_RoughPlaster() "Surface type" annotation(Dialog(group = "Surface properties", descriptionLabel = true, enable= - calcMethod == 2), choicesAllMatching = true); + calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals), choicesAllMatching = true); // Variables Modelica.Units.SI.CoefficientOfHeatTransfer hCon "Convection heat transfer coeffient"; - Modelica.Blocks.Interfaces.RealInput WindSpeedPort if calcMethod == 1 or calcMethod == 2 annotation(Placement(transformation(extent = {{-102, -82}, {-82, -62}}), iconTransformation(extent={{-100,-80},{-80,-60}}))); + Modelica.Blocks.Interfaces.RealInput WindSpeedPort if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 or calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals annotation(Placement(transformation(extent = {{-102, -82}, {-82, -62}}), iconTransformation(extent={{-100,-80},{-80,-60}}))); protected Modelica.Blocks.Interfaces.RealInput WindSpeed_internal(unit="m/s"); @@ -35,9 +30,9 @@ equation port_a.Q_flow =hCon*A*(port_a.T - port_b.T); //Determine convection heat transfer coefficient hCon - if calcMethod == 1 then + if calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.DIN_6946 then hCon = (4 + 4*WindSpeed_internal); - elseif calcMethod == 2 then + elseif calcMethod == AixLib.ThermalZones.HighOrder.Components.Types.CalcMethodConvectiveHeatTransfer.ASHRAE_Fundamentals then hCon = surfaceType.D + surfaceType.E*WindSpeed_internal + surfaceType.F*(WindSpeed_internal^2); else hCon = hCon_const;