From b475a3220724b0db9d1aad663eae6cff378af2d8 Mon Sep 17 00:00:00 2001 From: annadellisola Date: Mon, 30 Sep 2024 13:14:02 +0200 Subject: [PATCH 01/26] Adding parameter T_setpoint in PartialZone and PartialSurface --- IDEAS/Buildings/Components/BoundaryWall.mo | 2 +- .../Buildings/Components/Interfaces/PartialSurface.mo | 4 ++++ IDEAS/Buildings/Components/Interfaces/PartialZone.mo | 5 ++++- IDEAS/Buildings/Components/OuterWall.mo | 2 +- IDEAS/Buildings/Components/SlabOnGround.mo | 2 +- IDEAS/Buildings/Components/Window.mo | 11 +++++------ 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/IDEAS/Buildings/Components/BoundaryWall.mo b/IDEAS/Buildings/Components/BoundaryWall.mo index 8b440c7d9..561cf95e1 100644 --- a/IDEAS/Buildings/Components/BoundaryWall.mo +++ b/IDEAS/Buildings/Components/BoundaryWall.mo @@ -4,7 +4,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe final custom_q50=0, final use_custom_q50=true, final nWin=1, - QTra_design=U_value*A*(273.15 + 21 - TRef_a), + QTra_design=U_value*A*(T_setpoint - TRef_a), dT_nominal_a=-1, add_cracks=false, layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each diff --git a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo index 3a8b0e77d..cc20c28b2 100644 --- a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo +++ b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo @@ -30,6 +30,10 @@ partial model PartialSurface "Partial model for building envelope component" parameter Modelica.Units.SI.Temperature TRef_a=291.15 "Reference temperature of zone on side of propsBus_a, for calculation of design heat loss" annotation (Dialog(group="Design power", tab="Advanced")); + parameter Modelica.Units.SI.Temperature T_setpoint=273.15+21 + "Reference temperature setpoint of zone (in K), for calculation of design heat loss" + annotation (Dialog(group="Design power", tab="Advanced")); + parameter Boolean linIntCon_a=sim.linIntCon "= true, if convective heat transfer should be linearised" annotation (Dialog(tab="Convection")); diff --git a/IDEAS/Buildings/Components/Interfaces/PartialZone.mo b/IDEAS/Buildings/Components/Interfaces/PartialZone.mo index f4f59fb09..0ff029860 100644 --- a/IDEAS/Buildings/Components/Interfaces/PartialZone.mo +++ b/IDEAS/Buildings/Components/Interfaces/PartialZone.mo @@ -34,8 +34,11 @@ model PartialZone "Building zone model" parameter Boolean calculateViewFactor = false "Explicit calculation of view factors: works well only for rectangular zones!" annotation(Dialog(tab="Advanced", group="Radiative heat exchange")); + parameter Modelica.Units.SI.Temperature T_setpoint=273.15+21 + "Reference temperature setpoint of zone (in K), for calculation of design heat loss"; + final parameter Modelica.Units.SI.Power QInf_design=1012*1.204*V/3600*n50_int - /n50toAch*(273.15 + 21 - sim.Tdes) + /n50toAch*(T_setpoint - sim.Tdes) "Design heat losses from infiltration at reference outdoor temperature"; final parameter Modelica.Units.SI.Power QRH_design=A*fRH "Additional power required to compensate for the effects of intermittent heating"; diff --git a/IDEAS/Buildings/Components/OuterWall.mo b/IDEAS/Buildings/Components/OuterWall.mo index 2d52cf657..3c65e1d0a 100644 --- a/IDEAS/Buildings/Components/OuterWall.mo +++ b/IDEAS/Buildings/Components/OuterWall.mo @@ -96,7 +96,7 @@ protected "Outside air model" annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); initial equation - QTra_design =U_value*A*(273.15 + 21 - Tdes.y); + QTra_design =U_value*A*(T_setpoint - Tdes.y); equation if hasBuildingShade then diff --git a/IDEAS/Buildings/Components/SlabOnGround.mo b/IDEAS/Buildings/Components/SlabOnGround.mo index 0a778334b..b6c59ecfa 100644 --- a/IDEAS/Buildings/Components/SlabOnGround.mo +++ b/IDEAS/Buildings/Components/SlabOnGround.mo @@ -4,7 +4,7 @@ model SlabOnGround "opaque floor on ground slab" custom_q50=0, final use_custom_q50=true, final nWin=1, - QTra_design=UEqui*A*(273.15 + 21 - sim.Tdes), + QTra_design=UEqui*A*(T_setpoint - sim.Tdes), add_cracks=false, dT_nominal_a=-3, inc=IDEAS.Types.Tilt.Floor, diff --git a/IDEAS/Buildings/Components/Window.mo b/IDEAS/Buildings/Components/Window.mo index 3c2e29506..b0706801e 100644 --- a/IDEAS/Buildings/Components/Window.mo +++ b/IDEAS/Buildings/Components/Window.mo @@ -74,10 +74,8 @@ model Window "Multipane window" Modelica.Blocks.Interfaces.RealInput Ctrl if controlled "Control signal between 0 and 1, i.e. 1 is fully closed" annotation ( Placement(visible = true,transformation( - origin={-50,-110},extent={{20,-20},{-20,20}}, rotation=-90), iconTransformation( - origin={-40,-100},extent={{10,-10},{-10,10}}, rotation=-90))); @@ -190,7 +188,7 @@ protected "Outside air model" annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); initial equation - QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(273.15 + 21 - Tdes.y); + QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(T_setpoint - Tdes.y); assert(not use_trickle_vent or sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None, "In " + getInstanceName() + ": Trickle vents can only be enabled when sim.interZonalAirFlowType is not None."); @@ -271,8 +269,9 @@ equation connect(shaType.hForcedConExt, radSolData.hForcedConExt) annotation ( Line(points={{-68.5,-32.7043},{-76,-32.7043},{-76,-62.2},{-79.4,-62.2}}, color = {0, 0, 127})); - connect(outsideAir.TDryBul_in, shaType.TDryBul) annotation( - Line(points = {{-42, -90}, {-46, -90}, {-46, -48}, {-58, -48}}, color = {0, 0, 127})); + connect(outsideAir.TDryBul_in, shaType.TDryBul) annotation ( + Line(points={{-42,-90},{-46,-90},{-46,-49.4895},{-57.5,-49.4895}}, + color = {0, 0, 127})); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-60,-100},{60,100}}), graphics={Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-50, -90}, {50, 100}}), @@ -467,4 +466,4 @@ Adjusted implementation for grouping of solar calculations. ")); -end Window; \ No newline at end of file +end Window; From dcb5db138c1fcdfd71c91141292a4fa05cd3d05c Mon Sep 17 00:00:00 2001 From: annadellisola Date: Wed, 2 Oct 2024 15:14:02 +0200 Subject: [PATCH 02/26] Modelica convention for naming TSet --- IDEAS/Buildings/Components/BoundaryWall.mo | 2 +- IDEAS/Buildings/Components/Interfaces/PartialSurface.mo | 2 +- IDEAS/Buildings/Components/Interfaces/PartialZone.mo | 4 ++-- IDEAS/Buildings/Components/OuterWall.mo | 2 +- IDEAS/Buildings/Components/SlabOnGround.mo | 2 +- IDEAS/Buildings/Components/Window.mo | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IDEAS/Buildings/Components/BoundaryWall.mo b/IDEAS/Buildings/Components/BoundaryWall.mo index 561cf95e1..f55089994 100644 --- a/IDEAS/Buildings/Components/BoundaryWall.mo +++ b/IDEAS/Buildings/Components/BoundaryWall.mo @@ -4,7 +4,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe final custom_q50=0, final use_custom_q50=true, final nWin=1, - QTra_design=U_value*A*(T_setpoint - TRef_a), + QTra_design=U_value*A*(TSet - TRef_a), dT_nominal_a=-1, add_cracks=false, layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each diff --git a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo index cc20c28b2..c62bed75e 100644 --- a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo +++ b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo @@ -30,7 +30,7 @@ partial model PartialSurface "Partial model for building envelope component" parameter Modelica.Units.SI.Temperature TRef_a=291.15 "Reference temperature of zone on side of propsBus_a, for calculation of design heat loss" annotation (Dialog(group="Design power", tab="Advanced")); - parameter Modelica.Units.SI.Temperature T_setpoint=273.15+21 + parameter Modelica.Units.SI.Temperature TSet=273.15+21 "Reference temperature setpoint of zone (in K), for calculation of design heat loss" annotation (Dialog(group="Design power", tab="Advanced")); diff --git a/IDEAS/Buildings/Components/Interfaces/PartialZone.mo b/IDEAS/Buildings/Components/Interfaces/PartialZone.mo index 0ff029860..44eec8ab5 100644 --- a/IDEAS/Buildings/Components/Interfaces/PartialZone.mo +++ b/IDEAS/Buildings/Components/Interfaces/PartialZone.mo @@ -34,11 +34,11 @@ model PartialZone "Building zone model" parameter Boolean calculateViewFactor = false "Explicit calculation of view factors: works well only for rectangular zones!" annotation(Dialog(tab="Advanced", group="Radiative heat exchange")); - parameter Modelica.Units.SI.Temperature T_setpoint=273.15+21 + parameter Modelica.Units.SI.Temperature TSet=273.15+21 "Reference temperature setpoint of zone (in K), for calculation of design heat loss"; final parameter Modelica.Units.SI.Power QInf_design=1012*1.204*V/3600*n50_int - /n50toAch*(T_setpoint - sim.Tdes) + /n50toAch*(TSet - sim.Tdes) "Design heat losses from infiltration at reference outdoor temperature"; final parameter Modelica.Units.SI.Power QRH_design=A*fRH "Additional power required to compensate for the effects of intermittent heating"; diff --git a/IDEAS/Buildings/Components/OuterWall.mo b/IDEAS/Buildings/Components/OuterWall.mo index 3c65e1d0a..0b9f8d01f 100644 --- a/IDEAS/Buildings/Components/OuterWall.mo +++ b/IDEAS/Buildings/Components/OuterWall.mo @@ -96,7 +96,7 @@ protected "Outside air model" annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); initial equation - QTra_design =U_value*A*(T_setpoint - Tdes.y); + QTra_design =U_value*A*(TSet - Tdes.y); equation if hasBuildingShade then diff --git a/IDEAS/Buildings/Components/SlabOnGround.mo b/IDEAS/Buildings/Components/SlabOnGround.mo index b6c59ecfa..b71fa2117 100644 --- a/IDEAS/Buildings/Components/SlabOnGround.mo +++ b/IDEAS/Buildings/Components/SlabOnGround.mo @@ -4,7 +4,7 @@ model SlabOnGround "opaque floor on ground slab" custom_q50=0, final use_custom_q50=true, final nWin=1, - QTra_design=UEqui*A*(T_setpoint - sim.Tdes), + QTra_design=UEqui*A*(TSet - sim.Tdes), add_cracks=false, dT_nominal_a=-3, inc=IDEAS.Types.Tilt.Floor, diff --git a/IDEAS/Buildings/Components/Window.mo b/IDEAS/Buildings/Components/Window.mo index b0706801e..305e16587 100644 --- a/IDEAS/Buildings/Components/Window.mo +++ b/IDEAS/Buildings/Components/Window.mo @@ -188,7 +188,7 @@ protected "Outside air model" annotation (Placement(transformation(extent={{-40,-100},{-20,-80}}))); initial equation - QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(T_setpoint - Tdes.y); + QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(TSet - Tdes.y); assert(not use_trickle_vent or sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None, "In " + getInstanceName() + ": Trickle vents can only be enabled when sim.interZonalAirFlowType is not None."); From 5a4693ce6f4bd2dc378f8472fcc670f0c8cf0c96 Mon Sep 17 00:00:00 2001 From: annadellisola Date: Fri, 11 Oct 2024 11:55:09 +0200 Subject: [PATCH 03/26] BoundaryWall.mo change for QTra_losses calculation --- IDEAS/Buildings/Components/BoundaryWall.mo | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/IDEAS/Buildings/Components/BoundaryWall.mo b/IDEAS/Buildings/Components/BoundaryWall.mo index f55089994..2759506d0 100644 --- a/IDEAS/Buildings/Components/BoundaryWall.mo +++ b/IDEAS/Buildings/Components/BoundaryWall.mo @@ -4,7 +4,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe final custom_q50=0, final use_custom_q50=true, final nWin=1, - QTra_design=U_value*A*(TSet - TRef_a), + QTra_design=if use_T_in or use_T_fixed then U_value*A*(TRef_a - T_in_nom) else Q_in_nom, dT_nominal_a=-1, add_cracks=false, layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each @@ -13,16 +13,18 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe parameter Boolean use_T_fixed = false "Get the boundary temperature from the input connector" annotation(Dialog(group="Boundary conditions")); - parameter Modelica.Units.SI.Temperature T_fixed=294.15 - "Fixed boundary temperature" - annotation (Dialog(group="Boundary conditions", enable=use_T_fixed)); parameter Boolean use_T_in = false "Get the boundary temperature from the input connector" annotation(Dialog(group="Boundary conditions")); + parameter Modelica.Units.SI.Temperature T_in_nom=294.15 + "Nominal boundary temperature, for fixed boundary condition and for calculation of design heat loss" + annotation (Dialog(group="Boundary conditions",enable=use_T_fixed or use_T_in)); parameter Boolean use_Q_in = false "Get the boundary heat flux from the input connector" annotation(Dialog(group="Boundary conditions")); - + parameter Modelica.Units.SI.HeatFlowRate Q_in_nom + "Nominal boundary heat flux, for calculation of design heat loss" + annotation (Dialog(group="Boundary conditions", enable=use_Q_in)); Modelica.Blocks.Interfaces.RealInput T if use_T_in "Input for boundary temperature" annotation (Placement( transformation(extent={{-120,10},{-100,30}}),iconTransformation(extent={{-120,10}, @@ -36,7 +38,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe annotation (Placement(transformation(extent={{-86,26},{-74,14}}))); Modelica.Blocks.Math.Product proPreQ if use_Q_in "Product for linearisation" annotation (Placement(transformation(extent={{-86,-14},{-74,-26}}))); - Modelica.Blocks.Sources.Constant TConst(k=T_fixed) if use_T_fixed + Modelica.Blocks.Sources.Constant TConst(k=T_in_nom) if use_T_fixed "Constant block for temperature" annotation (Placement(transformation(extent={{-110,32},{-100,42}}))); @@ -166,10 +168,12 @@ Instead a prescribed temperature or heat flow rate may be set.

Parameters use_T_in and use_Q_in may be used to enable an input for a prescribed boundary condition temperature or heat flow rate. -Alternatively, parameters use_T_fixed and T_fixed can be used +Alternatively, parameters use_T_fixed and T_in_nom can be used to specify a fixed boundary condition temperature. It is not allowed to enabled multiple of these three options. -If all are disabled then an adiabatic boundary (Q_flow=0) is used. +If all are disabled then an adiabatic boundary (Q_flow=0) is used.

+Parameters T_in_nom and Q_in_nom are used for the calculation +of heat losses, when the temperature boundary condition and heat flow boundary condition are applied, respectively.

", revisions="