Skip to content

Commit

Permalink
Add case study resource files
Browse files Browse the repository at this point in the history
  • Loading branch information
terrancelu92 committed Jul 31, 2023
1 parent d0409f2 commit fbda598
Show file tree
Hide file tree
Showing 41 changed files with 168,248 additions and 231,674 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ model whoBui96 "EnergyPlus FMU for Model Exchange"
annotation (Dialog( group="Start values for inputs "));

inner Buildings.ThermalZones.EnergyPlus_9_6_0.Building building(
idfName=Modelica.Utilities.Files.loadResource("modelica://MultizoneOfficeComplexAir/Resources/idf/wholebuilding96_nogroheatra.idf"),
idfName=Modelica.Utilities.Files.loadResource(
"modelica://MultizoneOfficeComplexAir/Resources/idf/wholebuilding96_spawn.idf"),
epwName=Modelica.Utilities.Files.loadResource("modelica://MultizoneOfficeComplexAir/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"),
weaName=Modelica.Utilities.Files.loadResource("modelica://MultizoneOfficeComplexAir/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"),
computeWetBulbTemperature=true,
Expand Down Expand Up @@ -99,7 +100,7 @@ model whoBui96 "EnergyPlus FMU for Model Exchange"
each usePrecompiledFMU=false,
each logLevel=building.logLevel,
each final nFluPor=2) "Adapter to EnergyPlus"
annotation (Placement(transformation(extent={{20,20},{40,40}})));
annotation (Placement(transformation(extent={{20,22},{40,42}})));

