Skip to content

Commit

Permalink
Merge branch 'StackEffectAirflow' (PR1296) into 'StackEffectAirflow' …
Browse files Browse the repository at this point in the history
…(PR1322)
  • Loading branch information
jelgerjansen committed Sep 21, 2023
2 parents 284d2d0 + 7eb16f8 commit 074def0
Show file tree
Hide file tree
Showing 139 changed files with 27,690 additions and 494 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI of IDEAS using GitHub Actions
on: [push, pull_request]
jobs:
build:
runs-on: self-hosted
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server called tony-de-rekenpony hosted by The Sysis team at KU Leuven"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
with:
clean: true
- name: Change permissions of repository folder
run: chmod -R 777 /home/actions-runner/_work
- name: List of files in the repository
run: |
ls ${{ github.workspace }}
test:
runs-on: self-hosted
needs: build
defaults:
run:
working-directory: IDEAS/Resources/Scripts/tests
steps:
- name: Test IDEAS.Buildings.Components
run: make test-dymola PACKAGE=\"IDEAS.Buildings.Components\" INTERACTIVE=false
- name: Test IDEAS.Buildings.Examples
run: make test-dymola PACKAGE=\"IDEAS.Buildings.Examples\" INTERACTIVE=false
- name: Test IDEAS.Buildings.Validation
run: make test-dymola PACKAGE=\"IDEAS.Buildings.Validation\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Actuators
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Actuators\" INTERACTIVE=false
- name: Test IDEAS.Fluid.BaseClasses
run: make test-dymola PACKAGE=\"IDEAS.Fluid.BaseClasses\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Chillers
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Chillers\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Delays
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Delays\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Examples
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Examples\" INTERACTIVE=false
- name: Test IDEAS.Fluid.FixedResistances
run: make test-dymola PACKAGE=\"IDEAS.Fluid.FixedResistances\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Geothermal
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Geothermal\" INTERACTIVE=false
- name: Test IDEAS.Fluid.HeatExchangers
run: make test-dymola PACKAGE=\"IDEAS.Fluid.HeatExchangers\" INTERACTIVE=false
- name: Test IDEAS.Fluid.HeatPumps
run: make test-dymola PACKAGE=\"IDEAS.Fluid.HeatPumps\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Interfaces
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Interfaces\" INTERACTIVE=false
- name: Test IDEAS.Fluid.MassExchangers
run: make test-dymola PACKAGE=\"IDEAS.Fluid.MassExchangers\" INTERACTIVE=false
- name: Test IDEAS.Fluid.MixingVolumes
run: make test-dymola PACKAGE=\"IDEAS.Fluid.MixingVolumes\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Movers
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Movers\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Sensors
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Sensors\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Sources
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Sources\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Storage
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Storage\" INTERACTIVE=false
- name: Test IDEAS.Fluid.Taps
run: make test-dymola PACKAGE=\"IDEAS.Fluid.Taps\" INTERACTIVE=false
- name: Test IDEAS.ThermalZones
run: make test-dymola PACKAGE=\"IDEAS.ThermalZones\" INTERACTIVE=false
- name: Test IDEAS.BoundaryConditions
run: make test-dymola PACKAGE=\"IDEAS.BoundaryConditions\" INTERACTIVE=false
- name: Test IDEAS.Controls
run: make test-dymola PACKAGE=\"IDEAS.Controls\" INTERACTIVE=false
- name: Test IDEAS.Media
run: make test-dymola PACKAGE=\"IDEAS.Media\" INTERACTIVE=false
- name: Test IDEAS.Utilities
run: make test-dymola PACKAGE=\"IDEAS.Utilities\" INTERACTIVE=false
- name: Test IDEAS.Templates
run: make test-dymola PACKAGE=\"IDEAS.Templates\" INTERACTIVE=false
- name: Test IDEAS.Examples.PPD12
run: make test-dymola PACKAGE=\"IDEAS.Examples.PPD12\" INTERACTIVE=false
- name: Test IDEAS.Examples.IBPSA
run: make test-dymola PACKAGE=\"IDEAS.Examples.IBPSA\" INTERACTIVE=false
- name: Test IDEAS.Examples.Tutorial
run: make test-dymola PACKAGE=\"IDEAS.Examples.Tutorial\" INTERACTIVE=false
- name: Test IDEAS.Examples.TwinHouses
run: make test-dymola PACKAGE=\"IDEAS.Examples.TwinHouses\" INTERACTIVE=false
9 changes: 4 additions & 5 deletions IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,21 @@ partial model PartialSimInfoManager

