Skip to content

Commit

Permalink
extending ReversibleDensityColumn.mo from MediumColumn and moved from…
Browse files Browse the repository at this point in the history
… baseclasses folder upwards

for open-ideas#1244
  • Loading branch information
Mathadon committed Jun 22, 2023
1 parent 224f2c1 commit 5be2d6d
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 150 deletions.
145 changes: 0 additions & 145 deletions IDEAS/Airflow/Multizone/BaseClasses/ReversibleDensityColumn.mo

This file was deleted.

1 change: 0 additions & 1 deletion IDEAS/Airflow/Multizone/BaseClasses/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ DoorDiscretized
ErrorControl
PartialOneWayFlowElement
PowerLawResistanceParameters
ReversibleDensityColumn
TwoWayFlowElement
TwoWayFlowElementBuoyancy
ZonalFlow
Expand Down
81 changes: 81 additions & 0 deletions IDEAS/Airflow/Multizone/ReversibleDensityColumn.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
within IDEAS.Airflow.Multizone.BaseClasses;
model ReversibleDensityColumn
"Vertical shaft with no friction and no storage of heat and mass, reversible because it can handle negative column heights"

extends IDEAS.Airflow.Multizone.MediumColumn(
h(min=-Modelica.Constants.inf),
densitySelection = IDEAS.Airflow.Multizone.Types.densitySelection.fromBottom);

annotation (
Icon(graphics={
Line(
points={{0,100},{0,-100},{0,-98}}),
Text(
extent={{24,-78},{106,-100}},
lineColor={0,0,127},
textString="Zone/Amb"),
Text(
extent={{32,104},{98,70}},
lineColor={0,0,127},
textString="FlowElem"),
Text(
extent={{36,26},{88,-10}},
lineColor={0,0,127},
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
textString="h=%h"),
Rectangle(
extent={{-16,80},{16,-80}},
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None),
Rectangle(
visible=densitySelection == IDEAS.Airflow.Multizone.Types.densitySelection.fromTop,
extent={{-16,80},{16,0}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == IDEAS.Airflow.Multizone.Types.densitySelection.actual,
extent={{-16,80},{16,54}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == IDEAS.Airflow.Multizone.Types.densitySelection.fromBottom,
extent={{-16,0},{16,-82}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == IDEAS.Airflow.Multizone.Types.densitySelection.actual,
extent={{-16,-55},{16,-80}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0})}),
defaultComponentName="col",
Documentation(info="<html>
<p>
This model describes the pressure difference of a vertical medium
column. It can be used to model the pressure difference caused by
stack effect.
It is a variation on IDEAS.Airflow.Multizone.MediumColumn.
</p>
</html>",
revisions="<html>
<ul>
<li>
January 19, 2022, by Klaas De Jonge:<br/>
Adapted IDEAS.Airflow.Multizone.MediumColumn to obtain the current model where input of h can be negative and cleaned out the model as the density should always be set by port_b.
This makes port_a not nececarilly always the top port.
</li>
</ul>
</html>"));
end ReversibleDensityColumn;
1 change: 1 addition & 0 deletions IDEAS/Airflow/Multizone/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MediumColumnDynamic
Orifice
Point_m_flow
Points_m_flow
ReversibleDensityColumn
Table_V_flow
Table_m_flow
ZonalFlow_ACS
Expand Down
4 changes: 2 additions & 2 deletions IDEAS/Buildings/Components/Interfaces/PartialSurface.mo
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ model PowerLaw_q50_stack
mMea_flow_nominal=A*(q50*1.2)/3600)
"Middle or bottom crack "
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
IDEAS.Airflow.Multizone.BaseClasses.ReversibleDensityColumn col_a_pos(
IDEAS.Airflow.Multizone.ReversibleDensityColumn col_a_pos(
redeclare package Medium = Medium,
h=h_a) if StackEff
annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));

IDEAS.Airflow.Multizone.BaseClasses.ReversibleDensityColumn col_b_pos(
IDEAS.Airflow.Multizone.ReversibleDensityColumn col_b_pos(
redeclare package Medium = Medium,
h=h_b) if StackEff
annotation (Placement(transformation(extent={{50,-10},{70,10}})));
Expand Down
4 changes: 2 additions & 2 deletions IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ public
if useResDoor
"1-port model for open door"
annotation (Placement(transformation(extent={{-10,58},{10,78}})));
Airflow.Multizone.BaseClasses.ReversibleDensityColumn col_b_pos(
Airflow.Multizone.ReversibleDensityColumn col_b_pos(
redeclare package Medium = Medium,
h=-0.5*hzone_b + 0.5*Ope_hvert + hRef_b)
if useResDoor annotation (Placement(transformation(extent={{-40,42},{-20,62}})));
Airflow.Multizone.BaseClasses.ReversibleDensityColumn col_a_pos(
Airflow.Multizone.ReversibleDensityColumn col_a_pos(
redeclare package Medium = Medium,
h=-0.5*hzone_a + 0.5 *Ope_hvert + hRef_a)
if useResDoor annotation (Placement(transformation(extent={{16,42},{36,62}})));
Expand Down

0 comments on commit 5be2d6d

Please sign in to comment.