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

Issue293 test case frp #679

Open
wants to merge 18 commits into
base: issue293_TestCaseFRP
Choose a base branch
from
Open
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

Large diffs are not rendered by default.

1,820 changes: 1,820 additions & 0 deletions testcases/testcaseFRP/models/FRP/Envelope/FRPMultiZone_Envelope_Icon_v2.mo

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testcases/testcaseFRP/models/FRP/Envelope/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FRPMultiZone_Envelope_Icon
FRPMultiZone_Envelope_Icon_v1
FRPMultiZone_Envelope_Icon_v2
247 changes: 126 additions & 121 deletions testcases/testcaseFRP/models/FRP/Example/RTU_VAV_Control_Example_FRP.mo

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,109 changes: 1,109 additions & 0 deletions testcases/testcaseFRP/models/FRP/Example/RTU_VAV_Control_Example_FRP_v3.mo

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions testcases/testcaseFRP/models/FRP/Example/package.order
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
RTU_VAV_Control_Example_FRP
RTU_VAV_Control_Example_FRP_v2
RTU_VAV_Control_Example_FRP_new_performance_map
RTU_VAV_Control_Example_FRP_v3
24 changes: 11 additions & 13 deletions testcases/testcaseFRP/models/FRP/RTUVAV/Component/SupplyTempCon.mo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
within FRP.RTUVAV.Component;
model SupplyTempCon "Supply Ari Temperature Control"
model supplyTempCon "Supply Air Temperature Control"
Buildings.Controls.Continuous.LimPID conDX(
yMax=1,
Td=60,
k=0.3,
k=0.1,
Ti=120,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
yMin=0.1,
Expand All @@ -13,16 +13,14 @@ model SupplyTempCon "Supply Ari Temperature Control"
annotation (Placement(transformation(extent={{50,-30},{80,0}})));
Buildings.Utilities.IO.SignalExchange.Overwrite
oveTSup(description=
"Supply air temperature setpoint", u(
min=285.15,
max=313.15,
unit="K")) "Overwrite for supply air temperature signal"
"Supply air temperature setpoint", u(unit="K"))
"Overwrite for supply air temperature signal"
annotation (Placement(transformation(extent={{-76,-34},{-38,4}})));
Modelica.Blocks.Sources.RealExpression SupAirTemSP(y=273.15 + 12.78)
"Supply air temperature setpoint [K]"
annotation (Placement(transformation(extent={{-188,-50},{-118,20}})));
Modelica.Blocks.Interfaces.RealOutput y1
"Connector of actuator output signal"
Modelica.Blocks.Interfaces.RealOutput TSupSet_out
"Connector of actuator output signal"
annotation (Placement(transformation(extent={{160,-26},{180,-6}})));
Modelica.Blocks.Interfaces.RealInput u_m1
"Connector of measurement input signal" annotation (Placement(
Expand All @@ -33,8 +31,8 @@ model SupplyTempCon "Supply Ari Temperature Control"
equation
connect(SupAirTemSP.y, oveTSup.u)
annotation (Line(points={{-114.5,-15},{-79.8,-15}}, color={0,0,127}));
connect(conDX.y, y1) annotation (Line(points={{81.5,-15},{170,-15},{170,-16}},
color={0,0,127}));
connect(conDX.y, TSupSet_out) annotation (Line(points={{81.5,-15},{170,-15},{
170,-16}}, color={0,0,127}));
connect(conDX.u_m, u_m1)
annotation (Line(points={{65,-33},{65,-88},{66,-88}}, color={0,0,127}));
connect(oveTSup.y, conDX.u_s)
Expand All @@ -43,13 +41,13 @@ equation
-80},{160,60}}), graphics={Rectangle(
extent={{-200,60},{160,-78}},
lineColor={28,108,200},
fillColor={60,26,86},
fillColor={0,140,72},
fillPattern=FillPattern.Solid), Text(
extent={{-94,26},{46,-42}},
extent={{-112,36},{62,-46}},
lineColor={255,255,255},
fillColor={102,44,145},
fillPattern=FillPattern.None,
textString="TSup",
textStyle={TextStyle.Bold})}), Diagram(coordinateSystem(
preserveAspectRatio=false, extent={{-200,-80},{160,60}})));
end SupplyTempCon;
end supplyTempCon;
39 changes: 17 additions & 22 deletions testcases/testcaseFRP/models/FRP/RTUVAV/Component/Thermostat_T.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within FRP.RTUVAV.Component;
model Thermostat_T
model thermostat_T
parameter Modelica.SIunits.Temperature SP_TCSP=273.15+24; // zone cooling setpoint 72F
parameter Modelica.SIunits.Temperature SP_TCSP_setback=273.15+24; // zone cooling setpoint setback 75F
parameter Modelica.SIunits.Temperature SP_THSP=273.15+20; // zone heating setpoint 68F
Expand All @@ -17,41 +17,36 @@ model Thermostat_T
"Zone heating setpoint temperature [K]"
annotation (Placement(transformation(extent={{-144,12},{-110,46}})));
Buildings.Utilities.IO.SignalExchange.Overwrite
oveTSetCoo(u(
unit="K",
min=273.15 + 23,
max=273.15 + 30), description="Zone temperature setpoint for cooling")
oveTSetCoo(u(unit="K"),
description="Zone temperature setpoint for cooling")
"Overwrite for zone cooling setpoint"
annotation (Placement(transformation(extent={{-80,-30},{-60,-10}})));
annotation (Placement(transformation(extent={{-80,-28},{-60,-8}})));
Buildings.Utilities.IO.SignalExchange.Overwrite
oveTSetHea(description="Zone temperature setpoint for heating",
u(
max=273.15 + 23,
unit="K",
min=273.15 + 15)) "Overwrite for zone heating setpoint"
annotation (Placement(transformation(extent={{-80,30},{-60,50}})));
Modelica.Blocks.Interfaces.RealOutput CoolingSet
oveTSetHea(description="Zone temperature setpoint for heating", u(unit=
"K")) "Overwrite for zone heating setpoint"
annotation (Placement(transformation(extent={{-82,30},{-62,50}})));
Modelica.Blocks.Interfaces.RealOutput TZonCoolingSet_out
"Connector of Real output signal"
annotation (Placement(transformation(extent={{100,-30},{120,-10}})));
Modelica.Blocks.Interfaces.RealOutput HeatingSet
Modelica.Blocks.Interfaces.RealOutput TZonHeatingSet_out
"Connector of Real output signal"
annotation (Placement(transformation(extent={{100,30},{120,50}})));
equation
connect(HeatingSP.y[1], oveTSetHea.u) annotation (Line(points={{-106.6,29},{
-92,29},{-92,40},{-82,40}},
-92,29},{-92,40},{-84,40}},
color={0,0,127}));
connect(CoolingSP.y[1], oveTSetCoo.u) annotation (Line(points={{-106.6,-17},{
-92,-17},{-92,-20},{-82,-20}},
-92,-17},{-92,-18},{-82,-18}},
color={0,0,127}));
connect(oveTSetHea.y, HeatingSet)
annotation (Line(points={{-59,40},{110,40}}, color={0,0,127}));
connect(oveTSetCoo.y, CoolingSet)
annotation (Line(points={{-59,-20},{110,-20}}, color={0,0,127}));
connect(oveTSetHea.y, TZonHeatingSet_out)
annotation (Line(points={{-61,40},{110,40}}, color={0,0,127}));
connect(oveTSetCoo.y, TZonCoolingSet_out) annotation (Line(points={{-59,-18},
{26,-18},{26,-20},{110,-20}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-160,-100},
{100,100}}), graphics={Rectangle(
extent={{-100,58},{100,-66}},
lineColor={28,108,200},
fillColor={93,93,139},
fillColor={0,140,72},
fillPattern=FillPattern.Solid), Text(
extent={{-78,22},{76,-32}},
lineColor={255,255,255},
Expand All @@ -60,4 +55,4 @@ equation
textString="Thermostat",
textStyle={TextStyle.Bold})}), Diagram(coordinateSystem(
preserveAspectRatio=false, extent={{-160,-100},{100,100}})));
end Thermostat_T;
end thermostat_T;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model VAVReHeat_withCtrl_TRooCon
redeclare package Medium =Medium,
m_flow_nominal=m_flow_nominal,
dpDamper_nominal=dp_nominal)
annotation (Placement(transformation(extent={{28,-34},{84,44}})));
annotation (Placement(transformation(extent={{44,-36},{100,42}})));
Buildings.Fluid.HeatExchangers.HeaterCooler_u
ReHeat(
redeclare package Medium =Medium,
Expand All @@ -22,7 +22,8 @@ model VAVReHeat_withCtrl_TRooCon
Modelica.Fluid.Interfaces.FluidPort_b port_b(redeclare package Medium =
Medium)
"Fluid connector b (positive design flow direction is from port_a to port_b)"
annotation (Placement(transformation(extent={{90,-6},{110,14}})));
annotation (Placement(transformation(extent={{208,-10},{228,12}}),
iconTransformation(extent={{208,-10},{228,12}})));
Modelica.Fluid.Interfaces.FluidPort_a port_a(redeclare package Medium =
Medium)
"Fluid connector a (positive design flow direction is from port_a to port_b)"
Expand All @@ -32,14 +33,14 @@ model VAVReHeat_withCtrl_TRooCon
transformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-176,110}), iconTransformation(
origin={-172,124}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-120,120})));
Modelica.Blocks.Interfaces.RealInput TRoo "room air temperature"
annotation (Placement(transformation(extent={{-20,-20},{20,20}},
rotation=-90,
origin={-68,114}), iconTransformation(
origin={-68,124}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-30,120})));
Expand All @@ -48,7 +49,7 @@ model VAVReHeat_withCtrl_TRooCon
transformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={-32,112}), iconTransformation(
origin={-30,124}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=-90,
origin={40,120})));
Expand All @@ -58,11 +59,11 @@ model VAVReHeat_withCtrl_TRooCon
k=0.1,
Ti=120,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
yMin=0.25,
yMin=0.5,
initType=Modelica.Blocks.Types.InitPID.NoInit,
reverseActing=false)
"Controller for cooling (acts on damper)"
annotation (Placement(transformation(extent={{30,58},{46,74}})));
annotation (Placement(transformation(extent={{4,72},{20,88}})));
Buildings.Controls.Continuous.LimPID conHea(
yMax=1,
initType=Modelica.Blocks.Types.InitPID.NoInit,
Expand All @@ -73,47 +74,104 @@ model VAVReHeat_withCtrl_TRooCon
Ti=240,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI)
"Controller for heating"
annotation (Placement(transformation(extent={{-112,62},{-96,78}})));
Buildings.Fluid.Sensors.TemperatureTwoPort ReheatT(redeclare package Medium =
Medium, m_flow_nominal=m_flow_nominal) "Temperature after Reheat"
annotation (Placement(transformation(extent={{-6,-10},{14,20}})));
annotation (Placement(transformation(extent={{-138,72},{-122,88}})));
Buildings.Utilities.IO.SignalExchange.Overwrite yDam(description="Damper position setpoint for zone",
u(
unit="1",
min=0,
max=1)) "Damper position setpoint"
annotation (Placement(transformation(extent={{38,70},{58,90}})));
Buildings.Utilities.IO.SignalExchange.Overwrite yReaHea(description="Reheat control signal for zone",
u(
unit="1",
min=0,
max=1)) "Reheat control signal"
annotation (Placement(transformation(extent={{-106,72},{-90,88}})));
Buildings.Fluid.Sensors.TemperatureTwoPort senTemp(redeclare package Medium =
Medium, m_flow_nominal=m_flow_nominal) "supply air tempearature - VAV"
annotation (Placement(transformation(extent={{136,18},{156,-12}})));
Buildings.Fluid.Sensors.VolumeFlowRate
senVolFlo(
redeclare package Medium = Medium,
initType=Modelica.Blocks.Types.Init.InitialState,
m_flow_nominal=m_flow_nominal,
allowFlowReversal=false)
"Supply Air Volumetric Flow Rate Sensor"
annotation (Placement(
transformation(
extent={{-13,13},{13,-13}},
rotation=0,
origin={181,3})));
Modelica.Blocks.Interfaces.RealOutput V_flow1
"Volume flow rate from port_a to port_b" annotation (Placement(
transformation(
extent={{-12,-12},{12,12}},
rotation=-90,
origin={180,-108})));
Modelica.Blocks.Interfaces.RealOutput T1
"Temperature of the passing fluid" annotation (Placement(transformation(
extent={{-13,-13},{13,13}},
rotation=-90,
origin={147,-109}), iconTransformation(
extent={{-13,-13},{13,13}},
rotation=-90,
origin={150,-108})));
Modelica.Blocks.Interfaces.RealOutput y_damper_actual
"Actual actuator position" annotation (Placement(transformation(
extent={{-12,-12},{12,12}},
rotation=-90,
origin={116,-108})));
equation
connect(vavDam.port_b, port_b) annotation (Line(points={{84,5},{84,4},{100,4}},
color={0,127,255}));
connect(ReHeat.port_a, port_a)
annotation (Line(points={{-68,4},{-178,4}}, color={0,127,255}));
connect(TRoo, conCoo.u_m) annotation (Line(points={{-68,114},{-68,48},{38,48},
{38,56.4}},
connect(TRoo, conCoo.u_m) annotation (Line(points={{-68,124},{-68,56},{12,56},
{12,70.4}},
color={0,0,127}));
connect(TRoo, conHea.u_m) annotation (Line(points={{-68,114},{-68,48},{-104,
48},{-104,60.4}}, color={0,0,127}));
connect(conHea.y, ReHeat.u) annotation (Line(points={{-95.2,70},{-90,70},{-90,
22},{-73,22}},
color={0,0,127}));
connect(conCoo.y, vavDam.y)
annotation (Line(points={{46.8,66},{56,66},{56,51.8}},
color={0,0,127}));
connect(ReHeat.port_b, ReheatT.port_a) annotation (Line(points={{-18,4},{-12,4},
{-12,5},{-6,5}}, color={0,127,255}));
connect(ReheatT.port_b, vavDam.port_a)
annotation (Line(points={{14,5},{28,5}}, color={0,127,255}));
connect(TRooHeaSet, conHea.u_s) annotation (Line(points={{-176,110},{-176,70},
{-113.6,70}}, color={0,0,127}));
connect(TRooCooSet, conCoo.u_s) annotation (Line(points={{-32,112},{-30,112},
{-30,66},{28.4,66}}, color={0,0,127}));
connect(TRoo, conHea.u_m) annotation (Line(points={{-68,124},{-68,56},{-130,
56},{-130,70.4}}, color={0,0,127}));
connect(TRooHeaSet, conHea.u_s) annotation (Line(points={{-172,124},{-172,80},
{-139.6,80}}, color={0,0,127}));
connect(TRooCooSet, conCoo.u_s) annotation (Line(points={{-30,124},{-30,80},{2.4,
80}}, color={0,0,127}));
connect(conCoo.y, yDam.u)
annotation (Line(points={{20.8,80},{36,80}}, color={0,0,127}));
connect(yDam.y, vavDam.y)
annotation (Line(points={{59,80},{72,80},{72,49.8}}, color={0,0,127}));
connect(conHea.y, yReaHea.u) annotation (Line(points={{-121.2,80},{-116,80},{-116,
80},{-107.6,80}}, color={0,0,127}));
connect(yReaHea.y, ReHeat.u) annotation (Line(points={{-89.2,80},{-86,80},{-86,
20},{-73,20},{-73,22}}, color={0,0,127}));
connect(ReHeat.port_b, vavDam.port_a) annotation (Line(points={{-18,4},{0,4},
{0,3},{44,3}}, color={0,127,255}));
connect(vavDam.port_b, senTemp.port_a) annotation (Line(points={{100,3},{136,
3}}, color={0,127,255}));
connect(senTemp.port_b, senVolFlo.port_a)
annotation (Line(points={{156,3},{168,3}}, color={0,127,255}));
connect(senVolFlo.port_b, port_b)
annotation (Line(points={{194,3},{194,1},{218,1}}, color={0,127,255}));
connect(senVolFlo.V_flow, V_flow1) annotation (Line(points={{181,-11.3},{181,
-108},{180,-108}}, color={0,0,127}));
connect(senTemp.T, T1) annotation (Line(points={{146,-13.5},{147,-13.5},{147,
-109}}, color={0,0,127}));
connect(vavDam.y_actual, y_damper_actual) annotation (Line(points={{86,30.3},
{116,30.3},{116,-108}}, color={0,0,127}));
connect(T1, T1)
annotation (Line(points={{147,-109},{147,-109}}, color={0,0,127}));
connect(port_b, port_b)
annotation (Line(points={{218,1},{218,1}}, color={0,127,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-180,
-100},{100,100}}), graphics={
-100},{220,120}}), graphics={
Rectangle(
extent={{-170,100},{88,-64}},
extent={{-178,120},{222,-100}},
lineColor={0,0,0},
fillColor={185,185,185},
fillColor={0,140,72},
fillPattern=FillPattern.Solid), Text(
extent={{-136,68},{58,-46}},
lineColor={0,0,0},
fillColor={75,156,217},
extent={{-140,86},{180,-74}},
lineColor={255,255,255},
fillColor={0,140,72},
fillPattern=FillPattern.Solid,
textString="VAVReHeat",
textStyle={TextStyle.Bold})}), Diagram(
coordinateSystem(preserveAspectRatio=false, extent={{-180,-100},{100,
100}})));
textStyle={TextStyle.Bold},
textString="VAVReHeat")}), Diagram(
coordinateSystem(preserveAspectRatio=false, extent={{-180,-100},{220,
120}})));
end VAVReHeat_withCtrl_TRooCon;
32 changes: 32 additions & 0 deletions testcases/testcaseFRP/models/FRP/RTUVAV/Component/outdoorAirCon.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
within FRP.RTUVAV.Component;
model outdoorAirCon "Outdoor air control"
Modelica.Blocks.Sources.RealExpression oA_DamSet(y=0)
annotation (Placement(transformation(extent={{-196,-38},{-120,24}})));
Buildings.Utilities.IO.SignalExchange.Overwrite oveOADam(description=
"OA Damper position", u(
unit="1",
min=0,
max=1)) "OA damper position setpoint"
annotation (Placement(transformation(extent={{-62,-18},{-40,4}})));
Modelica.Blocks.Interfaces.RealOutput oAactuator
"Connector of Real output signal"
annotation (Placement(transformation(extent={{156,-18},{178,4}})));
equation
connect(oA_DamSet.y, oveOADam.u)
annotation (Line(points={{-116.2,-7},{-64.2,-7}}, color={0,0,127}));
connect(oveOADam.y, oAactuator)
annotation (Line(points={{-38.9,-7},{167,-7}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,
-80},{160,60}}), graphics={Rectangle(
extent={{-200,60},{160,-78}},
lineColor={28,108,200},
fillColor={0,140,72},
fillPattern=FillPattern.Solid), Text(
extent={{-154,56},{122,-68}},
lineColor={255,255,255},
fillColor={102,44,145},
fillPattern=FillPattern.None,
textStyle={TextStyle.Bold},
textString="OADamCon")}), Diagram(coordinateSystem(
preserveAspectRatio=false, extent={{-200,-80},{160,60}})));
end outdoorAirCon;
10 changes: 8 additions & 2 deletions testcases/testcaseFRP/models/FRP/RTUVAV/Component/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
VAVReHeat_withCtrl_TRooCon
Thermostat_T
SupplyTempCon
thermostat_T
supplyTempCon
staticPressureCon
outdoorAirCon
thermostat_T_1stfloor
thermostat_T_2ndtfloor
readZone
readAHU
Loading