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

added port_3 for avoiding mixing on port_1 when using trickle vent in… #1351

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
68 changes: 20 additions & 48 deletions IDEAS/Buildings/Components/BoundaryWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,24 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe
"Constant block for temperature"
annotation (Placement(transformation(extent={{-110,32},{-100,42}})));

Fluid.Sources.MassFlowSource_T boundary1(
IDEAS.Fluid.Sources.MassFlowSource_T boundary1(
redeclare package Medium = Medium,
nPorts=1,
final m_flow=1e-10)
if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None
annotation (Placement(transformation(extent={{-28,-40},{-8,-20}})));
Fluid.Sources.MassFlowSource_T boundary2(
IDEAS.Fluid.Sources.MassFlowSource_T boundary2(
redeclare package Medium = Medium,
nPorts=1,
final m_flow=1e-10)
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
annotation (Placement(transformation(extent={{-28,-76},{-8,-56}})));
IDEAS.Fluid.Sources.MassFlowSource_T boundary3(
redeclare package Medium = Medium,
m_flow = 1e-10,
nPorts = 1)
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts annotation(
Placement(transformation(origin = {0, -14}, extent = {{-28, -76}, {-8, -56}})));
protected
final parameter Real U_value=1/(1/8 + sum(constructionType.mats.R) + 1/8)
"Wall U-value";
Expand Down Expand Up @@ -107,50 +113,12 @@ equation
{42,-30},{42,19.91},{56.09,19.91}}, color={0,127,255}));
connect(boundary2.ports[1], propsBusInt.port_2) annotation (Line(points={{-8,-66},
{44,-66},{44,19.91},{56.09,19.91}}, color={0,127,255}));
annotation (
Diagram(coordinateSystem(preserveAspectRatio=false,extent={{-100,-100},{100,
100}})),
Icon(coordinateSystem(preserveAspectRatio=false,extent={{-60,-100},{60,100}}),
graphics={
Rectangle(
extent={{-50,-90},{50,-70}},
pattern=LinePattern.None,
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-50,80},{50,100}},
pattern=LinePattern.None,
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{-50,80},{50,80}},
color={175,175,175}),
Line(
points={{-50,-70},{50,-70}},
color={175,175,175}),
Line(
points={{-50,-90},{50,-90}},
color={175,175,175}),
Line(
points={{-50,100},{50,100}},
color={175,175,175}),
Rectangle(
extent={{-10,80},{10,-70}},
fillColor={175,175,175},
fillPattern=FillPattern.Backward,
pattern=LinePattern.None),
Line(
points={{-10,80},{-10,-70}},
smooth=Smooth.None,
color={175,175,175}),
Line(
points={{10,80},{10,-70}},
smooth=Smooth.None,
color={0,0,0},
thickness=0.5)}),
Documentation(info="<html>
connect(boundary3.ports[1], propsBusInt.port_3) annotation(
Line(points = {{-8, -80}, {56, -80}, {56, 20}}, color = {0, 127, 255}));
annotation(
Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}})),
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-60, -100}, {60, 100}}), graphics = {Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-50, -90}, {50, -70}}), Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-50, 80}, {50, 100}}), Line(points = {{-50, 80}, {50, 80}}, color = {175, 175, 175}), Line(points = {{-50, -70}, {50, -70}}, color = {175, 175, 175}), Line(points = {{-50, -90}, {50, -90}}, color = {175, 175, 175}), Line(points = {{-50, 100}, {50, 100}}, color = {175, 175, 175}), Rectangle(fillColor = {175, 175, 175}, pattern = LinePattern.None, fillPattern = FillPattern.Backward, extent = {{-10, 80}, {10, -70}}), Line(points = {{-10, 80}, {-10, -70}}, color = {175, 175, 175}), Line(points = {{10, 80}, {10, -70}}, thickness = 0.5)}),
Documentation(info = "<html>
<p>
This is a wall model that should be used
to simulate a wall between a zone and a prescribed temperature or prescribed heat flow rate boundary condition.
Expand All @@ -171,9 +139,13 @@ to specify a fixed boundary condition temperature.
It is not allowed to enabled multiple of these three options.
If all are disabled then an adiabatic boundary (<code>Q_flow=0</code>) is used.
</p>
</html>", revisions="<html>
</html>", revisions = "<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<li>
April 26, 2020, by Filip Jorissen:<br/>
Refactored <code>SolBus</code> to avoid many instances in <code>PropsBus</code>.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1131\">
Expand Down Expand Up @@ -230,4 +202,4 @@ Adjusted implementation for computing conservation of energy.
</li>
</ul>
</html>"));
end BoundaryWall;
end BoundaryWall;
4 changes: 3 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/DummyConnection.mo
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ model DummyConnection "Source generator/sink for propsbus"
annotation (Placement(transformation(extent={{-80,-130},{-60,-110}})));
Modelica.Blocks.Sources.Constant hZone(k = 0.88) if isZone "Zone height" annotation(
Placement(visible = true, transformation(origin = {-42, -16}, extent = {{0, 80}, {20, 100}}, rotation = 0)));
IDEAS.Fluid.Sources.Boundary_pT bou(redeclare package Medium= IDEAS.Media.Air, nPorts = 2) if isZone annotation(
IDEAS.Fluid.Sources.Boundary_pT bou(redeclare package Medium= IDEAS.Media.Air, nPorts = 3) if isZone annotation(
Placement(visible = true, transformation(origin = {-30, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(prescribedHeatFlow[1].port, zoneBus.surfCon) annotation (Line(
Expand Down Expand Up @@ -141,6 +141,8 @@ equation
Line(points = {{-20, 74}, {100, 74}, {100, -2}}, color = {0, 0, 127}));
connect(hZone.y, zoneBus.hfloor) annotation(
Line(points = {{-20, 74}, {100, 74}, {100, -2}}, color = {0, 0, 127}));
connect(bou.ports[3], zoneBus.port_3) annotation(
Line(points = {{-20, 40}, {100, 40}, {100, -2}}, color = {255, 204, 51}));
connect(bou.ports[2], zoneBus.port_2) annotation(
Line(points = {{-20, 40}, {100, 40}, {100, -2}}, color = {255, 204, 51}));
connect(bou.ports[1], zoneBus.port_1) annotation(
Expand Down
9 changes: 8 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/PartialZone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected
parameter Integer n_ports_interzonal=
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None then 0
elseif sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort then nSurf
else nSurf*2
else nSurf*3
"Number of fluid ports for interzonal air flow modelling"
annotation(Evaluate=true);
IDEAS.Buildings.Components.Interfaces.ZoneBus[nSurf] propsBusInt(
Expand Down Expand Up @@ -500,6 +500,9 @@ end for;
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then
connect(airModel.ports[interzonalAirFlow.nPorts + 1 + nSurf:interzonalAirFlow.nPorts + nSurf*2], propsBusInt[1:nSurf].port_2) annotation (Line(points={{-30,
40},{-30,39.9},{-80.1,39.9}}, color={0,127,255}));
connect(airModel.ports[interzonalAirFlow.nPorts + 1 + nSurf*2:interzonalAirFlow.nPorts + nSurf*3], propsBusInt[1:nSurf].port_3) annotation (Line(points={{-30,
40},{-30,39.9},{-80.1,39.9}}, color={0,127,255}));

end if;
connect(setq50.Area, propsBusInt.area) annotation (Line(points={{-60.6,-88.6},
{-60.6,-89.3},{-80.1,-89.3},{-80.1,39.9}}, color={0,0,127}));
Expand Down Expand Up @@ -548,6 +551,10 @@ end for;
</html>", revisions="<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<li>
July 25, 2023, by Filip Jorissen:<br/>
Added conditional inputs for injecting water or CO2.
Added output phi for the relative humidity.
Expand Down
8 changes: 8 additions & 0 deletions IDEAS/Buildings/Components/Interfaces/ZoneBus.mo
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ expandable connector ZoneBus
redeclare package Medium = Medium)
if use_port_2
"Port for detailed interzonal air flow";
Modelica.Fluid.Interfaces.FluidPort_a port_3(
redeclare package Medium = Medium)
if use_port_2
"Port for trickle vents etc. when using detailed interzonal air flow";
IDEAS.Buildings.Components.BaseClasses.ConservationOfEnergy.EnergyPort E
"Internal energy in model" annotation ();
IDEAS.Buildings.Components.Interfaces.RealConnector inc(
Expand Down Expand Up @@ -61,6 +65,10 @@ heat and information between a zone and a surface.
</html>", revisions="<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<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>
Expand Down
17 changes: 15 additions & 2 deletions IDEAS/Buildings/Components/Interfaces/ZoneBusVarMultiplicator.mo
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ protected
if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None
"Mass flow rate multiplier for port 1"
annotation (Placement(transformation(extent={{-10,-170},{10,-150}})));
IDEAS.Fluid.BaseClasses.MassFlowRateMultiplier massFlowRateMultiplier3(
redeclare package Medium = Medium, final k=k)
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
"Mass flow rate multiplier for port 3"
annotation (Placement(transformation(origin = {0, -208}, extent = {{-10, -200}, {10, -180}})));
Modelica.Blocks.Math.Gain QTra_desgin(k=k) "Design heat flow rate"
annotation (Placement(transformation(extent={{-10,178},{10,198}})));
Modelica.Blocks.Math.Gain area(k=k) "Heat exchange surface area"
Expand Down Expand Up @@ -175,6 +180,10 @@ equation
-374},{100,-0.1},{100.1,-0.1}}, color={0,0,127}));
connect(hFloor.y, propsBus_a.hfloor) annotation (Line(points={{-13,-374},{
-100,-374},{-100,0.1},{-100.1,0.1}}, color={0,0,127}));
connect(massFlowRateMultiplier3.port_a, propsBus_a.port_3) annotation(
Line(points = {{-10, -398}, {-100, -398}, {-100, 0}}, color = {0, 127, 255}));
connect(massFlowRateMultiplier3.port_b, propsBus_b.port_3) annotation(
Line(points = {{10, -398}, {100, -398}, {100, 0}}, color = {0, 127, 255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-180},
{100,200}}), graphics={
Polygon(
Expand All @@ -195,10 +204,14 @@ equation
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="%name")}), Diagram(
coordinateSystem(preserveAspectRatio=false, extent={{-100,-180},{100,200}})),
coordinateSystem(preserveAspectRatio=false, extent={{-120,200},{120,-380}})),
Documentation(revisions="<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</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 All @@ -216,4 +229,4 @@ First implementation.
</li>
</ul>
</html>"));
end ZoneBusVarMultiplicator;
end ZoneBusVarMultiplicator;
20 changes: 20 additions & 0 deletions IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ model InternalWall "interior opaque wall between two zones"
Modelica.Blocks.Interfaces.RealInput y_doo(min = 0, max = 1) if use_y_doo and useDooOpe
"Control input for the door" annotation(
Placement(visible = true, transformation(origin = {-80, 90}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-64, 88}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
IDEAS.Fluid.Sources.MassFlowSource_T boundary3_a(
redeclare package Medium = Medium,
m_flow = 1e-10,
nPorts = 1) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
"Boundary for bus a" annotation(
Placement(transformation(origin = {48, -4}, extent = {{-28, -76}, {-8, -56}})));
IDEAS.Fluid.Sources.MassFlowSource_T boundary3_b(
redeclare package Medium = Medium,
m_flow = 1e-10,
nPorts = 1) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
"Boundary for bus b" annotation(
Placement(transformation(origin = {-48, -4}, extent = {{28, -76}, {8, -56}}, rotation = -0)));
protected
parameter Real Ope_hvert = sin(inc)*h "Vertical opening height, height of the surface projected to the vertical, 0 for openings in horizontal floors and ceilings" annotation (
Dialog(enable=hasCavity,group="Cavity or open door"));
Expand Down Expand Up @@ -176,6 +188,10 @@ equation
end if;
connect(y_doo, crackOrOperableDoor.y) annotation(
Line(points = {{-80, 90}, {-52, 90}, {-52, -52}, {20, -52}}, color = {0, 0, 127}));
connect(boundary3_b.ports[1], propsBus_b.port_3) annotation(
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}));
annotation(
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-60, -100}, {60, 100}}), graphics = {Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-52, -90}, {48, -70}}), Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-50, 80}, {50, 100}}), Rectangle(fillColor = {175, 175, 175}, pattern = LinePattern.None, fillPattern = FillPattern.Backward, extent = {{-10, 80}, {10, -70}}), Line(points = {{-50, 80}, {50, 80}}, color = {175, 175, 175}), Line(points = {{-50, -70}, {50, -70}}, color = {175, 175, 175}), Line(points = {{-50, -90}, {50, -90}}, color = {175, 175, 175}), Line(points = {{-50, 100}, {50, 100}}, color = {175, 175, 175}), Line(points = {{-10, 80}, {-10, -70}}, thickness = 0.5), Line(points = {{10, 80}, {10, -70}}, thickness = 0.5)}),
Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-60, -100}, {60, 100}})),
Expand Down Expand Up @@ -203,6 +219,10 @@ We assume that the value of <code>A</code> excludes the surface area of the cavi
</html>", revisions = "<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<li>
July 9, 2023, by Filip Jorissen:<br/>
Replaced door by operable door.
</li>
Expand Down
16 changes: 15 additions & 1 deletion IDEAS/Buildings/Components/OuterWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ protected
if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None
"Outside air model"
annotation (Placement(transformation(extent={{-100,-60},{-80,-40}})));