parameter Modelica.Units.SI.Length H=10 "Building or roof height"
annotation (Dialog(group="Wind"));
parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) "
parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) "
annotation(Dialog(group="Wind"));
parameter Real a=0.28 "Velocity profile exponent. 0.28 for Suburban, 0.4 for Urban and 0.15 for Unshielded (Ashrae 1993) "
annotation(Dialog(group="Wind"));
parameter Modelica.Units.SI.Length Hwind=10
"Height above ground of meteorological wind speed measurement"
annotation (Dialog(group="Wind"));
parameter Real Cs_coeff = (A0*A0)*((1/Hwind)^(2*a)) "Multiplication factor for Habs"
parameter Real Cs_coeff = (A0*A0)*((1/Hwind)^(2*a)) "Multiplication factor for Habs"
annotation(Dialog(group="Wind"));
parameter Modelica.Units.SI.Length Hpres=1 "Height above ground of meteorological ambient pressure measurement"
parameter Modelica.Units.SI.Length Hpres=1 "Height above ground of meteorological ambient pressure measurement"
annotation(Dialog(group="Wind"));
constant Modelica.Units.SI.Density rho_default = 1.2 "Default air density"
annotation(Dialog(group="Wind"));

parameter Real Cs= Cs_coeff*H "Wind speed modifier"
annotation(Dialog(group="Wind"));
parameter Real Cs= Cs_coeff*(H^(2*a)) "Wind speed modifier" annotation(Dialog(group="Wind"));


