Skip to content

Commit

Permalink
Merge pull request #589 from RWTH-EBC/development
Browse files Browse the repository at this point in the history
Development into master
  • Loading branch information
PMehrfeld authored Aug 8, 2018
2 parents a7d0d31 + 60f5827 commit a6dcc19
Show file tree
Hide file tree
Showing 1,538 changed files with 119,825 additions and 7,685 deletions.
531 changes: 530 additions & 1 deletion AixLib/.copiedFiles.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within AixLib.Airflow.AirHandlingUnit.Examples;
model TestAHU
within AixLib.Airflow.AirHandlingUnit.Examples;
model AHU
"Example to test all states of the AHU model - Play with the possible modes (boolean parameters for: heating, cooling, de-/humidification"
extends Modelica.Icons.Example;

Expand All @@ -13,11 +13,11 @@ model TestAHU
annotation (Placement(transformation(extent={{-100,24},{-80,44}})));
Modelica.Blocks.Sources.Constant desiredT_sup(k=293)
annotation (Placement(transformation(extent={{62,-26},{42,-6}})));
AHU ahu( clockPeriodGeneric=30,
.AixLib.Airflow.AirHandlingUnit.AHU ahu(
clockPeriodGeneric=30,
heating=true,
cooling=true,
HRS=true)
annotation (Placement(transformation(extent={{-68,-18},{26,18}})));
HRS=true) annotation (Placement(transformation(extent={{-68,-18},{26,18}})));
Modelica.Blocks.Sources.Constant phi_roomMin(k=0.47)
annotation (Placement(transformation(extent={{68,-56},{48,-36}})));
Modelica.Blocks.Sources.Constant phi_roomMax(k=0.55)
Expand Down Expand Up @@ -60,103 +60,75 @@ model TestAHU
equation