IDEAS.Fluid.Sources.MassFlowSource_T boundary3(
redeclare package Medium = Medium,
m_flow = 1e-10,
nPorts = 1) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
"Boundary for bus a" annotation(
Placement(transformation(origin = {48, -4}, extent = {{-28, -76}, {-8, -56}})));

initial equation
QTra_design =U_value*A*(273.15 + 21 - Tdes.y);

Expand Down Expand Up @@ -201,6 +209,8 @@ equation
connect(crackOrOperableDoor.port_b2, outsideAir.ports[2]) annotation (Line(points={{20,-60},{16,
-60},{16,-50},{-80,-50}}, color={0,127,255}));
end if;
connect(boundary3.ports[1], propsBusInt.port_3) annotation(
Line(points = {{40, -70}, {56, -70}, {56, 20}}, color = {0, 127, 255}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-60,-100},{60,100}}),
graphics={
Expand Down Expand Up @@ -294,6 +304,10 @@ The correct shading parameter values should then be passed through the redeclara
</html>", revisions="<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<li>
July 18, 2022, by Filip Jorissen:<br/>
Revised code for supporting new shading model.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1270\">
Expand Down Expand Up @@ -359,4 +373,4 @@ Adjusted implementation for grouping of solar calculations.
</li>
</ul>
</html>"));
end OuterWall;
end OuterWall;
22 changes: 18 additions & 4 deletions IDEAS/Buildings/Components/SlabOnGround.mo
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ model SlabOnGround "opaque floor on ground slab"
nPorts=1,
final m_flow=1e-10)
if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
annotation (Placement(transformation(extent={{-28,-76},{-8,-56}})));
annotation (Placement(transformation(origin = {0, 16}, extent = {{-28, -76}, {-8, -56}})));
protected
final parameter IDEAS.Buildings.Data.Materials.Ground ground1(final d=0.50);
final parameter IDEAS.Buildings.Data.Materials.Ground ground2(final d=0.33);
Expand Down Expand Up @@ -91,6 +91,14 @@ protected
outputAngles=sim.outputAngles)
"Weather data bus connectable to weaBus connector from Buildings Library"
annotation (Placement(transformation(extent={{46,-90},{66,-70}})));
IDEAS.Fluid.Sources.MassFlowSource_T boundary3(
redeclare package Medium = Medium,
m_flow = 1e-10,
nPorts = 1) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
"Boundary for bus a" annotation(
Placement(transformation(origin = {0, -4}, extent = {{-28, -76}, {-8, -56}})));


