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

Issue3439 spawn ptac window ac #3452

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
251 changes: 251 additions & 0 deletions Buildings/Fluid/ZoneEquipment/BaseClasses/ControllerInterfaces.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
within Buildings.Fluid.ZoneEquipment.BaseClasses;
partial model ControllerInterfaces
"Baseclass for zone HVAC controller interfaces"

parameter Buildings.Fluid.ZoneEquipment.BaseClasses.Types.FanTypes fanTyp
"Select zonal HVAC fan type"
annotation (Dialog(group="Fan parameters"));

parameter Buildings.Fluid.ZoneEquipment.BaseClasses.Types.HeaSou heaCoiTyp
"Type of heating coil used"
annotation (Dialog(group="System parameters"));

parameter Buildings.Fluid.ZoneEquipment.BaseClasses.Types.CooSou cooCoiTyp
"Type of cooling coil used"
annotation (Dialog(group="System parameters"));

parameter Buildings.Fluid.ZoneEquipment.BaseClasses.Types.SupHeaSou supHeaTyp
"Type of supplemental heating coil used"
annotation(Dialog(group="System parameters"));

parameter Boolean has_fanOpeMod = true
"Does the controller need a fan operating mode signal interface?";

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan
"Fan proven on signal"
annotation (Placement(transformation(extent={{-180,110},{-140,150}}),
iconTransformation(extent={{-140,120},{-100,160}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uAva
"Availability signal"
annotation (Placement(transformation(extent={{-180,-76},{-140,-36}}),
iconTransformation(extent={{-140,-80},{-100,-40}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput fanOpeMod if has_fanOpeMod
"Supply fan operating mode signal"
annotation (Placement(transformation(extent={{-180,-114},{-140,-74}}),
iconTransformation(extent={{-140,-120},{-100,-80}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature")
"Measured zone temperature"
annotation (Placement(transformation(extent={{-180,74},{-140,114}}),
iconTransformation(extent={{-140,80},{-100,120}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature") if has_coo
"Zone cooling temperature setpoint"
annotation (Placement(transformation(extent={{-180,36},{-140,76}}),
iconTransformation(extent={{-140,40},{-100,80}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature") if has_hea
"Zone heating temperature setpoint"
annotation (Placement(transformation(extent={{-180,0},{-140,40}}),
iconTransformation(extent={{-140,0},{-100,40}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature")
"Measured supply temperature"
annotation (Placement(transformation(extent={{-180,-150},{-140,-110}}),
iconTransformation(extent={{-140,-160},{-100,-120}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature") if has_supHea
"Outdoor air dry bulb temperature"
annotation (Placement(transformation(extent={{-180,-40},{-140,0}}),
iconTransformation(extent={{-140,-40},{-100,0}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yCooEna if has_coo
"Cooling enable signal"
annotation (Placement(transformation(extent={{140,100},{180,140}}),
iconTransformation(extent={{100,100},{140,140}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yHeaEna if has_hea
"Heating enable signal"
annotation (Placement(transformation(extent={{140,60},{180,100}}),
iconTransformation(extent={{100,60},{140,100}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan
"Fan enable signal"
annotation (Placement(transformation(extent={{140,-140},{180,-100}}),
iconTransformation(extent={{100,-140},{140,-100}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHea(
final unit="1",
displayUnit="1") if has_hea
"Heating signal"
annotation (Placement(transformation(extent={{140,-60},{180,-20}}),
iconTransformation(extent={{100,-60},{140,-20}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe(
final unit="1",
displayUnit="1") if has_varFan
"Fan speed signal"
annotation (Placement(transformation(extent={{140,-100},{180,-60}}),
iconTransformation(extent={{100,-100},{140,-60}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCoo(
final unit="1",
displayUnit="1") if has_coo
"Cooling signal"
annotation (Placement(transformation(extent={{140,-20},{180,20}}),
iconTransformation(extent={{100,-20},{140,20}})));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput ySupHea(
final min=0,
final max=1,
final unit="1") if has_supHea
"Supplementary heating control signal"
annotation (Placement(transformation(extent={{140,20},{180,60}}),
iconTransformation(extent={{100,20},{140,60}})));

protected
final parameter Boolean has_hea=(heaCoiTyp==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.HeaSou.ele)
or (heaCoiTyp==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.HeaSou.hotWat)
or (heaCoiTyp==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.HeaSou.heaPum)
"Does the zone equipment have heating equipment?"
annotation(Dialog(enable=false, tab="Non-configurable"));

final parameter Boolean has_coo=(cooCoiTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.CooSou.eleDX)
or (cooCoiTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.CooSou.chiWat)
"Does the zone equipment have cooling equipment?"
annotation(Dialog(enable=false, tab="Non-configurable"));

final parameter Boolean has_supHea = (supHeaTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.SupHeaSou.ele)
or (supHeaTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.SupHeaSou.hotWat)
"Does the zone equipment have supplementary heating coil?";

final parameter Boolean has_conFan = (fanTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.FanTypes.conSpeFan)
"Does the zone equipment have constant speed fan?";

final parameter Boolean has_varFan = (fanTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.FanTypes.varSpeFan)
"Does the zone equipment have variable speed fan?";

parameter Boolean has_mulFan = (fanTyp ==Buildings.Fluid.ZoneEquipment.BaseClasses.Types.FanTypes.mulSpeFan)
"Does the zone equipment have multiple speed fan?"
annotation(Evaluate=true);

annotation (defaultComponentName = "fanCoiUni",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-160},{100,
160}}), graphics={
Text(
extent={{-140,200},{140,160}},
textString="%name",
textColor={0,0,255}),
Rectangle(
extent={{-100,160},{100,-160}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(
extent={{-98,148},{-62,132}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="uFan"),
Text(
extent={{-96,108},{-64,92}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="TZon"),
Text(
extent={{-96,72},{-48,48}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="TCooSet"),
Text(
extent={{-96,32},{-48,8}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="THeaSet"),
Text(
extent={{-96,-12},{-64,-28}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="TOut"),
Text(
extent={{-94,-50},{-62,-68}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="uAva"),
Text(
extent={{-94,-90},{-32,-112}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="fanOpeMod"),
Text(
extent={{-94,-132},{-62,-148}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="TSup"),
Text(
extent={{40,130},{94,112}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="yCooEna"),
Text(
extent={{40,90},{94,72}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="yHeaEna"),
Text(
extent={{42,54},{94,24}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="ySupHea"),
Text(
extent={{62,8},{94,-8}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="yCoo"),
Text(
extent={{64,-30},{96,-46}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="yHea"),
Text(
extent={{44,-64},{96,-94}},
textColor={0,0,127},
pattern=LinePattern.Dash,
textString="yFanSpe"),
Text(
extent={{62,-112},{98,-128}},
textColor={255,0,255},
pattern=LinePattern.Dash,
textString="yFan")}),
Diagram(coordinateSystem(preserveAspectRatio=false,
extent={{-140,-140},{140,140}})),
Documentation(info="<html>
<p>
Baseclass containing control signals and measured inputs for constructing the zone HVAC equipment system controllers.
</p>
</html>
", revisions="<html>
<ul>
<li>
June 15, 2023 by Karthik Devaprasad and Junke Wang:<br/>
First implementation.
</li>
</ul>
</html>"));
end ControllerInterfaces;
Loading