11within IDEAS.Buildings.Components.Interfaces;
22partial model PartialSurface "Partial model for building envelope component"
3-
3+
44 outer IDEAS.BoundaryConditions.SimInfoManager sim
55 "Simulation information manager for climate data"
66 annotation (Placement(visible = true, transformation(origin = {50, 180}, extent = {{30, -100}, {50, -80}}, rotation = 0)));
@@ -26,7 +26,7 @@ partial model PartialSurface "Partial model for building envelope component"
2626 annotation (Dialog(group="Design power" ,tab="Advanced" ));
2727 parameter Modelica.Units.SI.Temperature T_start= 293.15
2828 "Start temperature for each of the layers"
29- annotation (Dialog(tab="Dynamics" , group="Initial condition" ));
29+ annotation (Dialog(tab="Dynamics" , group="Initial condition" ));
3030 parameter Boolean linIntCon_a= sim.linIntCon
3131 "= true, if convective heat transfer should be linearised"
3232 annotation (Dialog(tab="Convection" ));
@@ -52,15 +52,15 @@ partial model PartialSurface "Partial model for building envelope component"
5252 final parameter Modelica.Units.SI.Length hzone_a( fixed= false );//connected with propsbus in inital equation
5353 final parameter Modelica.Units.SI.Length hAbs_floor_a( fixed= false );
5454 parameter Modelica.Units.SI.Length hVertical= if IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Floor) or IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Ceiling) then 0 else hzone_a "Vertical surface height, height of the surface projected to the vertical, 0 for floors and ceilings" annotation(Evaluate=true);
55- parameter Modelica.Units.SI.Length hRelSurfBot_a= if IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Ceiling) then hzone_a else 0 "Height between the lowest point of the surface (bottom) and the floor level of the zone connected at propsBus_a" annotation(Evaluate=true);
55+ parameter Modelica.Units.SI.Length hRelSurfBot_a= if IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Ceiling) then hzone_a else 0 "Height between the lowest point of the surface (bottom) and the floor level of the zone connected at propsBus_a"
56+ annotation(Evaluate=true);
5657 final parameter Modelica.Units.SI.Length Habs_surf= hAbs_floor_a+ hRelSurfBot_a+ (hVertical/ 2 ) "Absolute height of the middle of the surface, can be used to check the heights after initialisation" ;
5758
5859 IDEAS.Buildings.Components.Interfaces.ZoneBus propsBus_a(
5960 redeclare final package Medium = Medium,
6061 numIncAndAziInBus= sim.numIncAndAziInBus, outputAngles= sim.outputAngles,
6162 final use_port_1= sim.use_port_1,
62- final use_port_2= sim.use_port_2)
63- "If inc = Floor, then propsbus_a should be connected to the zone above this floor.
63+ final use_port_2= sim.use_port_2) "If inc = Floor, then propsbus_a should be connected to the zone above this floor.
6464 If inc = ceiling, then propsbus_a should be connected to the zone below this ceiling.
6565 If component is an outerWall, porpsBus_a should be connect to the zone."
6666 annotation (Placement(transformation(
@@ -106,6 +106,16 @@ partial model PartialSurface "Partial model for building envelope component"
106106 Placement(visible = true, transformation(origin = {30, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
107107 Modelica.Blocks.Sources.RealExpression AExp(y = A) "Area expression" annotation(
108108 Placement(transformation(origin = {0, 20}, extent = {{-10, -10}, {10, 10}})));
109+ Modelica.Blocks.Routing.BooleanPassThrough use_custom_q50PassThrough
110+ annotation (Placement(transformation(
111+ extent={{-5,5},{5,-5}},
112+ rotation=90,
113+ origin={62,-20})));
114+ Modelica.Blocks.Routing.RealPassThrough v50PassThrough annotation (Placement(transformation(
115+ extent={{-5,-5},{5,5}},
116+ rotation=90,
117+ origin={50,-20})));
118+
109119protected
110120 parameter Boolean add_door = true "Option to disable crackOrOperableDoor" ;
111121 final parameter Modelica.Units.SI.Angle aziInt=
@@ -170,6 +180,9 @@ model Q50_parameterToConnector "Converts parameter values into connectors for pr
170180 "Custom v50 value" ;
171181 parameter Boolean use_custom_q50= false
172182 "true if custom q50 value should be considered by the zone" ;
183+ parameter Integer nDum= 2
184+ "Number of dummy connections" ;
185+
173186 Modelica.Blocks.Interfaces.RealInput q50_zone
174187 "Input for q50 value computed by the zone"
175188 annotation (Placement(transformation(extent={{-126,50},{-86,90}})));
@@ -180,7 +193,7 @@ model Q50_parameterToConnector "Converts parameter values into connectors for pr
180193 Modelica.Blocks.Interfaces.BooleanOutput using_custom_q50 = use_custom_q50
181194 "Output indicating whether a custom q50 value should be considered by the zone"
182195 annotation (Placement(transformation(extent={{-100,-30},{-120,-10}})));
183- Modelica.Blocks.Interfaces.RealInput dummy_h[2 ]
196+ Modelica.Blocks.Interfaces.RealInput dummy_h[nDum ]
184197 "Dummy connectors for hzone and hfloor"
185198 annotation (Placement(transformation(extent={{-126,14},{-86,54}})));
186199 annotation (Icon(graphics={Rectangle(
@@ -237,37 +250,44 @@ equation
237250 color={255,204,51},
238251 thickness=0.5));
239252 connect (setArea.areaPort, sim.areaPort);
240- connect (q50_zone.v50, propsBusInt.v50) annotation (Line(points={{79,-58},{56,-58},
241- {56,-20},{56.09,-20},{56.09,19.91}}, color={0,0,127}));
242253 connect (q50_zone.q50_zone, propsBusInt.q50_zone) annotation (Line(points={{79.4,
243254 -43},{79.4,-44},{56.09,-44},{56.09,19.91}}, color={0,0,127}));
244- connect (q50_zone.using_custom_q50, propsBusInt.use_custom_q50) annotation (Line(points={{79,-52},
245- {56.09,-52},{56.09,19.91}}, color={0,0,127}));
246255 connect (setArea.use_custom_n50, propsBusInt.use_custom_n50) annotation (Line(points={{79.4,
247256 -91},{79.4,-90.5},{56.09,-90.5},{56.09,19.91}}, color={255,0,255}));
248257 connect (setArea.v50, propsBus_a.v50) annotation (Line(points={{79.4,-83.2},{
249258 79.4,-82},{56,-82},{56,0},{100.1,0},{100.1,19.9}}, color={0,0,127}));
250- connect (q50_zone.dummy_h[1 ], propsBusInt.hzone) annotation (Line(points={{79.4,
251- -47.6},{80,-47.6},{80,-48},{56.09,-48},{56.09,19.91}}, color={0,0,127}));
252- connect (q50_zone.dummy_h[2 ], propsBusInt.hfloor) annotation (Line(points={{79.4,
253- -45.6},{80,-45.6},{80,-46},{56.09,-46},{56.09,19.91}}, color={0,0,127}));
259+ connect (q50_zone.dummy_h[1 ], propsBusInt.hzone);
260+ connect (q50_zone.dummy_h[2 ], propsBusInt.hfloor);
254261 if sim.use_port_1 then
255262 connect (crackOrOperableDoor.port_b1, propsBusInt.port_1) annotation(
256- Line(points = {{40, -46}, {56, -46}, {56, 20}}, color = {0, 127, 255}));
263+ Line(points={{40,-46},{56.09,-46},{56.09,19.91}},
264+ color = {0, 127, 255}));
257265 end if ;
258266 if sim.use_port_2 then
259267 connect (crackOrOperableDoor.port_a2, propsBusInt.port_2) annotation(
260- Line(points = {{40, -58}, {56, -58}, {56, 20}}, color = {0, 127, 255}));
268+ Line(points={{40,-58},{56.09,-58},{56.09,19.91}},
269+ color = {0, 127, 255}));
261270 end if ;
262271 connect (AExp.y, propsBusInt.area) annotation(
263- Line(points = {{12, 20}, {56, 20}}, color = {0, 0, 127}));
272+ Line(points={{11,20},{34,20},{34,19.91},{56.09,19.91}},
273+ color = {0, 0, 127}));
274+ connect (q50_zone.v50, v50PassThrough.u) annotation (Line(points={{79,-58},{56,-58},{56,-30},{50,-30},{50,-26}}, color={0,0,127}));
275+ connect (v50PassThrough.y, propsBusInt.v50) annotation (Line(points={{50,-14.5},{50,-8},{56.09,-8},{56.09,19.91}}, color={0,0,127}));
276+ connect (q50_zone.using_custom_q50, use_custom_q50PassThrough.u) annotation (Line(points={{79,-52},{56,-52},{56,-30},{62,-30},{62,-26}}, color={255,0,255}));
277+ connect (use_custom_q50PassThrough.y, propsBusInt.use_custom_q50) annotation (Line(points={{62,-14.5},{62,-8},{56.09,-8},{56.09,19.91}}, color={255,0,255}));
264278 annotation (
265279 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
266280 100,100}})),
267281 Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-50, -100}, {50, 100}})),
268282 Documentation(revisions="<html>
269283<ul>
270284<li>
285+ January 24, 2025, by Klaas De Jonge:<br/>
286+ Addition of BooleanPassThrough and RealPassThrough block for v50 and use_custom_q50 and
287+ parameter for number of dummy connections in <code>Q50_parameterToConnector</code> to avoid translation warnings.
288+ See <a href=\" https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>
289+ </li>
290+ <li>
271291November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/>
272292Add variable <code>TRefZon</code> to be used when calculating <code>QTra_design</code>.
273293See <a href=\" https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a>
0 commit comments