Skip to content

Commit 45dd567

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 07479a2 + 8b3818d commit 45dd567

82 files changed

Lines changed: 1390 additions & 927 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ partial model DoorDiscretized
1717
Modelica.Units.SI.Velocity vTop "Velocity at top of opening from A to B";
1818
Modelica.Units.SI.Velocity vBot "Velocity at bottom of opening from A to B";
1919

20-
protected
21-
parameter Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment";
2220

21+
input Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment";
22+
protected
2323
parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX(
2424
T=Medium.T_default,
2525
p=Medium.p_default,
@@ -28,11 +28,11 @@ protected
2828
parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default)
2929
"Density, used to compute fluid volume";
3030

31-
parameter Real hAg[nCom](each unit="m2/s2")=
31+
input Real hAg[nCom](each unit="m2/s2")=
3232
{Modelica.Constants.g_n*(hA - (i - 0.5)*dh) for i in 1:nCom}
3333
"Product g*h_i for each compartment";
3434

35-
parameter Real hBg[nCom](each unit="m2/s2")=
35+
input Real hBg[nCom](each unit="m2/s2")=
3636
{Modelica.Constants.g_n*(hB - (i - 0.5)*dh) for i in 1:nCom}
3737
"Product g*h_i for each compartment";
3838
Modelica.Units.SI.AbsolutePressure pA[nCom](each nominal=101325)
@@ -118,6 +118,10 @@ using the model for a door that can be open or closed.
118118
revisions="<html>
119119
<ul>
120120
<li>
121+
October 29, 2024, by Klaas De Jonge:<br/>
122+
Unprotected <code>dh</code> and changed prefixes of <code>dh</code>,<code>hAg</code> and <code>hBg</code> to <code>input</code>. This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1935\">#1935</a>.
123+
</li>
124+
<li>
121125
January 8, 2019, by Michael Wetter:<br/>
122126
Moved parameter <code>CD</code> from
123127
<a href=\"modelica://IDEAS.Airflow.Multizone.BaseClasses.DoorDiscretized\">

IDEAS/Airflow/Multizone/Examples/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ PressurizationData
1212
ReverseBuoyancy
1313
ReverseBuoyancy3Zones
1414
TrickleVent
15+
TrickleVentIDEAS
1516
ZonalFlow

IDEAS/Airflow/Multizone/TrickleVent.mo

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ model TrickleVent "Self regulating trickle vent"
55
final from_dp=true,
66
final homotopyInitialization=true);
77

8+
parameter Real l(min=1e-10, max=1) = 0.0001
9+
"Valve leakage, l=Kv(y=0)/Kv(y=1)";
810
parameter Real deltaM(min=1E-6) = 0.3
911
"Fraction of nominal mass flow rate where transition to turbulent occurs"
1012
annotation(Evaluate=true,
1113
Dialog(group = "Transition to laminar",
1214
enable = not linearized));
13-
15+
parameter Boolean use_y = false
16+
"=true, to enable control input"
17+
annotation(Evaluate=true, Dialog(group="Control"));
1418
final parameter Real k = if computeFlowResistance then
1519
m_flow_nominal_pos / sqrt(dp_nominal_pos) else 0
1620
"Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)";
21+
Modelica.Blocks.Interfaces.RealInput y(min=0,max=1) if use_y "Control input for trickle vent Kv value" annotation(
22+
Placement(visible = true, transformation(origin = {0, 120}, extent = {{-20, -20}, {20, 20}}, rotation = -90), iconTransformation(origin = {0, 120}, extent = {{-20, -20}, {20, 20}}, rotation = -90)));
1723
protected
1824
final parameter Boolean computeFlowResistance=(dp_nominal_pos > Modelica.Constants.eps)
1925
"Flag to enable/disable computation of flow resistance"
@@ -23,13 +29,18 @@ protected
2329
then if from_dp then k^2/m_flow_nominal_pos else m_flow_nominal_pos/k^2
2430
else 0
2531
"Precomputed coefficient to avoid division by parameter";
32+
Modelica.Blocks.Interfaces.RealInput y_internal "Internal variable for conditional variables";
2633
initial equation
2734
if computeFlowResistance then
2835
assert(m_flow_turbulent > 0, "m_flow_turbulent must be bigger than zero.");
2936
end if;
3037

