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

Issue2886 fan coil model #3124

Open
wants to merge 125 commits into
base: issue2886_fanCoilModel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
9e9ab61
Added files from development branch
karthikeyad-pnnl Jun 1, 2022
f18e0ff
Updated package order files
karthikeyad-pnnl Jun 1, 2022
6e4367b
Updated class names with global paths and latest CDL blocks
karthikeyad-pnnl Jun 1, 2022
727e313
Updated branch with data files from development branch
karthikeyad-pnnl Jun 1, 2022
0bdfe3c
Changed dat file to use git lfs
karthikeyad-pnnl Jun 1, 2022
4aa215c
Updated python script to include additional output variable in dat file
karthikeyad-pnnl Jun 1, 2022
3699260
Updated dat file with new output variable
karthikeyad-pnnl Jun 1, 2022
41fb676
Added validation script for simulating and plotting
karthikeyad-pnnl Jun 1, 2022
e01cbf7
Merge pull request #1 from lbl-srg/master
SenHuang19 Jun 3, 2022
6bb5255
Added additional output variables to idf and csv_to_mos.py
karthikeyad-pnnl Jun 10, 2022
ba36a93
Added additional output variables to FanCoil.dat
karthikeyad-pnnl Jun 10, 2022
3c86a04
Merge branch 'upstream_master' into issue2886_fanCoilModel
karthikeyad-pnnl Jun 13, 2022
4402c76
Added new idf files and updated bash and python scripts to run them a…
karthikeyad-pnnl Jun 14, 2022
71397ea
Added dat file for new idf. Modified python script
karthikeyad-pnnl Jun 14, 2022
52078de
Updated control module name
karthikeyad-pnnl Jun 15, 2022
e97bfb4
Added new class to Data package to introduce new calculations for coo…
karthikeyad-pnnl Jun 15, 2022
3ed0159
Added validation file that uses SPAWN thermal zone
karthikeyad-pnnl Jun 15, 2022
cc890b5
Replaced fan type with model that uses mass flowrate input
karthikeyad-pnnl Jun 15, 2022
6974747
Added calculations for cumulative energy consumption. Replaced sizing…
karthikeyad-pnnl Jun 15, 2022
4691780
Changed simulation time to cooling season
karthikeyad-pnnl Jun 15, 2022
adf0a1a
Added new plotting script to study cooling mode operation
karthikeyad-pnnl Jun 15, 2022
e6943df
Added output variable for sensible cooling rate to data file
karthikeyad-pnnl Jun 23, 2022
0eb4cac
Added new output variable to .dat file
karthikeyad-pnnl Jun 23, 2022
89a6d61
Updated files
karthikeyad-pnnl Jun 24, 2022
8de271b
Added output variable for humidity ratio to python script
karthikeyad-pnnl Jun 25, 2022
a15b56e
Added new output variable to dat file
karthikeyad-pnnl Jun 25, 2022
064f32b
Added new class for cooling coil UA calculations. Changed current mod…
karthikeyad-pnnl Jun 27, 2022
5ef407f
Upadted models to use HHW and CHW sources with mass flowrate input
karthikeyad-pnnl Jun 29, 2022
a375198
Added file for fan curve calculations
karthikeyad-pnnl Jun 29, 2022
489afaa
Added fan curves to fan model. Added fan power plots to .mos scripts
karthikeyad-pnnl Jun 29, 2022
6f2dfa2
Added additional correction factor to UA calculations
karthikeyad-pnnl Jul 1, 2022
7584c2f
Updated package structure and model class names
karthikeyad-pnnl Jul 5, 2022
a03b61f
Merge remote-tracking branch 'Sen_upstream/issue2886_fanCoilModel' in…
karthikeyad-pnnl Jul 5, 2022
a647524
Removed unused sizing calculations
karthikeyad-pnnl Jul 5, 2022
8d79675
Removed unused data resources
karthikeyad-pnnl Jul 5, 2022
7473e8c
Upadetd package order file
karthikeyad-pnnl Jul 5, 2022
78b3cb7
Merge pull request #2 from karthikeyad-pnnl/issue2886_fanCoilModel
SenHuang19 Jul 5, 2022
92a1b16
fix path issues in the example
Jul 5, 2022
15b9a9a
Moved FCU fan performance curve to zone equipment package
karthikeyad-pnnl Jul 5, 2022
d557b25
fixed the warning and errors in the validation example
Jul 7, 2022
0cd2c0c
Updated propagation parameter for fan performance curve
karthikeyad-pnnl Jul 7, 2022
82def11
Merge remote-tracking branch 'Sen_upstream/issue2886_fanCoilModel' in…
karthikeyad-pnnl Jul 7, 2022
d9ab967
Updated parameters for heating mode validation
karthikeyad-pnnl Jul 15, 2022
7a7a21c
Updated fan curve to get energy results closer to EPlus
karthikeyad-pnnl Jul 15, 2022
2679c2a
Added output variables for system node pressure at fan inlet and outlet
karthikeyad-pnnl Jul 16, 2022
af7b3bd
Updated dat file
karthikeyad-pnnl Jul 16, 2022
6cb3501
Added data for fan pressure rise to data table
karthikeyad-pnnl Jul 19, 2022
583b684
Updated package structure and removed redundant files and models
karthikeyad-pnnl Jul 20, 2022
58139e9
Updated package structure. Added control module for constant fan spee…
karthikeyad-pnnl Jul 20, 2022
ebf748a
Added control module for multispeed fan control
karthikeyad-pnnl Jul 21, 2022
17572da
Updated package order files
karthikeyad-pnnl Jul 21, 2022
2cc9c98
Added open loop validation models for both heating and cooling mode o…
karthikeyad-pnnl Jul 21, 2022
fa7b07c
Updated package order
karthikeyad-pnnl Jul 21, 2022
87ca7b6
Updated sizing file with correct value of outlet air temperature
karthikeyad-pnnl Jul 22, 2022
063c90e
Changed model names for control modules
karthikeyad-pnnl Jul 26, 2022
0e2c5cd
Updated correction factor for cooling coil UA
karthikeyad-pnnl Jul 26, 2022
500ddfb
Updated formatting and documentation
karthikeyad-pnnl Aug 4, 2022
4a82f17
Removed redundant parameter setting
karthikeyad-pnnl Aug 4, 2022
82742a1
Updated documentation
karthikeyad-pnnl Aug 8, 2022
d270dd6
Updated cooling mode validation model
karthikeyad-pnnl Aug 9, 2022
2447937
Updated documentation for cooling mode validation model
karthikeyad-pnnl Aug 9, 2022
2eb534e
Updated documentation sections
karthikeyad-pnnl Aug 9, 2022
92b2ecf
Removed redundant instances and plots
karthikeyad-pnnl Aug 9, 2022
32edf6c
Updated documentation and models
karthikeyad-pnnl Aug 11, 2022
c5fe2f9
Updated validation script
karthikeyad-pnnl Aug 11, 2022
8d6a19f
Added svg files
karthikeyad-pnnl Aug 11, 2022
e4d581b
Upadted control modules
karthikeyad-pnnl Aug 12, 2022
565f668
Updated models for multispeed fan controller
karthikeyad-pnnl Aug 13, 2022
a50a2ee
Added documentation to control modules
karthikeyad-pnnl Aug 16, 2022
8561746
Updated validation models and associated documentation
karthikeyad-pnnl Aug 19, 2022
922668b
Updated connection statement
karthikeyad-pnnl Aug 19, 2022
5cab0ab
Updated comments
karthikeyad-pnnl Sep 2, 2022
5812d60
Updated data types for parameters
karthikeyad-pnnl Sep 2, 2022
7009ea2
Updated validation model names
karthikeyad-pnnl Sep 2, 2022
a6fdeac
Renamed control modules
karthikeyad-pnnl Sep 2, 2022
a1bcc38
Updated files based on comments
karthikeyad-pnnl Sep 6, 2022
38efb5c
Updated documentation and formatting
karthikeyad-pnnl Sep 6, 2022
45611e2
Updated validation script and removed unused expression blocks
karthikeyad-pnnl Sep 6, 2022
b95f262
Renamed system model and updated documentation for validation files
karthikeyad-pnnl Sep 6, 2022
41e39bf
Updated class names for validation records
karthikeyad-pnnl Sep 8, 2022
b7319a7
Updated type class
karthikeyad-pnnl Sep 8, 2022
0e817f1
Removed folder that is not part of upstream repo
karthikeyad-pnnl Sep 8, 2022
f773839
Updated validation script
karthikeyad-pnnl Sep 8, 2022
d781f2c
Updated instance names for uniformity
karthikeyad-pnnl Sep 9, 2022
f4321da
Changed calculated parameter to protected
karthikeyad-pnnl Sep 9, 2022
b1c79de
Updated connections and removed unnecessary value
karthikeyad-pnnl Sep 9, 2022
27bd00c
Updated instance name
karthikeyad-pnnl Sep 9, 2022
512b4f0
Merge pull request #3 from karthikeyad-pnnl/issue2886_fanCoilModel
SenHuang19 Sep 9, 2022
ea42113
clean up
Sep 11, 2022
fbc46ce
Merge pull request #35 from SenHuang19/issue2886_fanCoilModel
karthikeyad-pnnl Sep 13, 2022
6517b72
Upadted icon layer for FCU model. Upadted graphical layer for validat…
karthikeyad-pnnl Sep 13, 2022
a8ffab9
Updated medium name for chilled water to MediumCW. Fixed simulation i…
karthikeyad-pnnl Sep 13, 2022
cf3dd8e
Updated documentation. Changed instance names and medium for CHW comp…
karthikeyad-pnnl Sep 14, 2022
81894c4
Updated control logic for variable fan-constant flow controller
karthikeyad-pnnl Sep 19, 2022
ccbbeda
Added output interfaces for measured fan speed and supply temperature
karthikeyad-pnnl Sep 19, 2022
2cd8a6a
Added example package with model demonstrating use-case
karthikeyad-pnnl Sep 19, 2022
5547a3f
Updated documentation and formatting
karthikeyad-pnnl Sep 19, 2022
1f7e3ff
Updated documentation
karthikeyad-pnnl Sep 19, 2022
577b499
Added tolerance value to validation models
karthikeyad-pnnl Sep 19, 2022
53d817d
Fixed validation script
karthikeyad-pnnl Sep 19, 2022
9d0b579
Changed models to fix errors found in unit test
karthikeyad-pnnl Sep 19, 2022
047a398
Fixed parameter definition in sizing data file
karthikeyad-pnnl Sep 19, 2022
b755dba
Fixed parameter setting
karthikeyad-pnnl Sep 19, 2022
c350894
Fixed parameter data type in example package
karthikeyad-pnnl Sep 19, 2022
4d8787c
Added start vlue to outdoor air source medium
karthikeyad-pnnl Sep 19, 2022
5dca36f
Parametrized controls modifications
karthikeyad-pnnl Sep 20, 2022
8f93093
Added unit test results to the repo
karthikeyad-pnnl Sep 20, 2022
6015c41
Merge branch 'issue2886_fanCoilModel' of github.com:karthikeyad-pnnl/…
karthikeyad-pnnl Sep 20, 2022
ad5a479
Removed illegal Modelica modifier
karthikeyad-pnnl Sep 20, 2022
575e74a
Merge pull request #4 from karthikeyad-pnnl/issue2886_fanCoilModel
SenHuang19 Sep 26, 2022
7b8c0ca
Updated all control modules to use an input signal for occupancy
karthikeyad-pnnl Sep 27, 2022
6cf5a35
minor clean up and a bug fix
Sep 28, 2022
6f45446
Merge branch 'issue2886_fanCoilModel' of github.com:SenHuang19/modeli…
karthikeyad-pnnl Sep 29, 2022
02886e1
Merge branch 'SenHuang19-issue2886_fanCoilModel' into issue2886_fanCo…
karthikeyad-pnnl Sep 29, 2022
09d3b97
fix html issue
Sep 29, 2022
98ada73
Updated formatting
karthikeyad-pnnl Sep 29, 2022
9e7779f
minor changes to the model and update the reference dataset
Sep 29, 2022
2db15c8
Updated formatting and added documentation
karthikeyad-pnnl Sep 29, 2022
fbde96a
clean up
Sep 29, 2022
7d346d0
Merge branch 'issue2886_fanCoilModel' of github.com:SenHuang19/modeli…
karthikeyad-pnnl Oct 3, 2022
bef21a0
Merge branch 'SenHuang19-issue2886_fanCoilModel' into issue2886_fanCo…
karthikeyad-pnnl Oct 3, 2022
dfbc265
Added unit test results
karthikeyad-pnnl Oct 3, 2022
0a5b001
Updated formatting
karthikeyad-pnnl Oct 3, 2022
0207625
Merge pull request #5 from karthikeyad-pnnl/issue2886_fanCoilModel
SenHuang19 Oct 11, 2022
5b7e836
update the baseline data; clean up the doc and fix the breaking link
Oct 11, 2022
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Buildings/Resources/src/ThermalZones/EnergyPlus*/FMUs/Zones1.fmu filter=lfs diff
Buildings/Resources/src/ThermalZones/EnergyPlus*/FMUs/Zones3.fmu filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/bin/spawn-*/linux64/bin/spawn* filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/bin/spawn-*/win64/bin/spawn* filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/Data/Fluid/ZoneEquipment/FanCoil.dat filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/Data/Fluid/ZoneEquipment/FanCoilAutoSize_ConstantFlowVariableFan.dat filter=lfs diff=lfs merge=lfs -text
Buildings/Resources/Data/Fluid/ZoneEquipment/fan_curve_calculations.xlsx filter=lfs diff=lfs merge=lfs -text
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
within Buildings.Fluid.ZoneEquipment.FanCoilUnit.Controls;
block ConstantFanVariableWaterFlowrate
"Controller for fan coil system with variable water flow rates and constant fan speed "
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeCoo=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Type of cooling loop controller"
annotation (Dialog(group="Cooling mode control"));
parameter Real kCoo(
final unit="1",
displayUnit="1",
final min=0)=1
"Gain of cooling loop controller"
annotation(Dialog(group="Cooling mode control"));
parameter Modelica.Units.SI.Time TiCoo=0.5
"Time constant of cooling loop integrator block"
annotation(Dialog(group="Cooling mode control",
enable = controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or
controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Modelica.Units.SI.Time TdCoo=0.1
"Time constant of cooling loop derivative block"
annotation(Dialog(group="Cooling mode control",
enable = controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or
controllerTypeCoo == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerTypeHea=Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Type of heating loop controller"
annotation(Dialog(group="Heating mode control"));
parameter Real kHea(
final unit="1",
displayUnit="1",
final min=0)=1
"Gain of heating loop controller"
annotation(Dialog(group="Heating mode control"));
parameter Modelica.Units.SI.Time TiHea=0.5
"Time constant of heating loop integrator block"
annotation(Dialog(group="Heating mode control",
enable = controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PI or
controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Modelica.Units.SI.Time TdHea=0.1
"Time constant of heating loop derivative block"
annotation(Dialog(group="Heating mode control",
enable = controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PD or
controllerTypeHea == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));

parameter Real minFanSpe(
final unit="1",
displayUnit="1",
final min=0,
final max=1) = 0.4
"Minimum allowed fan speed"
annotation(Dialog(group="System parameters"));
parameter Modelica.Units.SI.Time tFanEnaDel = 30
"Time period for delay between switching from deadband mode to heating/cooling mode"
annotation(Dialog(group="System parameters"));
parameter Modelica.Units.SI.Time tFanEna = 300
"Minimum running time of the fan"
annotation(Dialog(group="System parameters"));
parameter Modelica.Units.SI.TemperatureDifference dTHys = 0.2
"Temperature difference used for enabling cooling and heating mode"
annotation(Dialog(tab="Advanced"));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uFan
"Fan proven on signal"
annotation (Placement(transformation(extent={{-160,60},{-120,100}}),
iconTransformation(extent={{-140,60},{-100,100}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc
"Occupancy signal"
annotation (Placement(transformation(extent={{-160,-120},{-120,-80}}),
iconTransformation(extent={{-140,-100},{-100,-60}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature")
"Measured zone temperature"
annotation (Placement(transformation(extent={{-160,-10},{-120,30}}),
iconTransformation(extent={{-140,20},{-100,60}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput TCooSet(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature")
"Zone cooling temperature setpoint"
annotation (Placement(transformation(extent={{-160,-50},{-120,-10}}),
iconTransformation(extent={{-140,-20},{-100,20}})));

Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaSet(
final unit="K",
displayUnit="K",
final quantity="ThermodynamicTemperature")
"Zone heating temperature setpoint"
annotation (Placement(transformation(extent={{-160,-90},{-120,-50}}),
iconTransformation(extent={{-140,-60},{-100,-20}})));

Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yFan
"Fan enable signal"
annotation (Placement(transformation(extent={{140,-100},{180,-60}}),
iconTransformation(extent={{100,-80},{140,-40}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yFanSpe(
final unit="1",
displayUnit="1")
"Fan speed signal"
annotation (Placement(transformation(extent={{140,-50},{180,-10}}),
iconTransformation(extent={{100,-40},{140,0}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCoo(
final unit="1",
displayUnit="1")
"Cooling signal"
annotation (Placement(transformation(extent={{140,40},{180,80}}),
iconTransformation(extent={{100,40},{140,80}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHea(
final unit="1",
displayUnit="1")
"Heating signal"
annotation (Placement(transformation(extent={{140,0},{180,40}}),
iconTransformation(extent={{100,0},{140,40}})));

protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conMinFanSpe(
final k=minFanSpe)
"Minimum fan speed signal"
annotation (Placement(transformation(extent={{60,-20},{80,0}})));

Buildings.Controls.OBC.CDL.Logical.Timer timFan(
final t=tFanEnaDel)
"Time delay for switching on fan"
annotation (Placement(transformation(extent={{30,-110},{50,-90}})));
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea
"Convert fan proven on signal to real value"
annotation (Placement(transformation(extent={{-80,70},{-60,90}})));
Buildings.Controls.OBC.CDL.Continuous.Multiply mulCoo
"Enable cooling coil valve only when fan is proven on"
annotation (Placement(transformation(extent={{60,50},{80,70}})));
Buildings.Controls.OBC.CDL.Continuous.Multiply mulHea
"Enable heating coil valve only when fan is proven on"
annotation (Placement(transformation(extent={{60,10},{80,30}})));

Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysCoo(
final uLow=-dTHys,
final uHigh=0)
"Enable cooling mode when zone temperature is higher than cooling setpoint"
annotation (Placement(transformation(extent={{-40,-30},{-20,-10}})));
Buildings.Controls.OBC.CDL.Continuous.Subtract subCoo
"Find difference between zone temperature and cooling setpoint"
annotation (Placement(transformation(extent={{-80,10},{-60,30}})));
Buildings.Controls.OBC.CDL.Continuous.Subtract subHea
"Find difference between zone temperature and heating setpoint"
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));

Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysHea(
final uLow=-dTHys,
final uHigh=0)
"Enable heating mode when zone temperature is lower than heating setpoint"
annotation (Placement(transformation(extent={{-40,-70},{-20,-50}})));
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToReaFanSpe
"Boolean to Real conversion for fan speed in heating or cooling mode"
annotation (Placement(transformation(extent={{100,-70},{120,-50}})));
Buildings.Controls.OBC.CDL.Logical.Or orHeaCoo
"Enable fan in heating mode and cooling mode"
annotation (Placement(transformation(extent={{-10,-50},{10,-30}})));
Buildings.Controls.OBC.CDL.Continuous.PID conPIDCoo(
final controllerType=controllerTypeCoo,
final k=kCoo,
final Ti=TiCoo,
final Td=TdCoo,
final reverseActing=false) "PI controller for fan speed in cooling mode"
annotation (Placement(transformation(extent={{20,50},{40,70}})));
Buildings.Controls.OBC.CDL.Continuous.PID conPIDHea(
final controllerType=controllerTypeHea,
final k=kHea,
final Ti=TiHea,
final Td=TdHea,
final reverseActing=false) "PI controller for fan speed in heating mode"
annotation (Placement(transformation(extent={{20,10},{40,30}})));

Buildings.Controls.OBC.CDL.Continuous.Sources.Constant conZero(
final k=0)
"Constant zero signal"
annotation (Placement(transformation(extent={{-40,10},{-20,30}})));
Buildings.Controls.OBC.CDL.Logical.Or orHeaCooOcc
"Enable fan when zone is occupied or when setpoints are exceeded"
annotation (Placement(transformation(extent={{60,-90},{80,-70}})));

Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol(
final trueHoldDuration=tFanEna,
final falseHoldDuration=0)
"Keep fan enabled for minimum running time"
annotation (Placement(transformation(extent={{100,-110},{120,-90}})));

Buildings.Controls.OBC.CDL.Continuous.Max max
"Ensure fan speed is always equal to or greater than minimum fan speed"
annotation (Placement(transformation(extent={{100,-40},{120,-20}})));

equation
connect(TZon, subCoo.u1) annotation (Line(points={{-140,10},{-114,10},{-114,26},
{-82,26}}, color={0,0,127}));

connect(TCooSet, subCoo.u2) annotation (Line(points={{-140,-30},{-110,-30},{-110,
14},{-82,14}}, color={0,0,127}));

connect(subCoo.y, hysCoo.u) annotation (Line(points={{-58,20},{-50,20},{-50,-20},
{-42,-20}}, color={0,0,127}));

connect(subHea.y, hysHea.u) annotation (Line(points={{-58,-30},{-54,-30},{-54,
-60},{-42,-60}}, color={0,0,127}));

connect(TZon, subHea.u2) annotation (Line(points={{-140,10},{-114,10},{-114,-36},
{-82,-36}}, color={0,0,127}));

connect(THeaSet, subHea.u1) annotation (Line(points={{-140,-70},{-108,-70},{-108,
-24},{-82,-24}}, color={0,0,127}));

connect(hysCoo.y, orHeaCoo.u1) annotation (Line(points={{-18,-20},{-16,-20},{-16,
-40},{-12,-40}}, color={255,0,255}));

connect(hysHea.y, orHeaCoo.u2) annotation (Line(points={{-18,-60},{-16,-60},{-16,
-48},{-12,-48}}, color={255,0,255}));

connect(subCoo.y, conPIDCoo.u_m) annotation (Line(points={{-58,20},{-50,20},{-50,
40},{30,40},{30,48}}, color={0,0,127}));

connect(subHea.y, conPIDHea.u_m) annotation (Line(points={{-58,-30},{-54,-30},
{-54,0},{30,0},{30,8}}, color={0,0,127}));

connect(conZero.y, conPIDCoo.u_s) annotation (Line(points={{-18,20},{-10,20},{
-10,60},{18,60}}, color={0,0,127}));

connect(conZero.y, conPIDHea.u_s)
annotation (Line(points={{-18,20},{18,20}}, color={0,0,127}));

connect(orHeaCooOcc.y, booToReaFanSpe.u) annotation (Line(points={{82,-80},{
90,-80},{90,-60},{98,-60}}, color={255,0,255}));
connect(orHeaCoo.y, timFan.u) annotation (Line(points={{12,-40},{20,-40},{20,-100},
{28,-100}}, color={255,0,255}));
connect(timFan.passed, orHeaCooOcc.u2) annotation (Line(points={{52,-108},{54,
-108},{54,-88},{58,-88}}, color={255,0,255}));
connect(uFan, booToRea.u) annotation (Line(points={{-140,80},{-82,80}},
color={255,0,255}));
connect(conPIDCoo.y, mulCoo.u2) annotation (Line(points={{42,60},{50,60},{50,54},
{58,54}}, color={0,0,127}));
connect(booToRea.y, mulCoo.u1) annotation (Line(points={{-58,80},{52,80},{52,66},
{58,66}}, color={0,0,127}));
connect(mulCoo.y, yCoo)
annotation (Line(points={{82,60},{160,60}}, color={0,0,127}));
connect(mulHea.y, yHea)
annotation (Line(points={{82,20},{160,20}}, color={0,0,127}));
connect(conPIDHea.y, mulHea.u2) annotation (Line(points={{42,20},{50,20},{50,14},
{58,14}}, color={0,0,127}));
connect(booToRea.y, mulHea.u1) annotation (Line(points={{-58,80},{52,80},{52,26},
{58,26}}, color={0,0,127}));
connect(orHeaCooOcc.y, truFalHol.u) annotation (Line(points={{82,-80},{90,-80},
{90,-100},{98,-100}}, color={255,0,255}));
connect(truFalHol.y, yFan) annotation (Line(points={{122,-100},{130,-100},{130,
-80},{160,-80}}, color={255,0,255}));
connect(uOcc, orHeaCooOcc.u1) annotation (Line(points={{-140,-100},{10,-100},{
10,-80},{58,-80}}, color={255,0,255}));
connect(max.y, yFanSpe)
annotation (Line(points={{122,-30},{160,-30}}, color={0,0,127}));
connect(booToReaFanSpe.y, max.u2) annotation (Line(points={{122,-60},{130,-60},
{130,-44},{90,-44},{90,-36},{98,-36}}, color={0,0,127}));
connect(conMinFanSpe.y, max.u1) annotation (Line(points={{82,-10},{90,-10},{90,
-24},{98,-24}}, color={0,0,127}));
annotation (defaultComponentName="conVarWatConFan",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}),
graphics={
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Text(
extent={{-100,100},{100,140}},
textString="%name",
textColor={0,0,255})}),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-120},{140,
100}})),
Documentation(info="<html>
<p>
This is a control module for the fan coil unit (FCU) system model designed as an
analogue to the <code>ConstantFanVariableFlow</code> capacity control method
in EnergyPlus. The control logic is as described in the following section
and can also be seen in the logic chart.
<br>
<ul>
<li>
When the zone temperature <code>TZon</code> is above the cooling setpoint
temperature <code>TCooSet</code>, the FCU enters cooling mode operation.
The fan is enabled (<code>yFan = True</code>) and is run at the maximum speed
(<code>yFanSpe = 1</code>). The cooling signal <code>yCoo</code> is used to
regulate <code>TZon</code> at <code>TCooSet</code>.
</li>
<li>
When <code>TZon</code> is below the heating setpoint
temperature <code>THeaSet</code>, the FCU enters heating mode operation.
The fan is enabled (<code>yFan = True</code>) and is run at the maximum speed
(<code>yFanSpe = 1</code>). The heating signal <code>yHea</code> is used to
regulate <code>TZon</code> at <code>THeaSet</code>.
</li>
<li>
When the zone temperature <code>TZon</code> is between <code>THeaSet</code>
and <code>TCooSet</code>, the FCU enters deadband mode. If the zone is occupied
as per the occupancy schedule (<code>conVarWatConFan.timTabOccSch.y = 1</code>),
the fan is enabled (<code>yFan = True</code>) and is run at the minimum speed
(<code>yFanSpe = minFanSpe</code>). <code>yHea</code> and <code>yCoo</code> are set
to <code>zero</code>.
</li>
</ul>
<p align=\"center\">
<img alt=\"image\" src=\"modelica://Buildings/Resources/Images/Fluid/ZoneEquipment/FanCoilUnit/Controls/constantFanVariableFlowrate.png\"/>
</p>
</html>
", revisions="<html>
<ul>
<li>
August 03, 2022 by Karthik Devaprasad:<br/>
First implementation.
</li>
</ul>
</html>"));
end ConstantFanVariableWaterFlowrate;
Loading