Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1561 airflowwindowventilationempiricalexpressionsdin16798 add deactivation option for window opening #1564

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
within AixLib.Airflow.WindowVentilation.BaseClasses;
partial model PartialEmpiricalFlowStackWindIncidence
"Partial model for empirical expressions with stack effect and wind incidence angle considered"
extends PartialEmpiricalFlowStack;
extends AixLib.Airflow.WindowVentilation.BaseClasses.PartialEmpiricalFlowStack;
parameter Modelica.Units.SI.Angle aziRef(displayUnit="deg")=0
"Azimuth angle of the referece surface impacted by wind";
Modelica.Units.SI.Angle incAng(displayUnit="deg")
Expand Down
17 changes: 2 additions & 15 deletions AixLib/Airflow/WindowVentilation/EmpiricalExpressions/Caciolo.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ model Caciolo "Empirical expression developed by Caciolo et al. (2013)"
redeclare replaceable model OpeningArea =
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSimple,
final varNameIntRes = "V_flow_th");
Integer errCouWinSpeLoc(start=0)
"Warning counter for assertion check of 'winSpeLoc'";
Modelica.Blocks.Interfaces.RealInput winSpeLoc(unit="m/s", min=0)
"Local wind speed by window or facade"
annotation (Placement(transformation(extent={{-140,-40},{-100,0}})));
Expand All @@ -17,27 +15,16 @@ protected
"Lower bound of wind speed in windward conditions";
Modelica.Units.SI.VolumeFlowRate V_flow_th "Thermal induced volume flow";
Modelica.Units.SI.VolumeFlowRate V_flow_win "Wind induced volume flow";
initial equation
errCouWinSpeLoc = 0;
equation
incAng = AixLib.Airflow.WindowVentilation.BaseClasses.Functions.SmallestAngleDifference(
AixLib.Airflow.WindowVentilation.BaseClasses.Types.SmallestAngleDifferenceTypes.Range180,
winDir, aziRef);
// Assertion of wind speed
when (winSpeLoc < winSpeLim) and abs(incAngDeg) <= 90 then
errCouWinSpeLoc = pre(errCouWinSpeLoc) + 1;
end when;
assert(winSpeLoc > winSpeLim or errCouWinSpeLoc > 1,
"In " + getInstanceName() + ": The wind speed in the windward condition
is equal or less than the limitation (" + String(winSpeLim) + " m/s), the
'V_flow_win' will be set to 0",
AssertionLevel.warning);
// Calculate V_flow_win
if abs(incAngDeg) <= 90 then
/*Windward*/
cofWin = 1.234 - 0.490*winSpeLoc + 0.048*(winSpeLoc^2);
V_flow_win =if noEvent(winSpeLoc > winSpeLim) then
0.0357*openingArea.A*(winSpeLoc - winSpeLim) else 0;
// If winSpeLoc < winSpeLim, wind-driven airflow negligible
V_flow_win = 0.0357*openingArea.A*max(winSpeLoc - winSpeLim, 0);
else
Comment on lines -40 to 28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a revision why this changed?

/*Leeward*/
cofWin = 1.355 - 0.179*winSpeLoc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ model DIN16798 "Empirical expression according to DIN EN 16798-7 (2017)"
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSashDIN16798,
final varNameIntRes = "V_flow");
parameter Modelica.Units.SI.Height heightASL=0 "Height above sea level";
parameter Boolean winOpnBeh=false "Activate window opening behavior depending
on ambient temperature and wind speed"
annotation(choices(checkBox=true));
Modelica.Blocks.Interfaces.RealInput winSpe10(unit="m/s", min=0)
"Local wind speed at a height of 10 m"
annotation (Placement(transformation(extent={{-140,-40},{-100,0}})));
protected
Real cofExt = min(1, max(0, (1 - 0.1*winSpe10)*((TAmb - T0)/25 + 0.2)))
Real cofExt = if winOpnBeh then
min(1, max(0, (1 - 0.1*winSpe10)*((TAmb - T0)/25 + 0.2))) else 1
"Coefficient depending on external conditions";
Real cofTh = 0.0035 "Coefficient of thermal buoyancy";
Real cofWin = 0.001 "Coefficient of wind speed";
Expand All @@ -34,6 +38,10 @@ equation
June 14, 2024, by Jun Jiang:<br/>
First implementation (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1492\">issue 1492</a>)
</li>
<li>
Dec. 16, 2024, by Jun Jiang:<br/>
Add parameter for window opening behavior (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1561\">issue 1561</a>)
</li>
</ul>
</html>", info="<html>
<p>This model contains the empirical expression according to DIN CEN/TR 16798-8 (DIN SPEC 32739-8):2018-03.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,17 @@ model VentilationFlowRateSashOpening
redeclare model OpeningArea =
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSashDIN16798 (
opnTyp=AixLib.Airflow.WindowVentilation.BaseClasses.Types.WindowOpeningTypes.BottomHungInward),
heightASL=200) "Model DIN 16798"
heightASL=200) "Model DIN 16798, without window opening behavior"
annotation (Placement(transformation(extent={{60,-20},{80,0}})));
AixLib.Airflow.WindowVentilation.EmpiricalExpressions.DIN16798 din16798_2(
winClrWidth=winClrWidth,
winClrHeight=winClrHeight,
redeclare model OpeningArea =
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSashDIN16798 (
opnTyp=AixLib.Airflow.WindowVentilation.BaseClasses.Types.WindowOpeningTypes.BottomHungInward),
heightASL=200,
winOpnBeh=true) "Model DIN 16798, with window opening behavior"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would advise setting winOpnBeh final in both models with and without opening behavior to avoid users overriding it. If you know use cases where a non-final setting is useful, keep it this way.

