From dbade3c6053947afeb9976bc0840a9ac483d9dca Mon Sep 17 00:00:00 2001
From: jelgerjansen
Date: Mon, 9 Dec 2024 17:22:03 +0100
Subject: [PATCH] Reapply "Merge remote-tracking branch master into
project_itz_fixes_v2 (issue 1337)"
This reverts commit 841a90714a9e563e6b8f1c2aceba4f282065244a.
---
IDEAS/Buildings/Components/BoundaryWall.mo | 34 +++++---
.../Components/Interfaces/DummyConnection.mo | 25 +++++-
.../Components/Interfaces/PartialSurface.mo | 13 +--
.../Components/Interfaces/PartialZone.mo | 26 ++++--
.../Components/Interfaces/ZoneBus.mo | 16 ++--
.../Interfaces/ZoneBusVarMultiplicator.mo | 19 +++-
IDEAS/Buildings/Components/InternalWall.mo | 86 ++++++++++++++-----
IDEAS/Buildings/Components/OuterWall.mo | 9 +-
IDEAS/Buildings/Components/SlabOnGround.mo | 17 ++--
IDEAS/Buildings/Components/Window.mo | 18 ++--
IDEAS/Buildings/Components/Zone.mo | 7 ++
11 files changed, 200 insertions(+), 70 deletions(-)
diff --git a/IDEAS/Buildings/Components/BoundaryWall.mo b/IDEAS/Buildings/Components/BoundaryWall.mo
index 0cccb8adb8..3a84fe5e9c 100644
--- a/IDEAS/Buildings/Components/BoundaryWall.mo
+++ b/IDEAS/Buildings/Components/BoundaryWall.mo
@@ -4,31 +4,36 @@ 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),
dT_nominal_a=-1,
add_door=false,
+ final QTra_design(fixed=false),
layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each
addRes_b=(sim.lineariseDymola and (use_T_in or use_T_fixed))))));
+ parameter Boolean use_T_in = false
+ "Use a temperature boundary condition which is read from the input connector T_in"
+ annotation(Dialog(group="Boundary conditions"));
parameter Boolean use_T_fixed = false
- "Get the boundary temperature from the input connector"
+ "Use a fixed temperature boundary condition which is read from the parameter T_fixed"
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"));
+ annotation (Dialog(group="Boundary conditions",enable=use_T_fixed));
+ parameter Modelica.Units.SI.Temperature T_in_nom=T_fixed
+ "Nominal boundary temperature, for calculation of design heat loss"
+ annotation (Dialog(group="Design power", tab="Advanced",enable=use_T_fixed or use_T_in));
parameter Boolean use_Q_in = false
- "Get the boundary heat flux from the input connector"
+ "Use a heat flow boundary condition which is read from the input connection Q_in"
annotation(Dialog(group="Boundary conditions"));
-
+ parameter Modelica.Units.SI.HeatFlowRate Q_in_nom=0
+ "Nominal boundary heat flux, for calculation of design heat loss (positive if entering the wall)"
+ annotation (Dialog(group="Design power", tab="Advanced", 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},
{-100,30}})));
Modelica.Blocks.Interfaces.RealInput Q_flow if use_Q_in
- "Input for boundary heat flow rate entering the wall" annotation (Placement(
+ "Input for boundary heat flow rate entering the wall (positive)" annotation (Placement(
transformation(extent={{-120,-30},{-100,-10}}),
iconTransformation(extent={{-120,
-30},{-100,-10}})));
@@ -70,6 +75,8 @@ protected
IDEAS.Buildings.Components.Interfaces.WeaBus weaBus(final numSolBus=sim.numIncAndAziInBus,
outputAngles=sim.outputAngles) "Weather bus"
annotation (Placement(transformation(extent={{40,-80},{60,-60}})));
+initial equation
+ QTra_design=if use_T_in or use_T_fixed then U_value*A*(TRefZon - T_in_nom) else -Q_in_nom;
equation
assert(not (use_T_in and use_Q_in or use_T_in and use_T_fixed or use_Q_in and use_T_fixed),
"In "+getInstanceName()+": Only one of the following options can be used simultaneously: use_T_in, use_Q_in, use_T_fixed");
@@ -137,11 +144,18 @@ to enable an input for a prescribed boundary condition temperature or heat flow
Alternatively, parameters use_T_fixed
and T_fixed
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, 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.