equation

connect(periodicFlow.port, layMul.port_b) annotation (Line(points={{-20,22},{
Expand All @@ -115,8 +123,10 @@ equation
horizontalAlignment=TextAlignment.Left));
connect(boundary1.ports[1], propsBusInt.port_1) annotation (Line(points={{-8,-30},
{42,-30},{42,19.91},{56.09,19.91}}, color={0,127,255}));
connect(boundary2.ports[1], propsBusInt.port_2) annotation (Line(points={{-8,-66},
{44,-66},{44,19.91},{56.09,19.91}}, color={0,127,255}));
connect(boundary2.ports[1], propsBusInt.port_2) annotation (Line(points={{-8,-50},
{44,-50},{44,19.91},{56.09,19.91}}, color={0,127,255}));
connect(boundary3.ports[1], propsBusInt.port_3) annotation(
Line(points = {{-8, -70}, {56, -70}, {56, 20}}, color = {0, 127, 255}));
annotation (
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-60,-100},{60,100}}),
graphics={
Expand Down Expand Up @@ -176,6 +186,10 @@ zone that is surrounded by air at the ambient temperature.
</html>", revisions="<html>
<ul>
<li>
Februari 18, 2024, by Filip Jorissen:<br/>
Modifications for supporting trickle vents and interzonal airflow.
</li>
<li>
April 26, 2020, by Filip Jorissen:<br/>
Refactored <code>SolBus</code> to avoid many instances in <code>PropsBus</code>.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1131\">
Expand Down Expand Up @@ -237,4 +251,4 @@ Adjusted implementation for computing conservation of energy.
</li>
</ul>
</html>"));
end SlabOnGround;
end SlabOnGround;
Loading
Loading