final parameter Integer numIncAndAziInBus = size(incAndAziInBus,1)
Expand Down
2 changes: 1 addition & 1 deletion IDEAS/BoundaryConditions/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package UsersGuide "User's Guide"
extends Modelica.Icons.Information;
annotation (preferredView="info",
Documentation(info="<html>
<p>This package contains models to read or compute boundary conditions, such as weather data, solar irradition and sky temperatures.
<p>This package contains models to read or compute boundary conditions, such as weather data, solar irradiation and sky temperatures.
The calculations follow the description in Wetter (2004), Appendix A.4.2.</p>
<h4>Accessing weather data</h4>
<p>
Expand Down
7 changes: 6 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/SolBus.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within IDEAS.Buildings.Components.Interfaces;
connector SolBus
expandable connector SolBus
"Bus containing solar radiation for various incidence angles as well as external convection coefficients"
parameter Boolean outputAngles = true "Set to false when linearising in Dymola only";
IDEAS.Buildings.Components.Interfaces.RealConnector HDirTil(unit="W/(m2)",start=100) annotation ();
Expand Down Expand Up @@ -37,6 +37,11 @@ Connector that contains all solar irridiation information for one inclination an
</html>", revisions="<html>
<ul>
<li>
April 20, 2023 by Jelger Jansen:<br/>
Make the connector expandable to avoid (pedantic check) warnings in Dymola 2022x.
See issue <a href=https://github.com/open-ideas/IDEAS/issues/1317>#1317</a>
</li>
<li>
November 28, 2019 by Ian Beausoleil-Morrison:<br/>
Add RealConnector for coefficient for forced convection at exterior surface.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1089\">
Expand Down
7 changes: 6 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/WeaBus.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within IDEAS.Buildings.Components.Interfaces;
connector WeaBus "Data bus that stores weather data"
expandable connector WeaBus "Data bus that stores weather data"
parameter Integer numSolBus;
parameter Boolean outputAngles = true "Set to false when linearising in Dymola only";

Expand Down Expand Up @@ -83,6 +83,11 @@ Connector that contains all environment information for many inclinations and ti
revisions="<html>
<ul>
<li>
April 20, 2023 by Jelger Jansen:<br/>
Make the connector expandable to avoid (pedantic check) warnings in Dymola 2022x.
See issue <a href=https://github.com/open-ideas/IDEAS/issues/1317>#1317</a>
</li>
<li>
November 28, 2019, by Ian Beausoleil-Morrison:<br/>
Removed hConExt from weather bus because it is not calculated in ExtConvForcedCoeff.mo and ExteriorConvection.mo.<br/>
Added wind speed and direction to weather bus.
Expand Down
7 changes: 6 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/WindowBus.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within IDEAS.Buildings.Components.Interfaces;
connector WindowBus
expandable connector WindowBus
"Bus containing inputs/outputs for linear window model"
parameter Integer nLay = 3 "Number of window layers";

Expand All @@ -10,6 +10,11 @@ connector WindowBus
annotation (Documentation(revisions="<html>
<ul>
<li>
April 20, 2023 by Jelger Jansen:<br/>
Make the connector expandable to avoid (pedantic check) warnings in Dymola 2022x.
See issue <a href=https://github.com/open-ideas/IDEAS/issues/1317>#1317</a>
</li>
<li>
October 22, 2016, by Filip Jorissen:<br/>
Revised documentation for IDEAS 1.0.
</li>
Expand Down
7 changes: 6 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/ZoneBus.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within IDEAS.Buildings.Components.Interfaces;
connector ZoneBus
expandable connector ZoneBus
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium "Medium in the component";
parameter Integer numIncAndAziInBus
Expand Down Expand Up @@ -61,6 +61,11 @@ heat and information between a zone and a surface.
</html>", revisions="<html>
<ul>
<li>
April 20, 2023 by Jelger Jansen:<br/>
Make the connector expandable to avoid (pedantic check) warnings in Dymola 2022x.
See issue <a href=https://github.com/open-ideas/IDEAS/issues/1317>#1317</a>
</li>
<li>
August 10, 2020, by Filip Jorissen:<br/>
Modifications for supporting interzonal airflow.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1066\">
Expand Down
3 changes: 2 additions & 1 deletion IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public
if useDooOpe
"2-port model for open door"
annotation (Placement(transformation(extent={{-10,82},{10,102}})));

Airflow.Multizone.Orifice resDoor(
redeclare package Medium = Medium,
A=w*h,
Expand Down Expand Up @@ -217,6 +217,7 @@ equation
-38,68},{-38,20.1},{-100.1,20.1}}, color={0,127,255}));
connect(resDoor.port_b, propsBusInt.port_1) annotation (Line(points={{10,68},{
38,68},{38,19.91},{56.09,19.91}}, color={0,127,255}));

annotation (
Icon(coordinateSystem(preserveAspectRatio=false,extent={{-60,-100},{60,100}}),
graphics={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ partial record PartialLighting
parameter Modelica.Units.SI.LuminousEfficacy K
"Luminous efficacy, specifies the lm/W (lumen per watt) of the installed lighting";

protected
parameter Real conFra(min=0, max=1) = 1-radFra
final parameter Real conFra(min=0, max=1) = 1-radFra
"Convective fraction of lighting heat exchange";
annotation (Documentation(revisions="<html>
<ul>
<li>
April 3, 2023 by Jelger Jansen:<br/>
Removed protected section and replaced by a final parameter. See <a href=\"https://github.com/open-ideas/IDEAS/issues/1314\">#1314</a>.
</li>
<li>
September 26, 2018 by Iago Cupeiro:<br/>
First implementation
See <a href=\"https://github.com/open-ideas/IDEAS/issues/879\">#879</a>.
Expand Down
8 changes: 4 additions & 4 deletions IDEAS/Buildings/Components/OuterWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ protected
final table=coeffsCp,
final azi=aziInt,
Cs=if not use_custom_Cs and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
then sim.Cs_coeff*Habs
elseif not use_custom_Cs
then sim.Cs
then sim.Cs_coeff*(Habs^(2*sim.a))
elseif not use_custom_Cs
then sim.Cs
else Cs,
Habs=Habs,
nPorts=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort
Expand Down Expand Up @@ -191,7 +191,7 @@ equation
connect(shaType.HShaGroDifTil, solDif.u2) annotation (Line(points={{-64.5,36},
{-56,36},{-56,1.6},{-54.8,1.6}}, color={0,0,127}));
connect(radSolData.hForcedConExt, extCon.hForcedConExt) annotation (Line(points={{-79.4,
-8.2},{-46,-8.2},{-46,-34},{-16,-34},{-16,-27},{-22,-27}},color={0,0,127}));
-8.2},{-46,-8.2},{-46,-34},{-16,-34},{-16,-22},{-44,-22}},color={0,0,127}));
connect(res1.port_a, outsideAir.ports[1]) annotation (Line(points={{20,-36},{
16,-36},{16,-50},{-80,-50}},color={0,127,255}));

Expand Down
8 changes: 6 additions & 2 deletions IDEAS/Buildings/Components/Shading/Box.mo
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ model Box "Both side fins and overhang"
haveFrame=haveFrame,
linRad=linRad,
final azi=azi,
haveBoundaryPorts=true,
haveBoundaryPorts=haveBoundaryPorts,
hSha=hSha,
final hWin=hWin,
final wWin=wWin,
Expand Down Expand Up @@ -168,8 +168,12 @@ and IDEAS.Buildings.Components.Shading.SideFins.
</html>", revisions="<html>
<ul>
<li>
December 15, 2022 by Filip Jorissen:<br/>
Bugfix for #1308.
</li>
<li>
July 18, 2022 by Filip Jorissen:<br/>
Refactored for #1270 for including thermal effect of screens.
Refactored for <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a> for including thermal effect of screens.
</li>
<li>
May 26, 2017 by Filip Jorissen:<br/>
Expand Down
20 changes: 6 additions & 14 deletions IDEAS/Buildings/Components/Shading/BoxAndScreen.mo
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,18 @@ initial equation
assert(ovDep > 0, "The depth of the overhang must be larger than zero, if this is not the case: just use Shading.Screen.");
assert(finDep > 0, "The depth of the side fins must be larger than zero, if this is not the case: just use Shading.OverhangAndScreen.");

equation
connect(stateShading2.port_frame, port_frame) annotation(
Line(points = {{4, 0}, {4, 160}, {100, 160}}, color = {191, 0, 0}));
connect(stateShading2.port_glazing, port_glazing) annotation(
Line(points = {{4, -4}, {6, -4}, {6, 120}, {100, 120}}, color = {191, 0, 0}));
connect(stateShading2.TDryBul, TDryBul) annotation(
Line(points = {{4, -12}, {40, -12}, {40, -10}}, color = {0, 0, 127}));
connect(Te, stateShading2.Te) annotation (Line(points={{-60,130},{-6,130},{-6,
-2},{-1.5,-2}}, color={0,0,127}));
connect(hForcedConExt, stateShading2.hForcedConExt) annotation (Line(points={
{-60,110},{-8,110},{-8,-3.33333},{-1.5,-3.33333}}, color={0,0,127}));
connect(TEnv, stateShading2.TEnv) annotation (Line(points={{-60,90},{-10,90},
{-10,-4.66667},{-1.5,-4.66667}}, color={0,0,127}));
annotation (Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 200}})), Documentation(info="<html>
<p>This model describes the transient behaviour of solar irradiance on a window below a non-fixed horizontal or vertical overhang combined with a controllable screen.</p>
</html>", revisions="<html>
<ul>
<li>
October 12, 2022, by Filip Jorissen:<br/>
Revised default connections between shading components when using DoubleShading. See
<a href=\"https://github.com/open-ideas/IDEAS/issues/1299\">#1299</a>.
</li>
<li>
July 18, 2022 by Filip Jorissen:<br/>
Refactored for #1270 for including thermal effect of screens.
Refactored for <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a> for including thermal effect of screens.
</li>
<li>
July 2015, by Filip Jorissenr:<br/>
Expand Down
4 changes: 2 additions & 2 deletions IDEAS/Buildings/Components/Shading/BuildingShade.mo
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ can be modelled by changing the value of parameter <code>fraSha</code> according
<ul>
<li>
July 18, 2022 by Filip Jorissen:<br/>
Refactored for #1270 for including thermal effect of screens.
Refactored for <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a> for including thermal effect of screens.
</li>
<li>
September 22, 2019 by Filip Jorissen:<br/>
Expand Down Expand Up @@ -151,4 +151,4 @@ First implementation.
</ul>
</html>"),
Diagram(coordinateSystem(extent = {{-100, -100}, {100, 200}})));
end BuildingShade;
end BuildingShade;
8 changes: 6 additions & 2 deletions IDEAS/Buildings/Components/Shading/HorizontalFins.mo
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ The implementation is illustrated using this figure:
</html>", revisions="<html>
<ul>
<li>
April 4, 2023 by Jelger Jansen:<br/>
Updated figure in documentation. See <a href=\"https://github.com/open-ideas/IDEAS/issues/1186\">#1186</a>.
</li>
<li>
July 18, 2022 by Filip Jorissen:<br/>
Refactored for #1270 for including thermal effect of screens.
Refactored for <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a> for including thermal effect of screens.
</li>
<li>
November 10, 2019 by Filip Jorissen:<br/>
Expand All @@ -162,4 +166,4 @@ Cleaned up implementation and documentation.
</ul>
</html>"),
Diagram(coordinateSystem(extent = {{-100, -100}, {100, 200}})));
end HorizontalFins;
end HorizontalFins;
31 changes: 31 additions & 0 deletions IDEAS/Buildings/Components/Shading/Interfaces/DoubleShading.mo
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,40 @@ equation
connect(HDirTil, stateShading1.HDirTil) annotation (Line(points={{-60,50},{-32,
50},{-32,-7.33333},{-25.5,-7.33333}},
color={0,0,127}));
connect(stateShading1.port_frame, port_frame) annotation (Line(points={{-20.5,
0.666667},{-20.5,160},{100,160}}, color={191,0,0}));
connect(stateShading2.port_frame, port_frame) annotation (Line(points={{3.5,0.666667},
{3.5,160},{100,160}}, color={191,0,0}));
connect(stateShading1.port_glazing, port_glazing) annotation (Line(points={{-20.5,
-2},{-20.5,120},{100,120}}, color={191,0,0}));
connect(stateShading2.port_glazing, port_glazing) annotation (Line(points={{3.5,-2},
{3.5,120},{100,120}}, color={191,0,0}));
connect(stateShading2.TDryBul, TDryBul) annotation (
Line(points={{3.5,-11.3333},{40,-11.3333},{40,-10}},
color = {0, 0, 127}));
connect(Te, stateShading2.Te) annotation (Line(points={{-60,130},{-6,130},{-6,
-2},{-1.5,-2}}, color={0,0,127}));
connect(hForcedConExt, stateShading2.hForcedConExt) annotation (Line(points={
{-60,110},{-8,110},{-8,-3.33333},{-1.5,-3.33333}}, color={0,0,127}));
connect(TEnv, stateShading2.TEnv) annotation (Line(points={{-60,90},{-10,90},
{-10,-4.66667},{-1.5,-4.66667}}, color={0,0,127}));
connect(stateShading1.TDryBul, TDryBul) annotation (
Line(points={{-20.5,-11.3333},{40,-11.3333},{40,-10}},
color = {0, 0, 127}));
connect(Te, stateShading1.Te) annotation (Line(points={{-60,130},{-6,130},{-6,
-2},{-25.5,-2}},color={0,0,127}));
connect(hForcedConExt, stateShading1.hForcedConExt) annotation (Line(points={{-60,110},
{-8,110},{-8,-3.33333},{-25.5,-3.33333}}, color={0,0,127}));
connect(TEnv, stateShading1.TEnv) annotation (Line(points={{-60,90},{-10,90},
{-10,-4.66667},{-25.5,-4.66667}},color={0,0,127}));
annotation (Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 200}})), Documentation(revisions="<html>
<ul>
<li>
October 12, 2022, by Filip Jorissen:<br/>
Revised default connections between shading components when using DoubleShading. See
<a href=\"https://github.com/open-ideas/IDEAS/issues/1299\">#1299</a>.
</li>
<li>
August 9, 2022, by Filip Jorissen:<br/>
Updated example after modified component connectors for issue
<a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">#1270</a>.
Expand Down
Loading

0 comments on commit 074def0

Please sign in to comment.