annotation (Placement(transformation(extent={{100,-40},{120,-20}})));
AixLib.Airflow.WindowVentilation.EmpiricalExpressions.DIN4108 din4108_1(
winClrWidth=winClrWidth,
winClrHeight=winClrHeight,
Expand Down Expand Up @@ -230,6 +239,12 @@ equation
60},{0,-6},{58,-6}}, color={0,0,127}));
connect(winSpe10Set.y, din16798_1.winSpe10) annotation (Line(points={{-79,30},
{-10,30},{-10,-12},{58,-12}}, color={0,0,127}));
connect(from_degC.y, din16798_2.TRoom) annotation (Line(points={{-39,90},{10,90},
{10,-2},{52,-2},{52,-22},{98,-22}}, color={0,0,127}));
connect(from_degC1.y, din16798_2.TAmb) annotation (Line(points={{-39,60},{0,60},
{0,-6},{50,-6},{50,-26},{98,-26}}, color={0,0,127}));
connect(winSpe10Set.y, din16798_2.winSpe10) annotation (Line(points={{-79,30},
{-10,30},{-10,-12},{48,-12},{48,-32},{98,-32}}, color={0,0,127}));
connect(from_degC.y, din4108_1.TRoom) annotation (Line(points={{-39,90},{10,
90},{10,-42},{58,-42}}, color={0,0,127}));
connect(from_degC1.y, din4108_1.TAmb) annotation (Line(points={{-39,60},{0,60},
Expand Down Expand Up @@ -266,6 +281,8 @@ equation
90},{90,90},{90,82},{70,82}}, color={0,0,127}));
connect(winOpnWidthSet.y, din16798_1.opnWidth_in)
annotation (Line(points={{99,90},{90,90},{90,2},{70,2}}, color={0,0,127}));
connect(winOpnWidthSet.y, din16798_2.opnWidth_in) annotation (Line(points={{99,
90},{90,90},{90,-18},{110,-18}}, color={0,0,127}));
connect(winOpnWidthSet.y, din4108_1.opnWidth_in) annotation (Line(points={{99,
90},{90,90},{90,-38},{70,-38}}, color={0,0,127}));
connect(winOpnWidthSet.y, ashrae.opnWidth_in) annotation (Line(points={{99,90},
Expand All @@ -280,6 +297,10 @@ equation
June 14, 2024, by Jun Jiang:<br/>
First implementation (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1492\">issue 1492</a>)
</li>
<li>
Dec. 16, 2024, by Jun Jiang:<br/>
Update due to model update (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1561\">issue 1561</a>)
</li>
</ul>
</html>", info="<html>
<p>This example checks the models that simulate the window ventilation flow rate with the sash opening. For the sash opening type, all models are set to the bottom-hung opening.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,16 @@ model VentilationFlowRateSimpleOpening
winClrHeight=winClrHeight,
redeclare model OpeningArea =
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSimple,
heightASL=200) "Model DIN 16798"
heightASL=200) "Model DIN 16798, without window opening behavior"
annotation (Placement(transformation(extent={{60,-20},{80,0}})));
AixLib.Airflow.WindowVentilation.EmpiricalExpressions.DIN16798 din16798_2(
winClrWidth=winClrWidth,
winClrHeight=winClrHeight,
redeclare model OpeningArea =
AixLib.Airflow.WindowVentilation.OpeningAreas.OpeningAreaSimple,
heightASL=200,
winOpnBeh=true) "Model DIN 16798, with window opening behavior"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. Also, explicitly set winOpnBeh in any case to avoid changes if someone changes the default at some point.

annotation (Placement(transformation(extent={{60,-40},{80,-20}})));
AixLib.Airflow.WindowVentilation.EmpiricalExpressions.DIN4108 din4108_1(
winClrWidth=winClrWidth,
winClrHeight=winClrHeight,
Expand Down Expand Up @@ -181,6 +189,12 @@ equation
60},{0,-6},{58,-6}}, color={0,0,127}));
connect(winSpe10Set.y, din16798_1.winSpe10) annotation (Line(points={{-79,30},
{-10,30},{-10,-12},{58,-12}}, color={0,0,127}));
connect(from_degC.y, din16798_2.TRoom) annotation (Line(points={{-39,90},{10,90},
{10,-2},{52,-2},{52,-22},{58,-22}}, color={0,0,127}));
connect(from_degC1.y, din16798_2.TAmb) annotation (Line(points={{-39,60},{0,60},
{0,-6},{50,-6},{50,-26},{58,-26}}, color={0,0,127}));
connect(winSpe10Set.y, din16798_2.winSpe10) annotation (Line(points={{-79,30},
{-10,30},{-10,-12},{48,-12},{48,-32},{58,-32}}, color={0,0,127}));
connect(from_degC.y, din4108_1.TRoom) annotation (Line(points={{-39,90},{10,
90},{10,-42},{58,-42}}, color={0,0,127}));
connect(from_degC1.y, din4108_1.TAmb) annotation (Line(points={{-39,60},{0,60},
Expand All @@ -201,6 +215,10 @@ equation
June 14, 2024, by Jun Jiang:<br/>
First implementation (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1492\">issue 1492</a>)
</li>
<li>
Dec. 16, 2024, by Jun Jiang:<br/>
Update due to model update (see <a href=\"https://github.com/RWTH-EBC/AixLib/issues/1561\">issue 1561</a>)
</li>
</ul>
</html>", info="<html>
<p>This example checks the models that simulate the window ventilation flow rate with the simple opening.</p>
Expand Down
Loading