Skip to content

Commit

Permalink
Merge pull request #1411 from open-ideas/issue1402_translationWarning
Browse files Browse the repository at this point in the history
Issue1402 translation warning
  • Loading branch information
jelgerjansen authored Feb 4, 2025
2 parents 8b3818d + db56abc commit 9feb231
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 31 deletions.
7 changes: 6 additions & 1 deletion IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ model CrackOrOperableDoor
hOpe=hOpe,
dpCloRat=dpCloRat,
LClo=LClo,
vZer=vZer*MFtrans*rho_default)
vZer=MFtrans/(rho_default*doo.wOpe*doo.hOpe))
if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts annotation (
Placement(visible = true, transformation(origin={-2,0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
IDEAS.Fluid.Sources.Boundary_pT bou(
Expand Down Expand Up @@ -223,6 +223,11 @@ There is no support for open doors when using only a single fluid port.
revisions="<html>
<ul>
<li>
January 30, 2025, by Klaas De Jonge:<br/>
Changed wrong parameter declaration <code>doo.vZer</code> to have compatible units.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>.
</li>
<li>
October 30, 2024, by Klaas De Jonge:<br/>
Changes for column heights,used default density and transition point to laminar flow at low dp.
</li>
Expand Down
11 changes: 8 additions & 3 deletions IDEAS/BoundaryConditions/SolarIrradiation/RadSol.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ model RadSol "Block that computes surface-dependent environment data"
extends Modelica.Blocks.Icons.Block;

parameter Real rho=0.2 "Ground reflectance";
parameter Modelica.Units.SI.Angle inc(displayUnit="degree") "inclination";
parameter Modelica.Units.SI.Angle azi(displayUnit="degree") "azimuth";
parameter Modelica.Units.SI.Angle lat(displayUnit="degree") "latitude";
parameter Modelica.Units.SI.Angle inc(displayUnit="deg") "inclination";
parameter Modelica.Units.SI.Angle azi(displayUnit="deg") "azimuth";
parameter Modelica.Units.SI.Angle lat(displayUnit="deg") "latitude";
parameter Boolean remDefVals = false "Remove default signal values";
parameter Boolean outputAngles=true "Set to false when linearising only";

Expand Down Expand Up @@ -141,6 +141,11 @@ equation
Documentation(revisions="<html>
<ul>
<li>
January 24, 2025, by Klaas De Jonge:<br/>
Changed <code>displayUnit</code> angles from <code>degree</code> to <code>deg</code> to avoid warnings.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>
</li>
<li>
November 28, 2019, by Ian Beausoleil-Morrison:<br/>
Add RealInput's for wind speed and wind direction.<br/>
Instantiate extConvForcedCoeff.mo and place resulting coefficient for forced convection on SolBus.
Expand Down
54 changes: 37 additions & 17 deletions IDEAS/Buildings/Components/Interfaces/PartialSurface.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
within IDEAS.Buildings.Components.Interfaces;
partial model PartialSurface "Partial model for building envelope component"

outer IDEAS.BoundaryConditions.SimInfoManager sim
"Simulation information manager for climate data"
annotation (Placement(visible = true, transformation(origin = {50, 180}, extent = {{30, -100}, {50, -80}}, rotation = 0)));
Expand All @@ -26,7 +26,7 @@ partial model PartialSurface "Partial model for building envelope component"
annotation (Dialog(group="Design power",tab="Advanced"));
parameter Modelica.Units.SI.Temperature T_start=293.15
"Start temperature for each of the layers"
annotation (Dialog(tab="Dynamics", group="Initial condition"));
annotation (Dialog(tab="Dynamics", group="Initial condition"));
parameter Boolean linIntCon_a=sim.linIntCon
"= true, if convective heat transfer should be linearised"
annotation (Dialog(tab="Convection"));
Expand All @@ -52,15 +52,15 @@ partial model PartialSurface "Partial model for building envelope component"
final parameter Modelica.Units.SI.Length hzone_a( fixed=false);//connected with propsbus in inital equation
final parameter Modelica.Units.SI.Length hAbs_floor_a( fixed=false);
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);
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);
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);
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";

IDEAS.Buildings.Components.Interfaces.ZoneBus propsBus_a(
redeclare final package Medium = Medium,
numIncAndAziInBus=sim.numIncAndAziInBus, outputAngles=sim.outputAngles,
final use_port_1=sim.use_port_1,
final use_port_2=sim.use_port_2)
"If inc = Floor, then propsbus_a should be connected to the zone above this floor.
final use_port_2=sim.use_port_2) "If inc = Floor, then propsbus_a should be connected to the zone above this floor.
If inc = ceiling, then propsbus_a should be connected to the zone below this ceiling.
If component is an outerWall, porpsBus_a should be connect to the zone."
annotation (Placement(transformation(
Expand Down Expand Up @@ -106,6 +106,16 @@ partial model PartialSurface "Partial model for building envelope component"
Placement(visible = true, transformation(origin = {30, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.RealExpression AExp(y = A) "Area expression" annotation(
Placement(transformation(origin = {0, 20}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Routing.BooleanPassThrough use_custom_q50PassThrough
annotation (Placement(transformation(
extent={{-5,5},{5,-5}},
rotation=90,
origin={62,-20})));
Modelica.Blocks.Routing.RealPassThrough v50PassThrough annotation (Placement(transformation(
extent={{-5,-5},{5,5}},
rotation=90,
origin={50,-20})));

protected
parameter Boolean add_door = true "Option to disable crackOrOperableDoor";
final parameter Modelica.Units.SI.Angle aziInt=
Expand Down Expand Up @@ -170,6 +180,9 @@ model Q50_parameterToConnector "Converts parameter values into connectors for pr
"Custom v50 value";
parameter Boolean use_custom_q50=false
"true if custom q50 value should be considered by the zone";
parameter Integer nDum=2
"Number of dummy connections";

Modelica.Blocks.Interfaces.RealInput q50_zone
"Input for q50 value computed by the zone"
annotation (Placement(transformation(extent={{-126,50},{-86,90}})));
Expand All @@ -180,7 +193,7 @@ model Q50_parameterToConnector "Converts parameter values into connectors for pr
Modelica.Blocks.Interfaces.BooleanOutput using_custom_q50 = use_custom_q50
"Output indicating whether a custom q50 value should be considered by the zone"
annotation (Placement(transformation(extent={{-100,-30},{-120,-10}})));
Modelica.Blocks.Interfaces.RealInput dummy_h[2]
Modelica.Blocks.Interfaces.RealInput dummy_h[nDum]
"Dummy connectors for hzone and hfloor"
annotation (Placement(transformation(extent={{-126,14},{-86,54}})));
annotation (Icon(graphics={Rectangle(
Expand Down Expand Up @@ -237,37 +250,44 @@ equation
color={255,204,51},
thickness=0.5));
connect(setArea.areaPort, sim.areaPort);
connect(q50_zone.v50, propsBusInt.v50) annotation (Line(points={{79,-58},{56,-58},
{56,-20},{56.09,-20},{56.09,19.91}}, color={0,0,127}));
connect(q50_zone.q50_zone, propsBusInt.q50_zone) annotation (Line(points={{79.4,
-43},{79.4,-44},{56.09,-44},{56.09,19.91}}, color={0,0,127}));
connect(q50_zone.using_custom_q50, propsBusInt.use_custom_q50) annotation (Line(points={{79,-52},
{56.09,-52},{56.09,19.91}}, color={0,0,127}));
connect(setArea.use_custom_n50, propsBusInt.use_custom_n50) annotation (Line(points={{79.4,
-91},{79.4,-90.5},{56.09,-90.5},{56.09,19.91}}, color={255,0,255}));
connect(setArea.v50, propsBus_a.v50) annotation (Line(points={{79.4,-83.2},{
79.4,-82},{56,-82},{56,0},{100.1,0},{100.1,19.9}}, color={0,0,127}));
connect(q50_zone.dummy_h[1], propsBusInt.hzone) annotation (Line(points={{79.4,
-47.6},{80,-47.6},{80,-48},{56.09,-48},{56.09,19.91}}, color={0,0,127}));
connect(q50_zone.dummy_h[2], propsBusInt.hfloor) annotation (Line(points={{79.4,
-45.6},{80,-45.6},{80,-46},{56.09,-46},{56.09,19.91}}, color={0,0,127}));
connect(q50_zone.dummy_h[1], propsBusInt.hzone);
connect(q50_zone.dummy_h[2], propsBusInt.hfloor);
if sim.use_port_1 then
connect(crackOrOperableDoor.port_b1, propsBusInt.port_1) annotation(
Line(points = {{40, -46}, {56, -46}, {56, 20}}, color = {0, 127, 255}));
Line(points={{40,-46},{56.09,-46},{56.09,19.91}},
color = {0, 127, 255}));
end if;
if sim.use_port_2 then
connect(crackOrOperableDoor.port_a2, propsBusInt.port_2) annotation(
Line(points = {{40, -58}, {56, -58}, {56, 20}}, color = {0, 127, 255}));
Line(points={{40,-58},{56.09,-58},{56.09,19.91}},
color = {0, 127, 255}));
end if;
connect(AExp.y, propsBusInt.area) annotation(
Line(points = {{12, 20}, {56, 20}}, color = {0, 0, 127}));
Line(points={{11,20},{34,20},{34,19.91},{56.09,19.91}},
color = {0, 0, 127}));
connect(q50_zone.v50, v50PassThrough.u) annotation (Line(points={{79,-58},{56,-58},{56,-30},{50,-30},{50,-26}}, color={0,0,127}));
connect(v50PassThrough.y, propsBusInt.v50) annotation (Line(points={{50,-14.5},{50,-8},{56.09,-8},{56.09,19.91}}, color={0,0,127}));
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}));
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}));
annotation (
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
100,100}})),
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-50, -100}, {50, 100}})),
Documentation(revisions="<html>
<ul>
<li>
January 24, 2025, by Klaas De Jonge:<br/>
Addition of BooleanPassThrough and RealPassThrough block for v50 and use_custom_q50 and
parameter for number of dummy connections in <code>Q50_parameterToConnector</code> to avoid translation warnings.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>
</li>
<li>
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/>
Add variable <code>TRefZon</code> to be used when calculating <code>QTra_design</code>.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,27 +300,27 @@ partial model RectangularZoneTemplateInterface
choicesAllMatching=true,
Placement(transformation(extent={{-228,-72},{-224,-68}})),
Dialog(tab="Internal wall",group="Construction details", enable=hasInt));
replaceable IDEAS.Buildings.Data.Glazing.Ins2 glazingA
replaceable IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingA
constrainedby IDEAS.Buildings.Data.Interfaces.Glazing "Glazing type of window of face A"
annotation (choicesAllMatching=true,
Dialog(tab="Face A", group="Window details",
enable = hasWinA));
replaceable IDEAS.Buildings.Data.Glazing.Ins2 glazingB
replaceable IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingB
constrainedby IDEAS.Buildings.Data.Interfaces.Glazing "Glazing type of window of face B"
annotation (choicesAllMatching=true,
Dialog(tab="Face B", group="Window details",
enable = hasWinB));
replaceable IDEAS.Buildings.Data.Glazing.Ins2 glazingC
replaceable IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingC
constrainedby IDEAS.Buildings.Data.Interfaces.Glazing "Glazing type of window of face C"
annotation (choicesAllMatching=true,
Dialog(tab="Face C", group="Window details",
enable = hasWinC));
replaceable IDEAS.Buildings.Data.Glazing.Ins2 glazingD
replaceable IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingD
constrainedby IDEAS.Buildings.Data.Interfaces.Glazing "Glazing type of window of face D"
annotation (choicesAllMatching=true,
Dialog(tab="Face D", group="Window details",
enable = hasWinD));
replaceable IDEAS.Buildings.Data.Glazing.Ins2 glazingCei
replaceable IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingCei
constrainedby IDEAS.Buildings.Data.Interfaces.Glazing "Glazing type of window of ceiling"
annotation (
choicesAllMatching=true,
Expand Down Expand Up @@ -1546,7 +1546,13 @@ components cannot be propagated.
</html>", revisions="<html>
<ul>
<li>
March 27, 2024, by Lucas Verleyen:<br>
January 30, 2025, by Jelger Jansen:<br/>
Updated default window glazing type to avoid obsolete type warning.
See <a href=https://github.com/open-ideas/IDEAS/issues/1402>#1402</a>
and <a href=https://github.com/open-ideas/IDEAS/issues/1410>#1410</a>.
</li>
<li>
March 27, 2024, by Lucas Verleyen:<br/>
Added parameter <code>T_start_gro</code> for initial temperature of the ground (<code>layGro</code>).<br>
According to the changes in SlabOnGround.<br>
See <a href=https://github.com/open-ideas/IDEAS/issues/1292>#1292</a> for more information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected
annotation (Placement(transformation(extent={{8,-384},{-12,-364}})));
Modelica.Blocks.Routing.RealPassThrough TRefZon
"Reference zone temperature for calculation of design heat load"
annotation (Placement(transformation(extent={{8,-356},{-12,-336}})));
annotation (Placement(transformation(extent={{8,-450},{-12,-430}})));

equation
connect(QTra_design.u, propsBus_a.QTra_design) annotation (Line(points={{-12,188},
Expand Down
9 changes: 8 additions & 1 deletion IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model InternalWall "interior opaque wall between two zones"
Qgai(y=(if sim.openSystemConservationOfEnergy or not sim.computeConservationOfEnergy
then 0 else sum(port_emb.Q_flow))),
final QTra_design(fixed=false),
q50_zone(v50_surf = 0),
q50_zone(v50_surf=0, nDum=4),
crackOrOperableDoor(
h_a1=-0.5*hzone_b + 0.75*hVertical + hRelSurfBot_b,
h_b2=-0.5*hzone_b + 0.25*hVertical + hRelSurfBot_b,
Expand Down Expand Up @@ -198,6 +198,8 @@ equation
Line(points = {{-40, -70}, {-52, -70}, {-52, 20}, {-100, 20}}, color = {0, 127, 255}));
connect(boundary3_a.ports[1], propsBusInt.port_3) annotation(
Line(points = {{40, -70}, {56, -70}, {56, 20}}, color = {0, 127, 255}));
connect(q50_zone.dummy_h[3], propsBus_b.hzone);
connect(q50_zone.dummy_h[4], propsBus_b.hfloor);
annotation (
Icon(coordinateSystem(preserveAspectRatio=false,extent={{-60,-100},{60,100}}),
graphics={
Expand Down Expand Up @@ -258,6 +260,11 @@ We assume that the value of <code>A</code> excludes the surface area of the cavi
</html>", revisions = "<html>
<ul>
<li>
January 24, 2025, by Klaas De Jonge:<br/>
Add dummy connections for <code>hzone</code> and <code>hfloor</code> in <code>propsbus_b</code> to avoid translation warnings.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>
</li>
<li>
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/>
Update calculation of transmission design losses.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a>
Expand Down
7 changes: 6 additions & 1 deletion IDEAS/Buildings/Components/SlabOnGround.mo
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected
Placement(transformation(origin = {0, -4}, extent = {{-28, -76}, {-8, -56}})));

initial equation
QTra_design=UEqui*A*(TRefZon - weaBus.TGroundDes);
QTra_design=UEqui*A*(TRefZon - TdesGround.y);
equation
connect(TdesGround.u, weaBus.TGroundDes);
connect(periodicFlow.port, layMul.port_b) annotation (Line(points={{-20,22},{
Expand Down Expand Up @@ -193,6 +193,11 @@ zone that is surrounded by air at the ambient temperature.
</html>", revisions="<html>
<ul>
<li>
January 30, 2025, by Klaas De Jonge:<br/>
Use <code>TdesGround.y</code> for calculating <code>QTra_design</code> to avoid causality warning.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>.
</li>
<li>
November 7, 2024, by Anna Dell'Isola and Jelger Jansen:<br/>
Update calculation of transmission design losses.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1337\">#1337</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ partial model PartialAirModel "Partial for air models"
parameter Integer nSurf "Number of connected surfaces";
parameter Integer nSeg(min=1)=1 "Number of air segments";
parameter Integer nPorts "Number of fluid port connections to zone air volume";
parameter Modelica.Units.SI.Volume Vtot "Total zone air volume";
parameter Modelica.Units.SI.Volume Vtot(min=Modelica.Constants.small) "Total zone air volume";
parameter Boolean allowFlowReversal=true
"= false to simplify equations, assuming, but not enforcing, no flow reversal"
annotation(Dialog(tab="Advanced"));
Expand Down Expand Up @@ -80,6 +80,11 @@ protected
-100},{100,100}})), Documentation(revisions="<html>
<ul>
<li>
January 24, 2025, by Klaas De Jonge:<br/>
Added minimum zone air volume to avoid division by zero warning.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1402\">#1402</a>.
</li>
<li>
July 27, 2018 by Filip Jorissen:<br/>
Added output for the CO2 concentration.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/868\">#868</a>.
Expand Down

0 comments on commit 9feb231

Please sign in to comment.