3138
assert(m_flow_nominal_pos > 0, "m_flow_nominal_pos must be non-zero. Check parameters.");
3239
equation
40+
connect(y, y_internal);
41+
if not use_y then
42+
y_internal = 1;
43+
end if;
3344
// Pressure drop calculation
3445
if computeFlowResistance then
3546
if linearized then
@@ -40,7 +51,7 @@ equation
4051
m_flow_nominal,
4152
IDEAS.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp(
4253
dp=dp,
43-
k=k,
54+
k=k*(l + (1-l)*y_internal),
4455
m_flow_turbulent=m_flow_turbulent),
4556
m_flow_nominal/10);
4657
end if; // linearized
@@ -56,12 +67,20 @@ The positive mass flow rate is limited to <code>m_flow_nominal</code>
5667
at a pressure difference of <code>dp_nominal</code>.
5768
For negative pressure differences the mass flow rate is not limited.
5869
</p>
70+
<p>
71+
An optional control input can be enabled, which reduces the flow rate for the same
72+
pressure difference, but which does not affect the maximum flow rate.
73+
</p>
5974
</html>", revisions="<html>
6075
<ul>
6176
<li>
77+
July 9, 2023, by Filip Jorissen:<br/>
78+
Add control input.
79+
</li>
80+
<li>
6281
September 21, 2021, by Filip Jorissen:<br/>
6382
First implementation.
6483
</li>
6584
</ul>
6685
</html>"));
67-
end TrickleVent;
86+
end TrickleVent;

IDEAS/Airflow/Multizone/Validation/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
DoorOpenClosed
2+
LargeHorizontalOpening
23
OneWayFlow
34
OpenDoorBuoyancyDynamic
45
OpenDoorBuoyancyPressureDynamic

IDEAS/Airflow/Multizone/package.order

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
UsersGuide
22
Coefficient_V_flow
33
Coefficient_m_flow
4+
CrackOrOperableDoor
45
DoorDiscretizedOpen
56
DoorDiscretizedOperable
67
DoorOpen
78
DoorOperable
89
EffectiveAirLeakageArea
910
MediumColumn
1011
MediumColumnDynamic
12+
MediumColumnReversible
1113
Orifice
1214
Point_m_flow
1315
Points_m_flow
1416
Table_V_flow
1517
Table_m_flow
18+
TrickleVent
1619
ZonalFlow_ACS
1720
ZonalFlow_m_flow
1821
Types
1922
Examples
2023
Validation
2124
BaseClasses
22-
TrickleVent

IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ partial model PartialSimInfoManager
4343
parameter Boolean openSystemConservationOfEnergy=false
4444
"Compute conservation of energy for open system" annotation (Evaluate=true,
4545
Dialog(tab="Conservation of energy", enable=computeConservationOfEnergy));
46-
46+
final parameter Boolean use_port_1 = interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None
47+
"Whether port_1 of the propsbus connector should be used";
48+
final parameter Boolean use_port_2 = interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
49+
"Whether port_2 of the propsbus connector should be used";
4750
parameter Boolean lineariseDymola=false "Linearises building model equations for Dymola linearisation approach"
4851
annotation (Dialog(tab="Linearisation"));
4952
parameter Boolean lineariseJModelica=false "Linearises building model equations for optimisations in JModelica"
@@ -101,18 +104,23 @@ partial model PartialSimInfoManager
101104
annotation(Dialog(enable=interZonalAirFlowType<>
102105
IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None or unify_n50,group="Interzonal airflow"));
103106