connect(desiredT_sup.y, ahu.T_supplyAir) annotation (Line(
points={{41,-16},{34,-16},{34,-4.5},{18.48,-4.5}},
points={{41,-16},{34,-16},{34,-6.3},{18.48,-6.3}},
color={0,0,127},
smooth=Smooth.None));
connect(tempOutside.y, ahu.T_outdoorAir) annotation (Line(
points={{-79,-6},{-74,-6},{-74,-6.3},{-62.36,-6.3}},
points={{-79,-6},{-74,-6},{-74,-7.2},{-62.36,-7.2}},
color={0,0,127},
smooth=Smooth.None));
connect(Vflow_in.y, ahu.Vflow_in) annotation (Line(
points={{-79,34},{-76,34},{-76,-3.6},{-66.12,-3.6}},
points={{-79,34},{-76,34},{-76,-4.5},{-66.12,-4.5}},
color={0,0,127},
smooth=Smooth.None));
connect(phi_roomMin.y, ahu.phi_supplyAir[1]) annotation (Line(
points={{47,-46},{32,-46},{32,-8.1},{18.48,-8.1}},
points={{47,-46},{32,-46},{32,-9.9},{18.48,-9.9}},
color={0,0,127},
smooth=Smooth.None));
connect(waterLoadOutside.y, ahu.X_outdoorAir) annotation (Line(
points={{-79,-40},{-72,-40},{-72,-10.8},{-62.36,-10.8}},
points={{-79,-40},{-72,-40},{-72,-11.7},{-62.36,-11.7}},
color={0,0,127},
smooth=Smooth.None));
connect(phi_RoomExtractAir.y, ahu.phi_extractAir) annotation (Line(
points={{77,-14},{66,-14},{66,0},{30,0},{30,8.1},{18.48,8.1}},
points={{77,-14},{66,-14},{66,0},{30,0},{30,5.4},{18.48,5.4}},
color={0,0,127},
smooth=Smooth.None));
connect(phi_roomMax.y, ahu.phi_supplyAir[2]) annotation (Line(points={{77,-46},
{72,-46},{72,-66},{28,-66},{28,-9.9},{18.48,-9.9}}, color={0,0,
{72,-46},{72,-66},{28,-66},{28,-11.7},{18.48,-11.7}}, color={0,0,
127}));
connect(ahu.T_extractAir, addToExtractTemp.y) annotation (Line(points={{18.48,
12.6},{27.92,12.6},{27.92,18},{33.4,18}}, color={0,0,127}));
9.9},{27.92,9.9},{27.92,18},{33.4,18}}, color={0,0,127}));
connect(tempAddInRoom.y, addToExtractTemp.u1) annotation (Line(points={{77,30},
{66,30},{56,30},{56,21.6},{47.2,21.6}}, color={0,0,127}));
connect(desiredT_sup.y, addToExtractTemp.u2) annotation (Line(points={{41,-16},
{38,-16},{38,6},{56,6},{56,14.4},{47.2,14.4}}, color={0,0,127}));
connect(ahu.QflowC, QFlowCool) annotation (Line(points={{-22.41,-14.85},{
-22.41,-46.425},{-26,-46.425},{-26,-86}}, color={0,0,127}));
connect(ahu.QflowH, QFlowHeat) annotation (Line(points={{-1.73,-14.85},{-1.73,
connect(ahu.QflowC, QFlowCool) annotation (Line(points={{-26.17,-15.75},{-26.17,
-46.425},{-26,-46.425},{-26,-86}}, color={0,0,127}));
connect(ahu.QflowH, QFlowHeat) annotation (Line(points={{-7.37,-15.75},{-7.37,
-47.425},{0,-47.425},{0,-86}}, color={0,0,127}));
connect(ahu.Pel, PEl) annotation (Line(points={{8.61,-14.85},{8.61,-47.425},{
26,-47.425},{26,-86}}, color={0,0,127}));
connect(ahu.Pel, PEl) annotation (Line(points={{2.03,-15.75},{2.03,-47.425},{26,
-47.425},{26,-86}}, color={0,0,127}));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
Text(
extent={{-88,84},{-50,58}},
extent={{-60,80},{-22,54}},
lineColor={28,108,200},
fontSize=6,
textString="Heat Cool Dehu Hu HRS
1 1 1 1 1
1 1 1 0 1
1 1 0 1 1
1 1 0 0 1
1 0 0 0 1
0 1 0 0 1
0 0 0 0 1
1 1 1 1 0
1 1 1 0 0
1 1 0 1 0
1 1 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 0 0 0
textString="Heat Cool Dehu Hu HRS
1 1 1 1 1
1 1 1 0 1
1 1 0 1 1
1 1 0 0 1
1 0 0 0 1
0 1 0 0 1
0 0 0 0 1
1 1 1 1 0
1 1 1 0 0
1 1 0 1 0
1 1 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 0 0 0
"), Text(
extent={{-88,100},{-44,90}},
extent={{-60,96},{-16,86}},
lineColor={28,108,200},
textString="Use the following Table for investigation of all possible modes.
Check whether variable allCond is always 1."),
Text(
extent={{-20,76},{36,62}},
lineColor={28,108,200},
fontSize=4,
horizontalAlignment=TextAlignment.Left,
textString="createPlot(id=1, position={917, 10, 693, 691}, y={\"ahu.allCond\"}, range={0.0, 90000.0, 0.89, 1.11}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}}, markers={MarkerStyle.SmallSquare});
createPlot(id=2, position={60, 18, 727, 669}, y={\"ahu.startState.active\", \"ahu.deHuHRS_true.active\", \"ahu.deHuHRS_false.active\",
\"ahu.onlyHeatingHRS_true.active\", \"ahu.onlyHeatingHRS_false.active\"}, range={0.0, 90000.0, -0.05, 1.05}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}, {0,0,0}}, markers={MarkerStyle.SmallSquare, MarkerStyle.SmallSquare, MarkerStyle.SmallSquare,
MarkerStyle.SmallSquare, MarkerStyle.SmallSquare});
createPlot(id=3, position={821, 15, 744, 666}, y={\"ahu.onlyCoolingHRS_true.active\", \"ahu.onlyCoolingHRS_false.active\",
\"ahu.huPreHHRS_true.active\", \"ahu.huPreHHRS_false.active\", \"ahu.huCHRS_true.active\",
\"ahu.huCHRS_false.active\"}, range={0.0, 90000.0, -0.05, 1.05}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}, {0,0,0}, {162,29,33}}, markers={MarkerStyle.SmallSquare, MarkerStyle.SmallSquare, MarkerStyle.SmallSquare,
MarkerStyle.SmallSquare, MarkerStyle.SmallSquare, MarkerStyle.SmallSquare});
createPlot(id=4, position={77, 62, 1429, 635}, y={\"ahu.QflowC\", \"ahu.QflowH\"}, range={0.0, 88000.0, -100000.0, 2100000.0}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}, {238,46,47}});
createPlot(id=5, position={50, 59, 1411, 632}, y={\"ahu.X_oda\", \"ahu.X_supMin\", \"ahu.X_supMax\"}, range={0.0, 88000.0, 0.0058000000000000005, 0.0102}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}, {238,46,47}, {0,140,72}}, markers={MarkerStyle.SmallSquare, MarkerStyle.SmallSquare, MarkerStyle.SmallSquare});
createPlot(id=6, position={31, 19, 1416, 654}, y={\"ahu.T_6\", \"ahu.T_oda\", \"ahu.T_supplyAirOut\"}, range={0.0, 88000.0, 8.0, 30.0}, grid=true, filename=\"TestAHU.mat\", colors={{28,108,200}, {238,46,47}, {28,108,200}}, markers={MarkerStyle.SmallSquare, MarkerStyle.SmallSquare, MarkerStyle.None});"),
Text(
extent={{-20,102},{64,82}},
lineColor={28,108,200},
textString="Double Click the text below, copy everything and
paste it after the simulation in the command line
to display most interesting plots.",
horizontalAlignment=TextAlignment.Left)}),
Check whether variable allCond is always 1.")}),
experiment(
StopTime=86400,
Interval=60,
__Dymola_Algorithm="Lsodar"),
__Dymola_experimentSetupOutput(events=false),
Interval=60),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Airflow/AirHandlingUnit/Examples/AHU.mos"
"Simulate and plot"),
Documentation(info="<html>
<h4><span style=\"color:#008000\">Overview</span></h4>
<p>Simulation to check the behaviour of the simple Air Handling Unit models. Various possibilities for inputs are provided. </p>
Expand All @@ -165,4 +137,4 @@ to display most interesting plots.",
<p>Occupation and Schedule is a percentage value between 0 and 1.</p>
<p>The zone parameter is needed to automatically calculate the air flow rate based on the occupation and room area.</p>
</html>"));
end TestAHU;
end AHU;
2 changes: 1 addition & 1 deletion AixLib/Airflow/AirHandlingUnit/Examples/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within AixLib.Airflow.AirHandlingUnit;
within AixLib.Airflow.AirHandlingUnit;
package Examples "Contains examples for Air Handling Units"
extends Modelica.Icons.ExamplesPackage;

Expand Down
2 changes: 1 addition & 1 deletion AixLib/Airflow/AirHandlingUnit/Examples/package.order
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TestAHU
AHU
126 changes: 126 additions & 0 deletions AixLib/Airflow/FacadeVentilationUnit/BaseClasses/SetPower.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
within AixLib.Airflow.FacadeVentilationUnit.BaseClasses;
model SetPower
"This model defines a specific mass flow rate based on the input power
share"

extends Modelica.Fluid.Interfaces.PartialTwoPort;

parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.05
"Nominal mass flow rate of fan";
parameter Medium.AbsolutePressure p_start=Medium.p_default
"Start value of pressure";
parameter Integer noUnits=1 "Number of identical FVU units";
parameter Modelica.SIunits.PressureDifference dp_nominal=500
"Initial pressure difference";
parameter Medium.Temperature T_start=Medium.T_default
"Start value of temperature";

Modelica.Blocks.Tables.CombiTable1D volumeFlow(table=[0,1; 0.1,25; 0.2,40;
0.3,60; 0.4,90; 0.5,100; 0.6,140; 0.7,175; 0.8,200; 0.9,225; 1,260])
"Correlates the relative input signal and a volume flow rate"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=90,
origin={0,-56})));
Modelica.Blocks.Interfaces.RealInput powerShare(
min=0,
max=1,
nominal=0.6) "Power share 0..1 for fan" annotation (Placement(
transformation(
origin={0,-100},
extent={{-20,-20},{20,20}},
rotation=90)));

AixLib.Fluid.Movers.FlowControlled_m_flow fan(
redeclare package Medium = Medium,
addPowerToMedium=false,
m_flow_nominal=m_flow_nominal,
T_start=T_start,
m_flow(start=m_flow_nominal),
dp(start=dp_nominal),
dp_nominal=dp_nominal,
p_start=p_start,
riseTime=120,
nominalValuesDefineDefaultPressureCurve=true)
"Mass-flow-controlled mover setting mass flow rate from table"
annotation (Placement(transformation(extent=
{{-10,10},{10,-10}})));
Modelica.Blocks.Math.Gain transforMassFlow(k=1.2/3600*noUnits, y(unit="kg/s"))
"Used to transform the volume flow rate in m3/h into a mass flow rate in kg/s"
annotation (Placement(transformation(
extent={{-6,-6},{6,6}},
rotation=90,
origin={0,-28})));
equation

connect(port_a, fan.port_a)
annotation (Line(points={{-100,0},{-56,0},{-10,0}}, color={0,127,255}));
connect(fan.port_b, port_b)
annotation (Line(points={{10,0},{56,0},{100,0}}, color={0,127,255}));
connect(powerShare, volumeFlow.u[1]) annotation (Line(points={{0,-100},{0,-80},
{-6.66134e-016,-80},{-6.66134e-016,-68}}, color={0,0,127}));
connect(transforMassFlow.u, volumeFlow.y[1]) annotation (Line(points={{-4.44089e-016,
-35.2},{-4.44089e-016,-46},{8.88178e-016,-46},{8.88178e-016,-45}},
color={0,0,127}));
connect(transforMassFlow.y, fan.m_flow_in) annotation (Line(points={{
4.44089e-016,-21.4},{4.44089e-016,-24},{0,-24},{0,-12}}, color={0,0,
127}));
annotation (
choicesAllMatching=true,
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
100,100}})),
Icon(graphics={
Ellipse(
extent={{-4,68},{4,0}},
lineColor={0,0,0},
fillColor={135,135,135},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{-4,0},{4,-68}},
lineColor={0,0,0},
fillColor={135,135,135},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{0,4},{30,-4}},
lineColor={0,0,0},
fillColor={135,135,135},
fillPattern=FillPattern.Solid),
Ellipse(
extent={{-30,4},{0,-4}},
lineColor={0,0,0},
fillColor={135,135,135},
fillPattern=FillPattern.Solid),
Ellipse(extent={{-30,68},{30,-68}}, lineColor={0,0,0}),
Line(
points={{8,48},{58,48}},
color={170,213,255},
arrow={Arrow.None,Arrow.Filled}),
Line(
points={{0,0},{82,0}},
color={170,213,255},
arrow={Arrow.None,Arrow.Filled}),
Line(
points={{2,24},{72,24}},
color={170,213,255},
arrow={Arrow.None,Arrow.Filled}),
Line(
points={{2,-24},{72,-24}},
color={170,213,255},
arrow={Arrow.None,Arrow.Filled}),
Line(
points={{8,-48},{58,-48}},
color={170,213,255},
arrow={Arrow.None,Arrow.Filled})}),
Documentation(info="<html>
<p>This model sets the mass flow rate of the air flow through a facade
ventilation unit based on the input value, which is the power share set
point of the fan.</p>
</html>", revisions="<html>
<ul>
<li>
July, 2017 by Marc Baranski and Roozbeh Sangi:<br/>
First implementation.
</li>
</ul>
</html>"));
end SetPower;
4 changes: 4 additions & 0 deletions AixLib/Airflow/FacadeVentilationUnit/BaseClasses/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
within AixLib.Airflow.FacadeVentilationUnit;
package BaseClasses
extends Modelica.Icons.BasesPackage;
end BaseClasses;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SetPower
54 changes: 54 additions & 0 deletions AixLib/Airflow/FacadeVentilationUnit/DataBase/FVUBaseRecord.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
within AixLib.Airflow.FacadeVentilationUnit.DataBase;
record FVUBaseRecord
"Base record for the facade ventilation unit model"
extends Modelica.Icons.Record;

parameter Integer noUnits=1 "Number of identical FVUs";
parameter Modelica.SIunits.ThermalConductance UA_heater=120
"Thermal conductance of heater at nominal flow, used to compute heat
capacity";
parameter Modelica.SIunits.ThermalConductance UA_cooler=65
"Thermal conductance of cooler at nominal flow, used to compute heat
capacity";
parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_heater=0.1
"Nominal mass flow rate on water side of heater";
parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_heater=0.1
"Nominal mass flow rate on air side of heater";
parameter Modelica.SIunits.MassFlowRate m1_flow_nominal_cooler=0.1
"Nominal mass flow rate on water side of cooler";
parameter Modelica.SIunits.MassFlowRate m2_flow_nominal_cooler=0.05
"Nominal mass flow rate on air side of cooler";
parameter Modelica.SIunits.MassFlowRate m_flow_nominal_damper=0.1
"Nominal mass flow rate of damper";
parameter Modelica.SIunits.Pressure dp1_nominal_heater=1000
"Nominal pressure loss on water side of heater";
parameter Modelica.SIunits.Pressure dp2_nominal_heater=100
"Nominal pressure loss on air side of heater";
parameter Modelica.SIunits.Pressure dp1_nominal_cooler=1000
"Nominal pressure loss on water side of cooler";
parameter Modelica.SIunits.Pressure dp2_nominal_cooler=100
"Nominal pressure loss on air side of cooler";
parameter Modelica.SIunits.Pressure p_default=101300
"Default static pressure at outlet";
parameter Modelica.SIunits.Pressure dp_nominal_damper=500
"Nominal pressure loss in dampers";
parameter Modelica.SIunits.Time damperRiseTimeLong = 90 "Rising time of the
slowly moving dampers";
parameter Modelica.SIunits.Time damperRiseTimeShort = 20 "Rising time of the
slowly moving dampers";

annotation (Documentation(info="<html>
<p><b><span style=\"color: #008000;\">Overview</span></b> </p>
<p>This is the base definition of the paramter record that can be used for the
<a href=\"AixLib.Airflow.FacadeVentilationUnit.FacadeVentilationUnit\">
AixLib.Airflow.FacadeVentilationUnit.FacadeVentilationUnit</a>.</p>
</html>", revisions="<html>
<ul>
<li>
July, 2017 by Marc Baranski and Roozbeh Sangi:<br/>
First implementation.
</li>
</ul>
</html>"));

end FVUBaseRecord;
16 changes: 16 additions & 0 deletions AixLib/Airflow/FacadeVentilationUnit/DataBase/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within AixLib.Airflow.FacadeVentilationUnit;
package DataBase "Contains parameter records of the facade ventilation unit"
extends Modelica.Icons.Package;

annotation (Icon(graphics={
Rectangle(
lineColor={128,128,128},
extent={{-100,-100},{100,100}},
radius=25.0),
Rectangle(extent={{-68,68},{-8,26}}, lineColor={0,0,0}),
Rectangle(extent={{-68,26},{-8,-20}}, lineColor={0,0,0}),
Rectangle(extent={{-68,-20},{-8,-62}}, lineColor={0,0,0}),
Rectangle(extent={{-6,68},{52,26}}, lineColor={0,0,0}),
Rectangle(extent={{-6,26},{52,-20}}, lineColor={0,0,0}),
Rectangle(extent={{-6,-20},{52,-62}}, lineColor={0,0,0})}));
end DataBase;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FVUBaseRecord
Loading

0 comments on commit a6dcc19

Please sign in to comment.