Modelica.Blocks.Interfaces.RealInput Temp1(start=_Temp1_start) "IDF line 6256"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Expand Down Expand Up @@ -322,20 +323,21 @@ equation
{-10,30},{-10,-9},{18,-9}}, color={0,0,127}));
connect(fmuZonMidFlr.QGaiRad_flow, QGaiRad_flow.y) annotation (Line(points={{18,
-18},{-4,-18},{-4,-36},{-67,-36}}, color={0,0,127}));
connect(X_w.y, fmuZonBotFlr.X_w) annotation (Line(points={{-67,54},{-14,54},{-14,
34},{18,34}}, color={0,0,127}));
connect(fmuZonBotFlr.m_flow[1], mIn_flow.y) annotation (Line(points={{18,29},{
-8,29},{-8,10},{-67,10}}, color={0,0,127}));
connect(X_w.y, fmuZonBotFlr.X_w) annotation (Line(points={{-67,54},{-14,54},{
-14,36},{18,36}},
color={0,0,127}));
connect(fmuZonBotFlr.m_flow[1], mIn_flow.y) annotation (Line(points={{18,31},
{-8,31},{-8,10},{-67,10}}, color={0,0,127}));
connect(mOut_flow.y, fmuZonBotFlr.m_flow[2]) annotation (Line(points={{-29,30},
{-10,30},{-10,31},{18,31}}, color={0,0,127}));
connect(fmuZonBotFlr.QGaiRad_flow, QGaiRad_flow.y) annotation (Line(points={{18,22},
{-4,22},{-4,-36},{-67,-36}}, color={0,0,127}));
{-10,30},{-10,33},{18,33}}, color={0,0,127}));
connect(fmuZonBotFlr.QGaiRad_flow, QGaiRad_flow.y) annotation (Line(points={{18,24},
{-4,24},{-4,-36},{-67,-36}}, color={0,0,127}));
for numZon in 1:5 loop
connect(TIn.y, fmuZonTopFlr[numZon].TInlet) annotation (Line(points={{-67,-14},
{-6,-14},{-6,-52},{18,-52}},color={0,0,127}));
connect(TIn.y, fmuZonMidFlr[numZon].TInlet) annotation (Line(points={{-67,-14},{18,-14}}, color={0,0,127}));
connect(TIn.y, fmuZonBotFlr[numZon].TInlet) annotation (Line(points={{-67,-14},
{-6,-14},{-6,26},{18,26}},
{-6,-14},{-6,28},{18,28}},
color={0,0,127}));
connect(neg[numZon].u, fmuZonMidFlr[numZon].QCon_flow)
annotation (Line(points={{58,-30},{50,-30},{50,-8},{41,-8}},
Expand All @@ -344,7 +346,7 @@ equation
annotation (Line(points={{58,-30},{50,-30},{50,-46},{41,-46}},
color={0,0,127}));
connect(neg[10+numZon].u, fmuZonBotFlr[numZon].QCon_flow)
annotation (Line(points={{58,-30},{50,-30},{50,32},{41,32}},
annotation (Line(points={{58,-30},{50,-30},{50,34},{41,34}},
color={0,0,127}));
end for;

Expand All @@ -363,7 +365,7 @@ equation
connect(Temp4_top, fmuZonTopFlr[4].T);
connect(Temp5_top, fmuZonTopFlr[5].T);
connect(Temp1_bot, fmuZonBotFlr[1].T)
annotation (Line(points={{-120,0},{-16,0},{-16,38},{18,38}},
annotation (Line(points={{-120,0},{-16,0},{-16,40},{18,40}},
color={0,0,127}));
connect(Temp2_bot, fmuZonBotFlr[2].T);
connect(Temp3_bot, fmuZonBotFlr[3].T);
Expand All @@ -385,7 +387,7 @@ equation
connect(Zone4_top_Sensible_COOLING_LOAD, fmuZonTopFlr[4].QCon_flow);
connect(Zone5_top_Sensible_COOLING_LOAD, fmuZonTopFlr[5].QCon_flow);
connect(Zone1_bot_Sensible_COOLING_LOAD, fmuZonBotFlr[1].QCon_flow)
annotation (Line(points={{120,0},{50,0},{50,32},{41,32}},
annotation (Line(points={{120,0},{50,0},{50,34},{41,34}},
color={0,0,127}));
connect(Zone2_bot_Sensible_COOLING_LOAD, fmuZonBotFlr[2].QCon_flow);
connect(Zone3_bot_Sensible_COOLING_LOAD, fmuZonBotFlr[3].QCon_flow);
Expand All @@ -408,7 +410,7 @@ equation
connect(Zone5_top_Latent_COOLING_LOAD, fmuZonTopFlr[5].QLat_flow);

connect(Zone1_bot_Latent_COOLING_LOAD, fmuZonBotFlr[1].QLat_flow)
annotation (Line(points={{120,0},{96,0},{96,28},{41,28}},
annotation (Line(points={{120,0},{96,0},{96,30},{41,30}},
color={0,0,127}));
connect(Zone2_bot_Latent_COOLING_LOAD, fmuZonBotFlr[2].QLat_flow);
connect(Zone3_bot_Latent_COOLING_LOAD, fmuZonBotFlr[3].QLat_flow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ model LoadWrapper
extent={{-10,-10},{10,10}},
rotation=0,
origin={110,-84})));
Buildings.Utilities.IO.SignalExchange.WeatherStation weatherStation
annotation (Placement(transformation(extent={{-40,40},{-20,60}})));
equation
connect(wholebuilding.Outdoor_Humidity, RelHum)
annotation (Line(
Expand Down Expand Up @@ -134,6 +136,10 @@ equation
connect(add.y, Loa) annotation (Line(
points={{81,-20},{110,-20}},
color={0,0,127}));
connect(weatherStation.weaBus, wholebuilding.weaBus) annotation (Line(
points={{-39.9,49.9},{-52,49.9},{-52,9.8}},
color={255,204,51},
thickness=0.5));
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Rectangle(
extent={{-100,100},{100,-100}},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
within MultizoneOfficeComplexAir.BaseClasses.ReadOverwrite;
model ReadAhu "Collection of AHU measurements for BOPTEST"
Buildings.Utilities.IO.SignalExchange.Read TSup(
description="Supply air temperature measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Supply air temperature measurement"
annotation (Placement(transformation(extent={{0,190},{20,210}})));
Buildings.Utilities.IO.SignalExchange.Read TMix(
description="Mixed air temperature measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Mixed air temperature measurement"
annotation (Placement(transformation(extent={{0,160},{20,180}})));
Buildings.Utilities.IO.SignalExchange.Read TRet(
description="Return air temperature measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Return air temperature measurement"
annotation (Placement(transformation(extent={{0,130},{20,150}})));
Buildings.Utilities.IO.SignalExchange.Read V_flow_sup(
description="Supply air flowrate measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="m3/s")) "Supply air flowrate measurement"
annotation (Placement(transformation(extent={{0,100},{20,120}})));
Buildings.Utilities.IO.SignalExchange.Read V_flow_ret(
description="Return air flowrate measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="m3/s")) "Return air flowrate measurement"
annotation (Placement(transformation(extent={{0,70},{20,90}})));
Modelica.Blocks.Interfaces.RealInput TSup_in
"Supply air temperature measurement"
annotation (Placement(transformation(extent={{-140,180},{-100,220}})));
Modelica.Blocks.Interfaces.RealInput TMix_in
"Mixed air temperature measurement"
annotation (Placement(transformation(extent={{-140,150},{-100,190}})));
Modelica.Blocks.Interfaces.RealInput TRet_in
"Return air temperature measurement"
annotation (Placement(transformation(extent={{-140,120},{-100,160}})));
Modelica.Blocks.Interfaces.RealInput V_flow_sup_in
"Supply air flowrate measurement"
annotation (Placement(transformation(extent={{-140,90},{-100,130}})));
Modelica.Blocks.Interfaces.RealInput V_flow_ret_in
"Return air flowrate measurement"
annotation (Placement(transformation(extent={{-140,60},{-100,100}})));
Modelica.Blocks.Interfaces.RealInput dp_in "Discharge pressure of supply fan"
annotation (Placement(transformation(extent={{-140,0},{-100,40}})));
Buildings.Utilities.IO.SignalExchange.Read dp_sup(
description="Discharge pressure of supply fan for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="Pa")) "Discharge pressure of supply fan"
annotation (Placement(transformation(extent={{0,10},{20,30}})));

Buildings.Utilities.IO.SignalExchange.Read PFanTot(
description=
"Total electrical power measurement of supply and return fans for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.ElectricPower,
y(unit="W")) "Electrical power of supply and return fans"
annotation (Placement(transformation(extent={{0,-20},{20,0}})));

Modelica.Blocks.Interfaces.RealInput PFanTot_in
"Total electrical power of supply and return fans"
annotation (Placement(transformation(extent={{-140,-30},{-100,10}})));

Buildings.Utilities.IO.SignalExchange.Read TCooCoiSup(
description="Cooling coil supply water temperature measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Cooling coil water supply temperature measurement"
annotation (Placement(transformation(extent={{0,-50},{20,-30}})));

Modelica.Blocks.Interfaces.RealInput TCooCoiSup_in
"Cooling coil water supply temperature measurement"
annotation (Placement(transformation(extent={{-140,-60},{-100,-20}})));
Modelica.Blocks.Interfaces.RealInput TCooCoiRet_in
"Cooling coil water return temperature measurement"
annotation (Placement(transformation(extent={{-140,-90},{-100,-50}})));
Buildings.Utilities.IO.SignalExchange.Read TCooCoiRet(
description="Cooling coil return water temperature measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Cooling coil water return temperature measurement"
annotation (Placement(transformation(extent={{0,-80},{20,-60}})));

Buildings.Utilities.IO.SignalExchange.Read yCooVal(
description="AHU cooling coil valve position measurement",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None, y(unit="1"))
"AHU cooling coil valve position measurement"
annotation (Placement(transformation(extent={{0,-110},{20,-90}})));

Modelica.Blocks.Interfaces.RealInput yCooVal_in
"AHU cooling coil valve position measurement"
annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}),
iconTransformation(extent={{-140,-120},{-100,-80}})));
Buildings.Utilities.IO.SignalExchange.Read TSup_set(
description="Supply air temperature setpoint measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Supply air temperature setpoint measurement"
annotation (Placement(transformation(extent={{0,214},{20,234}})));

Modelica.Blocks.Interfaces.RealInput TSup_set_in
"Supply air temperature setpoint"
annotation (Placement(transformation(extent={{-140,204},{-100,244}}),
iconTransformation(extent={{-140,204},{-100,244}})));
Buildings.Utilities.IO.SignalExchange.Read occ(
description="Occupancy status (1 occupied, 0 unoccupied)",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None, y(unit="1")) "Occupancy status (1 occupied, 0 unoccupied)"
annotation (Placement(transformation(extent={{0,244},{20,264}})));
Buildings.Utilities.IO.SignalExchange.Read yOA(
description="AHU cooling coil valve position measurement",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="1")) "AHU OA damper position measurement"
annotation (Placement(transformation(extent={{2,42},{22,62}})));

Modelica.Blocks.Interfaces.RealInput yOA_in
"AHU OA damper position measurement"
annotation (Placement(transformation(extent={{-140,32},{-100,72}}),
iconTransformation(extent={{-140,32},{-100,72}})));
Buildings.Utilities.IO.SignalExchange.Read V_flow_OA(
description="Supply outdoor airflow rate measurement for AHU",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="m3/s")) "Supply outdoor airflow rate measurement"
annotation (Placement(transformation(extent={{0,-140},{20,-120}})));

Modelica.Blocks.Interfaces.RealInput V_flow_OA_in
"Supply outdoor airflow rate measurement"
annotation (Placement(transformation(extent={{-140,-150},{-100,-110}}),
iconTransformation(extent={{-140,-150},{-100,-110}})));
Modelica.Blocks.Math.BooleanToReal booleanToReal
annotation (Placement(transformation(extent={{-50,244},{-30,264}})));
Modelica.Blocks.Interfaces.BooleanInput occ_in "Occupancy status"
annotation (Placement(transformation(extent={{-140,234},{-100,274}})));
equation
connect(TSup.u, TSup_in)
annotation (Line(points={{-2,200},{-120,200}}, color={0,0,127}));
connect(TMix_in, TMix.u)
annotation (Line(points={{-120,170},{-2,170}}, color={0,0,127}));
connect(TRet_in, TRet.u)
annotation (Line(points={{-120,140},{-2,140}}, color={0,0,127}));
connect(V_flow_sup_in, V_flow_sup.u)
annotation (Line(points={{-120,110},{-2,110}},
color={0,0,127}));
connect(V_flow_ret_in, V_flow_ret.u)
annotation (Line(points={{-120,80},{-2,80}}, color={0,0,127}));
connect(dp_sup.u, dp_in)
annotation (Line(points={{-2,20},{-120,20}},
color={0,0,127}));
connect(PFanTot_in,PFanTot. u) annotation (Line(
points={{-120,-10},{-62,-10},{-2,-10}},
color={0,0,127},
smooth=Smooth.Bezier));
connect(TCooCoiRet_in, TCooCoiRet.u)
annotation (Line(points={{-120,-70},{-2,-70}}, color={0,0,127}));
connect(TCooCoiSup_in, TCooCoiSup.u) annotation (Line(points={{-120,-40},{-2,
-40}}, color={0,0,127}));
connect(yCooVal_in, yCooVal.u)
annotation (Line(points={{-120,-100},{-2,-100}}, color={0,0,127}));
connect(TSup_set.u, TSup_set_in)
annotation (Line(points={{-2,224},{-120,224}}, color={0,0,127}));
connect(yOA_in, yOA.u)
annotation (Line(points={{-120,52},{0,52}}, color={0,0,127}));
connect(V_flow_OA_in, V_flow_OA.u)
annotation (Line(points={{-120,-130},{-2,-130}},color={0,0,127}));
connect(booleanToReal.y, occ.u)
annotation (Line(points={{-29,254},{-2,254}}, color={0,0,127}));
connect(booleanToReal.u, occ_in)
annotation (Line(points={{-52,254},{-120,254}}, color={255,0,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-180},{100,280}}), graphics={Rectangle(
extent={{-102,282},{106,-178}},
lineColor={0,0,0},
fillColor={255,170,170},
fillPattern=FillPattern.Solid),
Text(
extent={{-32,74},{34,34}},
lineColor={0,0,0},
textString="Read
AHU"), Text(
extent={{-156,290},{144,330}},
textString="%name",
textColor={0,0,255})}),Diagram(coordinateSystem(preserveAspectRatio=
false, extent={{-100,-160},{100,280}})));
end ReadAhu;
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
within MultizoneOfficeComplexAir.BaseClasses.ReadOverwrite;
model ReadChilledWater
"Collection of Chilled Water System measurements for BOPTEST"

Buildings.Utilities.IO.SignalExchange.Read dp(
description="Differential pressure of chilled/hot water measurement",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Differential pressure of chilled/hot water measurement"
annotation (Placement(transformation(extent={{-10,70},{10,90}})));

Buildings.Utilities.IO.SignalExchange.Read TW(
description="Chilled water temperature measurement",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.None,
y(unit="K")) "Chilled/hot water temperature measurement"
annotation (Placement(transformation(extent={{-10,30},{10,50}})));

Modelica.Blocks.Interfaces.RealInput dp_in
"Differential pressure of chilled/hot water measurement"
annotation (Placement(transformation(extent={{-140,60},{-100,100}})));
Modelica.Blocks.Interfaces.RealInput TW_in "CHW/HW temperature measurement"
annotation (Placement(transformation(extent={{-140,20},{-100,60}})));

Buildings.Utilities.IO.SignalExchange.Read reaPPum(
description="Chilled water plant pump power consumption",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.ElectricPower,
y(unit="W")) "Block for outputting the chilled water plant"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));

Buildings.Utilities.IO.SignalExchange.Read reaPChi(
description="Multiple chiller power consumption",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.ElectricPower,
y(unit="W")) "Block for outputting the multiple chillers"
annotation (Placement(transformation(extent={{-10,-50},{10,-30}})));

Modelica.Blocks.Interfaces.RealInput PPum_in "Water pump power"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealInput PChi_in "Chiller power "
annotation (Placement(transformation(extent={{-140,-60},{-100,-20}})));
Buildings.Utilities.IO.SignalExchange.Read reaPCooTow(
description="Multiple cooling tower power consumption",
KPIs=Buildings.Utilities.IO.SignalExchange.SignalTypes.SignalsForKPIs.ElectricPower,
y(unit="W")) "Block for outputting the multiple cooling towers"
annotation (Placement(transformation(extent={{-10,-80},{10,-60}})));

Modelica.Blocks.Interfaces.RealInput PCooTow_in "Cooling tower power "
annotation (Placement(transformation(extent={{-140,-90},{-100,-50}})));
equation
connect(dp.u, dp_in)
annotation (Line(points={{-12,80},{-120,80}}, color={0,0,127}));
connect(TW_in, TW.u)
annotation (Line(points={{-120,40},{-12,40}}, color={0,0,127}));
connect(reaPPum.u, PPum_in)
annotation (Line(points={{-12,0},{-120,0}}, color={0,0,127}));
connect(reaPChi.u, PChi_in)
annotation (Line(points={{-12,-40},{-120,-40}}, color={0,0,127}));
connect(reaPCooTow.u, PCooTow_in)
annotation (Line(points={{-12,-70},{-120,-70}}, color={0,0,127}));

annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,120}}), graphics={Rectangle(
extent={{-100,120},{102,-102}},
lineColor={0,0,0},
fillColor={255,170,170},
fillPattern=FillPattern.Solid),
Text(
extent={{-32,24},{34,-16}},
lineColor={0,0,0},
textString="Read
Wat"), Text(
extent={{-158,128},{142,168}},
textString="%name",
textColor={0,0,255})}),Diagram(coordinateSystem(preserveAspectRatio=
false, extent={{-100,-100},{100,120}})));
end ReadChilledWater;
Loading

0 comments on commit fbda598

Please sign in to comment.