107+
parameter Boolean use_sim_Cs =true "if checked, the default Cs of each surface in the building is sim.Cs"
108+
annotation(choices(checkBox=true),Dialog(group="Wind"));
109+
104110
parameter Modelica.Units.SI.Length H=10 "Building or roof height"
105111
annotation (Dialog(group="Wind"));
106-
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"));
112+
parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) "
113+
annotation(Dialog(group="Wind"));
107114
parameter Real a=0.28 "Velocity profile exponent. 0.28 for Suburban, 0.4 for Urban and 0.15 for Unshielded (Ashrae 1993) "
108-
annotation(Dialog(group="Wind"));
109-
parameter Modelica.Units.SI.Length Hwin=10
115+
annotation(Dialog(group="Wind"));
116+
parameter Modelica.Units.SI.Length Hwind=10
110117
"Height above ground of meteorological wind speed measurement"
111118
annotation (Dialog(group="Wind"));
119+
parameter Modelica.Units.SI.Length HPres=1 "Height above ground of meteorological atmospheric pressure measurement" annotation (Dialog(group="Wind"));
120+
parameter Real Cs_coeff = (A0*A0)*((1/Hwind)^(2*a)) "Multiplication factor for Habs"
121+
annotation(Dialog(group="Wind"));
112122

113-
parameter Real Cs= (A0*A0)*((H/Hwin)^(2*a)) "Wind speed modifier"
114-
annotation(Dialog(group="Wind"));
115-
123+
parameter Real Cs= Cs_coeff*(H^(2*a)) "Wind speed modifier" annotation(Dialog(group="Wind"));
116124

117125
final parameter Integer numIncAndAziInBus = size(incAndAziInBus,1)
118126
"Number of pre-computed azimuth";
@@ -576,6 +584,18 @@ equation
576584
</html>", revisions="<html>
577585
<ul>
578586
<li>
587+
October 30, 2024, by Klaas De Jonge:<br/>
588+
Modifications for wind pressure,ambient pressure and wind speed modifiers used in interzonal airflow.
589+
</li>
590+
<li>
591+
October 18, 2023 by Filip Jorissen:<br/>
592+
Added use_port_1 and use_port_2 for convenience.
593+
</li>
594+
<li>
595+
December 18, 2022 by Filip Jorissen:<br/>
596+
parameter revisions for #1244
597+
</li>
598+
<li>
579599
April 28, 2022 by Filip Jorissen:<br/>
580600
Changed the default weather file to BEL_VLG_Uccle.064470_TMYx.2007-2021.mos.
581601
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1239\">

IDEAS/BoundaryConditions/Validation/BESTEST/WD100.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
within IDEAS.BoundaryConditions.Validation.BESTEST;
1+
within IDEAS.BoundaryConditions.Validation.BESTEST;
22
model WD100
33
"Test model for BESTEST weather data: base case"
44
extends Modelica.Icons.Example;

IDEAS/Buildings/Components/BaseClasses/ConvectiveHeatTransfer/MonoLayerAir.mo

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ model MonoLayerAir
6464
then 0.028154*Ra^0.41399
6565
else 1+1.75967e-10*Ra^2.2984755)
6666
else 1 "Correlations from Hollands et al. and Wright et al.";
67-
67+
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_emb "Internal port"
68+
annotation (Placement(transformation(extent={{-10,90},{10,110}})));
69+
6870
protected
6971
final parameter Boolean ceiling=
7072
IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Ceiling)
@@ -83,16 +85,9 @@ protected
8385
abs(port_a.T-port_b.T))*coeffRa);
8486
Modelica.Units.SI.CoefficientOfHeatTransfer h=Nu*k/d;
8587

86-
public
87-
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_emb "Internal port"
88-
annotation (Placement(transformation(extent={{-10,90},{10,110}})));
89-
9088
equation
91-
if not (ceiling or floor or vertical) then
92-
assert(false, "Could not find suitable correlation for air cavity! Please
93-
change the inclination to wall, ceiling or floor or remove the air layer.",
89+
assert(ceiling or floor or vertical, "In " + getInstanceName() +": Could not find suitable correlation for air cavity in a wall. Results may be less accurate than expected.",
9490
level=AssertionLevel.warning);
95-
end if;
9691

9792
if checkCoating then
9893
assert(abs(epsLw_a - IDEAS.Buildings.Data.Constants.epsLw_glass) > 1e-5

0 commit comments

Comments
 (0)