From 9e0f86f07d988777da74ca7e2423e65b41ea42bc Mon Sep 17 00:00:00 2001 From: kldjonge Date: Fri, 3 Jul 2026 16:26:40 +0200 Subject: [PATCH] Refactor shading connections of PartialShadingDevice Moved former shading irradiance outputs onto explicit RealExpression and pass-through blocks across the shading components. This keeps the models consistent with the shared interface but simplifies connections. This avoid illegal modelica and avoids warnings . --- .../Components/Shading/BuildingShade.mo | 20 ++++++++-- .../Components/Shading/HorizontalFins.mo | 20 ++++++++-- .../Interfaces/PartialShadingDevice.mo | 39 ++++++++++++++----- IDEAS/Buildings/Components/Shading/None.mo | 16 +++++--- .../Buildings/Components/Shading/Overhang.mo | 20 ++++++++-- IDEAS/Buildings/Components/Shading/Screen.mo | 26 +++++++++++-- .../Buildings/Components/Shading/SideFins.mo | 21 ++++++++-- 7 files changed, 129 insertions(+), 33 deletions(-) diff --git a/IDEAS/Buildings/Components/Shading/BuildingShade.mo b/IDEAS/Buildings/Components/Shading/BuildingShade.mo index 45cb396064..fece583a87 100644 --- a/IDEAS/Buildings/Components/Shading/BuildingShade.mo +++ b/IDEAS/Buildings/Components/Shading/BuildingShade.mo @@ -23,6 +23,11 @@ model BuildingShade // Computation assumes that window base is at ground level. // Viewing angle computed from center of glazing. + Modelica.Blocks.Sources.RealExpression HShaDirexpr(y=fraSunDir*HDirTil) + annotation (Placement(transformation(extent={{-30,40},{-10,60}}))); + Modelica.Blocks.Sources.RealExpression HShaSkyDifexpr(y=fraSunDifSky* + HSkyDifTil) + annotation (Placement(transformation(extent={{-30,20},{-10,40}}))); protected parameter Modelica.Units.SI.Angle vieAngObj=atan((hWin/2 + dh)/L) "Viewing angle of opposite object"; @@ -57,13 +62,16 @@ equation fraSunDir=1; end if; - HShaDirTil=fraSunDir*HDirTil; - HShaSkyDifTil = fraSunDifSky*HSkyDifTil; + connect(angInc, iAngInc) annotation (Line(points={{-60,-50},{-14,-50},{-14,-50}, {40,-50}}, color={0,0,127})); - connect(HGroDifTil, HShaGroDifTil) - annotation (Line(points={{-60,10},{40,10},{40,10}}, color={0,0,127})); + connect(HShaDirexpr.y, HShaDir.u) + annotation (Line(points={{-9,50},{-1.2,50}}, color={0,0,127})); + connect(HShaSkyDifexpr.y, HShaSkyDif.u) + annotation (Line(points={{-9,30},{-1.2,30}}, color={0,0,127})); + connect(HGroDifTil, HShaSkyGro.u) + annotation (Line(points={{-60,10},{-1.2,10}}, color={0,0,127})); annotation ( Icon(coordinateSystem(extent = {{-100, -100}, {100, 200}})), Documentation(info=" @@ -96,6 +104,10 @@ can be modelled by changing the value of parameter fraSha according ", revisions="