diff --git a/design/FY2019/NFP-Connect Split DX to VRF Refrigerant Loop.md b/design/FY2019/NFP-Connect Split DX to VRF Refrigerant Loop.md new file mode 100644 index 00000000000..2581265cb0c --- /dev/null +++ b/design/FY2019/NFP-Connect Split DX to VRF Refrigerant Loop.md @@ -0,0 +1,229 @@ +Connecting Split DX AHU Components to VRF Refrigeration Loops +================ + +**Richard Raustad, Florida Solar Energy Center** + + - 11/7/19 - Draft NFP + - 12/4/19 - several off-line design strategy discussions + - 12/4/19 - Design Document added at end of NFP + - 12/5/19 - New OO method of storing air system factory pointers has tentatively been implemented and the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow objects has been added as a valid main air loop component. + +## Justification for New Feature ## + +One of the recent developments in the variable refrigerant flow systems (VRF) field is the ability to connect terminal devices other than indoor split fan coils to a VRF refrigerant loop. These new terminal devices include DOAS AHUs and rooftop mounted split DX AHUs for space conditioning and ventilation. + +Nearly all VRF applications need ventilation. Previously, ventilation had to be provided by separate packaged rooftop type DOAS equipment since VRF indoor units cannot handle raw outdoor air directly and VRF condensing units could not serve DOAS equipment. In addition, one of the energy efficiency limitations of VRF systems is the lack of an outdoor air economizer cycle. Both challenges have now been solved. + +Multiple major manufacturers such as Daikin, Mitsubishi, LG, and Toshiba-Carrier offer the ability to connect split DX DOAS AHUs to VRF condensing units. In addition, Toshiba-Carrier condensing units can be connected to multiple rooftop-mounted split DX AHUs that provide space conditioning and ventilation and can offer outdoor air economizer cycles. These developments extend the application of VRF systems and the energy efficiency of these systems. + +Currently, VRF systems in EnergyPlus only allow ZoneHVAC terminals to be connected to a VRF refrigerant loop. + +## E-mail and Conference Call Conclusions ## + + +## Overview ## + +This task will expand the capabilities of the VRF model to allow terminal devices such as split DX DOAS AHUs and split DX AHUs for space conditioning and ventilation to be connected to VRF refrigerant loops. The following figure is excerpt from the Eng. Ref. (Figure 16.51, pg 1163, V9.2) and modified to include VRF air loop and outdoor air equipment (red circle). + +Figure 1: ![Figure 1](https://github.com/NREL/EnergyPlus/blob/NFP---Connect-split-DX-to-VRF-refrigerant-loop/design/FY2019/VRFTU%20Allowed%20in%20Airloop-OASys.png) Variable Refrigerant Flow Heat Pump (draw through fan placement) + +## Approach ## + +The common connection of VRF TU's and the VRF condenser is the ZoneTerminalUnitList object. All ZoneHVAC:TerminalUnit:VariableRefrigerantFlow objects connected to a single VRF condenser (AirConditioner:VariableRefrigerantFlow or AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:\*) are listed in the ZoneTerminalUnitList object and this objects name is entered as an input in the VRF condenser object. + +The most straight-forward approach appears to be allowing the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object to be connected as zone (existing), air loop and outdoor air system equipment. Using this methodology, limited changes to the AirConditioner:VariableRefrigerantFlow and AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:\* objects are anticipated. + +## Controls: + ZoneHVAC Equipment: no changes (currently load based control) + AirloopHVAC Equipment: requires thermostat control zone input, load based control + OutdoorAir Equipment: controlled to outlet node set point temperature (and humidity ratio?) + +## Testing/Validation/Data Sources ## + +New test files will be created using VRF TUs in the air loop and outdoor air system. + +## Input Output Reference Documentation ## + +IO Ref text will be updated to include these new capabilities. + +## Input Description ## + +Changes to the IDD appear to be minimal as no new objects will be added to E+. The only changes to model inputs are the allowed location of the TU object and thermostat location for controlling air loop equipment. + +``` +ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + \memo Zone terminal unit with variable refrigerant flow (VRF) DX cooling and heating coils + \memo (air-to-air heat pump). The VRF terminal units are served by an + \memo AirConditioner:VariableRefrigerantFlow or + \memo AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:* system. + \min-fields 19 + A1 , \field Zone Terminal Unit Name + \required-field + \type alpha + \reference ZoneTerminalUnitNames + \reference DOAToZonalUnit + \reference ZoneEquipmentNames + + -- new references as follows (not yet tested) -- + \reference-class-name validBranchEquipmentTypes + \reference validBranchEquipmentNames + \reference-class-name validOASysEquipmentTypes + \reference validOASysEquipmentNames + + -- new field -- + A19; \field Controlling Zone or Thermostat Location + \note Used only for AirloopHVAC equipment on a main branch + \type object-list + \object-list ZoneNames + \note Zone name where thermostat is located. Required for control of air loop equipment. +``` + +## Outputs Description ## + +No new outputs are anticipated. + +## Engineering Reference ## + +New schematic diagram (similar to above) and corresponding text description. + +## Example File and Transition Changes ## + +New example file will be included. +No transition required. + +## References ## + + Manufacturer Documentation + ------------ ------------------------------------------------------------------- + Daikin https://www.daikinac.com/content/commercial/ventillation-units/dvs-dedicated-outside-air-system + Mitsubishi https://www.mitsubishipro.com/products/city-multi-vrf/ventilation/premisys-dedicated-outdoor-air-systems + Mitsubishi http://meus1.mylinkdrive.com/item/PremiSys.html + LG https://lghvac.com/commercial/product-type/?productTypeId=a2x44000003XR0s&iscommercial=true + Carrier https://www.carrier.com/commercial/en/us/products/variable-refrigerant-flow/toshiba-carrier-vrf-products/toshiba-carrier-indoor-units/40qq/ + + +## Design Documentation ## + +Adding another air loop component, in this case ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, perpetuates historical programming of individual component calls without regard to future code changes for air loop equipment and code maintenance. The Simulate call arguments for various air loop models use a CompIndex for array based access. The UnitarySystem was the first air loop model to use a pointer based Sim call, however, this pointer was not accessible to all air loop equipment (e.g. VRF, ChangeoverBypass). + +The declaration of the pointer, used by upper level managers (i.e., Air loop equipment, OA systems, zone equipment), was specific to the UnitarySystem and this declaration is no longer adequate. + +DataAirLoop.hh + + struct OutsideAirSysProps + std::vector compPointer; + +DataAirSystems.hh + + struct AirLoopCompData // data for an individual component + UnitarySys *compPointer; // pointer to UnitarySystem + +DataZoneEquipment.hh + + struct EquipList + std::vector compPointer; + +At the time that UnitarySystem was refactored to use the factory/pointer method, the set up for the air loop branch object changed from: + + } else if (componentType == "AIRLOOPHVAC:UNITARYSYSTEM") { + PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).CompType_Num = UnitarySystem; + +to: + + } else if (componentType == "AIRLOOPHVAC:UNITARYSYSTEM") { + PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).CompType_Num = UnitarySystemModel; + UnitarySystems::UnitarySys thisSys; + PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).compPointer = thisSys.factory( + DataHVACGlobals::UnitarySys_AnyCoilType, PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).Name, false, 0); + +And the Sim call was changed from this: + + } else if (SELECT_CASE_var == UnitarySystem) { // 'AirLoopHVAC:UnitarySystem' + SimUnitarySystem(CompName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive); + +to: + + } else if (SELECT_CASE_var == UnitarySystemModel) { // 'AirLoopHVAC:UnitarySystem' + CompPointer->simulate(CompName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, ZoneEquipFlag); + +where: CompPointer = PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).compPointer as provided by the UnitarySystem factory. + +As is done with plant equipment, a new class will be created such that a pointer can be declared in air systems managers for use by all types of air system equipment. This class is defined in a new header file, DataHVACSystems.hh. Virtual functions are included where this pointer is used to access model specific information from outside the scope of UnitarySystem (e.g., the Sim routine and get functions for air nodes used by air loop DOAS systems). Note that unit tests will need to be updated where this pointer is used to set or access object data and model functions. + +``` +#ifndef DataHVACSystems_hh_INCLUDED +#define DataHVACSystems_hh_INCLUDED + +// C++ Headers +#include + +// EnergyPlus Headers +#include + +namespace EnergyPlus { + +// base class for all HVAC systems +class HVACSystemData +{ + +public: + + // Default Constructor + HVACSystemData() + { + } + + virtual void simulate(std::string const &Name, + bool const firstHVACIteration, + int const &AirLoopNum, + int &CompIndex, + bool &HeatActive, + bool &CoolActive, + int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit + Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit + bool const ZoneEquipment, // TRUE if called as zone equipment + Real64 &sysOutputProvided, // sensible output at supply air node + Real64 &latOutputProvided // latent output at supply air node + ) = 0; + + virtual void sizeSystem(bool const FirstHVACIteration, int const AirLoopNum) = 0; + virtual int getAirInNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) = 0; + virtual int getAirOutNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) = 0; + +}; + + +} // namespace EnergyPlus + +#endif // DataHVACSystems_hh_INCLUDED +``` + +This class is inherited by the HVAC model where a factory call returns a pointer stored in a local array for later use. + +UnitarySystems.hh + + struct UnitarySys : HVACSystemData + +and it's the HVACSystemData class that is used to declare the pointer array in various managers (instead of using the UnitarySys class). + + +DataAirLoop.hh + + struct OutsideAirSysProps + std::vector compPointer; + +DataAirSystems.hh + + struct AirLoopCompData // data for an individual component + HVACSystemData *compPointer; // pointer to HVAC system + +DataZoneEquipment.hh + + struct EquipList + std::vector compPointer; + +Instead of CompIndex being used on the call to the Sim function, the compPointer accesses that data and Sim function directly (as long as all model Sim functions are unified with the same arguments). Eventually, CompIndex will no longer be needed. + +Now that the VRF terminal unit is allowed in the air loop, it should simply be a matter of inheriting the new class and storing the pointer in the same array previously used only for UnitarySystems. Similar changes to other HVAC equipment can now be made during ongoing refactoring efforts. The good news is that since the UnitarySystem can be used anywhere in the air simulation (i.e., air loops, OA systems, zone equipment, and zone OA units) this new OO method (with the help of reviewers updates) can be used with any HVAC equipment type. + + diff --git a/design/FY2019/VRFTU Allowed in Airloop-OASys.png b/design/FY2019/VRFTU Allowed in Airloop-OASys.png new file mode 100644 index 00000000000..8a0604d47ff Binary files /dev/null and b/design/FY2019/VRFTU Allowed in Airloop-OASys.png differ diff --git a/doc/input-output-reference/media/image310.png b/doc/input-output-reference/media/image310.png index 9f7c48579f0..c3267e93394 100644 Binary files a/doc/input-output-reference/media/image310.png and b/doc/input-output-reference/media/image310.png differ diff --git a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex index 2550d92b1ca..7f8c030d69a 100644 --- a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex +++ b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex @@ -2,7 +2,7 @@ \section{Group -- Variable Refrigerant Flow Equipment}\label{group-variable-refr This group of EnergyPlus input objects describes the configurations of Variable Refrigerant Flow (VRF, or Variable Refrigerant Volume) air-conditioning systems. -A VRF system is an air-conditioning system that varies the refrigerant flow rate using variable speed compressor(s) in the outdoor unit, and the electronic expansion valves (EEVs) located in each indoor unit. The system meets the space cooling or heating load requirements by maintaining the zone air temperature at the setpoint. The ability to control the refrigerant mass flow rate according to the cooling and/or heating load enables the use of as many as 20 or more indoor units with differing capacities in conjunction with one single outdoor unit. This unlocks the possibility of having individualized comfort control, simultaneous heating and cooling in different zones, and heat recovery from one zone to another. It may also lead to more efficient operations during part-load conditions. +A VRF system is an air-conditioning system that varies the refrigerant flow rate using variable speed compressor(s) in the outdoor unit, and the electronic expansion valves (EEVs) located in each terminal unit. For zone equipment the system meets the space cooling or heating load requirements by maintaining the zone air temperature at the setpoint or in the case of air loop equipment can meet a control zone load or maintain a terminal unit or coil outlet air temperature set point. The terminal unit may also be used in the air loop's outdoor air system where a terminal unit or coil outlet air temperature set point must be used. The ability to control the refrigerant mass flow rate according to the cooling and/or heating load enables the use of as many as 20 or more terminal units with differing capacities in conjunction with one single outdoor unit. This unlocks the possibility of having individualized comfort control, simultaneous heating and cooling in different zones, and heat recovery from one zone to another. There are two alternative VRF models in EnergyPlus: @@ -16,15 +16,15 @@ \section{Group -- Variable Refrigerant Flow Equipment}\label{group-variable-refr (Please refer to the engineering reference for more technical details of the two models). -In the VRF system model, direct-expansion cooling and/or heating coils with an optional supplemental heating coil are configured in a zone terminal unit, which is connected to a zone via the zone inlet and exhaust nodes. The zone terminal units are identified in a \emph{\hyperref[zoneterminalunitlist]{ZoneTerminalUnitList}} object, the name of which is entered as an input to the \emph{\hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow}} or \emph{\hyperref[airconditionervariablerefrigerantflowfluidtemperaturecontrol]{AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl}} object. +In the VRF system model, direct-expansion cooling and/or heating coils with an optional supplemental heating coil are configured in a zone terminal unit, which is connected to a zone via the zone inlet and exhaust nodes, connected to an air loop main branch or installed in the air loop's outdoor air system. The terminal units are identified in a \emph{\hyperref[zoneterminalunitlist]{ZoneTerminalUnitList}} object, the name of which is entered as an input to the \emph{\hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow}} or \emph{\hyperref[airconditionervariablerefrigerantflowfluidtemperaturecontrol]{AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl}} object. The EnergyPlus connection methodology is shown as dashed and greyed arrows in Figure~\ref{fig:variable-refrigerant-flow-schematic} according to the following rules: \begin{itemize} \item - The zone inlet and zone exhaust node names are defined in a \emph{\hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections}} object (bottom of figure). + For zone equipment the zone inlet and zone exhaust node names are defined in a \emph{\hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections}} object (bottom of figure) and the terminal unit type and name are specified in a \emph{\hyperref[zonehvacequipmentlist]{ZoneHVAC:EquipmentList}} object. For air loop equipment the terminal unit type and name and inlet and outlet node names are defined in the AirloopHVAC branch (top left of figure). For outside air system equipment the terminal unit type and name are defined in the \emph{\hyperef[airloophvacoutdoorairsystemequipmentlist]{AirLoopHVAC:OutdoorAirSystem:EquipmentList}} (top right of figure) and the terminal unit inlet node will typically (but not necessarily) be an outside air node and the terminal unit outlet node will typically connect to the \emph{\hyperef[outdoorairmixer]{OutdoorAir:Mixer}} object. \item - A \emph{\hyperref[zonehvacterminalunitvariablerefrigerantflow]{ZoneHVAC:TerminalUnit:VariableRefrigerantFlow}} object will identify these zone exhaust and zone inlet node names as the terminal unit's air inlet and air outlet nodes, respectively. + A \emph{\hyperref[zonehvacterminalunitvariablerefrigerantflow]{ZoneHVAC:TerminalUnit:VariableRefrigerantFlow}} object will specify the terminal unit's air inlet and air outlet node names. For zone equipment the zone exhaust node is the terminal unit inlet node and the zone inlet node is the terminal unit outlet node. For air loop and outdoor air system equipment the terminal unit inlet and outlet node names identify the order of the equipment in the air loop. \item All zone terminal units that are connected to the same \emph{\hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow}} or \emph{\hyperref[airconditionervariablerefrigerantflowfluidtemperaturecontrol]{AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl}} object are listed in a \emph{\hyperref[zoneterminalunitlist]{ZoneTerminalUnitList}} object. \item @@ -196,7 +196,7 @@ \subsubsection{Inputs}\label{inputs-051} \paragraph{Field: Master Thermostat Priority Control Type}\label{field-master-thermostat-priority-control-type-000} -This choice field determines the logic used to simulate the ``master'' thermostat. Valid choices are LoadPriority, ZonePriority, ThermostatOffsetPriority, MasterThermostatPriority, and Scheduled. The default value is MasterThermostatPriority. When LoadPriority is selected, the total zone load is used to choose the operating mode as either cooling or heating. When ZonePriority is selected, the number of zones requiring cooling or heating determines the operating mode. When ThermostatOffsetPriority is selected, the zone farthest from the thermostat set point determines the operating mode. The MasterThermostatPriority choice operates the system according the zone load where the master thermostat is located. The heat pump can also be scheduled to operate in either cooling or heating mode. For scheduled operation, a schedule name is entered in the following field. +This choice field determines the logic used to simulate the ``master'' thermostat. Valid choices are LoadPriority, ZonePriority, ThermostatOffsetPriority, MasterThermostatPriority, and Scheduled. The default value is MasterThermostatPriority. When LoadPriority is selected, the total zone load is used to choose the operating mode as either cooling or heating. When ZonePriority is selected, the number of zones requiring cooling or heating determines the operating mode. When ThermostatOffsetPriority is selected, the zone farthest from the thermostat set point determines the operating mode. The MasterThermostatPriority choice operates the system according the zone load where the master thermostat is located. The heat pump can also be scheduled to operate in either cooling or heating mode. For scheduled operation, a schedule name is entered in the following field. When all terminal units connected to this system are set point controlled (set point control is only allowed in air loops and outdoor air systems) this field is not used. \paragraph{Field: Thermostat Priority Schedule Name}\label{field-thermostat-priority-schedule-name-000} diff --git a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex index 12c0fc7e768..45c51e2a021 100644 --- a/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex +++ b/doc/input-output-reference/src/overview/group-zone-forced-air-units.tex @@ -3890,11 +3890,21 @@ \subsubsection{Outputs}\label{outputs-11-006} \subsection{ZoneHVAC:TerminalUnit:VariableRefrigerantFlow}\label{zonehvacterminalunitvariablerefrigerantflow} -Zone terminal units with variable refrigerant flow compound HVAC object are used exclusively with variable refrigerant flow (VRF) air conditioning systems (Ref. \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} objects). The zone terminal VRF compound object contains a DX cooling coil, a DX heating coil, supply fan, and an optional supplemental heating coil objects. zone The zone terminal units are connected to a zone using the inlet and exhaust node names specified in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. The zone exhaust node has the same name as the terminal unit air inlet node. The zone inlet node has the same name as the terminal unit air outlet node. The zone terminal unit is also listed in a zone's equipment list and will typically be the first equipment operating for both cooling and heating (i.e., Sequence = 1 in the \hyperref[zonehvacequipmentlist]{ZoneHVAC:EquipmentList}). Other ZoneHVAC equipment may be used in the same zone and should be sequenced to operate after the zone terminal units (i.e., sequence = 2 or higher) +Terminal units with variable refrigerant flow compound HVAC object are used exclusively with variable refrigerant flow (VRF) air conditioning systems (Ref. \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} objects). The VRF terminal unit may be used as zone, air loop or outside air system equipment. The VRF terminal unit compound object contains an optional outdoor air mixer, a DX cooling coil, a DX heating coil, a supply fan (optional for air loop and outdoor air system equipment), and an optional supplemental heating coil object. + +\begin{callout} +Note: The terminal unit may be used in the air loop and/or outdoor air system, however, at this time only constant flow (or limited variation within the limits allowed for DX coils) through the unit is allowed. Using a wide range of outdoor air flow rates will cause the DX coil model to fail. For example, if the minimum outdoor air flow rate is allowed to fall near 0, the DX coil model will calculate very low, even very negative, coil outlet temperatures. This can cause psychrometric warnings to occur and cause the simulation to end prematurely. +\end{callout} + +For zone equipment the terminal units are connected to a zone using the inlet and exhaust node names specified in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. The zone exhaust node has the same name as the terminal unit air inlet node. The zone inlet node has the same name as the terminal unit air outlet node. The zone terminal unit is also listed in a zone's equipment list and will typically be the first equipment operating for both cooling and heating (i.e., Sequence = 1 in the \hyperref[zonehvacequipmentlist]{ZoneHVAC:EquipmentList}). Other ZoneHVAC equipment may be used in the same zone and should be sequenced to operate after the zone terminal units (i.e., sequence = 2 or higher). + +For air loop equipment and outdoor air system equipment the VRF terminal unit inlet and outlet nodes define the location of the system in the air loop and outdoor air system. The node names must define the path of the air stream in order from the beginning of the air loop or outdoor air system to the outlet of that system. + +This VRF terminal unit can be controlled based on a load or set point. When the system is used as zone equipment load control is always used. When the VRF terminal unit is used in an air loop and the control zone name or thermostat location is specified, the system is controlled based on zone load. If the control zone name or thermostat location is not specified the VRF terminal unit will be controlled based on termninal unit or coil outlet node set point temperature. When set point based control is used the node temperature set points may be placed at the outlet of the terminal unit or at individual coil outlet nodes. If the VRF terminal unit is used in an air loop's outdoor air system, control is always based on a termninal unit or coil outlet node temperature set point. The terminal units operate to satisfy a heating or cooling load in a zone based on a zone thermostat temperature set point. A direct-expansion (DX) cooling and/or DX heating coil is specified depending on the operating mode required. Both a DX cooling and DX heating coil will typically be installed in the terminal unit, however only one may be used if desired. An optional supplemental heating coil can also be added to the terminal unit to provide additional heating when the main DX heating coil could not meet the entire heating load of a zone during cold outdoor conditions. The Supplemental Heating Coil Object Type must be \hyperref[coilheatingelectric]{Coil:Heating:Electric}, \hyperref[coilheatingfuel]{Coil:Heating:Fuel}, \hyperref[coilheatingwater]{Coil:Heating:Water}, or \hyperref[coilheatingsteam]{Coil:Heating:Steam}. Outdoor ventilation air is modeled with the use of an optional outside air mixer object. Outside air may be provided to the zone only when the coil is operating or can be supplied continuously even when the coil is not operating. -A supply air fan is also required and can be modeled as either draw through or blow through. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel}, \hyperref[fanonoff]{Fan:OnOff}, or \hyperref[fanconstantvolume]{Fan:ConstantVolume} if \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} is used to model the VRF outdoor unit. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel} or \hyperref[fanvariablevolume]{Fan:VariableVolume} if AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl or AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl:HR is used to model the VRF outdoor unit. +A supply air fan can be modeled as either draw through or blow through. The supply air fan is required for zone equipment and optional for air loop and outdoor air system equipment. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel}, \hyperref[fanonoff]{Fan:OnOff}, or \hyperref[fanconstantvolume]{Fan:ConstantVolume} if \hyperref[airconditionervariablerefrigerantflow]{AirConditioner:VariableRefrigerantFlow} is used to model the VRF outdoor unit. The Supply Air Fan Object Type must be \hyperref[fansystemmodel]{Fan:SystemModel} or \hyperref[fanvariablevolume]{Fan:VariableVolume} if AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl or AirConditioner:VariableRefrigerantFlow:\-FluidTemperatureControl:HR is used to model the VRF outdoor unit. \subsubsection{Inputs}\label{inputs-14-018} @@ -3960,13 +3970,15 @@ \subsubsection{Inputs}\label{inputs-14-018} \hyperref[fanconstantvolume]{Fan:ConstantVolume} is used when the Supply Air Fan Operating Mode Schedule values are never 0 and the fan operates continuously. \hyperref[fanonoff]{Fan:OnOff} is used when the fan cycles on and off with the cooling or heating coil (i.e.~Supply Air Fan Operating Mode Schedule values are at times 0). The \hyperref[fansystemmodel]{Fan:SystemModel} may be used to model either of these fan operating characteristics. +This field may be left blank when the VRF terminal unit is used as air loop or outdoor air system equipment. + \paragraph{Field: Supply Air Fan Object Name}\label{field-supply-air-fan-object-name} -This alpha field defines the name of the terminal unit's supply air fan. +This alpha field defines the name of the terminal unit's supply air fan. This field may be left blank when the VRF terminal unit is used as air loop or outdoor air system equipment. \paragraph{Field: Outdoor Air Mixer Object Type}\label{field-outdoor-air-mixer-object-type} -This alpha field contains the identifying type of outdoor air mixer specified for the terminal unit. Outdoor air mixer type must be \textit{\hyperref[outdoorairmixer]{OutdoorAir:Mixer}}. This input field should be left blank when the VRF terminal unit is connected to an \textit{\hyperref[airterminalsingleductmixer]{AirTerminal:SingleDuct:Mixer}} object. If this field is left blank, an outdoor air mixer is not simulated. +This alpha field contains the identifying type of outdoor air mixer specified for the terminal unit. Outdoor air mixer type must be \textit{\hyperref[outdoorairmixer]{OutdoorAir:Mixer}}. This input field should be left blank when the VRF terminal unit is connected to an \textit{\hyperref[airterminalsingleductmixer]{AirTerminal:SingleDuct:Mixer}} object. If this field is left blank, an outdoor air mixer is not simulated. If the VRF terminal unit is used as air loop equipment and this terminal unit's outdoor air flow rates are autosized then the autosized flow rates will be set to 0 when an outdoor air system is used in the air loop (ref \textit{\hyperref[airloophvacoutdoorairsystem]{AirloopHVAC:OutdoorAirSystem}}). \paragraph{Field: Outdoor Air Mixer Object Name}\label{field-outdoor-air-mixer-object-name} @@ -4024,6 +4036,10 @@ \subsubsection{Inputs}\label{inputs-14-018} This numeric field defines the maximum outdoor dry-bulb temperature in degrees Celsius for this VRF terminal unit supplemental heating coil operation. The supplemental heater will not operate when the outdoor dry-bulb temperature is above this value. The maximum value must be less than or equal to 21°C. If this field is left blank, the default value of 21°C will be used. +\paragraph{Field: Controlling Zone or Thermostat Location}\label{controlling-zone-or-thermostat-location-2-110} + +This alpha field is only used when this VRF terminal unit is used as air loop equipment with load based operational control. When the terminal unit is used in an air loop and this terminal unit is load controlled, this zone's thermostat will control operation. When this terminal unit is used in an air loop and is set point controlled, this field must be blank (i.e., when the controlling zone name is present the system will be load controlled). + Following is an example input for a ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object. \begin{lstlisting} @@ -4058,7 +4074,8 @@ \subsubsection{Inputs}\label{inputs-14-018} Coil:Heating:Electric, !- Supplemental Heating Coil Object Type TU1 Supp Heating Coil, !- Supplemental Heating Coil Name autosize, !- Maximum Supply Air Temperature from Supplemental Heater - ; !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation + , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation + ; !- Controlling Zone or Thermostat Location \end{lstlisting} \subsubsection{Outputs}\label{outputs-12-006} diff --git a/idd/Energy+.idd.in b/idd/Energy+.idd.in index d4d7acc9e80..9c759832a97 100644 --- a/idd/Energy+.idd.in +++ b/idd/Energy+.idd.in @@ -40180,10 +40180,11 @@ ZoneHVAC:OutdoorAirUnit:EquipmentList, A17; \field Component 8 Name ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, - \memo Zone terminal unit with variable refrigerant flow (VRF) DX cooling and heating coils + \memo A terminal unit with variable refrigerant flow (VRF) DX cooling and heating coils \memo (air-to-air heat pump). The VRF terminal units are served by an \memo AirConditioner:VariableRefrigerantFlow or \memo AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:* system. + \memo Terminal units can be configured as zone, air loop or outside air system equipment. \min-fields 19 A1 , \field Zone Terminal Unit Name \required-field @@ -40191,6 +40192,10 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \reference ZoneTerminalUnitNames \reference DOAToZonalUnit \reference ZoneEquipmentNames + \reference-class-name validBranchEquipmentTypes + \reference validBranchEquipmentNames + \reference-class-name validOASysEquipmentTypes + \reference validOASysEquipmentNames A2 , \field Terminal Unit Availability Schedule \type object-list \object-list ScheduleNames @@ -40229,47 +40234,65 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \units m3/s \minimum 0.0 \autosizable + \note This field is used only when an oudoor air mixer is included. \note This field is set to zero flow when the VRF terminal unit is connected to \note central dedicated outdoor air through air terminal single duct mixer object. + \note When this VRF terminal is used as air loop equipment the autosized flow + \note rate will be set to 0 when an outdoor air system is connected to this air loop, + \note otherwise the outdoor air flow rate will equal the maximum outdoor air flow rate. N6 , \field Heating Outdoor Air Flow Rate \type real \units m3/s \minimum 0.0 \autosizable + \note This field is used only when an oudoor air mixer is included. \note This field is set to zero flow when the VRF terminal unit is connected to \note central dedicated outdoor air through air terminal single duct mixer object. + \note When this VRF terminal is used as air loop equipment the autosized flow + \note rate will be set to 0 when an outdoor air system is connected to this air loop, + \note otherwise the outdoor air flow rate will equal the maximum outdoor air flow rate. N7 , \field No Load Outdoor Air Flow Rate \type real \units m3/s \minimum 0.0 \autosizable + \note This field is used only when an oudoor air mixer is included. \note This field is set to zero flow when the VRF terminal unit is connected to \note central dedicated outdoor air through air terminal single duct mixer object. + \note When this VRF terminal is used as air loop equipment the autosized flow + \note rate will be set to 0 when an outdoor air system is connected to this air loop, + \note otherwise the outdoor air flow rate will equal the maximum outdoor air flow rate. A5 , \field Supply Air Fan Operating Mode Schedule Name - \required-field \type object-list \object-list ScheduleNames + \note Required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList. + \note Also leave blank if terminal unit is used on main AirloopHVAC branch and terminal unit has no fan. A6 , \field Supply Air Fan Placement \type choice \key BlowThrough \key DrawThrough \default BlowThrough \note Select fan placement as either blow through or draw through. + \note Required for zone equipment. This field is ignored if the VRF terminal unit is used + \note in AirLoopHVAC:OutdoorAirSystem:EquipmentList. + \note This field is also ignored if VRF terminal unit is used on main AirloopHVAC branch + \note and terminal unit has no fan. A7 , \field Supply Air Fan Object Type \type choice \key Fan:SystemModel \key Fan:OnOff \key Fan:ConstantVolume \key Fan:VariableVolume + \default Fan:ConstantVolume \note Supply Air Fan Object Type must be Fan:SystemModel, Fan:OnOff, or Fan:ConstantVolume \note if AirConditioner:VariableRefrigerantFlow is used to model VRF outdoor unit \note Supply Air Fan Object Type must be Fan:SystemModel or Fan:VariableVolume if \note AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl or \note AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:HR \note is used to model VRF outdoor unit - \default Fan:ConstantVolume + \note Required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList. + \note Also leave blank if terminal unit is used on main AirloopHVAC branch and terminal unit has no fan. A8 , \field Supply Air Fan Object Name - \required-field \type object-list \object-list FansCVandOnOffandVAV A9 , \field Outside Air Mixer Object Type @@ -40279,6 +40302,8 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \note If this field is blank, and outside air mixer is not used. \note This field should be left blank if the VRF terminal unit is connected to \note central dedicated outdoor air through an AirTerminal:SingleDuct:Mixer object. + \note This field may also be left blank when the VRF terminal is used in the air + \note loop or outdoor air system. A10, \field Outside Air Mixer Object Name \type object-list \object-list OutdoorAirMixers @@ -40287,6 +40312,8 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \note When used, this name needs to match name of the OutdoorAir:Mixer object. \note This field should be left blank if the VRF terminal unit is connected to \note central dedicated outdoor air through an AirTerminal:SingleDuct:Mixer object. + \note This field may also be left blank when the VRF terminal is used in the air + \note loop or outdoor air system. A11, \field Cooling Coil Object Type \type choice \key Coil:Cooling:DX:VariableRefrigerantFlow @@ -40370,12 +40397,19 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, \autosizable \default autosize \note Supply air temperature from the supplemental heater will not exceed this value. - N12; \field Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation + N12, \field Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation \type real \maximum 21.0 \default 21.0 \units C \note Supplemental heater will not operate when outdoor temperature exceeds this value. + A19; \field Controlling Zone or Thermostat Location + \type object-list + \object-list ZoneNames + \note Used only for AirloopHVAC equipment on a main branch and defines zone name where thermostat is located. + \note Not required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList. + \note Required when terminal unit is used on main AirloopHVAC branch and coils are not set point controlled. + \note When terminal unit is used in air loop and is load controlled, this zone's thermostat will control operation. \group Zone HVAC Radiative/Convective Units @@ -61364,7 +61398,8 @@ AirConditioner:VariableRefrigerantFlow, \key Scheduled \default MasterThermostatPriority \note Choose a thermostat control logic scheme. If these control types fail to control zone - \note temperature within a reasonable limit, consider using multiple VRF systems + \note temperature within a reasonable limit, consider using multiple VRF systems. + \note This field is not used when all terminal units are set point controlled. A26, \field Thermostat Priority Schedule Name \type object-list \object-list ScheduleNames diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index bdb0900f97b..247cf7170d0 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -658,13 +659,17 @@ namespace AirLoopHVACDOAS { } else if (SELECT_CASE_var == "AIRLOOPHVAC:UNITARYSYSTEM") { OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = - OutsideAirSys(thisDOAS.m_OASystemNum).compPointer[CompNum]->AirInNode; + OutsideAirSys(thisDOAS.m_OASystemNum) + .compPointer[CompNum] + ->getAirInNode(OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), 0); if (OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) == 0) { InletNodeErrFlag = true; errorsFound = true; } OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) = - OutsideAirSys(thisDOAS.m_OASystemNum).compPointer[CompNum]->AirOutNode; + OutsideAirSys(thisDOAS.m_OASystemNum) + .compPointer[CompNum] + ->getAirOutNode(OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), 0); if (OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) == 0) { OutletNodeErrFlag = true; errorsFound = true; @@ -784,6 +789,16 @@ namespace AirLoopHVACDOAS { OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = EvaporativeCoolers::GetOutletNodeNum(OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), errorsFound); if (errorsFound) OutletNodeErrFlag = true; + } else if (SELECT_CASE_var == "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW") { + OutsideAirSys(thisDOAS.m_OASystemNum).InletNodeNum(CompNum) = HVACVariableRefrigerantFlow::GetVRFTUInAirNodeFromName( + OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), errorsFound); + if (errorsFound) { + InletNodeErrFlag = true; + errorsFound = false; + } + OutsideAirSys(thisDOAS.m_OASystemNum).OutletNodeNum(CompNum) = HVACVariableRefrigerantFlow::GetVRFTUOutAirNodeFromName( + OutsideAirSys(thisDOAS.m_OASystemNum).ComponentName(CompNum), errorsFound); + if (errorsFound) OutletNodeErrFlag = true; } else { ShowSevereError(CurrentModuleObject + " = \"" + CompName + "\" invalid Outside Air Component=\"" + OutsideAirSys(thisDOAS.m_OASystemNum).ComponentType(CompNum) + "\"."); diff --git a/src/EnergyPlus/AirLoopHVACDOAS.hh b/src/EnergyPlus/AirLoopHVACDOAS.hh index 481967d9c26..13dd0717adc 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.hh +++ b/src/EnergyPlus/AirLoopHVACDOAS.hh @@ -204,4 +204,4 @@ namespace AirLoopHVACDOAS { extern bool GetInputOnceFlag; } // namespace AirLoopHVACDOAS } // namespace EnergyPlus -#endif // ENERGYPLUS_UNITARYSYSTEM_HH +#endif // ENERGYPLUS_AIRLOOPHVACDOAS_HH diff --git a/src/EnergyPlus/CMakeLists.txt b/src/EnergyPlus/CMakeLists.txt index 32ff8d10025..03f2ea1809a 100644 --- a/src/EnergyPlus/CMakeLists.txt +++ b/src/EnergyPlus/CMakeLists.txt @@ -109,6 +109,7 @@ SET( SRC DataHVACControllers.hh DataHVACGlobals.cc DataHVACGlobals.hh + DataHVACSystems.hh DataHeatBalFanSys.cc DataHeatBalFanSys.hh DataHeatBalSurface.cc diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 0e395e20ad6..e8a40551b64 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -6981,7 +6981,15 @@ namespace DXCoils { FieldNum = 1; TempSize = DXCoil(DXCoilNum).RatedTotCap(Mode); SizingString = DXCoilNumericFields(DXCoilNum).PerfMode(Mode).FieldNames(FieldNum) + " [W]"; - CoilInTemp = ZoneSizingRunDone ? FinalZoneSizing(CurZoneEqNum).DesCoolCoilInTemp : 26; + if (CurZoneEqNum > 0) { + CoilInTemp = ZoneSizingRunDone ? FinalZoneSizing(CurZoneEqNum).DesCoolCoilInTemp : 26; + } else { + if (CurOASysNum > 0) { + CoilInTemp = SysSizingRunDone ? FinalSysSizing(CurSysNum).OutTempAtCoolPeak : 32; + } else { + CoilInTemp = SysSizingRunDone ? FinalSysSizing(CurSysNum).MixTempAtCoolPeak : 26; + } + } CalcVRFCoilCapModFac(0, _, CompName, CoilInTemp, _, _, _, DataTotCapCurveValue); } else if (DXCoil(DXCoilNum).DXCoilType_Num == CoilDX_MultiSpeedCooling) { SizingMethod = CoolingCapacitySizing; @@ -14477,6 +14485,29 @@ namespace DXCoils { return NodeNumber; } + int getCoilInNodeIndex(int const &CoilIndex, // coil index + bool &ErrorsFound // set to true if problem + ) { + + int NodeNumber; // returned node number of matched coil + + // Obtains and Allocates DXCoils + if ( GetCoilsInputFlag ) { + GetDXCoils(); + GetCoilsInputFlag = false; + } + + if (CoilIndex != 0) { + NodeNumber = DXCoil(CoilIndex).AirInNode; + } else { + ShowSevereError("GetCoilInletNode: Could not find Coil Type"); + ErrorsFound = true; + NodeNumber = 0; + } + + return NodeNumber; + } + int GetCoilOutletNode(std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem @@ -14517,6 +14548,29 @@ namespace DXCoils { return NodeNumber; } + int getCoilOutNodeIndex(int const &CoilIndex, // must match coil types in this module + bool &ErrorsFound // set to true if problem + ) { + + int NodeNumber; // returned node number of matched coil + + // Obtains and Allocates DXCoils + if ( GetCoilsInputFlag ) { + GetDXCoils(); + GetCoilsInputFlag = false; + } + + if (CoilIndex != 0) { + NodeNumber = DXCoil(CoilIndex).AirOutNode; + } else { + ShowSevereError("GetCoilOutletNode: Could not find Coil Type"); + ErrorsFound = true; + NodeNumber = 0; + } + + return NodeNumber; + } + int GetCoilCondenserInletNode(std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 7a864a389ee..af11aa96974 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -807,6 +807,14 @@ namespace DXCoils { bool &ErrorsFound // set to true if problem ); + int getCoilInNodeIndex(int const &CoilIndex, // coil index + bool &ErrorsFound // set to true if problem + ); + + int getCoilOutNodeIndex(int const &CoilIndex, // coil index + bool &ErrorsFound // set to true if problem + ); + int GetCoilCondenserInletNode(std::string const &CoilType, // must match coil types in this module std::string const &CoilName, // must match coil names for the coil type bool &ErrorsFound // set to true if problem diff --git a/src/EnergyPlus/DataAirLoop.hh b/src/EnergyPlus/DataAirLoop.hh index a1cd8c062a5..b0b5f409914 100644 --- a/src/EnergyPlus/DataAirLoop.hh +++ b/src/EnergyPlus/DataAirLoop.hh @@ -53,8 +53,8 @@ // EnergyPlus Headers #include +#include #include -#include namespace EnergyPlus { @@ -261,7 +261,7 @@ namespace DataAirLoop { Array1D_int ComponentType_Num; // Parameterized (see above) Component Types this // module can address Array1D_int ComponentIndex; // Which one in list -- updated by routines called from here - std::vector compPointer; + std::vector compPointer; Array1D_string ControllerName; Array1D_string ControllerType; Array1D_int ControllerIndex; // Which one in list -- updated by routines called from here diff --git a/src/EnergyPlus/DataAirSystems.hh b/src/EnergyPlus/DataAirSystems.hh index 68b9c5d39b7..fcba0f29131 100644 --- a/src/EnergyPlus/DataAirSystems.hh +++ b/src/EnergyPlus/DataAirSystems.hh @@ -53,9 +53,9 @@ // EnergyPlus Headers #include +#include #include #include -#include namespace EnergyPlus { @@ -64,7 +64,6 @@ namespace DataAirSystems { // Using/Aliasing using DataPlant::MeterData; using DataPlant::SubcomponentData; - using UnitarySystems::UnitarySys; // Data // MODULE PARAMETER DEFINITIONS: @@ -91,7 +90,7 @@ namespace DataAirSystems { std::string Name; // Component name int CompType_Num; // Numeric designator for CompType (TypeOf) int CompIndex; // Component Index in whatever is using this component - UnitarySys *compPointer; // pointer to UnitarySystem + HVACSystemData *compPointer; // pointer to HVAC system int FlowCtrl; // Component flow control (ACTIVE/PASSIVE) bool ON; // When true, the designated component or operation scheme is available bool Parent; // When true, the designated component is made up of sub-components diff --git a/src/EnergyPlus/DataHVACSystems.hh b/src/EnergyPlus/DataHVACSystems.hh new file mode 100644 index 00000000000..af321998d14 --- /dev/null +++ b/src/EnergyPlus/DataHVACSystems.hh @@ -0,0 +1,89 @@ +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, +// The Regents of the University of California, through Lawrence Berkeley National Laboratory +// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge +// National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other +// contributors. All rights reserved. +// +// NOTICE: This Software was developed under funding from the U.S. Department of Energy and the +// U.S. Government consequently retains certain rights. As such, the U.S. Government has been +// granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, +// worldwide license in the Software to reproduce, distribute copies to the public, prepare +// derivative works, and perform publicly and display publicly, and to permit others to do so. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted +// provided that the following conditions are met: +// +// (1) Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// (2) Redistributions in binary form must reproduce the above copyright notice, this list of +// conditions and the following disclaimer in the documentation and/or other materials +// provided with the distribution. +// +// (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, +// the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific prior +// written permission. +// +// (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form +// without changes from the version obtained under this License, or (ii) Licensee makes a +// reference solely to the software portion of its product, Licensee must refer to the +// software as "EnergyPlus version X" software, where "X" is the version number Licensee +// obtained under this License and may not use a different name for the software. Except as +// specifically required in this Section (4), Licensee shall not use in a company name, a +// product name, in advertising, publicity, or other promotional activities any name, trade +// name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly +// similar designation, without the U.S. Department of Energy's prior written consent. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#ifndef DataHVACSystems_hh_INCLUDED +#define DataHVACSystems_hh_INCLUDED + +// C++ Headers +#include + +// EnergyPlus Headers +#include + +namespace EnergyPlus { + + // base class for all HVAC systems + class HVACSystemData { + + public: + + // Default Constructor + HVACSystemData() { + } + + virtual void simulate(std::string const &Name, + bool const firstHVACIteration, + int const &AirLoopNum, + int &CompIndex, + bool &HeatActive, + bool &CoolActive, + int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit + Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit + bool const ZoneEquipment, // TRUE if called as zone equipment + Real64 &sysOutputProvided, // sensible output at supply air node + Real64 &latOutputProvided // latent output at supply air node + ) = 0; + + virtual void sizeSystem(bool const FirstHVACIteration, int const AirLoopNum) = 0; + virtual int getAirInNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) = 0; + virtual int getAirOutNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) = 0; + + }; + +} // namespace EnergyPlus + +#endif // DataHVACSystems_hh_INCLUDED diff --git a/src/EnergyPlus/DataZoneEquipment.cc b/src/EnergyPlus/DataZoneEquipment.cc index 7065ebf7359..3732e38bcd3 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -68,6 +68,7 @@ #include #include #include +#include #include namespace EnergyPlus { diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index 5492e32d625..8359211b9a8 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -54,9 +54,9 @@ // EnergyPlus Headers #include +#include #include #include -#include namespace EnergyPlus { @@ -396,7 +396,7 @@ namespace DataZoneEquipment { Array1D_int EquipType_Num; Array1D_string EquipName; Array1D_int EquipIndex; - std::vector compPointer; + std::vector compPointer; Array1D_int CoolingPriority; Array1D_int HeatingPriority; Array1D_int SequentialCoolingFractionSchedPtr; diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index 23d675f7b10..5d4133b65d1 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -2874,6 +2874,29 @@ namespace Fans { return NodeNumber; } + int getFanInNodeIndex(int const &FanIndex, // fan index + bool &ErrorsFound // set to true if problem + ) + { + + int NodeNumber = 0; // returned outlet node of matched fan + + // Obtains and Allocates fan related parameters from input file + if (GetFanInputFlag) { // First time subroutine has been entered + GetFanInput(); + GetFanInputFlag = false; + } + + if (FanIndex != 0) { + NodeNumber = Fan(FanIndex).InletNodeNum; + } else { + ShowSevereError("getFanInNodeIndex: Could not find Fan"); + ErrorsFound = true; + } + + return NodeNumber; + } + int GetFanOutletNode(std::string const &FanType, // must match fan types in this module std::string const &FanName, // must match fan names for the fan type bool &ErrorsFound // set to true if problem diff --git a/src/EnergyPlus/Fans.hh b/src/EnergyPlus/Fans.hh index 234495e0ee4..c8c07349210 100644 --- a/src/EnergyPlus/Fans.hh +++ b/src/EnergyPlus/Fans.hh @@ -364,6 +364,10 @@ namespace Fans { bool &ErrorsFound // set to true if problem ); + int getFanInNodeIndex(int const &FanIndex, // fan index + bool &ErrorsFound // set to true if problem + ); + int GetFanOutletNode(std::string const &FanType, // must match fan types in this module std::string const &FanName, // must match fan names for the fan type bool &ErrorsFound // set to true if problem diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 577cc1ce72a..52e834f4c9b 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -237,11 +239,16 @@ namespace HVACVariableRefrigerantFlow { Array1D VRFTUNumericFields; // holds VRF TU numeric input fields character field name void SimulateVRF(std::string const &CompName, - int const ZoneNum, bool const FirstHVACIteration, + int const ZoneNum, + int &CompIndex, + bool &HeatingActive, + bool &CoolingActive, + int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit + Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit + bool const ZoneEquipment, // TRUE if called as zone equipment Real64 &SysOutputProvided, - Real64 &LatOutputProvided, - int &CompIndex) + Real64 &LatOutputProvided) { // SUBROUTINE INFORMATION: @@ -284,6 +291,13 @@ namespace HVACVariableRefrigerantFlow { } CompIndex = VRFTUNum; + // suppress unused warnings temporarily until VRF inherits HVACSystemData + if (OAUnitNum > 0) { + bool tmpFlag = false; + if (OAUCoilOutTemp > 0.0) tmpFlag = true; + if (ZoneEquipment) tmpFlag = true; + } + } else { VRFTUNum = CompIndex; if (VRFTUNum > NumVRFTU || VRFTUNum < 1) { @@ -359,6 +373,9 @@ namespace HVACVariableRefrigerantFlow { // Report the current VRF terminal unit ReportVRFTerminalUnit(VRFTUNum); + if (VRFTU(VRFTUNum).TotalCoolingRate > 0.0 ) CoolingActive = true; + if (VRFTU(VRFTUNum).TotalHeatingRate > 0.0 ) HeatingActive = true; + // make sure all TU in a list are able to get simulated, otherwise condenser is never simulated ** // either fatal on GetInput, or keep track of unused TU's and set their respective flag to TRUE ** // after all VRF terminal units have been simulated, call the VRF condenser model @@ -369,7 +386,7 @@ namespace HVACVariableRefrigerantFlow { VRF(VRFCondenser).CalcVRFCondenser_FluidTCtrl(); } else { // Algorithm Type: VRF model based on system curve - CalcVRFCondenser(VRFCondenser, FirstHVACIteration); + CalcVRFCondenser(VRFCondenser); } ReportVRFCondenser(VRFCondenser); @@ -428,8 +445,7 @@ namespace HVACVariableRefrigerantFlow { } } - void CalcVRFCondenser(int const VRFCond, // index to VRF condenser - bool const EP_UNUSED(FirstHVACIteration) // flag for first time through HVAC system simulation + void CalcVRFCondenser(int const VRFCond ) { @@ -1238,7 +1254,7 @@ namespace HVACVariableRefrigerantFlow { VRF(VRFCond).SourceCompNum); // should be the same as above just entering this function - // VRF( VRFCond ).CondenserInletTemp = Node( VRF( VRFCond ).CondenserNodeNum ).Temp; + // VRF( VRFCond ).CondenserInletTemp = DataLoopNode::Node(VRF(VRFCond).CondenserNodeNum).Temp; VRF(VRFCond).WaterCondenserMassFlow = DataLoopNode::Node(VRF(VRFCond).CondenserNodeNum).MassFlowRate; CpCond = GetSpecificHeatGlycol(PlantLoop(VRF(VRFCond).SourceLoopNum).FluidName, @@ -1439,7 +1455,6 @@ namespace HVACVariableRefrigerantFlow { int ZoneTerminalUnitListNum; // Used to find connection between VRFTU, TUList and VRF condenser int NumCond; // loop counter int NumList; // loop counter - bool ZoneNodeNotFound; // used in error checking int CtrlZone; // index to loop counter int NodeNum; // index to loop counter // Followings for VRF FluidTCtrl Only @@ -2130,8 +2145,8 @@ namespace HVACVariableRefrigerantFlow { ErrorsFound, cCurrentModuleObject, VRF(VRFNum).Name, - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, ObjectIsNotParent); if (!CheckOutAirNodeNumber(VRF(VRFNum).CondenserNodeNum)) { @@ -2145,8 +2160,8 @@ namespace HVACVariableRefrigerantFlow { ErrorsFound, cCurrentModuleObject, VRF(VRFNum).Name, - NodeType_Water, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, 2, ObjectIsNotParent); } else { @@ -2159,14 +2174,14 @@ namespace HVACVariableRefrigerantFlow { ErrorsFound, cCurrentModuleObject, VRF(VRFNum).Name, - NodeType_Water, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, 2, ObjectIsNotParent); TestCompSet(cCurrentModuleObject, VRF(VRFNum).Name, cAlphaArgs(35), cAlphaArgs(36), "Condenser Water Nodes"); } else if (lAlphaFieldBlanks(36) && VRF(VRFNum).CondenserType == DataHVACGlobals::WaterCooled) { ShowSevereError(cCurrentModuleObject + ", \"" + VRF(VRFNum).Name + "\" " + cAlphaFieldNames(36) + " is blank."); - ShowContinueError("...node name must be entered when Condenser Type = DataHVACGlobals::WaterCooled."); + ShowContinueError("...node name must be entered when Condenser Type = WaterCooled."); ErrorsFound = true; } @@ -3105,7 +3120,7 @@ namespace HVACVariableRefrigerantFlow { } cCurrentModuleObject = "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow"; - for (VRFNum = 1; VRFNum <= NumVRFTU; ++VRFNum) { + for ( VRFNum = 1; VRFNum <= NumVRFTU; ++VRFNum ) { VRFTUNum = VRFNum; // initialize local node number variables @@ -3118,16 +3133,16 @@ namespace HVACVariableRefrigerantFlow { OANodeNums = 0; inputProcessor->getObjectItem(cCurrentModuleObject, - VRFTUNum, - cAlphaArgs, - NumAlphas, - rNumericArgs, - NumNums, - IOStat, - lNumericFieldBlanks, - lAlphaFieldBlanks, - cAlphaFieldNames, - cNumericFieldNames); + VRFTUNum, + cAlphaArgs, + NumAlphas, + rNumericArgs, + NumNums, + IOStat, + lNumericFieldBlanks, + lAlphaFieldBlanks, + cAlphaFieldNames, + cNumericFieldNames); VRFTUNumericFields(VRFTUNum).FieldNames.allocate(NumNums); VRFTUNumericFields(VRFTUNum).FieldNames = cNumericFieldNames; @@ -3169,10 +3184,10 @@ namespace HVACVariableRefrigerantFlow { } VRFTU(VRFTUNum).VRFTUInletNodeNum = GetOnlySingleNode( - cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, VRFTU(VRFTUNum).Name, NodeType_Air, NodeConnectionType_Inlet, 1, ObjectIsParent); + cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, VRFTU(VRFTUNum).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, ObjectIsParent); VRFTU(VRFTUNum).VRFTUOutletNodeNum = GetOnlySingleNode( - cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, VRFTU(VRFTUNum).Name, NodeType_Air, NodeConnectionType_Outlet, 1, ObjectIsParent); + cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, VRFTU(VRFTUNum).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Outlet, 1, ObjectIsParent); VRFTU(VRFTUNum).MaxCoolAirVolFlow = rNumericArgs(1); VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = rNumericArgs(2); @@ -3195,151 +3210,163 @@ namespace HVACVariableRefrigerantFlow { if (UtilityRoutines::SameString(cAlphaArgs(6), "BlowThrough")) VRFTU(VRFTUNum).FanPlace = DataHVACGlobals::BlowThru; if (UtilityRoutines::SameString(cAlphaArgs(6), "DrawThrough")) VRFTU(VRFTUNum).FanPlace = DataHVACGlobals::DrawThru; - if (VRFTU(VRFTUNum).FanPlace == 0) { - ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError("Illegal " + cAlphaFieldNames(6) + " = " + cAlphaArgs(6)); - ErrorsFound = true; - } - // Get fan data - FanType = cAlphaArgs(7); - FanName = cAlphaArgs(8); - if (UtilityRoutines::SameString(FanType, "Fan:SystemModel")) { - if (!HVACFan::checkIfFanNameIsAFanSystem(FanName)) { - ErrorsFound = true; + if (!lAlphaFieldBlanks(7) && !lAlphaFieldBlanks(8)) { + // Get fan data + FanType = cAlphaArgs(7); + FanName = cAlphaArgs(8); + if (UtilityRoutines::SameString(FanType, "Fan:SystemModel")) { + if (!HVACFan::checkIfFanNameIsAFanSystem(FanName)) { + ErrorsFound = true; + } else { + VRFTU(VRFTUNum).fanType_Num = DataHVACGlobals::FanType_SystemModelObject; + } } else { - VRFTU(VRFTUNum).fanType_Num = DataHVACGlobals::FanType_SystemModelObject; - } - } else { - errFlag = false; - GetFanType(FanName, VRFTU(VRFTUNum).fanType_Num, errFlag, cCurrentModuleObject); - if (errFlag) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ErrorsFound = true; + errFlag = false; + GetFanType(FanName, VRFTU(VRFTUNum).fanType_Num, errFlag, cCurrentModuleObject); + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ErrorsFound = true; + } } - } - - // Check the type of the fan is correct - if (!UtilityRoutines::SameString(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanType)) { - ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError("Fan type specified = " + cAlphaArgs(7)); - ShowContinueError("Based on the fan name the type of fan actually used = " + DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num)); - ErrorsFound = true; - } - if (VRFTU(VRFTUNum).VRFSysNum > 0) { - // VRFTU Supply Air Fan Object Type must be Fan:VariableVolume if VRF Algorithm Type is AlgorithmTypeFluidTCtrl - if (VRF(VRFTU(VRFTUNum).VRFSysNum).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl && - !(VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleVAV || - VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject)) { - ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError("Fan type specified = " + cAlphaArgs(7)); - ShowContinueError( - "Fan Object Type must be Fan:VariableVolume if VRF AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl"); - ShowContinueError("is used to model VRF outdoor unit."); - ErrorsFound = true; - } - // VRFTU Supply Air Fan Object Type must be Fan:OnOff or Fan:ConstantVolume if VRF Algorithm Type is AlgorithmTypeSysCurve - if (VRF(VRFTU(VRFTUNum).VRFSysNum).VRFAlgorithmTypeNum == AlgorithmTypeSysCurve && - !(VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleOnOff || VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume || - VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject)) { + // Check the type of the fan is correct + if (!UtilityRoutines::SameString(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanType)) { ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); ShowContinueError("Fan type specified = " + cAlphaArgs(7)); - ShowContinueError( - "Fan Object Type must be Fan:SystemModel, Fan:OnOff, or Fan:ConstantVolume if VRF AirConditioner:VariableRefrigerantFlow"); - ShowContinueError("is used to model VRF outdoor unit."); + ShowContinueError("Based on the fan name the type of fan actually used = " + DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num)); ErrorsFound = true; } - } - - if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleOnOff || VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume || - VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleVAV) { - - ValidateComponent(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanName, IsNotOK, cCurrentModuleObject); - if (IsNotOK) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ErrorsFound = true; - - } else { // mine data from fan object - // Get the fan index - errFlag = false; - GetFanIndex(FanName, VRFTU(VRFTUNum).FanIndex, errFlag); - if (errFlag) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + if (VRFTU(VRFTUNum).VRFSysNum > 0) { + // VRFTU Supply Air Fan Object Type must be Fan:VariableVolume if VRF Algorithm Type is AlgorithmTypeFluidTCtrl + if (VRF(VRFTU(VRFTUNum).VRFSysNum).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl && + !(VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleVAV || + VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject)) { + ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError("Fan type specified = " + cAlphaArgs(7)); + ShowContinueError( + "Fan Object Type must be Fan:VariableVolume if VRF AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl"); + ShowContinueError("is used to model VRF outdoor unit."); ErrorsFound = true; - } else { - VRFTU(VRFTUNum).fanOutletNode = Fans::Fan(VRFTU(VRFTUNum).FanIndex).OutletNodeNum; } - - // Set the Design Fan Volume Flow Rate - errFlag = false; - FanVolFlowRate = GetFanDesignVolumeFlowRate(FanType, FanName, errFlag); - VRFTU(VRFTUNum).ActualFanVolFlowRate = FanVolFlowRate; - - if (errFlag) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " =" + VRFTU(VRFTUNum).Name); + // VRFTU Supply Air Fan Object Type must be Fan:OnOff or Fan:ConstantVolume if VRF Algorithm Type is AlgorithmTypeSysCurve + if (VRF(VRFTU(VRFTUNum).VRFSysNum).VRFAlgorithmTypeNum == AlgorithmTypeSysCurve && + !(VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleOnOff || VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume || + VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject)) { + ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError("Fan type specified = " + cAlphaArgs(7)); + ShowContinueError("Fan Object Type must be Fan:SystemModel, Fan:OnOff, or Fan:ConstantVolume if VRF " + "AirConditioner:VariableRefrigerantFlow"); + ShowContinueError("is used to model VRF outdoor unit."); ErrorsFound = true; } + } - // Get the Fan Inlet Node - errFlag = false; - FanInletNodeNum = GetFanInletNode(FanType, FanName, errFlag); - if (errFlag) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ErrorsFound = true; - } + if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleOnOff || VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume || + VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleVAV) { - // Get the Fan Outlet Node - errFlag = false; - FanOutletNodeNum = GetFanOutletNode(FanType, FanName, errFlag); - if (errFlag) { + ValidateComponent(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanName, IsNotOK, cCurrentModuleObject); + if (IsNotOK) { ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); ErrorsFound = true; - } - // Get the fan's availability schedule - errFlag = false; - VRFTU(VRFTUNum).FanAvailSchedPtr = GetFanAvailSchPtr(FanType, FanName, errFlag); - if (errFlag) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ErrorsFound = true; - } + } else { // mine data from fan object - // Check fan's schedule for cycling fan operation if constant volume fan is used - if (VRFTU(VRFTUNum).FanOpModeSchedPtr > 0 && VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume) { - if (!CheckScheduleValueMinMax(VRFTU(VRFTUNum).FanOpModeSchedPtr, ">", 0.0, "<=", 1.0)) { - ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError("For fan type = " + DataHVACGlobals::cFanTypes(DataHVACGlobals::FanType_SimpleConstVolume)); - ShowContinueError("Fan operating mode must be continuous (fan operating mode schedule values > 0)."); - ShowContinueError("Error found in " + cAlphaFieldNames(5) + " = " + cAlphaArgs(5)); - ShowContinueError("...schedule values must be (>0., <=1.)"); + // Get the fan index + errFlag = false; + GetFanIndex(FanName, VRFTU(VRFTUNum).FanIndex, errFlag); + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); ErrorsFound = true; + } else { + VRFTU(VRFTUNum).fanInletNode = Fans::Fan(VRFTU(VRFTUNum).FanIndex).InletNodeNum; + VRFTU(VRFTUNum).fanOutletNode = Fans::Fan(VRFTU(VRFTUNum).FanIndex).OutletNodeNum; } - } - } // IF (IsNotOK) THEN - } else if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { + // Set the Design Fan Volume Flow Rate + errFlag = false; + FanVolFlowRate = GetFanDesignVolumeFlowRate(FanType, FanName, errFlag); + VRFTU(VRFTUNum).ActualFanVolFlowRate = FanVolFlowRate; + + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " =" + VRFTU(VRFTUNum).Name); + ErrorsFound = true; + } + + // Get the Fan Inlet node + errFlag = false; + FanInletNodeNum = GetFanInletNode(FanType, FanName, errFlag); + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ErrorsFound = true; + } + + // Get the Fan Outlet node + errFlag = false; + FanOutletNodeNum = GetFanOutletNode(FanType, FanName, errFlag); + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ErrorsFound = true; + } + + // Get the fan's availability schedule + errFlag = false; + VRFTU(VRFTUNum).FanAvailSchedPtr = GetFanAvailSchPtr(FanType, FanName, errFlag); + if (errFlag) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ErrorsFound = true; + } + + // Check fan's schedule for cycling fan operation if constant volume fan is used + if (VRFTU(VRFTUNum).FanOpModeSchedPtr > 0 && VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SimpleConstVolume) { + if (!CheckScheduleValueMinMax(VRFTU(VRFTUNum).FanOpModeSchedPtr, ">", 0.0, "<=", 1.0)) { + ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError("For fan type = " + DataHVACGlobals::cFanTypes(DataHVACGlobals::FanType_SimpleConstVolume)); + ShowContinueError("Fan operating mode must be continuous (fan operating mode schedule values > 0)."); + ShowContinueError("Error found in " + cAlphaFieldNames(5) + " = " + cAlphaArgs(5)); + ShowContinueError("...schedule values must be (>0., <=1.)"); + ErrorsFound = true; + } + } + } // IF (IsNotOK) THEN + + } else if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { + + ValidateComponent(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanName, IsNotOK, cCurrentModuleObject); + if (IsNotOK) { + ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ErrorsFound = true; - ValidateComponent(DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), FanName, IsNotOK, cCurrentModuleObject); - if (IsNotOK) { - ShowContinueError("...occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + } else { // mine data from fan object + HVACFan::fanObjs.emplace_back(new HVACFan::FanSystem(FanName)); // call constructor + VRFTU(VRFTUNum).FanIndex = HVACFan::getFanObjectVectorIndex(FanName); + VRFTU(VRFTUNum).ActualFanVolFlowRate = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + FanInletNodeNum = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->inletNodeNum; + FanOutletNodeNum = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->outletNodeNum; + VRFTU(VRFTUNum).FanAvailSchedPtr = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->availSchedIndex; + VRFTU(VRFTUNum).fanInletNode = FanInletNodeNum; + VRFTU(VRFTUNum).fanOutletNode = FanOutletNodeNum; + } + } else { // IF (FanType_Num == DataHVACGlobals::FanType_SimpleOnOff .OR. FanType_Num == DataHVACGlobals::FanType_SimpleConstVolume)THEN + ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError("Illegal " + cAlphaFieldNames(7) + " = " + cAlphaArgs(7)); ErrorsFound = true; + } // IF (FanType_Num == DataHVACGlobals::FanType_SimpleOnOff .OR. FanType_Num == DataHVACGlobals::FanType_SimpleConstVolume)THEN - } else { // mine data from fan object - HVACFan::fanObjs.emplace_back(new HVACFan::FanSystem(FanName)); // call constructor - VRFTU(VRFTUNum).FanIndex = HVACFan::getFanObjectVectorIndex(FanName); - VRFTU(VRFTUNum).ActualFanVolFlowRate = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; - FanInletNodeNum = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->inletNodeNum; - FanOutletNodeNum = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->outletNodeNum; - VRFTU(VRFTUNum).FanAvailSchedPtr = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->availSchedIndex; - VRFTU(VRFTUNum).fanOutletNode = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->outletNodeNum; - } - } else { // IF (FanType_Num == DataHVACGlobals::FanType_SimpleOnOff .OR. FanType_Num == DataHVACGlobals::FanType_SimpleConstVolume)THEN - ShowSevereError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError("Illegal " + cAlphaFieldNames(7) + " = " + cAlphaArgs(7)); - ErrorsFound = true; - } // IF (FanType_Num == DataHVACGlobals::FanType_SimpleOnOff .OR. FanType_Num == DataHVACGlobals::FanType_SimpleConstVolume)THEN + // Add TU to component sets array + SetUpCompSets(cCurrentModuleObject, + VRFTU(VRFTUNum).Name, + DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), + FanName, + DataLoopNode::NodeID(FanInletNodeNum), + DataLoopNode::NodeID(FanOutletNodeNum)); + + } else if (lAlphaFieldBlanks(7) || lAlphaFieldBlanks(8)) { + VRFTU(VRFTUNum).FanPlace = 0; // reset fan placement when fan is not used so as not to call the fan + } else { + VRFTU(VRFTUNum).FanPlace = 0; + } // Get OA mixer data OAMixerType = cAlphaArgs(9); @@ -3390,6 +3417,8 @@ namespace HVACVariableRefrigerantFlow { GetDXCoilIndex(cAlphaArgs(12), VRFTU(VRFTUNum).CoolCoilIndex, errFlag, DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Cooling)); CCoilInletNodeNum = GetDXCoilInletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Cooling), cAlphaArgs(12), errFlag); CCoilOutletNodeNum = GetDXCoilOutletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Cooling), cAlphaArgs(12), errFlag); + VRFTU(VRFTUNum).coolCoilAirInNode = CCoilInletNodeNum; + VRFTU(VRFTUNum).coolCoilAirOutNode = CCoilOutletNodeNum; if (errFlag) ShowContinueError("...occurs in " + cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\""); @@ -3408,11 +3437,19 @@ namespace HVACVariableRefrigerantFlow { DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).VRFOUPtr = VRFTU(VRFTUNum).VRFSysNum; DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).SupplyFanIndex = VRFTU(VRFTUNum).FanIndex; if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { - DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = - HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + if (VRFTU(VRFTUNum).FanIndex > -1) { + DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = + HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + } else { + DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = AutoSize; + } } else { - DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = - EnergyPlus::Fans::Fan(VRFTU(VRFTUNum).FanIndex).MaxAirFlowRate; + if ( VRFTU(VRFTUNum).FanIndex > 0 ) { + DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = + EnergyPlus::Fans::Fan(VRFTU(VRFTUNum).FanIndex).MaxAirFlowRate; + } else { + DXCoils::DXCoil(VRFTU(VRFTUNum).CoolCoilIndex).RatedAirVolFlowRate(1) = AutoSize; + } } } else { @@ -3445,6 +3482,8 @@ namespace HVACVariableRefrigerantFlow { GetDXCoilIndex(cAlphaArgs(12), VRFTU(VRFTUNum).CoolCoilIndex, errFlag, DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Cooling)); CCoilInletNodeNum = GetDXCoilInletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Cooling), cAlphaArgs(12), errFlag); CCoilOutletNodeNum = GetDXCoilOutletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Cooling), cAlphaArgs(12), errFlag); + VRFTU(VRFTUNum).coolCoilAirInNode = CCoilInletNodeNum; + VRFTU(VRFTUNum).coolCoilAirOutNode = CCoilOutletNodeNum; if (errFlag) ShowContinueError("...occurs in " + cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\""); @@ -3503,6 +3542,8 @@ namespace HVACVariableRefrigerantFlow { GetDXCoilIndex(cAlphaArgs(14), VRFTU(VRFTUNum).HeatCoilIndex, errFlag, DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Heating)); HCoilInletNodeNum = GetDXCoilInletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Heating), cAlphaArgs(14), errFlag); HCoilOutletNodeNum = GetDXCoilOutletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_FluidTCtrl_Heating), cAlphaArgs(14), errFlag); + VRFTU(VRFTUNum).heatCoilAirInNode = HCoilInletNodeNum; + VRFTU(VRFTUNum).heatCoilAirOutNode = HCoilOutletNodeNum; if (errFlag) ShowContinueError("...occurs in " + cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\""); @@ -3624,11 +3665,19 @@ namespace HVACVariableRefrigerantFlow { DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).VRFOUPtr = VRFTU(VRFTUNum).VRFSysNum; DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).SupplyFanIndex = VRFTU(VRFTUNum).FanIndex; if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { - DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = - HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + if (VRFTU(VRFTUNum).FanIndex > -1) { + DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = + HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + } else { + DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = AutoSize; + } } else { - DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = - EnergyPlus::Fans::Fan(VRFTU(VRFTUNum).FanIndex).MaxAirFlowRate; + if (VRFTU(VRFTUNum).FanIndex > 0) { + DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = + EnergyPlus::Fans::Fan(VRFTU(VRFTUNum).FanIndex).MaxAirFlowRate; + } else { + DXCoils::DXCoil(VRFTU(VRFTUNum).HeatCoilIndex).RatedAirVolFlowRate(1) = AutoSize; + } } // Terminal unit heating to cooling sizing ratio has precedence over VRF system sizing ratio @@ -3704,6 +3753,8 @@ namespace HVACVariableRefrigerantFlow { GetDXCoilIndex(cAlphaArgs(14), VRFTU(VRFTUNum).HeatCoilIndex, errFlag, DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Heating)); HCoilInletNodeNum = GetDXCoilInletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Heating), cAlphaArgs(14), errFlag); HCoilOutletNodeNum = GetDXCoilOutletNode(DataHVACGlobals::cAllCoilTypes(DataHVACGlobals::CoilVRF_Heating), cAlphaArgs(14), errFlag); + VRFTU(VRFTUNum).heatCoilAirInNode = HCoilInletNodeNum; + VRFTU(VRFTUNum).heatCoilAirOutNode = HCoilOutletNodeNum; if (errFlag) ShowContinueError("...occurs in " + cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\""); @@ -4020,7 +4071,7 @@ namespace HVACVariableRefrigerantFlow { ShowContinueError("Occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); ErrorsFound = true; } - // Get the supplemental heating Coil air inlet Node + // Get the supplemental heating Coil air inlet node errFlag = false; SuppHeatCoilAirInletNode = WaterCoils::GetCoilInletNode("Coil:Heating:Water", SuppHeatingCoilName, errFlag); VRFTU(VRFTUNum).SuppHeatCoilAirInletNode = SuppHeatCoilAirInletNode; @@ -4028,7 +4079,7 @@ namespace HVACVariableRefrigerantFlow { ShowContinueError("Occurs in " + cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); ErrorsFound = true; } - // Get the supplemental heating coil air outlet Node + // Get the supplemental heating coil air outlet node errFlag = false; SuppHeatCoilAirOutletNode = WaterCoils::GetCoilOutletNode("Coil:Heating:Water", SuppHeatingCoilName, errFlag); VRFTU(VRFTUNum).SuppHeatCoilAirOutletNode = SuppHeatCoilAirOutletNode; @@ -4101,6 +4152,15 @@ namespace HVACVariableRefrigerantFlow { } } + if (!lAlphaFieldBlanks(19)) { + VRFTU(VRFTUNum).ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(19), Zone); + if (VRFTU(VRFTUNum).ZoneNum == 0) { + ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowContinueError("Illegal " + cAlphaFieldNames(19) + " = " + cAlphaArgs(19)); + ErrorsFound = true; + } + } + // set supplemental heating coil operation temperature limits if (VRFTU(VRFTUNum).SuppHeatingCoilPresent) { // Set maximum supply air temperature for supplemental heating coil @@ -4109,14 +4169,6 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).MaxOATSuppHeatingCoil = rNumericArgs(12); } - // Add TU to component sets array - SetUpCompSets(cCurrentModuleObject, - VRFTU(VRFTUNum).Name, - DataHVACGlobals::cFanTypes(VRFTU(VRFTUNum).fanType_Num), - FanName, - NodeID(FanInletNodeNum), - NodeID(FanOutletNodeNum)); - // Add cooling coil to component sets array if (VRFTU(VRFTUNum).CoolingCoilPresent) { @@ -4124,8 +4176,8 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).Name, DataHVACGlobals::cAllCoilTypes(VRFTU(VRFTUNum).DXCoolCoilType_Num), cAlphaArgs(12), - NodeID(CCoilInletNodeNum), - NodeID(CCoilOutletNodeNum)); + DataLoopNode::NodeID(CCoilInletNodeNum), + DataLoopNode::NodeID(CCoilOutletNodeNum)); // set heating coil present flag SetDXCoolingCoilData( VRFTU(VRFTUNum).CoolCoilIndex, ErrorsFound, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, VRFTU(VRFTUNum).HeatingCoilPresent); @@ -4157,8 +4209,8 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).Name, DataHVACGlobals::cAllCoilTypes(VRFTU(VRFTUNum).DXHeatCoilType_Num), cAlphaArgs(14), - NodeID(HCoilInletNodeNum), - NodeID(HCoilOutletNodeNum)); + DataLoopNode::NodeID(HCoilInletNodeNum), + DataLoopNode::NodeID(HCoilOutletNodeNum)); // set cooling coil present flag SetDXCoolingCoilData( VRFTU(VRFTUNum).HeatCoilIndex, ErrorsFound, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, VRFTU(VRFTUNum).CoolingCoilPresent); @@ -4216,8 +4268,8 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).Name, DataHVACGlobals::cAllCoilTypes(VRFTU(VRFTUNum).SuppHeatCoilType_Num), SuppHeatingCoilName, - NodeID(SuppHeatCoilAirInletNode), - NodeID(SuppHeatCoilAirOutletNode)); + DataLoopNode::NodeID(SuppHeatCoilAirInletNode), + DataLoopNode::NodeID(SuppHeatCoilAirOutletNode)); } // Set up component set for OA mixer - use OA node and Mixed air node if (VRFTU(VRFTUNum).OAMixerUsed) @@ -4225,8 +4277,8 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).Name, "UNDEFINED", VRFTU(VRFTUNum).OAMixerName, - NodeID(OANodeNums(1)), - NodeID(OANodeNums(4))); + DataLoopNode::NodeID(OANodeNums(1)), + DataLoopNode::NodeID(OANodeNums(4))); // Get AirTerminal mixer data GetATMixer(VRFTU(VRFTUNum).Name, @@ -4247,246 +4299,68 @@ namespace HVACVariableRefrigerantFlow { ErrorsFound = true; } - // TU inlet node must be the same as a zone exhaust node and the OA Mixer return node - // check that TU inlet node is a zone exhaust node. + // for ZoneHVAC check that TU inlet node is a zone exhaust node otherwise ZoneAirNode and ZoneNum = 0 if (!VRFTU(VRFTUNum).ATMixerExists || VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_SupplySide) { - ZoneNodeNotFound = true; for (CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { if (!ZoneEquipConfig(CtrlZone).IsControlled) continue; for (NodeNum = 1; NodeNum <= ZoneEquipConfig(CtrlZone).NumExhaustNodes; ++NodeNum) { if (VRFTU(VRFTUNum).VRFTUInletNodeNum == ZoneEquipConfig(CtrlZone).ExhaustNode(NodeNum)) { VRFTU(VRFTUNum).ZoneAirNode = ZoneEquipConfig(CtrlZone).ZoneNode; - ZoneNodeNotFound = false; + VRFTU(VRFTUNum).ZoneNum = CtrlZone; break; } } } - if (ZoneNodeNotFound) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name."); - ShowContinueError("... Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError("... Zone terminal unit inlet node name = " + NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); - ErrorsFound = true; - } - } - // check OA Mixer return node - if (!VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).OAMixerUsed) { - if (VRFTU(VRFTUNum).VRFTUInletNodeNum != OANodeNums(3)) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name."); - ShowContinueError("... Zone terminal unit air inlet node name = " + NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); - ShowContinueError("... OutdoorAir:Mixer return air node name = " + NodeID(OANodeNums(3))); - ErrorsFound = true; - } - } - // check that TU outlet node is a zone inlet node. - if (!VRFTU(VRFTUNum).ATMixerExists || VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_InletSide) { - ZoneNodeNotFound = true; + } else if (VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_InletSide) { for (CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { if (!ZoneEquipConfig(CtrlZone).IsControlled) continue; for (NodeNum = 1; NodeNum <= ZoneEquipConfig(CtrlZone).NumInletNodes; ++NodeNum) { if (VRFTU(VRFTUNum).VRFTUOutletNodeNum == ZoneEquipConfig(CtrlZone).InletNode(NodeNum)) { VRFTU(VRFTUNum).ZoneAirNode = ZoneEquipConfig(CtrlZone).ZoneNode; - ZoneNodeNotFound = false; + VRFTU(VRFTUNum).ZoneNum = CtrlZone; break; } } } - if (ZoneNodeNotFound) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Zone terminal unit air outlet node name must be the same as a zone inlet node name."); - ShowContinueError("... Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError("... Zone terminal unit outlet node name = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } } - // check fan inlet and outlet nodes - if (VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::BlowThru) { - if (!VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).OAMixerUsed) { - if (FanInletNodeNum != OANodeNums(4)) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); - ShowContinueError( - "as the outside air mixers mixed air node name when blow through fan is specified and an outside air mixer is present."); - ShowContinueError("... Fan inlet node = " + NodeID(FanInletNodeNum)); - ShowContinueError("... OA mixers mixed air node = " + NodeID(OANodeNums(4))); - ErrorsFound = true; - } - } else if (!VRFTU(VRFTUNum).OAMixerUsed && (VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_SupplySide)) { - if (FanInletNodeNum != VRFTU(VRFTUNum).VRFTUInletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); - ShowContinueError( - "as the terminal unit air inlet node name when blow through fan is specified and an outside air mixer is not present."); - ShowContinueError("... Fan inlet node = " + NodeID(FanInletNodeNum)); - ShowContinueError("... Terminal unit air inlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); - ErrorsFound = true; - } - } - if (VRFTU(VRFTUNum).CoolingCoilPresent) { - if (FanOutletNodeNum != CCoilInletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); - ShowContinueError("as the DX cooling coil air inlet node name when blow through fan is specified."); - ShowContinueError("... Fan outlet node = " + NodeID(FanOutletNodeNum)); - ShowContinueError("... DX cooling coil air inlet node = " + NodeID(CCoilInletNodeNum)); - ErrorsFound = true; - } - if (VRFTU(VRFTUNum).HeatingCoilPresent) { - if (HCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Heating coil outlet node name must be the same"); - ShowContinueError("as the terminal unit air outlet node name when blow through fan is specified."); - ShowContinueError("... Heating coil outlet node = " + NodeID(HCoilOutletNodeNum)); - ShowContinueError("... Terminal Unit air outlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } - } else { - if (CCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Cooling coil outlet node name must be the same"); - ShowContinueError( - "as the terminal unit air outlet node name when blow through fan is specified and no DX heating coil is present."); - ShowContinueError("... Cooling coil outlet node = " + NodeID(CCoilOutletNodeNum)); - ShowContinueError("... Terminal Unit air outlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } - } - } else if (VRFTU(VRFTUNum).HeatingCoilPresent) { - if (FanOutletNodeNum != HCoilInletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); - ShowContinueError( - "as the DX heating coil air inlet node name when blow through fan is specified and a DX cooling coil is not present."); - ShowContinueError("... Fan outlet node = " + NodeID(FanOutletNodeNum)); - ShowContinueError("... DX heating coil air inlet node = " + NodeID(HCoilInletNodeNum)); - ErrorsFound = true; - } - if (HCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Heating coil outlet node name must be the same"); - ShowContinueError("as the terminal unit air outlet node name when blow through fan is specified."); - ShowContinueError("... Heating coil outlet node = " + NodeID(HCoilOutletNodeNum)); - ShowContinueError("... Terminal Unit air outlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } + } // end Number of VRF Terminal Unit Loop + + // perform additional error checking + for (NumList = 1; NumList <= NumVRFTULists; ++NumList) { + for (VRFNum = 1; VRFNum <= TerminalUnitList(NumList).NumTUInList; ++VRFNum) { + if (TerminalUnitList(NumList).ZoneTUPtr(VRFNum) == 0) { + // TU name in zone terminal unit list not found + ShowSevereError("ZoneTerminalUnitList \"" + TerminalUnitList(NumList).Name + "\""); + ShowContinueError("...Zone Terminal Unit = " + TerminalUnitList(NumList).ZoneTUName(VRFNum) + " improperly connected to system."); + ShowContinueError("...either the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object does not exist,"); + ShowContinueError("...the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object name is misspelled,"); + ShowContinueError("...or the ZoneTerminalUnitList object is not named in an AirConditioner:VariableRefrigerantFlow object."); + ErrorsFound = true; } - } else if (VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::DrawThru) { - if (VRFTU(VRFTUNum).CoolingCoilPresent) { - if (!VRFTU(VRFTUNum).OAMixerUsed) { - if (VRFTU(VRFTUNum).VRFTUInletNodeNum != CCoilInletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Cooling coil inlet node name must be the same"); - ShowContinueError("as the terminal unit air inlet node name when draw through fan is specified."); - ShowContinueError("... Terminal unit air inlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); - ShowContinueError("... DX cooling coil air inlet node = " + NodeID(CCoilInletNodeNum)); - ErrorsFound = true; - } - } - if (VRFTU(VRFTUNum).HeatingCoilPresent) { - if (FanInletNodeNum != HCoilOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); - ShowContinueError("as the DX heating coil air outlet node name when draw through fan is specified."); - ShowContinueError("... Fan inlet node = " + NodeID(FanInletNodeNum)); - ShowContinueError("... DX heating coil air outlet node = " + NodeID(HCoilOutletNodeNum)); - ErrorsFound = true; - } - } else { - if (FanInletNodeNum != CCoilOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); - ShowContinueError("as the DX cooling coil air outlet node name when draw through fan is specified and a DX heating coil " - "is not present."); - ShowContinueError("... Fan inlet node = " + NodeID(FanInletNodeNum)); - ShowContinueError("... DX cooling coil air outlet node = " + NodeID(CCoilOutletNodeNum)); - ErrorsFound = true; + if (VRFTU(VRFNum).VRFSysNum > 0) { + if (TerminalUnitList(NumList).NumTUInList == 1 && VRF(VRFTU(VRFNum).VRFSysNum).VRFAlgorithmTypeNum == AlgorithmTypeSysCurve) { + if (VRF(VRFTU(VRFNum).VRFSysNum).HeatRecoveryUsed) { + ShowWarningError("ZoneTerminalUnitList \"" + TerminalUnitList(NumList).Name + "\""); + ShowWarningError("...Only 1 Terminal Unit connected to system and heat recovery is selected."); + ShowContinueError("...Heat recovery will be disabled."); + VRF(VRFNum).HeatRecoveryUsed = false; } } - } else if (VRFTU(VRFTUNum).HeatingCoilPresent) { - if (FanInletNodeNum != HCoilOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); - ShowContinueError("as the DX heating coil air outlet node name when draw through fan is specified."); - ShowContinueError("... Fan inlet node = " + NodeID(FanInletNodeNum)); - ShowContinueError("... DX heating coil air outlet node = " + NodeID(HCoilOutletNodeNum)); - ErrorsFound = true; - } } - if (VRFTU(VRFTUNum).SuppHeatingCoilPresent) { - if (SuppHeatCoilAirOutletNode != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + - "\" Supplemental heating coil air outlet node name must be the same"); - ShowContinueError("as the terminal unit air outlet node name when draw through fan is specified."); - ShowContinueError("... Supplemental heating coil air outlet node = " + NodeID(SuppHeatCoilAirOutletNode)); - ShowContinueError("... Terminal unit air outlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } + } + } + + // warn when number of ZoneTerminalUnitList different from number of AirConditioner:VariableRefrigerantFlow + if (NumVRFTULists != NumVRFCond) { + ShowSevereError("The number of AirConditioner:VariableRefrigerantFlow objects (" + TrimSigDigits(NumVRFCond) + + ") does not match the number of ZoneTerminalUnitList objects (" + TrimSigDigits(NumVRFTULists) + ")."); + for (NumCond = 1; NumCond <= NumVRFCond; ++NumCond) { + if (VRF(NumCond).ZoneTUListPtr > 0) { + ShowContinueError("...AirConditioner:VariableRefrigerantFlow = " + VRF(NumCond).Name + + " specifies Zone Terminal Unit List Name = " + TerminalUnitList(VRF(NumCond).ZoneTUListPtr).Name); } else { - if (FanOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); - ShowContinueError("as the terminal unit air outlet node name when draw through fan is specified."); - ShowContinueError("... Fan outlet node = " + NodeID(FanOutletNodeNum)); - ShowContinueError("... Terminal unit air outlet node = " + NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); - ErrorsFound = true; - } - } - } - if (VRFTU(VRFTUNum).CoolingCoilPresent && VRFTU(VRFTUNum).HeatingCoilPresent) { - if (CCoilOutletNodeNum != HCoilInletNodeNum) { - ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" DX cooling coil air outlet node name must be the same"); - ShowContinueError(" as the DX heating coil air inlet node name."); - ShowContinueError("... DX cooling coil air outlet node = " + NodeID(CCoilOutletNodeNum)); - ShowContinueError("... DX heating coil air inlet node = " + NodeID(HCoilInletNodeNum)); - ErrorsFound = true; - } - } - - if (VRFTU(VRFTUNum).ATMixerExists) { - // check that OA flow in cooling must be set to zero when connected to DOAS - if (VRFTU(VRFTUNum).CoolOutAirVolFlow != 0) { - ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError(".. " + cNumericFieldNames(5) + " must be zero when " + cCurrentModuleObject); - ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); - ShowContinueError(".. " + cNumericFieldNames(5) + " is set to 0 and simulation continues."); - VRFTU(VRFTUNum).CoolOutAirVolFlow = 0; - } - // check that OA flow in heating must be set to zero when connected to DOAS - if (VRFTU(VRFTUNum).HeatOutAirVolFlow != 0) { - ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError(".. " + cNumericFieldNames(6) + " must be zero when " + cCurrentModuleObject); - ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); - ShowContinueError(".. " + cNumericFieldNames(6) + " is set to 0 and simulation continues."); - VRFTU(VRFTUNum).HeatOutAirVolFlow = 0; - } - // check that OA flow in no cooling and no heating must be set to zero when connected to DOAS - if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow != 0) { - ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); - ShowContinueError(".. " + cNumericFieldNames(7) + " must be zero when " + cCurrentModuleObject); - ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); - ShowContinueError(".. " + cNumericFieldNames(7) + " is set to 0 and simulation continues."); - VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = 0; - } - } - - } // end Number of VRF Terminal Unit Loop - - // perform additional error checking - for (NumList = 1; NumList <= NumVRFTULists; ++NumList) { - for (VRFNum = 1; VRFNum <= TerminalUnitList(NumList).NumTUInList; ++VRFNum) { - if (TerminalUnitList(NumList).ZoneTUPtr(VRFNum) > 0) continue; - // TU name in zone terminal unit list not found - ShowSevereError("ZoneTerminalUnitList \"" + TerminalUnitList(NumList).Name + "\""); - ShowContinueError("...Zone Terminal Unit = " + TerminalUnitList(NumList).ZoneTUName(VRFNum) + " improperly connected to system."); - ShowContinueError("...either the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object does not exist,"); - ShowContinueError("...the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object name is misspelled,"); - ShowContinueError("...or the ZoneTerminalUnitList object is not named in an AirConditioner:VariableRefrigerantFlow object."); - ErrorsFound = true; - } - } - - // warn when number of ZoneTerminalUnitList different from number of AirConditioner:VariableRefrigerantFlow - if (NumVRFTULists != NumVRFCond) { - ShowSevereError("The number of AirConditioner:VariableRefrigerantFlow objects (" + TrimSigDigits(NumVRFCond) + - ") does not match the number of ZoneTerminalUnitList objects (" + TrimSigDigits(NumVRFTULists) + ")."); - for (NumCond = 1; NumCond <= NumVRFCond; ++NumCond) { - if (VRF(NumCond).ZoneTUListPtr > 0) { - ShowContinueError("...AirConditioner:VariableRefrigerantFlow = " + VRF(NumCond).Name + - " specifies Zone Terminal Unit List Name = " + TerminalUnitList(VRF(NumCond).ZoneTUListPtr).Name); - } else { - ShowContinueError("...AirConditioner:VariableRefrigerantFlow = " + VRF(NumCond).Name + - " Zone Terminal Unit List Name not found."); + ShowContinueError("...AirConditioner:VariableRefrigerantFlow = " + VRF(NumCond).Name + + " Zone Terminal Unit List Name not found."); } } ShowContinueError("...listing ZoneTerminalUnitList objects."); @@ -5035,7 +4909,6 @@ namespace HVACVariableRefrigerantFlow { using DataSizing::AutoSize; using DataZoneEquipment::CheckZoneEquipmentList; using DataZoneEquipment::VRFTerminalUnit_Num; - using DataZoneEquipment::ZoneEquipInputsFilled; using DataZoneEquipment::ZoneEquipList; using Fans::GetFanVolFlow; using FluidProperties::GetDensityGlycol; @@ -5122,6 +4995,10 @@ namespace HVACVariableRefrigerantFlow { SuppHeatCoilCapacity = 0.0; SuppHeatCoilLoad = 0.0; + LoadToCoolingSP = 0.0; + LoadToHeatingSP = 0.0; + ErrorsFound = false; + bool SetPointErrorFlag = false; // set condenser inlet temp, used as surrogate for OAT (used to check limits of operation) if (VRF(VRFCond).CondenserType == DataHVACGlobals::WaterCooled) { @@ -5228,55 +5105,590 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).MySuppCoilPlantScanFlag = false; } - // If all VRF Terminal Units on this VRF AC System have been simulated, reset the IsSimulated flag - // The condenser will be simulated after all terminal units have been simulated (see Sub SimulateVRF) - if (all(TerminalUnitList(TUListIndex).IsSimulated)) { - // this should be the first time through on the next iteration. All TU's and condenser have been simulated. - // reset simulation flag for each terminal unit - TerminalUnitList(TUListIndex).IsSimulated = false; - // after all TU's have been simulated, reset operating mode flag if necessary - if (LastModeHeating(VRFCond) && CoolingLoad(VRFCond)) { - LastModeCooling(VRFCond) = true; - LastModeHeating(VRFCond) = false; - // SwitchedMode(VRFCond) = .TRUE. - } - if (LastModeCooling(VRFCond) && HeatingLoad(VRFCond)) { - LastModeHeating(VRFCond) = true; - LastModeCooling(VRFCond) = false; - // SwitchedMode(VRFCond) = .TRUE. - } - } // IF(ALL(TerminalUnitList(VRFTU(VRFTUNum)%TUListIndex)%IsSimulated))THEN - - // one-time check to see if VRF TU's are on Zone Equipment List or issue warning + // one-time check to see if VRF TU's are on ZoneHVAC:EquipmentList or AirloopHVAC or issue warning if (ZoneEquipmentListNotChecked) { - if (ZoneEquipInputsFilled) { - ZoneEquipmentListNotChecked = false; - for (TUListNum = 1; TUListNum <= NumVRFTULists; ++TUListNum) { - for (NumTULoop = 1; NumTULoop <= TerminalUnitList(TUListNum).NumTUInList; ++NumTULoop) { - TUIndex = TerminalUnitList(TUListNum).ZoneTUPtr(NumTULoop); - for (ELLoop = 1; ELLoop <= NumOfZones; ++ELLoop) { // NumOfZoneEquipLists - if (ZoneEquipList(ELLoop).Name == "") continue; // dimensioned by NumOfZones. Only valid ones have names. - for (ListLoop = 1; ListLoop <= ZoneEquipList(ELLoop).NumOfEquipTypes; ++ListLoop) { - if (!UtilityRoutines::SameString(ZoneEquipList(ELLoop).EquipType(ListLoop), - DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num))) - continue; - if (!UtilityRoutines::SameString(ZoneEquipList(ELLoop).EquipName(ListLoop), VRFTU(TUIndex).Name)) continue; - VRFTU(TUIndex).ZoneNum = ELLoop; - if (VRF(VRFTU(TUIndex).VRFSysNum).MasterZonePtr == ELLoop) { - VRF(VRFTU(TUIndex).VRFSysNum).MasterZoneTUIndex = TUIndex; + if (DataAirLoop::AirLoopInputsFilled) ZoneEquipmentListNotChecked = false; + bool AirLoopFound = false; + bool errorsFound = false; + bool AirNodeFound = false; + int ctrlZoneNum = 0; + std::string const cCurrentModuleObject = "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow"; + for (TUListNum = 1; TUListNum <= NumVRFTULists; ++TUListNum) { + for (NumTULoop = 1; NumTULoop <= TerminalUnitList(TUListNum).NumTUInList; ++NumTULoop) { + AirLoopFound = false; // reset for next TU + ctrlZoneNum = 0; // reset for next TU + TUIndex = TerminalUnitList(TUListNum).ZoneTUPtr(NumTULoop); + std::string const thisObjectName = VRFTU(TUIndex).Name; + if (VRFTU(TUIndex).isInZone) goto EquipList_exit; // already found previously + for (ELLoop = 1; ELLoop <= NumOfZones; ++ELLoop) { // NumOfZoneEquipLists + if (ZoneEquipList(ELLoop).Name == "") continue; // dimensioned by NumOfZones. Only valid ones have names. + for (ListLoop = 1; ListLoop <= ZoneEquipList(ELLoop).NumOfEquipTypes; ++ListLoop) { + if (!UtilityRoutines::SameString(ZoneEquipList(ELLoop).EquipType(ListLoop),DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num))) + continue; + if (!UtilityRoutines::SameString(ZoneEquipList(ELLoop).EquipName(ListLoop), VRFTU(TUIndex).Name)) continue; + VRFTU(TUIndex).ZoneNum = ELLoop; + VRFTU(TUIndex).isInZone = true; + if (VRF(VRFTU(TUIndex).VRFSysNum).MasterZonePtr == ELLoop) { + VRF(VRFTU(TUIndex).VRFSysNum).MasterZoneTUIndex = TUIndex; + } + if (VRFTU(TUIndex).ZoneAirNode == 0) { + bool ZoneNodeNotFound = true; + for (int CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { + if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; + for (int NodeNum = 1; NodeNum <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumExhaustNodes; ++NodeNum) { + if (VRFTU(TUIndex).VRFTUInletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).ExhaustNode(NodeNum)) { + VRFTU(TUIndex).ZoneAirNode = DataZoneEquipment::ZoneEquipConfig(CtrlZone).ZoneNode; + ZoneNodeNotFound = false; + break; + } + } + for (int NodeNum = 1; NodeNum <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++NodeNum) { + if (VRFTU(TUIndex).VRFTUOutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(NodeNum)) { + VRFTU(TUIndex).ZoneAirNode = DataZoneEquipment::ZoneEquipConfig(CtrlZone).ZoneNode; + ZoneNodeNotFound = false; + break; + } + } + if (!ZoneNodeNotFound) break; } + if (ZoneNodeNotFound) { + ShowSevereError( + "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow \"" + VRFTU(TUIndex).Name + + "\" Zone terminal unit air inlet node name must be the same as a zone inlet or exhaust node name."); + ShowContinueError("... Zone inlet and exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); + ShowContinueError("... Zone terminal unit inlet node name = " + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUInletNodeNum)); + ShowContinueError("... Zone terminal unit outlet node name = " + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUOutletNodeNum)); + } + } + goto EquipList_exit; + } + } + // check if the TU is connected to an air loop + if (!VRFTU(TUIndex).isInAirLoop) { + for (int AirLoopNum = 1; AirLoopNum <= DataHVACGlobals::NumPrimaryAirSys; ++AirLoopNum) { + for (int BranchNum = 1; BranchNum <= DataAirSystems::PrimaryAirSystem(AirLoopNum).NumBranches; ++BranchNum) { + for (int CompNum = 1; CompNum <= DataAirSystems::PrimaryAirSystem(AirLoopNum).Branch(BranchNum).TotalComponents; + ++CompNum) { + if (UtilityRoutines::SameString(DataAirSystems::PrimaryAirSystem(AirLoopNum).Branch(BranchNum).Comp(CompNum).Name, + thisObjectName) && + UtilityRoutines::SameString(DataAirSystems::PrimaryAirSystem(AirLoopNum).Branch(BranchNum).Comp(CompNum).TypeOf, + cCurrentModuleObject)) { + VRFTU(TUIndex).airLoopNum = AirLoopNum; + AirLoopFound = true; + VRFTU(TUIndex).isInAirLoop = true; + BranchNodeConnections::TestCompSet(cCurrentModuleObject, + thisObjectName, + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUInletNodeNum), + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUOutletNodeNum), + "Air Nodes"); + if (VRFTU(TUIndex).ZoneNum > 0) { + VRFTU(TUIndex).ZoneAirNode = DataZoneEquipment::ZoneEquipConfig(VRFTU(TUIndex).ZoneNum).ZoneNode; + for (int ControlledZoneNum = 1; ControlledZoneNum <= DataGlobals::NumOfZones; ++ControlledZoneNum) { + if (DataZoneEquipment::ZoneEquipConfig(ControlledZoneNum).ActualZoneNum != VRFTU(TUIndex).ZoneNum) + continue; + for (int TstatZoneNum = 1; TstatZoneNum <= DataZoneControls::NumTempControlledZones; ++TstatZoneNum) { + if (DataZoneControls::TempControlledZone(TstatZoneNum).ActualZoneNum != VRFTU(TUIndex).ZoneNum) + continue; + VRF(VRFTU(TUIndex).VRFSysNum).MasterZoneTUIndex = TUIndex; + AirNodeFound = true; + ctrlZoneNum = ControlledZoneNum; + goto EquipList_exit; + } + for (int TstatZoneNum = 1; TstatZoneNum <= DataZoneControls::NumComfortControlledZones; ++TstatZoneNum) { + if (DataZoneControls::ComfortControlledZone(TstatZoneNum).ActualZoneNum != VRFTU(TUIndex).ZoneNum) + continue; + VRF(VRFTU(TUIndex).VRFSysNum).MasterZoneTUIndex = TUIndex; + AirNodeFound = true; + ctrlZoneNum = ControlledZoneNum; + goto EquipList_exit; + } + if (!AirNodeFound && VRFTU(TUIndex).ZoneNum > 0) { + ShowSevereError("Input errors for " + cCurrentModuleObject + ":" + thisObjectName); + ShowContinueError("Did not find Air node (Zone with Thermostat or Thermal Comfort Thermostat)."); + // ShowContinueError("specified Controlling Zone or Thermostat Location name = " + + // loc_controlZoneName); + errorsFound = true; + } + } + } else if (AirLoopFound) { // control zone name not entered in TU object input + VRFTU(TUIndex).isSetPointControlled = true; + } + } if (AirLoopFound) break; + } if (AirLoopFound) break; + } if (AirLoopFound) break; + } + } + + // check if the TU is connected to an outside air system + if (!AirLoopFound && !VRFTU(TUIndex).isInOASys) { + for (int OASysNum = 1; OASysNum <= DataAirLoop::NumOASystems; ++OASysNum) { + for (int OACompNum = 1; OACompNum <= DataAirLoop::OutsideAirSys(OASysNum).NumComponents; ++OACompNum) { + if (!UtilityRoutines::SameString(DataAirLoop::OutsideAirSys(OASysNum).ComponentName(OACompNum), + VRFTU(TUIndex).Name) || + !UtilityRoutines::SameString(DataAirLoop::OutsideAirSys(OASysNum).ComponentType(OACompNum), cCurrentModuleObject)) + continue; + VRFTU(TUIndex).airLoopNum = 0; // need air loop number here? + VRFTU(TUIndex).isInOASys = true; + AirLoopFound = true; + VRFTU(TUIndex).isSetPointControlled = true; + // user may have inadvertantly entered a zone name in the OA system TU object + VRFTU(TUIndex).ZoneNum = 0; + VRFTU(TUIndex).ZoneAirNode = 0; + BranchNodeConnections::TestCompSet(cCurrentModuleObject, + thisObjectName, + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUInletNodeNum), + DataLoopNode::NodeID(VRFTU(TUIndex).VRFTUOutletNodeNum), + "Air Nodes"); goto EquipList_exit; } } - EquipList_exit:; + } + EquipList_exit:; + if (ctrlZoneNum > 0) { + int inletNodeADUNum = 0; + int sysType_Num = 0; + std::string sysName = ""; + for (int inletNode = 1; inletNode <= DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).NumInletNodes; inletNode++) { + if (DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).InletNodeAirLoopNum(inletNode) != VRFTU(TUIndex).airLoopNum) continue; + inletNodeADUNum = DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).InletNodeADUNum(inletNode); + if (inletNodeADUNum > 0 && inletNodeADUNum <= DataDefineEquip::NumAirDistUnits) { + sysType_Num = DataZoneEquipment::AirDistUnit_Num; + sysName = DataDefineEquip::AirDistUnit(inletNodeADUNum).Name; + break; + } + } + if (inletNodeADUNum > 0) { + if (DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex > 0) { + for (int EquipNum = 1; + EquipNum <= + DataZoneEquipment::ZoneEquipList(DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex).NumOfEquipTypes; + ++EquipNum) { + if ((DataZoneEquipment::ZoneEquipList(DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex) + .EquipType_Num(EquipNum) != sysType_Num) || + DataZoneEquipment::ZoneEquipList(DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex) + .EquipName(EquipNum) != sysName) + continue; + VRFTU(TUIndex).zoneSequenceCoolingNum = + DataZoneEquipment::ZoneEquipList(DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex) + .CoolingPriority(EquipNum); + VRFTU(TUIndex).zoneSequenceHeatingNum = + DataZoneEquipment::ZoneEquipList(DataZoneEquipment::ZoneEquipConfig(ctrlZoneNum).EquipListIndex) + .HeatingPriority(EquipNum); + break; + } + } + } else { + ShowSevereError("Input errors for " + cCurrentModuleObject + ":" + thisObjectName); + ShowContinueError("Did not find ZoneHVAC:EquipmentList connected to this VRF terminal unit."); + errorsFound = true; + } } - if (CheckZoneEquipmentList(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num), VRFTU(TUIndex).Name)) continue; - ShowSevereError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num) + ',' + VRFTU(TUIndex).Name + - "] is not on any ZoneHVAC:EquipmentList. It will not be simulated."); + // Find the number of zones (zone Inlet nodes) attached to an air loop from the air loop number + if (AirLoopFound || VRFTU(TUIndex).isInAirLoop) { + int NumAirLoopZones = 0; + bool initLoadBasedControlFlowFracFlagReady = false; + Real64 initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax = 0.0; + if (allocated(DataAirLoop::AirToZoneNodeInfo) && VRFTU(TUIndex).airLoopNum > 0) + NumAirLoopZones = DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).NumZonesCooled + + DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).NumZonesHeated; + if (allocated(DataAirLoop::AirToZoneNodeInfo)) { + initLoadBasedControlFlowFracFlagReady = true; + for (int ZoneInSysIndex = 1; ZoneInSysIndex <= NumAirLoopZones; ++ZoneInSysIndex) { + // zone inlet nodes for cooling + if (DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).NumZonesCooled > 0) { + if (DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).TermUnitCoolInletNodes(ZoneInSysIndex) == -999) { + // the data structure for the zones inlet nodes has not been filled + initLoadBasedControlFlowFracFlagReady = false; + } else { + int ZoneInletNodeNum = + DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).TermUnitCoolInletNodes(ZoneInSysIndex); + if (DataLoopNode::Node(ZoneInletNodeNum).MassFlowRateMax == -999.0) { + // the node mass flow rate has not been set + initLoadBasedControlFlowFracFlagReady = false; + } + } + } + // zone inlet nodes for heating + if (DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).NumZonesHeated > 0) { + if (DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).TermUnitHeatInletNodes(ZoneInSysIndex) == -999) { + // the data structure for the zones inlet nodes has not been filled + initLoadBasedControlFlowFracFlagReady = false; + } else { + int ZoneInletNodeNum = + DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).TermUnitHeatInletNodes(ZoneInSysIndex); + if (DataLoopNode::Node(ZoneInletNodeNum).MassFlowRateMax == -999.0) { + // the node mass flow rate has not been set + initLoadBasedControlFlowFracFlagReady = false; + } + } + } + } + } + if (allocated(DataAirLoop::AirToZoneNodeInfo) && initLoadBasedControlFlowFracFlagReady) { + Real64 SumOfMassFlowRateMax = 0.0; // initialize the sum of the maximum flows + for (int ZoneInSysIndex = 1; ZoneInSysIndex <= NumAirLoopZones; ++ZoneInSysIndex) { + int ZoneInletNodeNum = + DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).TermUnitCoolInletNodes(ZoneInSysIndex); + SumOfMassFlowRateMax += DataLoopNode::Node(ZoneInletNodeNum).MassFlowRateMax; + if (DataAirLoop::AirToZoneNodeInfo(VRFTU(TUIndex).airLoopNum).CoolCtrlZoneNums(ZoneInSysIndex) == + VRFTU(TUIndex).ZoneNum) { + initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax = DataLoopNode::Node(ZoneInletNodeNum).MassFlowRateMax; + } + } + if (SumOfMassFlowRateMax != 0.0 && DataAirLoop::AirLoopInputsFilled) { + if (initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax >= DataHVACGlobals::SmallAirVolFlow) { + VRFTU(TUIndex).controlZoneMassFlowFrac = + initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; + ReportSizingManager::ReportSizingOutput(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num), + VRFTU(TUIndex).Name, + "Fraction of Supply Air Flow That Goes Through the Controlling Zone", + VRFTU(TUIndex).controlZoneMassFlowFrac); + VRFTU(TUIndex).isSetPointControlled = false; // redundant + } else { + if (VRFTU(TUIndex).isInAirLoop && VRFTU(TUIndex).ZoneNum == 0 && VRFTU(TUIndex).ZoneAirNode == 0) { + // TU must be set point controlled and use constant fan mode (or coil out T won't change with PLR/air flow) + VRFTU(TUIndex).isSetPointControlled = true; + if (VRFTU(TUIndex).FanOpModeSchedPtr > 0) { + if (ScheduleManager::GetScheduleMinValue(VRFTU(TUIndex).FanOpModeSchedPtr) == 0.0) { + ShowSevereError(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num) + " = " + VRFTU(TUIndex).Name); + ShowContinueError("When using set point control, fan operating mode must be continuous (fan " + "operating mode schedule values > 0)."); + ShowContinueError("Error found in Supply Air Fan Operating Mode Schedule Name = " + + ScheduleManager::Schedule(VRFTU(TUIndex).FanOpModeSchedPtr).Name); + ShowContinueError("...schedule values must be (>0., <=1.)"); + ErrorsFound = true; + } + } + } else { + ShowSevereError(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num) + " = " + VRFTU(TUIndex).Name); + ShowContinueError(" The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); + VRFTU(TUIndex).controlZoneMassFlowFrac = 1.0; + ReportSizingManager::ReportSizingOutput(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num), + VRFTU(TUIndex).Name, + "Fraction of Supply Air Flow That Goes Through the Controlling Zone", + VRFTU(TUIndex).controlZoneMassFlowFrac); + } + } + } else if (VRFTU(TUIndex).ZoneNum == 0) { + // TU must be set point controlled and use constant fan mode (or coil outlet T won't change with PLR/air flow rate) + // TU inlet air flow rate is also determined by OA system, not TU + VRFTU(TUIndex).isSetPointControlled = true; + } + } + } + + if (VRFTU(TUIndex).isInZone && DataAirLoop::AirLoopInputsFilled) { + if (VRFTU(TUIndex).FanPlace == 0) { + ShowSevereError("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = " + VRFTU(TUIndex).Name); + ShowContinueError("Illegal Supply Air Fan Placement."); + ErrorsFound = true; + } + if (VRFTU(TUIndex).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { + if (VRFTU(TUIndex).FanIndex == -1) { + ShowSevereError("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = " + VRFTU(TUIndex).Name); + ShowContinueError("VRF Terminal Unit fan is required when used as zone equipment."); + ErrorsFound = true; + } + } else { + if (VRFTU(TUIndex).FanIndex == 0) { + ShowSevereError("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = " + VRFTU(TUIndex).Name); + ShowContinueError("VRF Terminal Unit fan is required when used as zone equipment."); + ErrorsFound = true; + } + } + } + + if (VRFTU(TUIndex).isSetPointControlled && DataAirLoop::AirLoopInputsFilled) { + bool missingSetPoint = false; + Real64 TUOutNodeSP = DataLoopNode::Node(VRFTU(TUIndex).VRFTUOutletNodeNum).TempSetPoint; + Real64 coolCoilOutNodeSP = DataLoopNode::Node(VRFTU(TUIndex).coolCoilAirOutNode).TempSetPoint; + Real64 heatCoilOutNodeSP = DataLoopNode::Node(VRFTU(TUIndex).heatCoilAirOutNode).TempSetPoint; + // SP can be at outlet of TU or at outlet of coils + // if supp heat coil is present, a SP must be at the outlet of the TU + if (VRFTU(TUIndex).SuppHeatingCoilPresent) { + if (TUOutNodeSP == DataLoopNode::SensedNodeFlagValue) missingSetPoint = true; + } else { + if (VRFTU(TUIndex).FanPlace == DataHVACGlobals::DrawThru) { + // then SP must be at TU outlet + if (TUOutNodeSP == DataLoopNode::SensedNodeFlagValue) missingSetPoint = true; + // or at coil outlet nodes + if (missingSetPoint) { + if (coolCoilOutNodeSP != DataLoopNode::SensedNodeFlagValue && + heatCoilOutNodeSP != DataLoopNode::SensedNodeFlagValue) + missingSetPoint = false; + } + } else { + // else fan is blow thru or missing + if (TUOutNodeSP == DataLoopNode::SensedNodeFlagValue) missingSetPoint = true; + } + } + if (missingSetPoint) { + if (!DataGlobals::AnyEnergyManagementSystemInModel) { + ShowSevereError("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for " + + VRFTU(TUIndex).Name); + ShowContinueError("...use a Setpoint Manager to establish a setpoint at the TU or coil(s) outlet node."); + ErrorsFound = true; + } else if (DataGlobals::AnyEnergyManagementSystemInModel) { + bool SPNotFound = false; + EMSManager::CheckIfNodeSetPointManagedByEMS( + VRFTU(TUIndex).VRFTUOutletNodeNum, EMSManager::iTemperatureSetPoint, SetPointErrorFlag); + SPNotFound = SPNotFound || SetPointErrorFlag; + EMSManager::CheckIfNodeSetPointManagedByEMS( + VRFTU(TUIndex).coolCoilAirOutNode, EMSManager::iTemperatureSetPoint, SetPointErrorFlag); + SPNotFound = SPNotFound || SetPointErrorFlag; + EMSManager::CheckIfNodeSetPointManagedByEMS( + VRFTU(TUIndex).heatCoilAirOutNode, EMSManager::iTemperatureSetPoint, SetPointErrorFlag); + SPNotFound = SPNotFound || SetPointErrorFlag; + if (SPNotFound && DataAirLoop::AirLoopInputsFilled) { + ShowSevereError( + "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for unitary system = " + + VRFTU(TUIndex).Name); + ShowContinueError("...use a Setpoint Manager to establish a setpoint at the TU or coil(s) outlet node."); + ShowContinueError("...or use an EMS actuator to establish a temperature setpoint at the coil control node."); + ErrorsFound = true; + } + } + } + } + + if (VRFTU(TUIndex).isInAirLoop || VRFTU(TUIndex).isInOASys || + CheckZoneEquipmentList(DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num), VRFTU(TUIndex).Name)) + continue; + if (!DataAirLoop::AirLoopInputsFilled) continue; + ShowSevereError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(TUIndex).VRFTUType_Num) + ',' + VRFTU(TUIndex).Name + + "] is not on any ZoneHVAC:EquipmentList, AirloopHVAC or AirLoopHVAC:OutdoorAirSystem:EquipmentList. It will not " + "be simulated."); ShowContinueError("...The VRF AC System associated with this terminal unit may also not be simulated."); } - } // IF(ZoneEquipInputsFilled) THEN + } + + // TU inlet node must be the same as a zone exhaust node and the OA Mixer return node + // check that TU inlet node is a zone exhaust node. + if (VRFTU(VRFTUNum).isInZone && (!VRFTU(VRFTUNum).ATMixerExists || VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_SupplySide)) { + bool ZoneNodeNotFound = true; + for (int CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { + if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; + for (int NodeNum = 1; NodeNum <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumExhaustNodes; ++NodeNum) { + if (VRFTU(VRFTUNum).VRFTUInletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).ExhaustNode(NodeNum)) { + VRFTU(VRFTUNum).ZoneAirNode = DataZoneEquipment::ZoneEquipConfig(CtrlZone).ZoneNode; + ZoneNodeNotFound = false; + break; + } + } + if (!ZoneNodeNotFound) break; + } + if (ZoneNodeNotFound && !VRFTU(VRFTUNum).isInAirLoop) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + "\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name."); + ShowContinueError("... Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); + ShowContinueError("... Zone terminal unit inlet node name = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); + ErrorsFound = true; + } + } + // check OA Mixer return node + if (VRFTU(VRFTUNum).isInZone && !VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).OAMixerUsed) { + Array1D_int OANodeNums = MixedAir::GetOAMixerNodeNumbers(VRFTU(VRFTUNum).OAMixerName, errFlag); + if (VRFTU(VRFTUNum).VRFTUInletNodeNum != OANodeNums(3)) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + "\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name."); + ShowContinueError("... Zone terminal unit air inlet node name = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); + ShowContinueError("... OutdoorAir:Mixer return air node name = " + DataLoopNode::NodeID(OANodeNums(3))); + ErrorsFound = true; + } + } + // check that TU outlet node is a zone inlet node. + if ((VRFTU(VRFTUNum).isInZone && (!VRFTU(VRFTUNum).ATMixerExists || VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_InletSide))) { + bool ZoneNodeNotFound = true; + for (int CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { + if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; + for (int NodeNum = 1; NodeNum <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++NodeNum) { + if (VRFTU(VRFTUNum).VRFTUOutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(NodeNum)) { + VRFTU(VRFTUNum).ZoneAirNode = DataZoneEquipment::ZoneEquipConfig(CtrlZone).ZoneNode; + ZoneNodeNotFound = false; + break; + } + } + if (!ZoneNodeNotFound) break; + } + if (ZoneNodeNotFound) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + "\" Zone terminal unit air outlet node name must be the same as a zone inlet node name."); + ShowContinueError("... Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); + ShowContinueError("... Zone terminal unit outlet node name = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + ErrorsFound = true; + } + } + // check fan inlet and outlet nodes + int FanInletNodeNum = 0; + if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { + if (VRFTU(VRFTUNum).FanIndex > -1) FanInletNodeNum = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->inletNodeNum; + } else { + if (VRFTU(VRFTUNum).FanIndex > 0) FanInletNodeNum = Fans::getFanInNodeIndex(VRFTU(VRFTUNum).FanIndex, errFlag); + } + int CCoilInletNodeNum = DXCoils::getCoilInNodeIndex(VRFTU(VRFTUNum).CoolCoilIndex, errFlag); + int CCoilOutletNodeNum = DXCoils::getCoilOutNodeIndex(VRFTU(VRFTUNum).CoolCoilIndex, errFlag); + int HCoilInletNodeNum = DXCoils::getCoilInNodeIndex(VRFTU(VRFTUNum).HeatCoilIndex, errFlag); + int HCoilOutletNodeNum = DXCoils::getCoilOutNodeIndex(VRFTU(VRFTUNum).HeatCoilIndex, errFlag); + if (VRFTU(VRFTUNum).isInZone && VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::BlowThru) { + if (!VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).OAMixerUsed) { + Array1D_int OANodeNums = MixedAir::GetOAMixerNodeNumbers(VRFTU(VRFTUNum).OAMixerName, errFlag); + if (FanInletNodeNum != OANodeNums(4)) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); + ShowContinueError("as the outside air mixers mixed air node name when blow through fan is specified and an outside air " + "mixer is present."); + ShowContinueError("... Fan inlet node = " + DataLoopNode::NodeID(FanInletNodeNum)); + ShowContinueError("... OA mixers mixed air node = " + DataLoopNode::NodeID(OANodeNums(4))); + ErrorsFound = true; + } + } else if (!VRFTU(VRFTUNum).OAMixerUsed && (VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).ATMixerType == DataHVACGlobals::ATMixer_SupplySide)) { + if (FanInletNodeNum != VRFTU(VRFTUNum).VRFTUInletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); + ShowContinueError("as the terminal unit air inlet node name when blow through fan is specified and an outside air mixer " + "is not present."); + ShowContinueError("... Fan inlet node = " + DataLoopNode::NodeID(FanInletNodeNum)); + ShowContinueError("... Terminal unit air inlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); + ErrorsFound = true; + } + } + if (VRFTU(VRFTUNum).CoolingCoilPresent) { + if (VRFTU(VRFTUNum).fanOutletNode != CCoilInletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); + ShowContinueError("as the DX cooling coil air inlet node name when blow through fan is specified."); + ShowContinueError("... Fan outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).fanOutletNode)); + ShowContinueError("... DX cooling coil air inlet node = " + DataLoopNode::NodeID(CCoilInletNodeNum)); + ErrorsFound = true; + } + if (VRFTU(VRFTUNum).HeatingCoilPresent) { + if (HCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + "\" Heating coil outlet node name must be the same"); + ShowContinueError("as the terminal unit air outlet node name when blow through fan is specified."); + ShowContinueError("... Heating coil outlet node = " + DataLoopNode::NodeID(HCoilOutletNodeNum)); + ShowContinueError("... Terminal Unit air outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + ErrorsFound = true; + } + } else { + if (CCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + "\" Cooling coil outlet node name must be the same"); + ShowContinueError("as the terminal unit air outlet node name when blow through fan is specified and no DX heating " + "coil is present."); + ShowContinueError("... Cooling coil outlet node = " + DataLoopNode::NodeID(CCoilOutletNodeNum)); + ShowContinueError("... Terminal Unit air outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + ErrorsFound = true; + } + } + } else if (VRFTU(VRFTUNum).HeatingCoilPresent) { + if (VRFTU(VRFTUNum).fanOutletNode != HCoilInletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); + ShowContinueError("as the DX heating coil air inlet node name when blow through fan is specified and a DX cooling coil " + "is not present."); + ShowContinueError("... Fan outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).fanOutletNode)); + ShowContinueError("... DX heating coil air inlet node = " + DataLoopNode::NodeID(HCoilInletNodeNum)); + ErrorsFound = true; + } + if (HCoilOutletNodeNum != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Heating coil outlet node name must be the same"); + ShowContinueError("as the terminal unit air outlet node name when blow through fan is specified."); + ShowContinueError("... Heating coil outlet node = " + DataLoopNode::NodeID(HCoilOutletNodeNum)); + ShowContinueError("... Terminal Unit air outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + ErrorsFound = true; + } + } + } else if (VRFTU(VRFTUNum).isInZone && VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::DrawThru) { + if (VRFTU(VRFTUNum).CoolingCoilPresent) { + if (!VRFTU(VRFTUNum).OAMixerUsed) { + if (VRFTU(VRFTUNum).VRFTUInletNodeNum != CCoilInletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Cooling coil inlet node name must be the same"); + ShowContinueError("as the terminal unit air inlet node name when draw through fan is specified."); + ShowContinueError("... Terminal unit air inlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUInletNodeNum)); + ShowContinueError("... DX cooling coil air inlet node = " + DataLoopNode::NodeID(CCoilInletNodeNum)); + ErrorsFound = true; + } + } + if (VRFTU(VRFTUNum).HeatingCoilPresent) { + if (FanInletNodeNum != HCoilOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); + ShowContinueError("as the DX heating coil air outlet node name when draw through fan is specified."); + ShowContinueError("... Fan inlet node = " + DataLoopNode::NodeID(FanInletNodeNum)); + ShowContinueError("... DX heating coil air outlet node = " + DataLoopNode::NodeID(HCoilOutletNodeNum)); + ErrorsFound = true; + } + } else { + if (FanInletNodeNum != CCoilOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); + ShowContinueError("as the DX cooling coil air outlet node name when draw through fan is specified and a DX heating coil " + "is not present."); + ShowContinueError("... Fan inlet node = " + DataLoopNode::NodeID(FanInletNodeNum)); + ShowContinueError("... DX cooling coil air outlet node = " + DataLoopNode::NodeID(CCoilOutletNodeNum)); + ErrorsFound = true; + } + } + } else if (VRFTU(VRFTUNum).HeatingCoilPresent) { + if (FanInletNodeNum != HCoilOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan inlet node name must be the same"); + ShowContinueError("as the DX heating coil air outlet node name when draw through fan is specified."); + ShowContinueError("... Fan inlet node = " + DataLoopNode::NodeID(FanInletNodeNum)); + ShowContinueError("... DX heating coil air outlet node = " + DataLoopNode::NodeID(HCoilOutletNodeNum)); + ErrorsFound = true; + } + } + if (VRFTU(VRFTUNum).SuppHeatingCoilPresent) { + // if (SuppHeatCoilAirOutletNode != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { + // ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + + // "\" Supplemental heating coil air outlet node name must be the same"); + // ShowContinueError("as the terminal unit air outlet node name when draw through fan is specified."); + // ShowContinueError("... Supplemental heating coil air outlet node = " + DataLoopNode::NodeID(SuppHeatCoilAirOutletNode)); + // ShowContinueError("... Terminal unit air outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + // ErrorsFound = true; + //} + } else { + if (VRFTU(VRFTUNum).isInZone && VRFTU(VRFTUNum).fanOutletNode != VRFTU(VRFTUNum).VRFTUOutletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" Fan outlet node name must be the same"); + ShowContinueError("as the terminal unit air outlet node name when draw through fan is specified."); + ShowContinueError("... Fan outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).fanOutletNode)); + ShowContinueError("... Terminal unit air outlet node = " + DataLoopNode::NodeID(VRFTU(VRFTUNum).VRFTUOutletNodeNum)); + ErrorsFound = true; + } + } + } + if (VRFTU(VRFTUNum).CoolingCoilPresent && VRFTU(VRFTUNum).HeatingCoilPresent) { + if (CCoilOutletNodeNum != HCoilInletNodeNum) { + ShowSevereError(cCurrentModuleObject + " \"" + VRFTU(VRFTUNum).Name + "\" DX cooling coil air outlet node name must be the same"); + ShowContinueError(" as the DX heating coil air inlet node name."); + ShowContinueError("... DX cooling coil air outlet node = " + DataLoopNode::NodeID(CCoilOutletNodeNum)); + ShowContinueError("... DX heating coil air inlet node = " + DataLoopNode::NodeID(HCoilInletNodeNum)); + ErrorsFound = true; + } + } + + if (VRFTU(VRFTUNum).isInZone && VRFTU(VRFTUNum).ATMixerExists) { + // check that OA flow in cooling must be set to zero when connected to DOAS + if (VRFTU(VRFTUNum).CoolOutAirVolFlow != 0) { + ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError(".. Cooling Outdoor Air Flow Rate must be zero when " + cCurrentModuleObject); + ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); + ShowContinueError(".. Cooling Outdoor Air Flow Rate is set to 0 and simulation continues."); + VRFTU(VRFTUNum).CoolOutAirVolFlow = 0; + } + // check that OA flow in heating must be set to zero when connected to DOAS + if (VRFTU(VRFTUNum).HeatOutAirVolFlow != 0) { + ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError(".. Heating Outdoor Air Flow Rate must be zero when " + cCurrentModuleObject); + ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); + ShowContinueError(".. Heating Outdoor Air Flow Rate is set to 0 and simulation continues."); + VRFTU(VRFTUNum).HeatOutAirVolFlow = 0; + } + // check that OA flow in no cooling and no heating must be set to zero when connected to DOAS + if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow != 0) { + ShowWarningError(cCurrentModuleObject + " = " + VRFTU(VRFTUNum).Name); + ShowContinueError(".. No Load Outdoor Air Flow Rate must be zero when " + cCurrentModuleObject); + ShowContinueError("..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); + ShowContinueError(".. No Load Outdoor Air Flow Rate is set to 0 and simulation continues."); + VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = 0; + } + } } // IF(ZoneEquipmentListNotChecked)THEN // Size TU @@ -5384,14 +5796,48 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).SuppHeatCoilBranchNum, VRFTU(VRFTUNum).SuppHeatCoilCompNum); } + + // the first time an air loop VRF TU is simulated set isSimulated = true so that the TU initialization + // will occur with the first TU simulated this time step. Zone VRF TUs are called during sizing which, if air + // loop TUs are included, alters when all TUs appear to have been simulated. Also, BeginEnvrnFlag is true multiple + // times during the simulation, reset each time to avoid a different order during sizing and simulation + if (TerminalUnitList(VRFTU(VRFTUNum).TUListIndex).reset_isSimulatedFlags) { + // if no TUs are in the air loop or outdoor air system they will all be simulated during ManageZoneEquipment + // and there is no need to adjust the order of simulation (i.e., when isSimulated are all true for a given system) + if (VRFTU(VRFTUNum).isInAirLoop || VRFTU(VRFTUNum).isInOASys) { + TerminalUnitList(VRFTU(VRFTUNum).TUListIndex).IsSimulated = true; + TerminalUnitList(VRFTU(VRFTUNum).TUListIndex).reset_isSimulatedFlags = false; + } + } + } // IF (BeginEnvrnFlag .and. MyEnvrnFlag(VRFTUNum)) THEN // reset environment flag for next environment if (!BeginEnvrnFlag) { MyEnvrnFlag(VRFTUNum) = true; MyVRFCondFlag(VRFCond) = true; + TerminalUnitList(VRFTU(VRFTUNum).TUListIndex).reset_isSimulatedFlags = true; } + // If all VRF Terminal Units on this VRF AC System have been simulated, reset the IsSimulated flag + // The condenser will be simulated after all terminal units have been simulated (see Sub SimulateVRF) + if (all(TerminalUnitList(TUListIndex).IsSimulated)) { + // this should be the first time through on the next iteration. All TU's and condenser have been simulated. + // reset simulation flag for each terminal unit + TerminalUnitList(TUListIndex).IsSimulated = false; + // after all TU's have been simulated, reset operating mode flag if necessary + if (LastModeHeating(VRFCond) && CoolingLoad(VRFCond)) { + LastModeCooling(VRFCond) = true; + LastModeHeating(VRFCond) = false; + // SwitchedMode(VRFCond) = .TRUE. + } + if (LastModeCooling(VRFCond) && HeatingLoad(VRFCond)) { + LastModeHeating(VRFCond) = true; + LastModeCooling(VRFCond) = false; + // SwitchedMode(VRFCond) = .TRUE. + } + } // IF(ALL(TerminalUnitList(VRFTU(VRFTUNum)%TUListIndex)%IsSimulated))THEN + // get operating capacity of water and steam coil if (FirstHVACIteration) { if (VRFTU(VRFTUNum).SuppHeatCoilFluidInletNode > 0) { @@ -5449,112 +5895,116 @@ namespace HVACVariableRefrigerantFlow { // one-time checks of flow rate vs fan flow rate if (MyVRFFlag(VRFTUNum)) { if (!ZoneSizingCalc && !SysSizingCalc) { - if (VRFTU(VRFTUNum).ActualFanVolFlowRate != AutoSize) { + if (VRFTU(VRFTUNum).FanPlace > 0) { + if (VRFTU(VRFTUNum).ActualFanVolFlowRate != AutoSize) { + + if (VRFTU(VRFTUNum).MaxCoolAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError("... has Supply Air Flow Rate During Cooling Operation > Max Fan Volume Flow Rate, should be <="); + ShowContinueError("... Supply Air Flow Rate During Cooling Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxCoolAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Max Fan Volume Flow Rate = " + + RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); + ShowContinueError( + "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).MaxCoolAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; + } - if (VRFTU(VRFTUNum).MaxCoolAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError("... has Supply Air Flow Rate During Cooling Operation > Max Fan Volume Flow Rate, should be <="); - ShowContinueError( - "... Supply Air Flow Rate During Cooling Operation = " + RoundSigDigits(VRFTU(VRFTUNum).MaxCoolAirVolFlow, 4) + " m3/s"); - ShowContinueError("... Max Fan Volume Flow Rate = " + - RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); - ShowContinueError( - "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).MaxCoolAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; - } - - if (VRFTU(VRFTUNum).MaxNoCoolAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError("... has Supply Air Flow Rate When No Cooling is Needed > Max Fan Volume Flow Rate, should be <="); - ShowContinueError("... Supply Air Flow Rate When No Cooling is Needed = " + - RoundSigDigits(VRFTU(VRFTUNum).MaxNoCoolAirVolFlow, 4) + " m3/s"); - ShowContinueError("... Max Fan Volume Flow Rate = " + - RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); - ShowContinueError( - "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; - } + if (VRFTU(VRFTUNum).MaxNoCoolAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError("... has Supply Air Flow Rate When No Cooling is Needed > Max Fan Volume Flow Rate, should be <="); + ShowContinueError("... Supply Air Flow Rate When No Cooling is Needed = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxNoCoolAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Max Fan Volume Flow Rate = " + + RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); + ShowContinueError( + "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; + } - if (VRFTU(VRFTUNum).CoolOutAirVolFlow > VRFTU(VRFTUNum).MaxCoolAirVolFlow) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError( - "...The Outdoor Air Flow Rate During Cooling Operation exceeds the Supply Air Flow Rate During Cooling Operation."); - ShowContinueError( - "...Outdoor Air Flow Rate During Cooling Operation = " + RoundSigDigits(VRFTU(VRFTUNum).CoolOutAirVolFlow, 4) + " m3/s"); - ShowContinueError( - "... Supply Air Flow Rate During Cooling Operation = " + RoundSigDigits(VRFTU(VRFTUNum).MaxCoolAirVolFlow, 4) + " m3/s"); - ShowContinueError("...the outdoor air flow rate will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).CoolOutAirVolFlow = VRFTU(VRFTUNum).MaxCoolAirVolFlow; - } + if (VRFTU(VRFTUNum).CoolOutAirVolFlow > VRFTU(VRFTUNum).MaxCoolAirVolFlow) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError( + "...The Outdoor Air Flow Rate During Cooling Operation exceeds the Supply Air Flow Rate During Cooling Operation."); + ShowContinueError("...Outdoor Air Flow Rate During Cooling Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).CoolOutAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Supply Air Flow Rate During Cooling Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxCoolAirVolFlow, 4) + " m3/s"); + ShowContinueError("...the outdoor air flow rate will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).CoolOutAirVolFlow = VRFTU(VRFTUNum).MaxCoolAirVolFlow; + } - if (VRFTU(VRFTUNum).MaxHeatAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError("... has Supply Air Flow Rate During Heating Operation > Max Fan Volume Flow Rate, should be <="); - ShowContinueError( - "... Supply Air Flow Rate During Heating Operation = " + RoundSigDigits(VRFTU(VRFTUNum).MaxHeatAirVolFlow, 4) + " m3/s"); - ShowContinueError("... Max Fan Volume Flow Rate = " + - RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); - ShowContinueError( - "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).MaxHeatAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; - } - - if (VRFTU(VRFTUNum).MaxNoHeatAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError("... has Supply Air Flow Rate When No Heating is Needed > Max Fan Volume Flow Rate, should be <="); - ShowContinueError("... Supply Air Flow Rate When No Heating is Needed = " + - RoundSigDigits(VRFTU(VRFTUNum).MaxNoHeatAirVolFlow, 4) + " m3/s"); - ShowContinueError("... Max Fan Volume Flow Rate = " + - RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); - ShowContinueError( - "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; - } + if (VRFTU(VRFTUNum).MaxHeatAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError("... has Supply Air Flow Rate During Heating Operation > Max Fan Volume Flow Rate, should be <="); + ShowContinueError("... Supply Air Flow Rate During Heating Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxHeatAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Max Fan Volume Flow Rate = " + + RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); + ShowContinueError( + "...the supply air flow rate during cooling operation will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).MaxHeatAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; + } - if (VRFTU(VRFTUNum).HeatOutAirVolFlow > VRFTU(VRFTUNum).MaxHeatAirVolFlow) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError( - "...The Outdoor Air Flow Rate During Heating Operation exceeds the Supply Air Flow Rate During Heating Operation."); - ShowContinueError( - "...Outdoor Air Flow Rate During Heating Operation = " + RoundSigDigits(VRFTU(VRFTUNum).HeatOutAirVolFlow, 4) + " m3/s"); - ShowContinueError( - "... Supply Air Flow Rate During Heating Operation = " + RoundSigDigits(VRFTU(VRFTUNum).MaxHeatAirVolFlow, 4) + " m3/s"); - ShowContinueError("...the outdoor air flow rate will be reduced to match and the simulation continues."); - VRFTU(VRFTUNum).HeatOutAirVolFlow = VRFTU(VRFTUNum).MaxHeatAirVolFlow; - } + if (VRFTU(VRFTUNum).MaxNoHeatAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError("... has Supply Air Flow Rate When No Heating is Needed > Max Fan Volume Flow Rate, should be <="); + ShowContinueError("... Supply Air Flow Rate When No Heating is Needed = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxNoHeatAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Max Fan Volume Flow Rate = " + + RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); + ShowContinueError( + "...the supply air flow rate when no cooling is needed will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; + } - if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { - ShowWarningError("InitVRF: VRF Terminal Unit = [" + DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + - VRFTU(VRFTUNum).Name + "\"]"); - ShowContinueError( - "... has a Outdoor Air Flow Rate When No Cooling or Heating is Needed > Max Fan Volume Flow Rate, should be <="); - ShowContinueError("... Outdoor Air Flow Rate When No Cooling or Heating is Needed = " + - RoundSigDigits(VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow, 4) + " m3/s"); - ShowContinueError("... Max Fan Volume Flow Rate = " + - RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); - ShowContinueError("...the outdoor air flow rate when no cooling or heating is needed will be reduced to match and the " - "simulation continues."); - VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; - } + if (VRFTU(VRFTUNum).HeatOutAirVolFlow > VRFTU(VRFTUNum).MaxHeatAirVolFlow) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError( + "...The Outdoor Air Flow Rate During Heating Operation exceeds the Supply Air Flow Rate During Heating Operation."); + ShowContinueError("...Outdoor Air Flow Rate During Heating Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).HeatOutAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Supply Air Flow Rate During Heating Operation = " + + RoundSigDigits(VRFTU(VRFTUNum).MaxHeatAirVolFlow, 4) + " m3/s"); + ShowContinueError("...the outdoor air flow rate will be reduced to match and the simulation continues."); + VRFTU(VRFTUNum).HeatOutAirVolFlow = VRFTU(VRFTUNum).MaxHeatAirVolFlow; + } - if (VRFTU(VRFTUNum).ActualFanVolFlowRate > 0.0) { - VRFTU(VRFTUNum).HeatingSpeedRatio = VRFTU(VRFTUNum).MaxHeatAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate; - VRFTU(VRFTUNum).CoolingSpeedRatio = VRFTU(VRFTUNum).MaxCoolAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate; - } + if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow > VRFTU(VRFTUNum).ActualFanVolFlowRate) { + ShowWarningError("InitVRF: VRF Terminal Unit = [" +DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num) + ", \"" + + VRFTU(VRFTUNum).Name + "\"]"); + ShowContinueError( + "... has a Outdoor Air Flow Rate When No Cooling or Heating is Needed > Max Fan Volume Flow Rate, should be <="); + ShowContinueError("... Outdoor Air Flow Rate When No Cooling or Heating is Needed = " + + RoundSigDigits(VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow, 4) + " m3/s"); + ShowContinueError("... Max Fan Volume Flow Rate = " + + RoundSigDigits(VRFTU(VRFTUNum).ActualFanVolFlowRate, 4) + " m3/s"); + ShowContinueError("...the outdoor air flow rate when no cooling or heating is needed will be reduced to match and the " + "simulation continues."); + VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = VRFTU(VRFTUNum).ActualFanVolFlowRate; + } - MyVRFFlag(VRFTUNum) = false; - } else { - if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { - VRFTU(VRFTUNum).ActualFanVolFlowRate = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + if (VRFTU(VRFTUNum).ActualFanVolFlowRate > 0.0) { + VRFTU(VRFTUNum).HeatingSpeedRatio = VRFTU(VRFTUNum).MaxHeatAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate; + VRFTU(VRFTUNum).CoolingSpeedRatio = VRFTU(VRFTUNum).MaxCoolAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate; + } + + MyVRFFlag(VRFTUNum) = false; } else { - GetFanVolFlow(VRFTU(VRFTUNum).FanIndex, VRFTU(VRFTUNum).ActualFanVolFlowRate); + if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { + VRFTU(VRFTUNum).ActualFanVolFlowRate = HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->designAirVolFlowRate; + } else { + GetFanVolFlow(VRFTU(VRFTUNum).FanIndex, VRFTU(VRFTUNum).ActualFanVolFlowRate); + } } + } else { + MyVRFFlag(VRFTUNum) = false; } } } // IF(MyVRFFlag(VRFTUNum))THEN @@ -5685,7 +6135,7 @@ namespace HVACVariableRefrigerantFlow { if ((OutsideDryBulbTemp < VRF(VRFCond).MinOATHeating || OutsideDryBulbTemp > VRF(VRFCond).MaxOATHeating) && any(TerminalUnitList(TUListIndex).HeatingCoilPresent)) { HeatingLoad(VRFCond) = false; - // test if heating load exists, account for thermostat control type + // test if cooling load exists, account for thermostat control type { auto const SELECT_CASE_var(VRF(VRFCond).ThermostatPriority); if ((SELECT_CASE_var == LoadPriority) || (SELECT_CASE_var == ZonePriority)) { @@ -5762,14 +6212,14 @@ namespace HVACVariableRefrigerantFlow { DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(VRFTUNum).MaxHeatAirMassFlow; DataLoopNode::Node(OutsideAirNode).MassFlowRate = VRFTU(VRFTUNum).HeatOutAirMassFlow; } else { - DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxHeatAirMassFlow; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxHeatAirMassFlow; } } else if (CoolingLoad(VRFCond) || (VRF(VRFCond).HeatRecoveryUsed && TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList))) { if (VRFTU(VRFTUNum).OAMixerUsed) { DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(VRFTUNum).MaxCoolAirMassFlow; DataLoopNode::Node(OutsideAirNode).MassFlowRate = VRFTU(VRFTUNum).CoolOutAirMassFlow; } else { - DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxCoolAirMassFlow; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxCoolAirMassFlow; } } else { if (LastModeCooling(VRFCond)) { @@ -5777,14 +6227,14 @@ namespace HVACVariableRefrigerantFlow { DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow; DataLoopNode::Node(OutsideAirNode).MassFlowRate = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow; } else { - DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow; } } else if (LastModeHeating(VRFCond)) { if (VRFTU(VRFTUNum).OAMixerUsed) { DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow; DataLoopNode::Node(OutsideAirNode).MassFlowRate = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow; } else { - DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InNode).MassFlowRate = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow; } } } @@ -5813,9 +6263,9 @@ namespace HVACVariableRefrigerantFlow { // TerminalUnitList(TUListIndex)%HRCoolRequest(IndexToTUInTUList) - TU will operate in this mode if heat recovery is used // TerminalUnitList(TUListIndex)%HRHeatRequest(IndexToTUInTUList) - TU will operate in this mode if heat recovery is used - QZnReq = ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputRequired; + getVRFTUZoneLoad(VRFTUNum, QZnReq, LoadToHeatingSP, LoadToCoolingSP, false); + if (std::abs(QZnReq) < DataHVACGlobals::SmallLoad) QZnReq = 0.0; - LoadToCoolingSP = ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputReqToCoolSP; // set initial terminal unit operating mode for heat recovery // operating mode for non-heat recovery set above using CoolingLoad(VRFCond) or HeatingLoad(VRFCond) variables // first turn off terminal unit @@ -5827,7 +6277,6 @@ namespace HVACVariableRefrigerantFlow { TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList) = true; } } - LoadToHeatingSP = ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputReqToHeatSP; if (LoadToHeatingSP > DataHVACGlobals::SmallLoad) { if (CoolingLoad(VRFCond) || HeatingLoad(VRFCond)) { // don't allow heat recovery if control logic dictates unit is off TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList) = true; @@ -5837,7 +6286,7 @@ namespace HVACVariableRefrigerantFlow { // next check for overshoot when constant fan mode is used // check operating load to see if OA will overshoot setpoint temperature when constant fan mode is used - if (VRFTU(VRFTUNum).OpMode == DataHVACGlobals::ContFanCycCoil || VRFTU(VRFTUNum).ATMixerExists) { + if ((VRFTU(VRFTUNum).OpMode == DataHVACGlobals::ContFanCycCoil || VRFTU(VRFTUNum).ATMixerExists) && !VRFTU(VRFTUNum).isSetPointControlled) { SetCompFlowRate(VRFTUNum, VRFCond, true); if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { @@ -6189,7 +6638,12 @@ namespace HVACVariableRefrigerantFlow { } SetAverageAirFlow(VRFTUNum, 0.0, OnOffAirFlowRatio); - } // namespace HVACVariableRefrigerantFlow + + if (ErrorsFound) { + ShowFatalError(RoutineName + + ": Errors found in getting ZoneHVAC:TerminalUnit:VariableRefrigerantFlow system input. Preceding condition(s) causes termination."); + } + } void SetCompFlowRate(int const VRFTUNum, int const VRFCond, Optional_bool_const UseCurrentMode) { @@ -6369,6 +6823,42 @@ namespace HVACVariableRefrigerantFlow { int CapSizingMethod(0); // capacity sizing methods (HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, and // FractionOfAutosizedHeatingCapacity ) + // Formats + static ObjexxFCL::gio::Fmt Format_990( + "('! , VRF System Type, VRF System Name, ','VRF System Cooling Combination Ratio, VRF " + "System Heating Combination Ratio, ','VRF System Cooling Piping Correction Factor, VRF System Heating Piping " + "Correction Factor')"); + static ObjexxFCL::gio::Fmt Format_991("(' VRF System Information',6(', ',A))"); + + DataSizing::ZoneEqSizingData *select_EqSizing(nullptr); + + // sweep specific data into one pointer to avoid if statements throughout this subroutine + if (DataSizing::CurOASysNum > 0) { + select_EqSizing = &DataSizing::OASysEqSizing(DataSizing::CurOASysNum); + } else if (DataSizing::CurSysNum > 0) { + select_EqSizing = &DataSizing::UnitarySysEqSizing(DataSizing::CurSysNum); + } else if (DataSizing::CurZoneEqNum > 0) { + select_EqSizing = &DataSizing::ZoneEqSizing(DataSizing::CurZoneEqNum); + DataSizing::ZoneEqUnitarySys = true; + } else { + assert(false); + } + // Object Data, points to specific array + DataSizing::ZoneEqSizingData &EqSizing(*select_EqSizing); + + // can't hurt to initialize these going in, problably redundant + EqSizing.AirFlow = false; + EqSizing.CoolingAirFlow = false; + EqSizing.HeatingAirFlow = false; + EqSizing.AirVolFlow = 0.0; + EqSizing.CoolingAirVolFlow = 0.0; + EqSizing.HeatingAirVolFlow = 0.0; + EqSizing.Capacity = false; + EqSizing.CoolingCapacity = false; + EqSizing.HeatingCapacity = false; + EqSizing.DesCoolingLoad = 0.0; + EqSizing.DesHeatingLoad = 0.0; + EqSizing.OAVolFlow = 0.0; VRFCond = VRFTU(VRFTUNum).VRFSysNum; IsAutoSize = false; @@ -6411,283 +6901,303 @@ namespace HVACVariableRefrigerantFlow { MyOneTimeSizeFlag = false; } - CompType = "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow"; + CompType =DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num); CompName = VRFTU(VRFTUNum).Name; DataZoneNumber = VRFTU(VRFTUNum).ZoneNum; if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { - DataSizing::DataFanEnumType = DataAirSystems::objectVectorOOFanSystemModel; - } else { - DataSizing::DataFanEnumType = DataAirSystems::structArrayLegacyFanModels; - } - DataSizing::DataFanIndex = VRFTU(VRFTUNum).FanIndex; - if (VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::BlowThru) { - DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneBlowThru; - } else if (VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::DrawThru) { - DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneDrawThru; - } - - if (CurZoneEqNum > 0) { - if (VRFTU(VRFTUNum).HVACSizingIndex > 0) { - // initialize OA flow for sizing other inputs (e.g., capacity) - if (VRFTU(VRFTUNum).CoolOutAirVolFlow == AutoSize) { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA; + if (VRFTU(VRFTUNum).isInZone) { + DataSizing::DataFanEnumType = DataAirSystems::objectVectorOOFanSystemModel; + DataSizing::DataFanIndex = VRFTU(VRFTUNum).FanIndex; + if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::BlowThru) { + DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneBlowThru; + } else if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::DrawThru) { + DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneDrawThru; + } + } else if (VRFTU(VRFTUNum).isInAirLoop) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanModelTypeEnum = DataAirSystems::objectVectorOOFanSystemModel; + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanVecIndex = VRFTU(VRFTUNum).FanIndex; + if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::BlowThru) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanLocation = DataAirSystems::fanPlacement::BlowThru; + } else if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::DrawThru) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanLocation = DataAirSystems::fanPlacement::DrawThru; + } + } + } else if (VRFTU(VRFTUNum).FanIndex > 0) { + if (VRFTU(VRFTUNum).isInZone) { + DataSizing::DataFanEnumType = DataAirSystems::structArrayLegacyFanModels; + DataSizing::DataFanIndex = VRFTU(VRFTUNum).FanIndex; + if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::BlowThru) { + DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneBlowThru; + } else if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::DrawThru) { + DataSizing::DataFanPlacement = DataSizing::zoneFanPlacement::zoneDrawThru; + } + } else if (VRFTU(VRFTUNum).isInAirLoop) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanModelTypeEnum = DataAirSystems::structArrayLegacyFanModels; + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanVecIndex = VRFTU(VRFTUNum).FanIndex; + if (VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::BlowThru) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanLocation = DataAirSystems::fanPlacement::BlowThru; + } else if ( VRFTU(VRFTUNum).FanPlace ==DataHVACGlobals::DrawThru ) { + DataAirSystems::PrimaryAirSystem(VRFTU(VRFTUNum).airLoopNum).supFanLocation = DataAirSystems::fanPlacement::DrawThru; + } + } + } + + if (VRFTU(VRFTUNum).HVACSizingIndex > 0) { + // initialize OA flow for sizing other inputs (e.g., capacity) + if (VRFTU(VRFTUNum).CoolOutAirVolFlow == AutoSize) { + EqSizing.OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA; + } else { + EqSizing.OAVolFlow = VRFTU(VRFTUNum).CoolOutAirVolFlow; + } + if (VRFTU(VRFTUNum).HeatOutAirVolFlow != AutoSize) { + EqSizing.OAVolFlow = max(EqSizing.OAVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); + } + if (VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).isInZone) { // set up ATMixer conditions for scalable capacity sizing + EqSizing.OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used + SingleDuct::setATMixerSizingProperties(VRFTU(VRFTUNum).ATMixerIndex, VRFTU(VRFTUNum).ZoneNum, CurZoneEqNum); + } + + zoneHVACIndex = VRFTU(VRFTUNum).HVACSizingIndex; + + SizingMethod = CoolingAirflowSizing; + FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation + PrintFlag = true; + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SAFMethod = ZoneHVACSizing(zoneHVACIndex).CoolingSAFMethod; + EqSizing.SizingMethod(SizingMethod) = SAFMethod; + if (SAFMethod == SupplyAirFlowRate || SAFMethod == FlowPerFloorArea || SAFMethod == FractionOfAutosizedCoolingAirflow) { + if (SAFMethod == SupplyAirFlowRate) { + if (ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow > 0.0) { + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; + EqSizing.SystemAirFlow = true; + } + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; + } else if (SAFMethod == FlowPerFloorArea) { + EqSizing.SystemAirFlow = true; + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow * Zone(DataZoneNumber).FloorArea; + TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; + DataScalableSizingON = true; + } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { + DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; + TempSize = AutoSize; + DataScalableSizingON = true; } else { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = VRFTU(VRFTUNum).CoolOutAirVolFlow; - } - if (VRFTU(VRFTUNum).HeatOutAirVolFlow != AutoSize) { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(ZoneEqSizing(CurZoneEqNum).OAVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; } - if (VRFTU(VRFTUNum).ATMixerExists) { // set up ATMixer conditions for scalable capacity sizing - ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used - SingleDuct::setATMixerSizingProperties(VRFTU(VRFTUNum).ATMixerIndex, VRFTU(VRFTUNum).ZoneNum, CurZoneEqNum); + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; + } else if (SAFMethod == FlowPerCoolingCapacity) { + SizingMethod = CoolingCapacitySizing; + TempSize = AutoSize; + PrintFlag = false; + DataScalableSizingON = true; + DataFlowUsedForSizing = FinalZoneSizing(CurZoneEqNum).DesCoolVolFlow; + if (ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod == FractionOfAutosizedCoolingCapacity) { + DataFracOfAutosizedCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; } - - zoneHVACIndex = VRFTU(VRFTUNum).HVACSizingIndex; - + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + DataAutosizedCoolingCapacity = TempSize; + DataFlowPerCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; SizingMethod = CoolingAirflowSizing; - FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation PrintFlag = true; - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SAFMethod = ZoneHVACSizing(zoneHVACIndex).CoolingSAFMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = SAFMethod; - if (SAFMethod == SupplyAirFlowRate || SAFMethod == FlowPerFloorArea || SAFMethod == FractionOfAutosizedCoolingAirflow) { - if (SAFMethod == SupplyAirFlowRate) { - if (ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow > 0.0) { - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - } - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; - } else if (SAFMethod == FlowPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow * Zone(DataZoneNumber).FloorArea; - TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { - DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else { - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; - } else if (SAFMethod == FlowPerCoolingCapacity) { - SizingMethod = CoolingCapacitySizing; - TempSize = AutoSize; - PrintFlag = false; - DataScalableSizingON = true; - DataFlowUsedForSizing = FinalZoneSizing(CurZoneEqNum).DesCoolVolFlow; - if (ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod == FractionOfAutosizedCoolingCapacity) { - DataFracOfAutosizedCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - DataAutosizedCoolingCapacity = TempSize; - DataFlowPerCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).MaxCoolAirVolFlow; - SizingMethod = CoolingAirflowSizing; - PrintFlag = true; - TempSize = AutoSize; - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; - } + TempSize = AutoSize; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; + } - SizingMethod = HeatingAirflowSizing; - FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation - PrintFlag = true; - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SAFMethod = ZoneHVACSizing(zoneHVACIndex).HeatingSAFMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = SAFMethod; - if (SAFMethod == SupplyAirFlowRate || SAFMethod == FlowPerFloorArea || SAFMethod == FractionOfAutosizedHeatingAirflow) { - if (SAFMethod == SupplyAirFlowRate) { - if (ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow > 0.0) { - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - } - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - } else if (SAFMethod == FlowPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; - TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { - DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else { - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxHeatAirVolFlow = TempSize; - } else if (SAFMethod == FlowPerHeatingCapacity) { - SizingMethod = HeatingCapacitySizing; - TempSize = AutoSize; - PrintFlag = false; + SizingMethod = HeatingAirflowSizing; + FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation + PrintFlag = true; + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SAFMethod = ZoneHVACSizing(zoneHVACIndex).HeatingSAFMethod; + EqSizing.SizingMethod(SizingMethod) = SAFMethod; + if (SAFMethod == SupplyAirFlowRate || SAFMethod == FlowPerFloorArea || SAFMethod == FractionOfAutosizedHeatingAirflow) { + if (SAFMethod == SupplyAirFlowRate) { + if (ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow > 0.0) { + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; + EqSizing.SystemAirFlow = true; + } + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; + } else if (SAFMethod == FlowPerFloorArea) { + EqSizing.SystemAirFlow = true; + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; + TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; DataScalableSizingON = true; - DataFlowUsedForSizing = FinalZoneSizing(CurZoneEqNum).DesHeatVolFlow; - if (ZoneHVACSizing(zoneHVACIndex).HeatingCapMethod == FractionOfAutosizedHeatingCapacity) { - DataFracOfAutosizedHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - DataAutosizedHeatingCapacity = TempSize; - DataFlowPerHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; - SizingMethod = HeatingAirflowSizing; - PrintFlag = true; + } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { + DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; TempSize = AutoSize; - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxHeatAirVolFlow = TempSize; - } - - SizingMethod = CoolingAirflowSizing; - FieldNum = 2; // N2, \field Supply Air Flow Rate When No Cooling is Needed - PrintFlag = true; - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SAFMethod = ZoneHVACSizing(zoneHVACIndex).NoCoolHeatSAFMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = SAFMethod; - if ((SAFMethod == SupplyAirFlowRate) || (SAFMethod == FlowPerFloorArea) || (SAFMethod == FractionOfAutosizedHeatingAirflow) || - (SAFMethod == FractionOfAutosizedCoolingAirflow)) { - if (SAFMethod == SupplyAirFlowRate) { - if (ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow > 0.0) { - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - } - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - } else if (SAFMethod == FlowPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - ZoneEqSizing(CurZoneEqNum).AirVolFlow = - ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; - TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { - DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { - DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else { - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = TempSize; - } - - SizingMethod = HeatingAirflowSizing; - FieldNum = 4; // N4, \field Supply Air Flow Rate When No Heating is Needed - PrintFlag = true; - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SAFMethod = ZoneHVACSizing(zoneHVACIndex).NoCoolHeatSAFMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = SAFMethod; - if ((SAFMethod == SupplyAirFlowRate) || (SAFMethod == FlowPerFloorArea) || (SAFMethod == FractionOfAutosizedHeatingAirflow) || - (SAFMethod == FractionOfAutosizedCoolingAirflow)) { - if (SAFMethod == SupplyAirFlowRate) { - if (ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow > 0.0) { - ZoneEqSizing(CurZoneEqNum).AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - } - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - } else if (SAFMethod == FlowPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).SystemAirFlow = true; - ZoneEqSizing(CurZoneEqNum).AirVolFlow = - ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; - TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { - DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { - DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - TempSize = AutoSize; - DataScalableSizingON = true; - } else { - TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; - } - RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = TempSize; - } - - // initialize capacity sizing variables: cooling - SizingMethod = CoolingCapacitySizing; - CapSizingMethod = ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = CapSizingMethod; - if (CapSizingMethod == CoolingDesignCapacity || CapSizingMethod == CapacityPerFloorArea || - CapSizingMethod == FractionOfAutosizedCoolingCapacity) { - if (CapSizingMethod == HeatingDesignCapacity) { - if (ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity > 0.0) { - ZoneEqSizing(CurZoneEqNum).CoolingCapacity = true; - ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; - } - } else if (CapSizingMethod == CapacityPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).CoolingCapacity = true; - ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = - ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity * Zone(DataZoneNumber).FloorArea; - DataScalableCapSizingON = true; - } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { - DataFracOfAutosizedCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; - DataScalableCapSizingON = true; - } + DataScalableSizingON = true; + } else { + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; } - - // initialize capacity sizing variables: heating + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxHeatAirVolFlow = TempSize; + } else if (SAFMethod == FlowPerHeatingCapacity) { SizingMethod = HeatingCapacitySizing; - CapSizingMethod = ZoneHVACSizing(zoneHVACIndex).HeatingCapMethod; - ZoneEqSizing(CurZoneEqNum).SizingMethod(SizingMethod) = CapSizingMethod; - if (CapSizingMethod == HeatingDesignCapacity || CapSizingMethod == CapacityPerFloorArea || - CapSizingMethod == FractionOfAutosizedHeatingCapacity) { - if (CapSizingMethod == HeatingDesignCapacity) { - if (ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity > 0.0) { - ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; - ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; - } - } else if (CapSizingMethod == CapacityPerFloorArea) { - ZoneEqSizing(CurZoneEqNum).HeatingCapacity = true; - ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = - ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity * Zone(DataZoneNumber).FloorArea; - DataScalableCapSizingON = true; - } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { - DataFracOfAutosizedHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; - DataScalableCapSizingON = true; - } + TempSize = AutoSize; + PrintFlag = false; + DataScalableSizingON = true; + DataFlowUsedForSizing = FinalZoneSizing(CurZoneEqNum).DesHeatVolFlow; + if (ZoneHVACSizing(zoneHVACIndex).HeatingCapMethod == FractionOfAutosizedHeatingCapacity) { + DataFracOfAutosizedHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; } - } else { - // no scalable sizing method has been specified. Sizing proceeds using the method - // specified in the zoneHVAC object - - PrintFlag = true; - - SizingMethod = CoolingAirflowSizing; - FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - TempSize = VRFTU(VRFTUNum).MaxCoolAirVolFlow; RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); - VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; - - FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + DataAutosizedHeatingCapacity = TempSize; + DataFlowPerHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow; SizingMethod = HeatingAirflowSizing; - TempSize = VRFTU(VRFTUNum).MaxHeatAirVolFlow; + PrintFlag = true; + TempSize = AutoSize; RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); VRFTU(VRFTUNum).MaxHeatAirVolFlow = TempSize; + } - FieldNum = 2; // N2, \field Supply Air Flow Rate When No Cooling is Needed - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SizingMethod = SystemAirflowSizing; - TempSize = VRFTU(VRFTUNum).MaxNoCoolAirVolFlow; + SizingMethod = CoolingAirflowSizing; + FieldNum = 2; // N2, \field Supply Air Flow Rate When No Cooling is Needed + PrintFlag = true; + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SAFMethod = ZoneHVACSizing(zoneHVACIndex).NoCoolHeatSAFMethod; + EqSizing.SizingMethod(SizingMethod) = SAFMethod; + if ((SAFMethod == SupplyAirFlowRate) || (SAFMethod == FlowPerFloorArea) || (SAFMethod == FractionOfAutosizedHeatingAirflow) || + (SAFMethod == FractionOfAutosizedCoolingAirflow)) { + if (SAFMethod == SupplyAirFlowRate) { + if (ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow > 0.0) { + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + EqSizing.SystemAirFlow = true; + } + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + } else if (SAFMethod == FlowPerFloorArea) { + EqSizing.SystemAirFlow = true; + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; + TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; + DataScalableSizingON = true; + } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { + DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + TempSize = AutoSize; + DataScalableSizingON = true; + } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { + DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + TempSize = AutoSize; + DataScalableSizingON = true; + } else { + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + } RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = TempSize; + } - FieldNum = 4; // N4, \field Supply Air Flow Rate When No Heating is Needed - SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; - SizingMethod = SystemAirflowSizing; - TempSize = VRFTU(VRFTUNum).MaxNoHeatAirVolFlow; + SizingMethod = HeatingAirflowSizing; + FieldNum = 4; // N4, \field Supply Air Flow Rate When No Heating is Needed + PrintFlag = true; + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SAFMethod = ZoneHVACSizing(zoneHVACIndex).NoCoolHeatSAFMethod; + EqSizing.SizingMethod(SizingMethod) = SAFMethod; + if ((SAFMethod == SupplyAirFlowRate) || (SAFMethod == FlowPerFloorArea) || (SAFMethod == FractionOfAutosizedHeatingAirflow) || + (SAFMethod == FractionOfAutosizedCoolingAirflow)) { + if (SAFMethod == SupplyAirFlowRate) { + if (ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow > 0.0) { + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + EqSizing.SystemAirFlow = true; + } + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + } else if (SAFMethod == FlowPerFloorArea) { + EqSizing.SystemAirFlow = true; + EqSizing.AirVolFlow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow * Zone(DataZoneNumber).FloorArea; + TempSize = ZoneEqSizing(CurZoneEqNum).AirVolFlow; + DataScalableSizingON = true; + } else if (SAFMethod == FractionOfAutosizedHeatingAirflow) { + DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + TempSize = AutoSize; + DataScalableSizingON = true; + } else if (SAFMethod == FractionOfAutosizedCoolingAirflow) { + DataFracOfAutosizedCoolingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + DataFracOfAutosizedHeatingAirflow = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + TempSize = AutoSize; + DataScalableSizingON = true; + } else { + TempSize = ZoneHVACSizing(zoneHVACIndex).MaxNoCoolHeatAirVolFlow; + } RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = TempSize; } + + // initialize capacity sizing variables: cooling + SizingMethod = CoolingCapacitySizing; + CapSizingMethod = ZoneHVACSizing(zoneHVACIndex).CoolingCapMethod; + EqSizing.SizingMethod(SizingMethod) = CapSizingMethod; + if (CapSizingMethod == CoolingDesignCapacity || CapSizingMethod == CapacityPerFloorArea || + CapSizingMethod == FractionOfAutosizedCoolingCapacity) { + if (CapSizingMethod == HeatingDesignCapacity) { + if (ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity > 0.0) { + EqSizing.CoolingCapacity = true; + EqSizing.DesCoolingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; + } + } else if (CapSizingMethod == CapacityPerFloorArea) { + EqSizing.CoolingCapacity = true; + EqSizing.DesCoolingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity * Zone(DataZoneNumber).FloorArea; + DataScalableCapSizingON = true; + } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { + DataFracOfAutosizedCoolingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledCoolingCapacity; + DataScalableCapSizingON = true; + } + } + + // initialize capacity sizing variables: heating + SizingMethod = HeatingCapacitySizing; + CapSizingMethod = ZoneHVACSizing(zoneHVACIndex).HeatingCapMethod; + EqSizing.SizingMethod(SizingMethod) = CapSizingMethod; + if (CapSizingMethod == HeatingDesignCapacity || CapSizingMethod == CapacityPerFloorArea || + CapSizingMethod == FractionOfAutosizedHeatingCapacity) { + if (CapSizingMethod == HeatingDesignCapacity) { + if (ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity > 0.0) { + EqSizing.HeatingCapacity = true; + EqSizing.DesHeatingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; + } + } else if (CapSizingMethod == CapacityPerFloorArea) { + EqSizing.HeatingCapacity = true; + EqSizing.DesHeatingLoad = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity * Zone(DataZoneNumber).FloorArea; + DataScalableCapSizingON = true; + } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { + DataFracOfAutosizedHeatingCapacity = ZoneHVACSizing(zoneHVACIndex).ScaledHeatingCapacity; + DataScalableCapSizingON = true; + } + } + } else { + // no scalable sizing method has been specified. Sizing proceeds using the method + // specified in the zoneHVAC object + + PrintFlag = true; + + SizingMethod = CoolingAirflowSizing; + FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + TempSize = VRFTU(VRFTUNum).MaxCoolAirVolFlow; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxCoolAirVolFlow = TempSize; + + FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SizingMethod = HeatingAirflowSizing; + TempSize = VRFTU(VRFTUNum).MaxHeatAirVolFlow; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxHeatAirVolFlow = TempSize; + + FieldNum = 2; // N2, \field Supply Air Flow Rate When No Cooling is Needed + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SizingMethod = SystemAirflowSizing; + TempSize = VRFTU(VRFTUNum).MaxNoCoolAirVolFlow; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxNoCoolAirVolFlow = TempSize; + + FieldNum = 4; // N4, \field Supply Air Flow Rate When No Heating is Needed + SizingString = VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]"; + SizingMethod = SystemAirflowSizing; + TempSize = VRFTU(VRFTUNum).MaxNoHeatAirVolFlow; + RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxNoHeatAirVolFlow = TempSize; } IsAutoSize = false; if (VRFTU(VRFTUNum).CoolOutAirVolFlow == AutoSize) { @@ -6738,6 +7248,18 @@ namespace HVACVariableRefrigerantFlow { } } } + } else { + if (VRFTU(VRFTUNum).CoolOutAirVolFlow == DataSizing::AutoSize) { + if (DataAirSystems::PrimaryAirSystem(CurSysNum).OASysExists) { + VRFTU(VRFTUNum).CoolOutAirVolFlow = 0.0; + } else { + VRFTU(VRFTUNum).CoolOutAirVolFlow = min(FinalSysSizing(CurSysNum).DesOutAirVolFlow, VRFTU(VRFTUNum).MaxCoolAirVolFlow); + } + ReportSizingOutput(DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num), + VRFTU(VRFTUNum).Name, + "Design Size Outdoor Air Flow Rate During Cooling Operation [m3/s]", + VRFTU(VRFTUNum).CoolOutAirVolFlow); + } } IsAutoSize = false; @@ -6789,11 +7311,23 @@ namespace HVACVariableRefrigerantFlow { } } } + } else { + if (VRFTU(VRFTUNum).HeatOutAirVolFlow == DataSizing::AutoSize) { + if (DataAirSystems::PrimaryAirSystem(CurSysNum).OASysExists) { + VRFTU(VRFTUNum).HeatOutAirVolFlow = 0.0; + } else { + VRFTU(VRFTUNum).HeatOutAirVolFlow = min(FinalSysSizing(CurSysNum).DesOutAirVolFlow, VRFTU(VRFTUNum).MaxHeatAirVolFlow); + } + ReportSizingOutput(DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num), + VRFTU(VRFTUNum).Name, + "Design Size Outdoor Air Flow Rate During Heating Operation [m3/s]", + VRFTU(VRFTUNum).HeatOutAirVolFlow); + } } - ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(VRFTU(VRFTUNum).CoolOutAirVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); + EqSizing.OAVolFlow = max(VRFTU(VRFTUNum).CoolOutAirVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); - if (VRFTU(VRFTUNum).ATMixerExists) { // set up ATMixer conditions for use in component sizing - ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used + if (VRFTU(VRFTUNum).ATMixerExists && VRFTU(VRFTUNum).isInZone) { // set up ATMixer conditions for use in component sizing + EqSizing.OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used SingleDuct::setATMixerSizingProperties(VRFTU(VRFTUNum).ATMixerIndex, VRFTU(VRFTUNum).ZoneNum, CurZoneEqNum); } @@ -6848,6 +7382,18 @@ namespace HVACVariableRefrigerantFlow { } } } + } else { + if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow == DataSizing::AutoSize) { + if (DataAirSystems::PrimaryAirSystem(CurSysNum).OASysExists) { + VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = 0.0; + } else { + VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow = min(VRFTU(VRFTUNum).MaxCoolAirVolFlow, VRFTU(VRFTUNum).MaxHeatAirVolFlow); + } + ReportSizingOutput(DataHVACGlobals::cVRFTUTypes(VRFTU(VRFTUNum).VRFTUType_Num), + VRFTU(VRFTUNum).Name, + "Design Size Outdoor Air Flow Rate When No Cooling or Heating Heating is Needed [m3/s]", + VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow); + } } IsAutoSize = false; @@ -6899,6 +7445,12 @@ namespace HVACVariableRefrigerantFlow { } } } + } else { + SizingMethod = DataHVACGlobals::MaxHeaterOutletTempSizing; + TempSize = VRFTU(VRFTUNum).MaxSATFromSuppHeatCoil; + SizingString = "Maximum Supply Air Temperature from Supplemental Heater [C]"; + ReportSizingManager::RequestSizing(CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName); + VRFTU(VRFTUNum).MaxSATFromSuppHeatCoil = TempSize; } if (VRFTU(VRFTUNum).SuppHeatCoilType_Num == DataHVACGlobals::Coil_HeatingWater) { @@ -6925,25 +7477,23 @@ namespace HVACVariableRefrigerantFlow { } } - if (CurZoneEqNum > 0) { - ZoneEqSizing(CurZoneEqNum).CoolingAirFlow = true; - ZoneEqSizing(CurZoneEqNum).CoolingAirVolFlow = VRFTU(VRFTUNum).MaxCoolAirVolFlow; - ZoneEqSizing(CurZoneEqNum).HeatingAirFlow = true; - ZoneEqSizing(CurZoneEqNum).HeatingAirVolFlow = VRFTU(VRFTUNum).MaxHeatAirVolFlow; - } + EqSizing.CoolingAirFlow = true; + EqSizing.CoolingAirVolFlow = VRFTU(VRFTUNum).MaxCoolAirVolFlow; + EqSizing.HeatingAirFlow = true; + EqSizing.HeatingAirVolFlow = VRFTU(VRFTUNum).MaxHeatAirVolFlow; if (CheckVRFCombinationRatio(VRFCond)) { OnOffAirFlowRat = 1.0; // set up the outside air data for sizing the DX coils - ZoneEqDXCoil = true; + if (VRFTU(VRFTUNum).isInZone) ZoneEqDXCoil = true; if (CurZoneEqNum > 0) { if (VRFTU(VRFTUNum).CoolOutAirVolFlow > 0.0 || VRFTU(VRFTUNum).HeatOutAirVolFlow > 0.0) { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(VRFTU(VRFTUNum).CoolOutAirVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); + EqSizing.OAVolFlow = max(VRFTU(VRFTUNum).CoolOutAirVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow); } else { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; + EqSizing.OAVolFlow = 0.0; } } else { - ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; + EqSizing.OAVolFlow = 0.0; } Real64 SuppHeatCoilLoad = 0.0; @@ -7494,52 +8044,14 @@ namespace HVACVariableRefrigerantFlow { // METHODOLOGY EMPLOYED: // Use RegulaFalsi technique to iterate on part-load ratio until convergence is achieved. - using General::RoundSigDigits; - using General::SolveRoot; - using General::TrimSigDigits; - using HeatingCoils::SimulateHeatingCoilComponents; - using ScheduleManager::GetCurrentScheduleValue; - - int const MaxIte(500); // maximum number of iterations - Real64 const MinPLF(0.0); // minimum part load factor allowed - Real64 const ErrorTol(0.001); // tolerance for RegulaFalsi iterations - static ObjexxFCL::gio::Fmt fmtLD("*"); - - Real64 FullOutput; // unit full output when compressor is operating [W] - Real64 TempOutput; // unit output when iteration limit exceeded [W] - Real64 NoCompOutput; // output when no active compressor [W] - int SolFla; // Flag of RegulaFalsi solver - Array1D Par(6); // Parameters passed to RegulaFalsi - std::string IterNum; // Max number of iterations for warning message - Real64 TempMinPLR; // min PLR used in Regula Falsi call - Real64 TempMaxPLR; // max PLR used in Regula Falsi call - bool ContinueIter; // used when convergence is an issue - int VRFCond; // index to VRF condenser - int IndexToTUInTUList; // index to TU in specific list for the VRF system - int TUListIndex; // index to TU list for this VRF system - bool VRFCoolingMode; - bool VRFHeatingMode; - bool HRCoolingMode; - bool HRHeatingMode; - Real64 SuppHeatCoilPLR; // supplemental heating part-load ratio - Real64 LoadToHeatingSP; // load to heating setpoint of a zone - - SuppHeatCoilPLR = 0.0; PartLoadRatio = 0.0; LoopDXCoolCoilRTF = 0.0; LoopDXHeatCoilRTF = 0.0; - VRFCond = this->VRFSysNum; - IndexToTUInTUList = this->IndexToTUInTUList; - TUListIndex = VRF(VRFCond).ZoneTUListPtr; - VRFCoolingMode = CoolingLoad(VRFCond); - VRFHeatingMode = HeatingLoad(VRFCond); - HRCoolingMode = TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList); - HRHeatingMode = TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList); // The RETURNS here will jump back to SimVRF where the CalcVRF routine will simulate with latest PLR // do nothing else if TU is scheduled off - if (GetCurrentScheduleValue(this->SchedPtr) == 0.0) return; + if (ScheduleManager::GetCurrentScheduleValue(this->SchedPtr) == 0.0) return; // do nothing if TU has no load (TU will be modeled using PLR=0) if (QZnReq == 0.0) return; @@ -7553,6 +8065,34 @@ namespace HVACVariableRefrigerantFlow { // Get result when DX coil is operating at the minimum PLR (1E-20) if not otherwise specified PartLoadRatio = this->MinOperatingPLR; + this->ControlVRFToLoad(VRFTUNum, QZnReq, FirstHVACIteration, PartLoadRatio, OnOffAirFlowRatio, SuppHeatCoilLoad); + + } + + void VRFTerminalUnitEquipment::ControlVRFToLoad(int const VRFTUNum, Real64 const QZnReq, bool const FirstHVACIteration, Real64 & PartLoadRatio, Real64 & OnOffAirFlowRatio, Real64 & SuppHeatCoilLoad) { + + int const MaxIte(500); // maximum number of iterations + Real64 const MinPLF(0.0); // minimum part load factor allowed + Real64 const ErrorTol(0.001); // tolerance for RegulaFalsi iterations + static ObjexxFCL::gio::Fmt fmtLD("*"); + + int VRFCond = this->VRFSysNum; + Real64 FullOutput = 0.0; // unit full output when compressor is operating [W] + Real64 TempOutput = 0.0; // unit output when iteration limit exceeded [W] + int SolFla = 0; // Flag of RegulaFalsi solver + Array1D Par(6); // Parameters passed to RegulaFalsi + std::string IterNum; // Max number of iterations for warning message + Real64 TempMinPLR = 0.0; // min PLR used in Regula Falsi call + Real64 TempMaxPLR = 0.0; // max PLR used in Regula Falsi call + bool ContinueIter; // used when convergence is an issue + Real64 NoCompOutput = 0.0; // output when no active compressor [W] + bool VRFCoolingMode = CoolingLoad(VRFCond); + bool VRFHeatingMode = HeatingLoad(VRFCond); + int IndexToTUInTUList = this->IndexToTUInTUList; + int TUListIndex = VRF(VRFCond).ZoneTUListPtr; + bool HRCoolingMode = TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList); + bool HRHeatingMode = TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList); + if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control this->CalcVRF_FluidTCtrl(VRFTUNum, FirstHVACIteration, PartLoadRatio, NoCompOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); @@ -7598,44 +8138,84 @@ namespace HVACVariableRefrigerantFlow { } // set supplemental heating coil calculation if the condition requires - if (this->SuppHeatingCoilPresent && QZnReq > DataHVACGlobals::SmallLoad && QZnReq > FullOutput) { - LoadToHeatingSP = ZoneSysEnergyDemand(this->ZoneNum).RemainingOutputReqToHeatSP; - if ((FullOutput < (LoadToHeatingSP - DataHVACGlobals::SmallLoad)) && !FirstHVACIteration) { - SuppHeatCoilLoad = max(0.0, LoadToHeatingSP - FullOutput); - this->SuppHeatingCoilLoad = SuppHeatCoilLoad; - if (this->DesignSuppHeatingCapacity > 0.0) { - this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + if (this->SuppHeatingCoilPresent) { + if ((QZnReq > DataHVACGlobals::SmallLoad && QZnReq > FullOutput) || + (this->isSetPointControlled && this->suppTempSetPoint > DataLoopNode::Node(this->SuppHeatCoilAirInletNode).Temp)) { + Real64 ZoneLoad = 0.0; + Real64 LoadToHeatingSP = 0.0; + Real64 LoadToCoolingSP = 0.0; + if (this->isSetPointControlled) { + Real64 mDot = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).MassFlowRate; + Real64 Tin = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).Temp; + Real64 Win = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).HumRat; + Real64 CpAirIn = Psychrometrics::PsyCpAirFnWTdb(Win, Tin); + SuppHeatCoilLoad = mDot * CpAirIn * (this->suppTempSetPoint - Tin); + this->SuppHeatingCoilLoad = SuppHeatCoilLoad; + if (this->DesignSuppHeatingCapacity > 0.0) { + this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + } + } else { + getVRFTUZoneLoad(VRFTUNum, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, false); + if ((FullOutput < (LoadToHeatingSP - DataHVACGlobals::SmallLoad)) && !FirstHVACIteration) { + SuppHeatCoilLoad = max(0.0, LoadToHeatingSP - FullOutput); + this->SuppHeatingCoilLoad = SuppHeatCoilLoad; + if (this->DesignSuppHeatingCapacity > 0.0) { + this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + } + } else { + SuppHeatCoilLoad = 0.0; + this->SuppHeatPartLoadRatio = 0.0; + } } } else { SuppHeatCoilLoad = 0.0; this->SuppHeatPartLoadRatio = 0.0; } - } else { + } else { // does it matter what these are if there is no supp heater? SuppHeatCoilLoad = 0.0; this->SuppHeatPartLoadRatio = 0.0; } - PartLoadRatio = 0.0; - if ((VRFCoolingMode && !VRF(VRFCond).HeatRecoveryUsed) || (VRF(VRFCond).HeatRecoveryUsed && HRCoolingMode)) { // Since we are cooling, we expect FullOutput < NoCompOutput // If the QZnReq <= FullOutput the unit needs to run full out if (QZnReq <= FullOutput) { // if no coil present in terminal unit, no need to reset PLR? - if (VRFTU(VRFTUNum).CoolingCoilPresent) PartLoadRatio = 1.0; - return; + if (VRFTU(VRFTUNum).CoolingCoilPresent) { + PartLoadRatio = 1.0; + // the zone set point could be exceeded if set point control is used so protect against that + if (this->isSetPointControlled) { + if (DataLoopNode::Node(this->coolCoilAirOutNode).Temp > this->coilTempSetPoint) return; + } else { + return; + } + } else { + PartLoadRatio = 0.0; + return; + } } } else if ((VRFHeatingMode && !VRF(VRFCond).HeatRecoveryUsed) || (VRF(VRFCond).HeatRecoveryUsed && HRHeatingMode)) { // Since we are heating, we expect FullOutput > NoCompOutput // If the QZnReq >= FullOutput the unit needs to run full out if (QZnReq >= FullOutput) { // if no coil present in terminal unit, no need reset PLR? - if (this->HeatingCoilPresent) PartLoadRatio = 1.0; - return; + if (this->HeatingCoilPresent) { + PartLoadRatio = 1.0; + // the zone set point could be exceeded if set point control is used so protect against that + if (this->isSetPointControlled) { + if (DataLoopNode::Node(this->heatCoilAirOutNode).Temp < this->coilTempSetPoint) return; + } else { + return; + } + } else { + PartLoadRatio = 0.0; + return; + } } } else { - // VRF terminal unit is off, PLR already set to 0 above + // VRF terminal unit is off // shouldn't actually get here + PartLoadRatio = 0.0; return; } @@ -7645,7 +8225,8 @@ namespace HVACVariableRefrigerantFlow { Par(1) = VRFTUNum; Par(2) = 0.0; - Par(4) = 0.0; + if (VRFTU(VRFTUNum).isSetPointControlled) Par(2) = 1.0; + Par(4) = 0.0; // fan OpMode if (FirstHVACIteration) { Par(3) = 1.0; } else { @@ -7654,7 +8235,7 @@ namespace HVACVariableRefrigerantFlow { // Par(4) = OpMode Par(5) = QZnReq; Par(6) = OnOffAirFlowRatio; - SolveRoot(ErrorTol, MaxIte, SolFla, PartLoadRatio, PLRResidual, 0.0, 1.0, Par); + General::SolveRoot(ErrorTol, MaxIte, SolFla, PartLoadRatio, PLRResidual, 0.0, 1.0, Par); if (SolFla == -1) { // Very low loads may not converge quickly. Tighten PLR boundary and try again. TempMaxPLR = -0.1; @@ -7690,7 +8271,7 @@ namespace HVACVariableRefrigerantFlow { if (VRFHeatingMode && TempOutput < QZnReq) ContinueIter = false; if (VRFCoolingMode && TempOutput > QZnReq) ContinueIter = false; } - SolveRoot(ErrorTol, MaxIte, SolFla, PartLoadRatio, PLRResidual, TempMinPLR, TempMaxPLR, Par); + General::SolveRoot(ErrorTol, MaxIte, SolFla, PartLoadRatio, PLRResidual, TempMinPLR, TempMaxPLR, Par); if (SolFla == -1) { if (!FirstHVACIteration && !WarmupFlag) { if (this->IterLimitExceeded == 0) { @@ -7698,7 +8279,7 @@ namespace HVACVariableRefrigerantFlow { strip(IterNum); ShowWarningMessage(DataHVACGlobals::cVRFTUTypes(this->VRFTUType_Num) + " \"" + this->Name + "\""); ShowContinueError(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = " + IterNum); - ShowContinueErrorTimeStamp(" Part-load ratio returned = " + RoundSigDigits(PartLoadRatio, 3)); + ShowContinueErrorTimeStamp(" Part-load ratio returned = " + General::RoundSigDigits(PartLoadRatio, 3)); if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control @@ -7709,7 +8290,8 @@ namespace HVACVariableRefrigerantFlow { this->CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); } - ShowContinueError(" Load requested = " + TrimSigDigits(QZnReq, 5) + ", Load delivered = " + TrimSigDigits(TempOutput, 5)); + ShowContinueError(" Load requested = " + General::TrimSigDigits(QZnReq, 5) + + ", Load delivered = " + General::TrimSigDigits(TempOutput, 5)); ShowRecurringWarningErrorAtEnd(DataHVACGlobals::cVRFTUTypes(this->VRFTUType_Num) + " \"" + this->Name + "\" -- Terminal unit Iteration limit exceeded error continues...", this->IterLimitExceeded); @@ -7801,8 +8383,8 @@ namespace HVACVariableRefrigerantFlow { Real64 AirMassFlow; // total supply air mass flow [m3/s] int OpMode; // fan operating mode, DataHVACGlobals::CycFanCycCoil or DataHVACGlobals::ContFanCycCoil int VRFCond; // index to VRF condenser - Real64 SpecHumOut; // specific humidity ratio at outlet node - Real64 SpecHumIn; // specific humidity ratio at inlet node + Real64 SpecHumOut(0.0); // specific humidity ratio at outlet node + Real64 SpecHumIn(0.0); // specific humidity ratio at inlet node int TUListIndex; // index to TU list for this VRF system int IndexToTUInTUList; // index to TU in specific list for the VRF system static int ATMixOutNode(0); // terminal unit mixer outlet node @@ -7838,7 +8420,8 @@ namespace HVACVariableRefrigerantFlow { if (this->FanPlace == DataHVACGlobals::BlowThru) { if (this->fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { if (OnOffAirFlowRatio > 0.0) { - HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); +// HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); + HVACFan::fanObjs[ this->FanIndex ]->simulate(_, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } else { HVACFan::fanObjs[this->FanIndex]->simulate(PartLoadRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } @@ -7886,7 +8469,8 @@ namespace HVACVariableRefrigerantFlow { if (this->FanPlace == DataHVACGlobals::DrawThru) { if (this->fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { if (OnOffAirFlowRatio > 0.0) { - HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); +// HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); + HVACFan::fanObjs[ this->FanIndex ]->simulate(_, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } else { HVACFan::fanObjs[this->FanIndex]->simulate(PartLoadRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } @@ -7923,22 +8507,25 @@ namespace HVACVariableRefrigerantFlow { // Air terminal supply side mixer, calculate supply side mixer output SimATMixer(this->ATMixerName, FirstHVACIteration, this->ATMixerIndex); TempOut = DataLoopNode::Node(ATMixOutNode).Temp; - TempIn = DataLoopNode::Node(ZoneNode).Temp; SpecHumOut = DataLoopNode::Node(ATMixOutNode).HumRat; - SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; AirMassFlow = DataLoopNode::Node(ATMixOutNode).MassFlowRate; } else { // Air terminal inlet side mixer TempOut = DataLoopNode::Node(VRFTUOutletNodeNum).Temp; - TempIn = DataLoopNode::Node(ZoneNode).Temp; SpecHumOut = DataLoopNode::Node(VRFTUOutletNodeNum).HumRat; - SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; } + TempIn = DataLoopNode::Node(ZoneNode).Temp; + SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; } else { TempOut = DataLoopNode::Node(VRFTUOutletNodeNum).Temp; - TempIn = DataLoopNode::Node(VRFTUInletNodeNum).Temp; SpecHumOut = DataLoopNode::Node(VRFTUOutletNodeNum).HumRat; - SpecHumIn = DataLoopNode::Node(VRFTUInletNodeNum).HumRat; + if (ZoneNode > 0) { + TempIn = DataLoopNode::Node(ZoneNode).Temp; + SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; + } else { + TempIn = DataLoopNode::Node(VRFTUInletNodeNum).Temp; + SpecHumIn = DataLoopNode::Node(VRFTUInletNodeNum).HumRat; + } } // calculate sensible load met using delta enthalpy LoadMet = AirMassFlow * PsyDeltaHSenFnTdb2W2Tdb1W1(TempOut, SpecHumOut, TempIn, SpecHumIn); // sensible {W} @@ -8170,6 +8757,23 @@ namespace HVACVariableRefrigerantFlow { DataLoopNode::Node(CondenserOutletNode).MassFlowRateMinAvail = DataLoopNode::Node(CondenserOutletNode).MassFlowRateMinAvail; } + void isVRFCoilPresent(std::string const VRFTUName, bool& CoolCoilPresent, bool& HeatCoilPresent) { + + if (GetVRFInputFlag) { + GetVRFInput(); + GetVRFInputFlag = false; + } + + int WhichVRFTU = UtilityRoutines::FindItemInList(VRFTUName, VRFTU, &VRFTerminalUnitEquipment::Name, NumVRFTU); + if (WhichVRFTU != 0) { + CoolCoilPresent = VRFTU(WhichVRFTU).CoolingCoilPresent; + HeatCoilPresent = VRFTU(WhichVRFTU).HeatingCoilPresent; + } else { + ShowSevereError("isVRFCoilPresent: Could not find VRF TU = \"" + VRFTUName + "\""); + } + + } + // End of Reporting subroutines for the Module // ***************************************************************************** @@ -8196,7 +8800,7 @@ namespace HVACVariableRefrigerantFlow { Real64 PLRResidual; // SUBROUTINE ARGUMENT DEFINITIONS: - // par(2) = Not used + // par(2) = indicates load (0) or set point (1) control // par(3) = FirstHVACIteration // par(4) = OpMode // par(5) = QZnReq @@ -8212,12 +8816,12 @@ namespace HVACVariableRefrigerantFlow { Real64 SuppHeatCoilLoad; // supplemetal heating coil load (W) VRFTUNum = int(Par(1)); + bool setPointControlled = (Par(2) == 1.0); // FirstHVACIteration is a logical, Par is real, so make 1.0=TRUE and 0.0=FALSE FirstHVACIteration = (Par(3) == 1.0); OpMode = int(Par(4)); QZnReq = Par(5); QZnReqTemp = QZnReq; - if (std::abs(QZnReq) < 100.0) QZnReqTemp = sign(100.0, QZnReq); OnOffAirFlowRatio = Par(6); SuppHeatCoilLoad = 0.0; @@ -8229,7 +8833,13 @@ namespace HVACVariableRefrigerantFlow { VRFTU(VRFTUNum).CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, ActualOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); } - PLRResidual = (ActualOutput - QZnReq) / QZnReqTemp; + if (setPointControlled) { + Real64 outletNodeT = DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUOutletNodeNum).Temp; + PLRResidual = (outletNodeT - VRFTU(VRFTUNum).coilTempSetPoint); + } else { + if (std::abs(QZnReq) < 100.0) QZnReqTemp = sign(100.0, QZnReq); + PLRResidual = (ActualOutput - QZnReq) / QZnReqTemp; + } return PLRResidual; } @@ -8286,8 +8896,10 @@ namespace HVACVariableRefrigerantFlow { if (GetCurrentScheduleValue(VRFTU(VRFTUNum).SchedPtr) > 0.0 && (GetCurrentScheduleValue(VRFTU(VRFTUNum).FanAvailSchedPtr) > 0.0 || DataHVACGlobals::ZoneCompTurnFansOff) && !DataHVACGlobals::ZoneCompTurnFansOff) { - DataLoopNode::Node(InletNode).MassFlowRate = AverageUnitMassFlow; - DataLoopNode::Node(InletNode).MassFlowRateMaxAvail = AverageUnitMassFlow; + // so for sure OA system TUs should use inlet node flow rate, don't overwrite inlet node flow rate + // could there be a reason for air loops to use inlet node flow? Possibly when VAV TUs used? + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InletNode).MassFlowRate = AverageUnitMassFlow; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InletNode).MassFlowRateMaxAvail = AverageUnitMassFlow; if (OutsideAirNode > 0) { DataLoopNode::Node(OutsideAirNode).MassFlowRate = AverageOAMassFlow; DataLoopNode::Node(OutsideAirNode).MassFlowRateMaxAvail = AverageOAMassFlow; @@ -8302,7 +8914,7 @@ namespace HVACVariableRefrigerantFlow { } else { // terminal unit and/or fan is off - DataLoopNode::Node(InletNode).MassFlowRate = 0.0; + if (!VRFTU(VRFTUNum).isInOASys) DataLoopNode::Node(InletNode).MassFlowRate = 0.0; if (OutsideAirNode > 0) { DataLoopNode::Node(OutsideAirNode).MassFlowRate = 0.0; DataLoopNode::Node(AirRelNode).MassFlowRate = 0.0; @@ -8369,7 +8981,6 @@ namespace HVACVariableRefrigerantFlow { // loop through all TU's to find operating mode. Be careful not to mix loop counters with current TU/Cond index for (NumTU = 1; NumTU <= TerminalUnitList(TUListNum).NumTUInList; ++NumTU) { // make sure TU's have been sized before looping through each one of them to determine operating mode - // (which would size all coils based on the zone that called this specific VRF terminal unit) if (any(TerminalUnitList(TUListNum).TerminalUnitNotSizedYet)) break; TUIndex = TerminalUnitList(TUListNum).ZoneTUPtr(NumTU); ThisZoneNum = VRFTU(TUIndex).ZoneNum; @@ -8390,164 +9001,245 @@ namespace HVACVariableRefrigerantFlow { } } - // Constant fan systems are tested for ventilation load to determine if load to be met changes. - // more logic may be needed here, what is the OA flow rate, was last mode heating or cooling, what control is used, etc... - ZoneLoad = ZoneSysEnergyDemand(ThisZoneNum).RemainingOutputRequired; - if (VRF(VRFCond).ThermostatPriority == ThermostatOffsetPriority) { - // for TSTATPriority, just check difference between zone temp and thermostat setpoint - if (ThisZoneNum > 0) { - SPTempHi = ZoneThermostatSetPointHi(ThisZoneNum); - SPTempLo = ZoneThermostatSetPointLo(ThisZoneNum); - { - auto const SELECT_CASE_var(TempControlType(ThisZoneNum)); - if (SELECT_CASE_var == 0) { // Uncontrolled - // MaxDeltaT denotes cooling, MinDeltaT denotes heating - } else if (SELECT_CASE_var == DataHVACGlobals::SingleHeatingSetPoint) { - // if heating load, ZoneDeltaT will be negative - ZoneDeltaT = min(0.0, ZT(ThisZoneNum) - SPTempLo); - MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), ZoneDeltaT); - } else if (SELECT_CASE_var == DataHVACGlobals::SingleCoolingSetPoint) { - // if cooling load, ZoneDeltaT will be positive - ZoneDeltaT = max(0.0, ZT(ThisZoneNum) - SPTempHi); - MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), ZoneDeltaT); - } else if (SELECT_CASE_var == DataHVACGlobals::SingleHeatCoolSetPoint) { - ZoneDeltaT = ZT(ThisZoneNum) - SPTempHi; //- SPTempHi and SPTempLo are same value - if (ZoneDeltaT > 0.0) { - MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), ZoneDeltaT); - } else { + if (VRFTU(TUIndex).isSetPointControlled) { + // set point temperature may only reside at the TU outlet node + Real64 coolCoilTempSetPoint = DataLoopNode::Node(VRFTU(TUIndex).VRFTUOutletNodeNum).TempSetPoint; + VRFTU(TUIndex).suppTempSetPoint = coolCoilTempSetPoint; + Real64 heatCoilTempSetPoint = coolCoilTempSetPoint; + // adjust coil control for fan heat when set point is at outlet node + Real64 coolfanDeltaT = 0.0; + Real64 heatfanDeltaT = 0.0; + if (VRFTU(TUIndex).FanPlace == DataHVACGlobals::DrawThru) { + if (VRFTU(TUIndex).fanOutletNode > 0) + coolfanDeltaT = DataLoopNode::Node(VRFTU(TUIndex).fanOutletNode).Temp - DataLoopNode::Node(VRFTU(TUIndex).fanInletNode).Temp; + } + heatfanDeltaT = coolfanDeltaT; + // or the set point could be placed at either or both coils, update both if necessary + if (VRFTU(TUIndex).CoolingCoilPresent) { + if (DataLoopNode::Node(VRFTU(TUIndex).coolCoilAirOutNode).TempSetPoint != DataLoopNode::SensedNodeFlagValue) { + coolCoilTempSetPoint = DataLoopNode::Node(VRFTU(TUIndex).coolCoilAirOutNode).TempSetPoint; + //// should we adjust for fan heat or not? What if it's a mixed air SP that already adjusts for fan heat? + //coolfanDeltaT = 0.0; + } + } + if (VRFTU(TUIndex).HeatingCoilPresent) { + if (DataLoopNode::Node(VRFTU(TUIndex).heatCoilAirOutNode).TempSetPoint != DataLoopNode::SensedNodeFlagValue) { + heatCoilTempSetPoint = DataLoopNode::Node(VRFTU(TUIndex).heatCoilAirOutNode).TempSetPoint; + //// should we adjust for fan heat or not? What if it's a mixed air SP that already adjusts for fan heat? + //heatfanDeltaT = 0.0; + } + } + // set a flow rate and simulate ATMixer/OASystem if needed + if (FirstHVACIteration) { + SetAverageAirFlow(TUIndex, 1.0, OnOffAirFlowRatio); + if (VRFTU(TUIndex).ATMixerExists) { + // There is an air terminal mixer + if (VRFTU(TUIndex).ATMixerType == DataHVACGlobals::ATMixer_InletSide) { // if there is an inlet side air terminal mixer + // set the primary air inlet mass flow rate + DataLoopNode::Node(VRFTU(TUIndex).ATMixerPriNode).MassFlowRate = + min(DataLoopNode::Node(VRFTU(TUIndex).ATMixerPriNode).MassFlowRateMaxAvail, DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate); + // now calculate the the mixer outlet air conditions (and the secondary air inlet flow rate). The mixer outlet flow rate + // has already been set above (it is the "inlet" node flow rate) + SingleDuct::SimATMixer(VRFTU(TUIndex).ATMixerName, FirstHVACIteration, VRFTU(TUIndex).ATMixerIndex); + } + } else { + // simulate OA Mixer + if (VRFTU(TUIndex).OAMixerUsed) SimOAMixer(VRFTU(TUIndex).OAMixerName, FirstHVACIteration, VRFTU(TUIndex).OAMixerIndex); + } + } + // identify a coil inlet temperature + if (VRFTU(TUIndex).CoolingCoilPresent) { + VRFTU(TUIndex).coilInNodeT = DataLoopNode::Node(VRFTU(TUIndex).coolCoilAirInNode).Temp; + VRFTU(TUIndex).coilInNodeW = DataLoopNode::Node(VRFTU(TUIndex).coolCoilAirInNode).HumRat; + } else { + VRFTU(TUIndex).coilInNodeT = DataLoopNode::Node(VRFTU(TUIndex).heatCoilAirInNode).Temp; + VRFTU(TUIndex).coilInNodeW = DataLoopNode::Node(VRFTU(TUIndex).heatCoilAirInNode).HumRat; + } + Real64 coilInletTemp = VRFTU(TUIndex).coilInNodeT; + Real64 coilInletHumRat = VRFTU(TUIndex).coilInNodeW; + Real64 coilInletMassFlow = DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate; + VRFTU(TUIndex).coolSPActive = false; + VRFTU(TUIndex).heatSPActive = false; + + if ((heatCoilTempSetPoint - coilInletTemp - heatfanDeltaT) > DataHVACGlobals::SmallTempDiff) { // heating + Real64 CpAirIn = Psychrometrics::PsyCpAirFnWTdb(coilInletHumRat, coilInletTemp); + ZoneLoad = coilInletMassFlow * CpAirIn * (heatCoilTempSetPoint - coilInletTemp - heatfanDeltaT); + VRFTU(TUIndex).heatSPActive = true; + VRFTU(TUIndex).heatLoadToSP = ZoneLoad; + ++NumHeatingLoads(VRFCond); + SumHeatingLoads(VRFCond) += ZoneLoad; + MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), -1.0); + VRFTU(TUIndex).coilTempSetPoint = heatCoilTempSetPoint - heatfanDeltaT; + } else if ((coilInletTemp - coolCoilTempSetPoint - coolfanDeltaT) > DataHVACGlobals::SmallTempDiff) { // cooling + Real64 CpAirIn = Psychrometrics::PsyCpAirFnWTdb(coilInletHumRat, coilInletTemp); + ZoneLoad = coilInletMassFlow * CpAirIn * (coolCoilTempSetPoint - coilInletTemp - coolfanDeltaT); + VRFTU(TUIndex).coolSPActive = true; + VRFTU(TUIndex).coolLoadToSP = ZoneLoad; + ++NumCoolingLoads(VRFCond); + SumCoolingLoads(VRFCond) += ZoneLoad; + MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), 1.0); + VRFTU(TUIndex).coilTempSetPoint = coolCoilTempSetPoint - coolfanDeltaT; + } + } else { // else is not set point controlled + // Constant fan systems are tested for ventilation load to determine if load to be met changes. + // more logic may be needed here, what is the OA flow rate, was last mode heating or cooling, what control is used, etc... + + getVRFTUZoneLoad(TUIndex, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, true); + + if (VRF(VRFCond).ThermostatPriority == ThermostatOffsetPriority) { + // for TSTATPriority, just check difference between zone temp and thermostat setpoint + if (ThisZoneNum > 0) { + SPTempHi = ZoneThermostatSetPointHi(ThisZoneNum); + SPTempLo = ZoneThermostatSetPointLo(ThisZoneNum); + { + auto const SELECT_CASE_var(TempControlType(ThisZoneNum)); + if (SELECT_CASE_var == 0) { // Uncontrolled + // MaxDeltaT denotes cooling, MinDeltaT denotes heating + } else if (SELECT_CASE_var == DataHVACGlobals::SingleHeatingSetPoint) { + // if heating load, ZoneDeltaT will be negative + ZoneDeltaT = min(0.0, ZT(ThisZoneNum) - SPTempLo); MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), ZoneDeltaT); - } - } else if (SELECT_CASE_var == DataHVACGlobals::DualSetPointWithDeadBand) { - if (ZT(ThisZoneNum) - SPTempHi > 0.0) { + } else if (SELECT_CASE_var == DataHVACGlobals::SingleCoolingSetPoint) { + // if cooling load, ZoneDeltaT will be positive ZoneDeltaT = max(0.0, ZT(ThisZoneNum) - SPTempHi); MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), ZoneDeltaT); - } else if (SPTempLo - ZT(ThisZoneNum) > 0.0) { - ZoneDeltaT = min(0.0, ZT(ThisZoneNum) - SPTempLo); - MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), ZoneDeltaT); + } else if (SELECT_CASE_var == DataHVACGlobals::SingleHeatCoolSetPoint) { + ZoneDeltaT = ZT(ThisZoneNum) - SPTempHi; //- SPTempHi and SPTempLo are same value + if (ZoneDeltaT > 0.0) { + MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), ZoneDeltaT); + } else { + MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), ZoneDeltaT); + } + } else if (SELECT_CASE_var == DataHVACGlobals::DualSetPointWithDeadBand) { + if (ZT(ThisZoneNum) - SPTempHi > 0.0) { + ZoneDeltaT = max(0.0, ZT(ThisZoneNum) - SPTempHi); + MaxDeltaT(VRFCond) = max(MaxDeltaT(VRFCond), ZoneDeltaT); + } else if (SPTempLo - ZT(ThisZoneNum) > 0.0) { + ZoneDeltaT = min(0.0, ZT(ThisZoneNum) - SPTempLo); + MinDeltaT(VRFCond) = min(MinDeltaT(VRFCond), ZoneDeltaT); + } + } else { } - } else { } } - } - } else if (VRF(VRFCond).ThermostatPriority == LoadPriority || VRF(VRFCond).ThermostatPriority == ZonePriority) { - if (VRFTU(TUIndex).OpMode == DataHVACGlobals::ContFanCycCoil) { - SetCompFlowRate(TUIndex, VRFCond); - - if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { - // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control - VRFTU(TUIndex).CalcVRF_FluidTCtrl(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); - } else { - // Algorithm Type: VRF model based on system curve - VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); - } + } else if (VRF(VRFCond).ThermostatPriority == LoadPriority || VRF(VRFCond).ThermostatPriority == ZonePriority) { + if (VRFTU(TUIndex).OpMode == DataHVACGlobals::ContFanCycCoil) { + SetCompFlowRate(TUIndex, VRFCond); - LoadToCoolingSP = ZoneSysEnergyDemand(ThisZoneNum).OutputRequiredToCoolingSP; - LoadToHeatingSP = ZoneSysEnergyDemand(ThisZoneNum).OutputRequiredToHeatingSP; - // If the Terminal Unit has a net cooling capacity (NoCompOutput < 0) and - // the zone temp is above the Tstat heating setpoint (QToHeatSetPt < 0) - if (TempOutput < 0.0 && LoadToHeatingSP < 0.0) { - // If the net cooling capacity overshoots the heating setpoint count as heating load - if (TempOutput < LoadToHeatingSP) { - // Don't count as heating load unless mode is allowed. Also check for floating zone. - if (TempControlType(ThisZoneNum) != DataHVACGlobals::SingleCoolingSetPoint && TempControlType(ThisZoneNum) != 0) { - if (!LastModeHeating(VRFCond)) { - // if last mode was cooling, make sure heating flow rate is used - if (VRFTU(TUIndex).OAMixerUsed) { - DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(TUIndex).MaxHeatAirMassFlow; - DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerOANodeNum).MassFlowRate = VRFTU(TUIndex).HeatOutAirMassFlow; - SimOAMixer(VRFTU(TUIndex).OAMixerName, FirstHVACIteration, VRFTU(TUIndex).OAMixerIndex); - } else { - DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate = VRFTU(TUIndex).MaxHeatAirMassFlow; - } + if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { + // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control + VRFTU(TUIndex).CalcVRF_FluidTCtrl(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } else { + // Algorithm Type: VRF model based on system curve + VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } - // recalculate using correct flow rate - if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { - // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control - VRFTU(TUIndex).CalcVRF_FluidTCtrl( - TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + // If the Terminal Unit has a net cooling capacity (NoCompOutput < 0) and + // the zone temp is above the Tstat heating setpoint (QToHeatSetPt < 0) + if (TempOutput < 0.0 && LoadToHeatingSP < 0.0) { + // If the net cooling capacity overshoots the heating setpoint count as heating load + if (TempOutput < LoadToHeatingSP) { + // Don't count as heating load unless mode is allowed. Also check for floating zone. + if (TempControlType(ThisZoneNum) != DataHVACGlobals::SingleCoolingSetPoint && TempControlType(ThisZoneNum) != 0) { + if (!LastModeHeating(VRFCond)) { + // if last mode was cooling, make sure heating flow rate is used + if (VRFTU(TUIndex).OAMixerUsed) { + DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(TUIndex).MaxHeatAirMassFlow; + DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerOANodeNum).MassFlowRate = VRFTU(TUIndex).HeatOutAirMassFlow; + SimOAMixer(VRFTU(TUIndex).OAMixerName, FirstHVACIteration, VRFTU(TUIndex).OAMixerIndex); + } else { + DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate = VRFTU(TUIndex).MaxHeatAirMassFlow; + } + + // recalculate using correct flow rate + if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { + // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control + VRFTU(TUIndex).CalcVRF_FluidTCtrl( + TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } else { + // Algorithm Type: VRF model based on system curve + VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } + + if (TempOutput < LoadToHeatingSP) { + ++NumHeatingLoads(VRFCond); + // sum heating load on condenser, not total zone heating load + SumHeatingLoads(VRFCond) += (LoadToHeatingSP - TempOutput); + } } else { - // Algorithm Type: VRF model based on system curve - VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); - } - - if (TempOutput < LoadToHeatingSP) { ++NumHeatingLoads(VRFCond); // sum heating load on condenser, not total zone heating load SumHeatingLoads(VRFCond) += (LoadToHeatingSP - TempOutput); } - } else { - ++NumHeatingLoads(VRFCond); - // sum heating load on condenser, not total zone heating load - SumHeatingLoads(VRFCond) += (LoadToHeatingSP - TempOutput); } + } else if (TempOutput < ZoneLoad) { + // If the net cooling capacity meets the zone cooling load but does not overshoot heating setpoint, turn + // off coil do nothing, the zone will float + } else if (ZoneLoad < 0.0) { + // still a cooling load + ++NumCoolingLoads(VRFCond); + // sum cooling load on condenser, not total zone cooling load + SumCoolingLoads(VRFCond) += (LoadToCoolingSP - TempOutput); } - } else if (TempOutput < ZoneLoad) { - // If the net cooling capacity meets the zone cooling load but does not overshoot heating setpoint, turn off - // coil do nothing, the zone will float - } else if (ZoneLoad < 0.0) { - // still a cooling load - ++NumCoolingLoads(VRFCond); - // sum cooling load on condenser, not total zone cooling load - SumCoolingLoads(VRFCond) += (LoadToCoolingSP - TempOutput); - } - - // If the terminal unit has a net heating capacity and the zone temp is below the Tstat cooling setpoint - } else if (TempOutput > 0.0 && LoadToCoolingSP > 0.0) { - // If the net heating capacity overshoots the cooling setpoint count as cooling load - if (TempOutput > LoadToCoolingSP) { - // Don't count as cooling load unless mode is allowed. Also check for floating zone. - if (TempControlType(ThisZoneNum) != DataHVACGlobals::SingleHeatingSetPoint && TempControlType(ThisZoneNum) != 0) { - if (!LastModeCooling(VRFCond)) { - if (VRFTU(TUIndex).OAMixerUsed) { - DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(TUIndex).MaxCoolAirMassFlow; - DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerOANodeNum).MassFlowRate = VRFTU(TUIndex).CoolOutAirMassFlow; - SimOAMixer(VRFTU(TUIndex).OAMixerName, FirstHVACIteration, VRFTU(TUIndex).OAMixerIndex); - } else { - DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate = VRFTU(TUIndex).MaxCoolAirMassFlow; - } - if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { - // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control - VRFTU(TUIndex).CalcVRF_FluidTCtrl( - TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + // If the terminal unit has a net heating capacity and the zone temp is below the Tstat cooling setpoint + } else if (TempOutput > 0.0 && LoadToCoolingSP > 0.0) { + // If the net heating capacity overshoots the cooling setpoint count as cooling load + if (TempOutput > LoadToCoolingSP) { + // Don't count as cooling load unless mode is allowed. Also check for floating zone. + if (TempControlType(ThisZoneNum) != DataHVACGlobals::SingleHeatingSetPoint && TempControlType(ThisZoneNum) != 0) { + if (!LastModeCooling(VRFCond)) { + if (VRFTU(TUIndex).OAMixerUsed) { + DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerRetNodeNum).MassFlowRate = VRFTU(TUIndex).MaxCoolAirMassFlow; + DataLoopNode::Node(VRFTU(TUIndex).VRFTUOAMixerOANodeNum).MassFlowRate = VRFTU(TUIndex).CoolOutAirMassFlow; + SimOAMixer(VRFTU(TUIndex).OAMixerName, FirstHVACIteration, VRFTU(TUIndex).OAMixerIndex); + } else { + DataLoopNode::Node(VRFTU(TUIndex).VRFTUInletNodeNum).MassFlowRate = VRFTU(TUIndex).MaxCoolAirMassFlow; + } + + if (VRF(VRFCond).VRFAlgorithmTypeNum == AlgorithmTypeFluidTCtrl) { + // Algorithm Type: VRF model based on physics, applicable for Fluid Temperature Control + VRFTU(TUIndex).CalcVRF_FluidTCtrl( + TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } else { + // Algorithm Type: VRF model based on system curve + VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); + } + + if (TempOutput > LoadToCoolingSP) { + ++NumCoolingLoads(VRFCond); + SumCoolingLoads(VRFCond) += (LoadToCoolingSP - TempOutput); + } } else { - // Algorithm Type: VRF model based on system curve - VRFTU(TUIndex).CalcVRF(TUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); - } - - if (TempOutput > LoadToCoolingSP) { ++NumCoolingLoads(VRFCond); SumCoolingLoads(VRFCond) += (LoadToCoolingSP - TempOutput); } - } else { - ++NumCoolingLoads(VRFCond); - SumCoolingLoads(VRFCond) += (LoadToCoolingSP - TempOutput); } + } else if (TempOutput > ZoneLoad) { + // do nothing, zone will float + } else if (ZoneLoad > 0.0) { + ++NumHeatingLoads(VRFCond); + SumHeatingLoads(VRFCond) += ZoneLoad; } - } else if (TempOutput > ZoneLoad) { - // do nothing, zone will float + // ELSE there is no overshoot and the zone has a valid cooling load + } else if (ZoneLoad < 0.0) { + ++NumCoolingLoads(VRFCond); + SumCoolingLoads(VRFCond) += ZoneLoad; + // ELSE there is no overshoot and the zone has a valid heating load } else if (ZoneLoad > 0.0) { ++NumHeatingLoads(VRFCond); SumHeatingLoads(VRFCond) += ZoneLoad; } - // ELSE there is no overshoot and the zone has a valid cooling load - } else if (ZoneLoad < 0.0) { - ++NumCoolingLoads(VRFCond); - SumCoolingLoads(VRFCond) += ZoneLoad; - // ELSE there is no overshoot and the zone has a valid heating load - } else if (ZoneLoad > 0.0) { - ++NumHeatingLoads(VRFCond); - SumHeatingLoads(VRFCond) += ZoneLoad; - } - } else { // is cycling fan - if (ZoneLoad > 0.0) { - ++NumHeatingLoads(VRFCond); - SumHeatingLoads(VRFCond) += ZoneLoad; - } else if (ZoneLoad < 0.0) { - ++NumCoolingLoads(VRFCond); - SumCoolingLoads(VRFCond) += ZoneLoad; - } - } // IF(VRFTU(TUIndex)%OpMode == DataHVACGlobals::ContFanCycCoil)THEN + } else { // is cycling fan + if (ZoneLoad > 0.0) { + ++NumHeatingLoads(VRFCond); + SumHeatingLoads(VRFCond) += ZoneLoad; + } else if (ZoneLoad < 0.0) { + ++NumCoolingLoads(VRFCond); + SumCoolingLoads(VRFCond) += ZoneLoad; + } + } // IF(VRFTU(TUIndex)%OpMode == DataHVACGlobals::ContFanCycCoil)THEN + } } } @@ -8599,7 +9291,8 @@ namespace HVACVariableRefrigerantFlow { CoolingLoad(VRFCond) = false; } } else if (SELECT_CASE_var == MasterThermostatPriority) { - ZoneLoad = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).RemainingOutputRequired; + ZoneLoad = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).RemainingOutputRequired / + VRFTU(VRF(VRFCond).MasterZoneTUIndex).controlZoneMassFlowFrac; if (VRFTU(VRF(VRFCond).MasterZoneTUIndex).OpMode == DataHVACGlobals::ContFanCycCoil) { SetCompFlowRate(VRF(VRFCond).MasterZoneTUIndex, VRFCond); @@ -8614,8 +9307,10 @@ namespace HVACVariableRefrigerantFlow { .CalcVRF(VRF(VRFCond).MasterZoneTUIndex, FirstHVACIteration, 0.0, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); } - LoadToCoolingSP = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).OutputRequiredToCoolingSP; - LoadToHeatingSP = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).OutputRequiredToHeatingSP; + LoadToCoolingSP = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).OutputRequiredToCoolingSP / + VRFTU(VRF(VRFCond).MasterZoneTUIndex).controlZoneMassFlowFrac; + LoadToHeatingSP = ZoneSysEnergyDemand(VRF(VRFCond).MasterZonePtr).OutputRequiredToHeatingSP / + VRFTU(VRF(VRFCond).MasterZoneTUIndex).controlZoneMassFlowFrac; if (TempOutput < LoadToHeatingSP) { CoolingLoad(VRFCond) = false; HeatingLoad(VRFCond) = true; @@ -8823,6 +9518,46 @@ namespace HVACVariableRefrigerantFlow { } } + int GetVRFTUOutAirNodeFromName(std::string const VRFTUName, bool & errorsFound) { + int NodeNum; // return value of node number + + if (GetVRFInputFlag) { + GetVRFInput(); + GetVRFInputFlag = false; + } + + int WhichVRFTU = UtilityRoutines::FindItemInList(VRFTUName, VRFTU, &VRFTerminalUnitEquipment::Name, NumVRFTU); + if (WhichVRFTU != 0) { + NodeNum = VRFTU(WhichVRFTU).VRFTUOutletNodeNum; + } else { + ShowSevereError("GetVRFTUOutAirNodeFromName: Could not find VRF TU = \"" + VRFTUName + "\""); + errorsFound = true; + NodeNum = 0; + } + + return NodeNum; + } + + int GetVRFTUInAirNodeFromName(std::string const VRFTUName, bool & errorsFound) { + int NodeNum; // return value of node number + + if (GetVRFInputFlag) { + GetVRFInput(); + GetVRFInputFlag = false; + } + + int WhichVRFTU = UtilityRoutines::FindItemInList(VRFTUName, VRFTU, &VRFTerminalUnitEquipment::Name, NumVRFTU); + if (WhichVRFTU != 0) { + NodeNum = VRFTU(WhichVRFTU).VRFTUInletNodeNum; + } else { + ShowSevereError("GetVRFTUInAirNodeFromName: Could not find VRF TU = \"" + VRFTUName + "\""); + errorsFound = true; + NodeNum = 0; + } + + return NodeNum; + } + int GetVRFTUMixedAirNode(int const VRFTUNum) { @@ -8871,6 +9606,64 @@ namespace HVACVariableRefrigerantFlow { } } + void getVRFTUZoneLoad(int const VRFTUNum, Real64 &zoneLoad, Real64 &LoadToHeatingSP, Real64 &LoadToCoolingSP, bool const InitFlag) + { + + if (VRFTU(VRFTUNum).zoneSequenceCoolingNum > 0 && VRFTU(VRFTUNum).zoneSequenceHeatingNum > 0 && VRFTU(VRFTUNum).isInAirLoop) { + // air loop equipment uses sequenced variables + LoadToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum) + .SequencedOutputRequiredToCoolingSP(VRFTU(VRFTUNum).zoneSequenceCoolingNum) / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + LoadToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum) + .SequencedOutputRequiredToHeatingSP(VRFTU(VRFTUNum).zoneSequenceHeatingNum) / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + if (LoadToHeatingSP > 0.0 && LoadToCoolingSP > 0.0 && + DataHeatBalFanSys::TempControlType(VRFTU(VRFTUNum).ZoneNum) != DataHVACGlobals::SingleCoolingSetPoint) { + zoneLoad = LoadToHeatingSP; + } else if (LoadToHeatingSP > 0.0 && LoadToCoolingSP > 0.0 && + DataHeatBalFanSys::TempControlType(VRFTU(VRFTUNum).ZoneNum) == DataHVACGlobals::SingleCoolingSetPoint) { + zoneLoad = 0.0; + } else if (LoadToHeatingSP < 0.0 && LoadToCoolingSP < 0.0 && + DataHeatBalFanSys::TempControlType(VRFTU(VRFTUNum).ZoneNum) != DataHVACGlobals::SingleHeatingSetPoint) { + zoneLoad = LoadToCoolingSP; + } else if (LoadToHeatingSP < 0.0 && LoadToCoolingSP < 0.0 && + DataHeatBalFanSys::TempControlType(VRFTU(VRFTUNum).ZoneNum) == DataHVACGlobals::SingleHeatingSetPoint) { + zoneLoad = 0.0; + } else if (LoadToHeatingSP <= 0.0 && LoadToCoolingSP >= 0.0) { + zoneLoad = 0.0; + } + } else if (VRFTU(VRFTUNum).ZoneNum > 0) { + // zone equipment uses Remaining* variables + if (InitFlag) { + // this will need more investigation. Using Remaining* variable during the initial load calculation seems wrong. + // This may also have implications when VRF TUs are in the air loop or if SP control is used + // another question is whether initialization of the opeating mode should look at TotalOutputRequired or RemainingOutputRequired + zoneLoad = ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputRequired / VRFTU(VRFTUNum).controlZoneMassFlowFrac; + LoadToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).OutputRequiredToCoolingSP / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + LoadToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).OutputRequiredToHeatingSP / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + } else { + zoneLoad = ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputRequired / VRFTU(VRFTUNum).controlZoneMassFlowFrac; + LoadToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputReqToCoolSP / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + LoadToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(VRFTU(VRFTUNum).ZoneNum).RemainingOutputReqToHeatSP / + VRFTU(VRFTUNum).controlZoneMassFlowFrac; + } + } else if (VRFTU(VRFTUNum).isSetPointControlled) { + if (VRFTU(VRFTUNum).coolSPActive) { + LoadToCoolingSP = VRFTU(VRFTUNum).coolLoadToSP; + zoneLoad = LoadToCoolingSP; + LoadToHeatingSP = 0.0; + } + if (VRFTU(VRFTUNum).heatSPActive) { + LoadToHeatingSP = VRFTU(VRFTUNum).heatLoadToSP; + zoneLoad = LoadToHeatingSP; + LoadToCoolingSP = 0.0; + } + } + } + void VRFCondenserEquipment::CalcVRFIUTeTc_FluidTCtrl() { // SUBROUTINE INFORMATION: @@ -9019,12 +9812,17 @@ namespace HVACVariableRefrigerantFlow { RHsat = 0.98; BFC = 0.0592; BFH = 0.136; + Real64 ZoneLoad = 0.0; + Real64 LoadToHeatingSP = 0.0; + Real64 LoadToCoolingSP = 0.0; + // 1. COOLING Mode if ((Garate > 0.0) && ((!VRF(VRFNum).HeatRecoveryUsed && CoolingLoad(VRFNum)) || (VRF(VRFNum).HeatRecoveryUsed && TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList)))) { // 1.1) Cooling coil is running - QZnReqSenCoolingLoad = max(0.0, -1.0 * ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToCoolingSP); + getVRFTUZoneLoad(IndexToTUInTUList, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, false); + QZnReqSenCoolingLoad = max(0.0, -1.0 * LoadToCoolingSP); Tout = T_TU_in - QZnReqSenCoolingLoad * 1.2 / Garate / 1005; Th2 = T_coil_in - (T_coil_in - Tout) / (1 - BFC); DeltaT = C3Tevap * SH * SH + C2Tevap * SH + C1Tevap; @@ -9039,7 +9837,8 @@ namespace HVACVariableRefrigerantFlow { if ((Garate > 0.0) && ((!VRF(VRFNum).HeatRecoveryUsed && HeatingLoad(VRFNum)) || (VRF(VRFNum).HeatRecoveryUsed && TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList)))) { // 2.1) Heating coil is running - QZnReqSenHeatingLoad = max(0.0, ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToHeatingSP); + getVRFTUZoneLoad(IndexToTUInTUList, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, false); + QZnReqSenHeatingLoad = max(0.0, LoadToHeatingSP); Tout = T_TU_in + QZnReqSenHeatingLoad / Garate / 1005; Th2 = T_coil_in + (Tout - T_coil_in) / (1 - BFH); DeltaT = C3Tcond * SC * SC + C2Tcond * SC + C1Tcond; @@ -9352,11 +10151,13 @@ namespace HVACVariableRefrigerantFlow { if (TU_HeatingLoad > 0) { HRHeatRequestFlag = true; } else { + HeatingLoad(VRFCond) = false; HRHeatRequestFlag = false; } if (TU_CoolingLoad > 0) { HRCoolRequestFlag = true; } else { + CoolingLoad(VRFCond) = false; HRCoolRequestFlag = false; } @@ -9587,7 +10388,7 @@ namespace HVACVariableRefrigerantFlow { this->IUEvapHeatRate = TU_CoolingLoad; // 2. VRF-HP Heating Mode .OR. VRF-HR Mode_6 - } else if ((!this->HeatRecoveryUsed && HeatingLoad(VRFCond)) || (this->HeatRecoveryUsed && !HRCoolRequestFlag && HRHeatRequestFlag)) { + } else if ((!this->HeatRecoveryUsed && HeatingLoad(VRFCond) ) || (this->HeatRecoveryUsed && !HRCoolRequestFlag && HRHeatRequestFlag)) { this->OperatingMode = ModeHeatingOnly; this->VRFOperationSimPath = 60; @@ -10488,14 +11289,36 @@ namespace HVACVariableRefrigerantFlow { this->coilInNodeT = DataLoopNode::Node(DXCoils::DXCoil(this->HeatCoilIndex).AirInNode).Temp; this->coilInNodeW = DataLoopNode::Node(DXCoils::DXCoil(this->HeatCoilIndex).AirInNode).HumRat; } + // set supplemental heating coil calculation if the condition requires - if (this->SuppHeatingCoilPresent && QZnReq > DataHVACGlobals::SmallLoad && QZnReq > FullOutput) { - Real64 LoadToHeatingSP = ZoneSysEnergyDemand(this->ZoneNum).RemainingOutputReqToHeatSP; - if ((FullOutput < (LoadToHeatingSP - DataHVACGlobals::SmallLoad)) && !FirstHVACIteration) { - SuppHeatCoilLoad = max(0.0, LoadToHeatingSP - FullOutput); - this->SuppHeatingCoilLoad = SuppHeatCoilLoad; - if (this->DesignSuppHeatingCapacity > 0.0) { - this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + if (this->SuppHeatingCoilPresent) { + if ((QZnReq > DataHVACGlobals::SmallLoad && QZnReq > FullOutput) || + (this->isSetPointControlled && this->suppTempSetPoint > DataLoopNode::Node(this->SuppHeatCoilAirInletNode).Temp)) { + Real64 ZoneLoad = 0.0; + Real64 LoadToHeatingSP = 0.0; + Real64 LoadToCoolingSP = 0.0; + if (this->isSetPointControlled) { + Real64 mDot = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).MassFlowRate; + Real64 Tin = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).Temp; + Real64 Win = DataLoopNode::Node(this->SuppHeatCoilAirInletNode).HumRat; + Real64 CpAirIn = Psychrometrics::PsyCpAirFnWTdb(Win, Tin); + SuppHeatCoilLoad = mDot * CpAirIn * (this->suppTempSetPoint - Tin); + this->SuppHeatingCoilLoad = SuppHeatCoilLoad; + if (this->DesignSuppHeatingCapacity > 0.0) { + this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + } + } else { + getVRFTUZoneLoad(VRFTUNum, ZoneLoad, LoadToHeatingSP, LoadToCoolingSP, false); + if ((FullOutput < (LoadToHeatingSP - DataHVACGlobals::SmallLoad)) && !FirstHVACIteration) { + SuppHeatCoilLoad = max(0.0, LoadToHeatingSP - FullOutput); + this->SuppHeatingCoilLoad = SuppHeatCoilLoad; + if (this->DesignSuppHeatingCapacity > 0.0) { + this->SuppHeatPartLoadRatio = min(1.0, SuppHeatCoilLoad / this->DesignSuppHeatingCapacity); + } + } else { + SuppHeatCoilLoad = 0.0; + this->SuppHeatPartLoadRatio = 0.0; + } } } else { SuppHeatCoilLoad = 0.0; @@ -10506,27 +11329,46 @@ namespace HVACVariableRefrigerantFlow { this->SuppHeatPartLoadRatio = 0.0; } - PartLoadRatio = 0.0; - if ((VRFCoolingMode && !VRF(VRFCond).HeatRecoveryUsed) || (VRF(VRFCond).HeatRecoveryUsed && HRCoolingMode)) { // Since we are cooling, we expect FullOutput < NoCompOutput // If the QZnReq <= FullOutput the unit needs to run full out if (QZnReq <= FullOutput) { // if no coil present in terminal unit, no need to reset PLR? - if (this->CoolingCoilPresent) PartLoadRatio = 1.0; - return; + if (VRFTU(VRFTUNum).CoolingCoilPresent) { + PartLoadRatio = 1.0; + // the zone set point could be exceeded if set point control is used so protect against that + if (this->isSetPointControlled) { + if (DataLoopNode::Node(this->coolCoilAirOutNode).Temp > this->coilTempSetPoint) return; + } else { + return; + } + } else { + PartLoadRatio = 0.0; + return; + } } } else if ((VRFHeatingMode && !VRF(VRFCond).HeatRecoveryUsed) || (VRF(VRFCond).HeatRecoveryUsed && HRHeatingMode)) { // Since we are heating, we expect FullOutput > NoCompOutput // If the QZnReq >= FullOutput the unit needs to run full out if (QZnReq >= FullOutput) { // if no coil present in terminal unit, no need reset PLR? - if (this->HeatingCoilPresent) PartLoadRatio = 1.0; - return; + if (this->HeatingCoilPresent) { + PartLoadRatio = 1.0; + // the zone set point could be exceeded if set point control is used so protect against that + if (this->isSetPointControlled) { + if (DataLoopNode::Node(this->heatCoilAirOutNode).Temp < this->coilTempSetPoint) return; + } else { + return; + } + } else { + PartLoadRatio = 0.0; + return; + } } } else { - // VRF terminal unit is off, PLR already set to 0 above + // VRF terminal unit is off // shouldn't actually get here + PartLoadRatio = 0.0; return; } @@ -10536,6 +11378,7 @@ namespace HVACVariableRefrigerantFlow { Par(1) = VRFTUNum; Par(2) = 0.0; + if (VRFTU(VRFTUNum).isSetPointControlled) Par(2) = 1.0; Par(4) = 0.0; if (FirstHVACIteration) { Par(3) = 1.0; @@ -10692,7 +11535,8 @@ namespace HVACVariableRefrigerantFlow { if (this->FanPlace == DataHVACGlobals::BlowThru) { if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { if (OnOffAirFlowRatio > 0.0) { - HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); +// HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); + HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(_, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } else { HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(PartLoadRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } @@ -10739,7 +11583,8 @@ namespace HVACVariableRefrigerantFlow { if (this->FanPlace == DataHVACGlobals::DrawThru) { if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { if (OnOffAirFlowRatio > 0.0) { - HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); +// HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / OnOffAirFlowRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); + HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(_, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } else { HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(PartLoadRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } @@ -10776,22 +11621,25 @@ namespace HVACVariableRefrigerantFlow { // Air terminal supply side mixer, calculate supply side mixer output SimATMixer(this->ATMixerName, FirstHVACIteration, this->ATMixerIndex); TempOut = DataLoopNode::Node(ATMixOutNode).Temp; - TempIn = DataLoopNode::Node(ZoneNode).Temp; SpecHumOut = DataLoopNode::Node(ATMixOutNode).HumRat; - SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; AirMassFlow = DataLoopNode::Node(ATMixOutNode).MassFlowRate; } else { // Air terminal inlet side mixer TempOut = DataLoopNode::Node(VRFTUOutletNodeNum).Temp; - TempIn = DataLoopNode::Node(ZoneNode).Temp; SpecHumOut = DataLoopNode::Node(VRFTUOutletNodeNum).HumRat; - SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; } + TempIn = DataLoopNode::Node(ZoneNode).Temp; + SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; } else { TempOut = DataLoopNode::Node(VRFTUOutletNodeNum).Temp; - TempIn = DataLoopNode::Node(VRFTUInletNodeNum).Temp; SpecHumOut = DataLoopNode::Node(VRFTUOutletNodeNum).HumRat; - SpecHumIn = DataLoopNode::Node(VRFTUInletNodeNum).HumRat; + if (ZoneNode > 0) { + TempIn = DataLoopNode::Node(ZoneNode).Temp; + SpecHumIn = DataLoopNode::Node(ZoneNode).HumRat; + } else { + TempIn = DataLoopNode::Node(VRFTUInletNodeNum).Temp; + SpecHumIn = DataLoopNode::Node(VRFTUInletNodeNum).HumRat; + } } // calculate sensible load met using delta enthalpy LoadMet = AirMassFlow * PsyDeltaHSenFnTdb2W2Tdb1W1(TempOut, SpecHumOut, TempIn, SpecHumIn); // sensible {W} @@ -10999,7 +11847,8 @@ namespace HVACVariableRefrigerantFlow { if (VRFTU(VRFTUNum).FanPlace == DataHVACGlobals::BlowThru) { if (VRFTU(VRFTUNum).fanType_Num == DataHVACGlobals::FanType_SystemModelObject) { if (temp > 0) { - HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / temp, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); +// HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(1.0 / temp, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); + HVACFan::fanObjs[ VRFTU(VRFTUNum).FanIndex ]->simulate(_, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } else { HVACFan::fanObjs[VRFTU(VRFTUNum).FanIndex]->simulate(PartLoadRatio, DataHVACGlobals::ZoneCompTurnFansOff, DataHVACGlobals::ZoneCompTurnFansOff, _); } diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index c3d4a3581fc..e3bbdcadbfe 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -601,6 +601,7 @@ namespace HVACVariableRefrigerantFlow { // Members std::string Name; // Name of the VRF Terminal Unit List int NumTUInList; // Number of VRF Terminal Units in List + bool reset_isSimulatedFlags; // used to align simulate flags with order of each TU in simulation Array1D_int ZoneTUPtr; // index to VRF Terminal Unit Array1D_string ZoneTUName; // Name of the VRF Terminal Unit Array1D_bool IsSimulated; // TRUE if TU has been simulated @@ -618,7 +619,7 @@ namespace HVACVariableRefrigerantFlow { Array1D_int HeatingCoilAvailSchPtr; // heating coil availability schedule index // Default Constructor - TerminalUnitListData() : NumTUInList(0) + TerminalUnitListData() : NumTUInList(0), reset_isSimulatedFlags(true) { } }; @@ -711,7 +712,6 @@ namespace HVACVariableRefrigerantFlow { Real64 EMSValueForPartLoadFrac; // user defined value for EMS function int IterLimitExceeded; // index used for warning messages int FirstIterfailed; // index used for warning messages - int ZonePtr; // pointer to a zone served by a VRF terminal unit int HVACSizingIndex; // index of a HVACSizing object for a VRF terminal bool ATMixerExists; // True if there is an ATMixer std::string ATMixerName; // name of air terminal mixer @@ -731,9 +731,27 @@ namespace HVACVariableRefrigerantFlow { int SuppHeatCoilCompNum; // supplemental heating coil plant component index Real64 coilInNodeT; // coil inlet node temp at full flow (C) Real64 coilInNodeW; // coil inlet node humidity ratio at full flow (kg/kg) + int fanInletNode; // fan inlet node index int fanOutletNode; // fan outlet node index bool MySuppCoilPlantScanFlag; // flag used to initialize plant comp for water and steam heating coils - + int airLoopNum; // index to air loop + bool isInOASys; // true if TU is configured in outside air system + bool isInAirLoop; // true if TU is configured in an air loop + bool isInZone; // true if TU is configured as zone equipment + bool isSetPointControlled; // TU is controlled via setpoint instead of the standard load control + bool coolSPActive; // set point controlled cooling coil active (needs to operate) + bool heatSPActive; // set point controlled heating coil active (needs to operate) + Real64 coolLoadToSP; // load to set point in cooling mode + Real64 heatLoadToSP; // load to set point in heating mode + Real64 coilTempSetPoint; // coil control temperature + Real64 suppTempSetPoint; // supplemental heating coil control temperature + Real64 controlZoneMassFlowFrac; // ratio of control zone air mass flow rate to total zone air mass flow rate + int zoneSequenceCoolingNum; // zone equipment cooling sequence + int zoneSequenceHeatingNum; // zone equipment heating sequence + int coolCoilAirInNode; // cooling coil air inlet node number + int coolCoilAirOutNode; // cooling coil air outlet node number + int heatCoilAirInNode; // heating coil air inlet node number + int heatCoilAirOutNode; // heating coil air outlet node number // Default Constructor VRFTerminalUnitEquipment() : VRFTUType_Num(0), SchedPtr(-1), VRFSysNum(0), TUListIndex(0), IndexToTUInTUList(0), ZoneNum(0), ZoneAirNode(0), VRFTUInletNodeNum(0), @@ -742,19 +760,23 @@ namespace HVACVariableRefrigerantFlow { MaxNoCoolAirMassFlow(0.0), MaxNoHeatAirMassFlow(0.0), CoolOutAirVolFlow(0.0), HeatOutAirVolFlow(0.0), NoCoolHeatOutAirVolFlow(0.0), CoolOutAirMassFlow(0.0), HeatOutAirMassFlow(0.0), NoCoolHeatOutAirMassFlow(0.0), MinOperatingPLR(1.0E-20), SuppHeatCoilFluidMaxFlow(0.0), DesignSuppHeatingCapacity(0.0), MaxSATFromSuppHeatCoil(0.0), MaxOATSuppHeatingCoil(0.0), - SuppHeatPartLoadRatio(0.0), SuppHeatingCoilLoad(0.0), fanType_Num(0), FanOpModeSchedPtr(0), FanAvailSchedPtr(0), FanIndex(0), FanPower(0.0), OpMode(0), - FanPlace(0), ActualFanVolFlowRate(0.0), OAMixerIndex(0), OAMixerUsed(false), CoolCoilIndex(0), HeatCoilIndex(0), SuppHeatCoilIndex(0), - DXCoolCoilType_Num(0), DXHeatCoilType_Num(0), SuppHeatCoilType_Num(0), ParasiticElec(0.0), ParasiticOffElec(0.0), - HeatingSpeedRatio(1.0), HeatingCapacitySizeRatio(1.0), CoolingSpeedRatio(1.0), ParasiticCoolElecPower(0.0), ParasiticHeatElecPower(0.0), - ParasiticElecCoolConsumption(0.0), ParasiticElecHeatConsumption(0.0), CoolingCoilPresent(true), HeatingCoilPresent(true), - SuppHeatingCoilPresent(false), AvailStatus(0), TerminalUnitSensibleRate(0.0), TerminalUnitLatentRate(0.0), TotalCoolingRate(0.0), - TotalHeatingRate(0.0), SensibleCoolingRate(0.0), SensibleHeatingRate(0.0), LatentCoolingRate(0.0), LatentHeatingRate(0.0), - TotalCoolingEnergy(0.0), TotalHeatingEnergy(0.0), SensibleCoolingEnergy(0.0), SensibleHeatingEnergy(0.0), LatentCoolingEnergy(0.0), - LatentHeatingEnergy(0.0), EMSOverridePartLoadFrac(false), EMSValueForPartLoadFrac(0.0), IterLimitExceeded(0), FirstIterfailed(0), - ZonePtr(0), HVACSizingIndex(0), ATMixerExists(false), ATMixerIndex(0), ATMixerType(0), ATMixerPriNode(0), ATMixerSecNode(0), - ATMixerOutNode(0), SuppHeatCoilAirInletNode(0), SuppHeatCoilAirOutletNode(0), SuppHeatCoilFluidInletNode(0), SuppHeatCoilFluidOutletNode(0), - firstPass(true), SuppHeatCoilLoopNum(), SuppHeatCoilLoopSide(), SuppHeatCoilBranchNum(), SuppHeatCoilCompNum(), coilInNodeT(0.0), coilInNodeW(0.0), - fanOutletNode(0), MySuppCoilPlantScanFlag(true) + SuppHeatPartLoadRatio(0.0), SuppHeatingCoilLoad(0.0), fanType_Num(0), FanOpModeSchedPtr(0), FanAvailSchedPtr(-1), FanIndex(0), + FanPower(0.0), OpMode(0), FanPlace(0), ActualFanVolFlowRate(0.0), OAMixerIndex(0), OAMixerUsed(false), CoolCoilIndex(0), + HeatCoilIndex(0), SuppHeatCoilIndex(0), DXCoolCoilType_Num(0), DXHeatCoilType_Num(0), SuppHeatCoilType_Num(0), ParasiticElec(0.0), + ParasiticOffElec(0.0), HeatingSpeedRatio(1.0), HeatingCapacitySizeRatio(1.0), CoolingSpeedRatio(1.0), ParasiticCoolElecPower(0.0), + ParasiticHeatElecPower(0.0), ParasiticElecCoolConsumption(0.0), ParasiticElecHeatConsumption(0.0), CoolingCoilPresent(true), + HeatingCoilPresent(true), SuppHeatingCoilPresent(false), AvailStatus(0), TerminalUnitSensibleRate(0.0), TerminalUnitLatentRate(0.0), + TotalCoolingRate(0.0), TotalHeatingRate(0.0), SensibleCoolingRate(0.0), SensibleHeatingRate(0.0), LatentCoolingRate(0.0), + LatentHeatingRate(0.0), TotalCoolingEnergy(0.0), TotalHeatingEnergy(0.0), SensibleCoolingEnergy(0.0), SensibleHeatingEnergy(0.0), + LatentCoolingEnergy(0.0), LatentHeatingEnergy(0.0), EMSOverridePartLoadFrac(false), EMSValueForPartLoadFrac(0.0), IterLimitExceeded(0), + FirstIterfailed(0), HVACSizingIndex(0), ATMixerExists(false), ATMixerIndex(0), ATMixerType(0), ATMixerPriNode(0), ATMixerSecNode(0), + ATMixerOutNode(0), SuppHeatCoilAirInletNode(0), SuppHeatCoilAirOutletNode(0), SuppHeatCoilFluidInletNode(0), + SuppHeatCoilFluidOutletNode(0), firstPass(true), SuppHeatCoilLoopNum(), SuppHeatCoilLoopSide(), SuppHeatCoilBranchNum(), + SuppHeatCoilCompNum(), coilInNodeT(0.0), coilInNodeW(0.0), fanInletNode(0), fanOutletNode(0), MySuppCoilPlantScanFlag(true), + airLoopNum(0), isInOASys(false), isInAirLoop(false), isInZone(false), isSetPointControlled(false), coolSPActive(false), + heatSPActive(false), coolLoadToSP(0.0), heatLoadToSP(0.0), coilTempSetPoint(0.0), suppTempSetPoint(0.0), controlZoneMassFlowFrac(1.0), + zoneSequenceCoolingNum(0), zoneSequenceHeatingNum(0), coolCoilAirInNode(0), coolCoilAirOutNode(0), heatCoilAirInNode(0), + heatCoilAirOutNode(0) { } @@ -799,9 +821,17 @@ namespace HVACVariableRefrigerantFlow { Real64 &SuppHeatCoilLoad // supplemental heating coil load (W) ); - void CalcVRF(int VRFTUNum, // Unit index in VRF terminal unit array - bool FirstHVACIteration, // flag for 1st HVAC iteration in the time step - Real64 PartLoadRatio, // compressor part load fraction + void ControlVRFToLoad(int const VRFTUNum, // Index to VRF terminal unit + Real64 const QZnReq, // Index to zone number + bool const FirstHVACIteration, // flag for 1st HVAC iteration in the time step + Real64 &PartLoadRatio, // unit part load ratio + Real64 &OnOffAirFlowRatio, // ratio of compressor ON airflow to AVERAGE airflow over timestep + Real64 &SuppHeatCoilLoad // supplemental heating coil load (W) + ); + + void CalcVRF(int const VRFTUNum, // Unit index in VRF terminal unit array + bool const FirstHVACIteration, // flag for 1st HVAC iteration in the time step + Real64 const PartLoadRatio, // compressor part load fraction Real64 &LoadMet, // load met by unit (W) Real64 &OnOffAirFlowRatio, // ratio of ON air flow to average air flow Real64 &SuppHeatCoilLoad, // supplemental heating coil load (W) @@ -844,15 +874,18 @@ namespace HVACVariableRefrigerantFlow { // Functions void SimulateVRF(std::string const &CompName, - int ZoneNum, - bool FirstHVACIteration, + bool const FirstHVACIteration, + int const ZoneNum, + int &CompIndex, + bool &HeatingActive, + bool &CoolingActive, + int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit + Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit + bool const ZoneEquipment, // TRUE if called as zone equipment Real64 &SysOutputProvided, - Real64 &LatOutputProvided, - int &CompIndex); + Real64 &LatOutputProvided); - void CalcVRFCondenser(int VRFCond, // index to VRF condenser - bool FirstHVACIteration // flag for first time through HVAC system simulation - ); + void CalcVRFCondenser(int VRFCond); void GetVRFInput(); @@ -878,7 +911,15 @@ namespace HVACVariableRefrigerantFlow { int GetVRFTUMixedAirNode(int VRFTUNum); - int GetVRFTUReturnAirNode(int VRFTUNum); + int GetVRFTUOutAirNodeFromName(std::string const VRFTUName, bool &errorsFound); + + int GetVRFTUInAirNodeFromName(std::string const VRFTUName, bool &errorsFound); + + int GetVRFTUMixedAirNode(int const VRFTUNum); + + int GetVRFTUReturnAirNode(int const VRFTUNum); + + void getVRFTUZoneLoad(int const VRFTUNum, Real64 &zoneLoad, Real64 &LoadToHeatingSP, Real64 &LoadToCoolingSP, bool const InitFlag); void ReportVRFTerminalUnit(int VRFTUNum); // index to VRF terminal unit @@ -886,6 +927,8 @@ namespace HVACVariableRefrigerantFlow { void UpdateVRFCondenser(int VRFCond); // index to VRF condensing unit + void isVRFCoilPresent(std::string const VRFTUName, bool &CoolCoilPresent, bool & HeatCoilPresent); + Real64 PLRResidual(Real64 PartLoadRatio, // compressor cycling ratio (1.0 is continuous, 0.0 is off) Array1 const &Par // par(1) = VRFTUNum ); diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index 3625c03a360..2172e8a7426 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -84,6 +84,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ #include #include #include +#include #include #include #include @@ -206,6 +208,7 @@ namespace MixedAir { int const Humidifier(21); int const Fan_System_Object(22); int const UnitarySystemModel(23); + int const VRFTerminalUnit(24); // new Jan 2020 int const ControllerOutsideAir(2); int const ControllerStandAloneERV(3); @@ -747,8 +750,19 @@ namespace MixedAir { bool CoolingActive = false; Real64 OAUCoilOutTemp = 0.0; bool ZoneEquipFlag = false; - OutsideAirSys(OASysNum).compPointer[CompIndex]->simulate( - CompName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, CompIndex, OAUCoilOutTemp, ZoneEquipFlag); + Real64 sensOut = 0.0; + Real64 latOut = 0.0; + OutsideAirSys(OASysNum).compPointer[CompIndex]->simulate(CompName, + FirstHVACIteration, + AirLoopNum, + CompIndex, + HeatingActive, + CoolingActive, + CompIndex, + OAUCoilOutTemp, + ZoneEquipFlag, + sensOut, + latOut); } if (AirLoopInputsFilled) UnitarySystems::UnitarySys::getUnitarySysHeatCoolCoil(CompName, OACoolingCoil, OAHeatingCoil, 0); if (MyOneTimeCheckUnitarySysFlag(OASysNum)) { @@ -843,6 +857,31 @@ namespace MixedAir { SimEvapCooler(CompName, CompIndex); } + } else if (SELECT_CASE_var == VRFTerminalUnit) { // 'ZoneHVAC:TerminalUnit:VariableRefrigerantFlow' + if (Sim) { + int ControlledZoneNum = 0; + bool HeatingActive = false; + bool CoolingActive = false; + int const OAUnitNum = 0; + Real64 const OAUCoilOutTemp = 0.0; + bool const ZoneEquipment = false; + Real64 sysOut = 0.0; + Real64 latOut = 0.0; + HVACVariableRefrigerantFlow::SimulateVRF(CompName, + FirstHVACIteration, + ControlledZoneNum, + CompIndex, + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + sysOut, + latOut); + } else { + HVACVariableRefrigerantFlow::isVRFCoilPresent(CompName, OACoolingCoil, OAHeatingCoil); + } + } else { ShowFatalError("Invalid Outside Air Component=" + CompType); } @@ -1266,6 +1305,8 @@ namespace MixedAir { OutsideAirSys(OASysNum).ComponentType_Num(CompNum) = EvapCooler; } else if (SELECT_CASE_var == "EVAPORATIVECOOLER:DIRECT:RESEARCHSPECIAL") { OutsideAirSys(OASysNum).ComponentType_Num(CompNum) = EvapCooler; + } else if ( SELECT_CASE_var == "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW" ) { + OutsideAirSys(OASysNum).ComponentType_Num(CompNum) = VRFTerminalUnit; } else { ShowSevereError(CurrentModuleObject + " = \"" + AlphArray(1) + "\" invalid Outside Air Component=\"" + OutsideAirSys(OASysNum).ComponentType(CompNum) + "\"."); diff --git a/src/EnergyPlus/MixedAir.hh b/src/EnergyPlus/MixedAir.hh index 81005432205..7de9edc8f38 100644 --- a/src/EnergyPlus/MixedAir.hh +++ b/src/EnergyPlus/MixedAir.hh @@ -87,7 +87,6 @@ namespace MixedAir { extern int const OAMixer_Num; extern int const Fan_Simple_CV; extern int const Fan_Simple_VAV; - extern int const Fan_System_Object; extern int const WaterCoil_SimpleCool; extern int const WaterCoil_Cooling; extern int const WaterCoil_SimpleHeat; @@ -105,8 +104,10 @@ namespace MixedAir { extern int const Fan_ComponentModel; // cpw22Aug2010 (new) extern int const DXHeatPumpSystem; extern int const Coil_UserDefined; - extern int const UnitarySystem; extern int const Humidifier; + extern int const Fan_System_Object; + extern int const UnitarySystem; + extern int const VRFTerminalUnit; extern int const ControllerOutsideAir; extern int const ControllerStandAloneERV; diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index 5deaf8a0ead..b325d02f241 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -2417,10 +2417,21 @@ namespace OutdoorAirUnit { } else { Dxsystemouttemp = CompAirOutTemp - FanEffect; } + Real64 sensOut = 0.0; + Real64 latOut = 0.0; OutAirUnit(OAUnitNum) .OAEquip(SimCompNum) - .compPointer->simulate( - EquipName, FirstHVACIteration, -1, DXSystemIndex, HeatActive, CoolActive, UnitNum, Dxsystemouttemp, false); + .compPointer->simulate(EquipName, + FirstHVACIteration, + -1, + DXSystemIndex, + HeatActive, + CoolActive, + UnitNum, + Dxsystemouttemp, + false, + sensOut, + latOut); } } else { diff --git a/src/EnergyPlus/OutdoorAirUnit.hh b/src/EnergyPlus/OutdoorAirUnit.hh index 4d2500b3de3..4549d823808 100644 --- a/src/EnergyPlus/OutdoorAirUnit.hh +++ b/src/EnergyPlus/OutdoorAirUnit.hh @@ -53,8 +53,8 @@ // EnergyPlus Headers #include +#include #include -#include namespace EnergyPlus { @@ -111,12 +111,6 @@ namespace OutdoorAirUnit { extern Array1D_bool MySizeFlag; extern Array1D_bool CheckEquipName; - // SUBROUTINE SPECIFICATIONS FOR MODULE OUTDOOR AIR UNIT - // PRIVATE UpdateOutdoorAirUnit - // PUBLIC GetOutAirCoilOutletTemp - - // Types - struct OAEquipList { // Members @@ -125,7 +119,7 @@ namespace OutdoorAirUnit { std::string ComponentType; int ComponentType_Num; // Parameterized Component Types this module can address int ComponentIndex; // Which one in list -- updated by routines called from here - UnitarySystems::UnitarySys *compPointer; + HVACSystemData *compPointer; int CoilAirInletNode; int CoilAirOutletNode; int CoilWaterInletNode; diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index 0402720ebd1..7fec8f4f402 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -80,6 +80,8 @@ #include #include #include +#include +#include #include #include #include @@ -197,6 +199,7 @@ namespace SimAirServingZones { int const CoilUserDefined(27); int const Fan_System_Object(28); int const UnitarySystemModel(29); + int const ZoneVRFasAirLoopEquip(30); // DERIVED TYPE DEFINITIONS: // na @@ -1364,6 +1367,9 @@ namespace SimAirServingZones { } else if (componentType == "AIRLOOPHVAC:UNITARYHEATPUMP:AIRTOAIR:MULTISPEED") { PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).CompType_Num = UnitarySystem_MSHeatPump; + } else if ( componentType == "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW" ) { + PrimaryAirSystem(AirSysNum).Branch(BranchNum).Comp(CompNum).CompType_Num = ZoneVRFasAirLoopEquip; + } else if (componentType == "FAN:ONOFF" || componentType == "COIL:COOLING:DX:SINGLESPEED" || componentType == "COIL:HEATING:DX:SINGLESPEED" || componentType == "COIL:COOLING:DX:TWOSTAGEWITHHUMIDITYCONTROLMODE" || @@ -3495,7 +3501,7 @@ namespace SimAirServingZones { bool const FirstHVACIteration, // TRUE if first full HVAC iteration in an HVAC timestep int const AirLoopNum, // Primary air loop number int &CompIndex, // numeric pointer for CompType/CompName -- passed back from other routines - UnitarySystems::UnitarySys *CompPointer // equipment actual pointer + HVACSystemData *CompPointer // equipment actual pointer ) { @@ -3543,16 +3549,14 @@ namespace SimAirServingZones { // SUBROUTINE LOCAL VARIABLE DEFINITIONS: Real64 QActual; - bool CoolingActive; - bool HeatingActive; int OAUnitNum = 0; // used only for UnitarySystem call Real64 OAUCoilOutTemp = 0.0; // used only for UnitarySystem call bool ZoneEquipFlag = false; // used only for UnitarySystem call // FLOW: - CoolingActive = false; - HeatingActive = false; + bool CoolingActive = false; + bool HeatingActive = false; { auto const SELECT_CASE_var(CompType_Num); @@ -3630,8 +3634,19 @@ namespace SimAirServingZones { SimCoilUserDefined(CompName, CompIndex, AirLoopNum, HeatingActive, CoolingActive); } else if (SELECT_CASE_var == UnitarySystemModel) { // 'AirLoopHVAC:UnitarySystem' - CompPointer->simulate( - CompName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, ZoneEquipFlag); + Real64 sensOut = 0.0; + Real64 latOut = 0.0; + CompPointer->simulate(CompName, + FirstHVACIteration, + AirLoopNum, + CompIndex, + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipFlag, + sensOut, + latOut); } else if (SELECT_CASE_var == Furnace_UnitarySys_HeatOnly || SELECT_CASE_var == Furnace_UnitarySys_HeatCool) { // 'AirLoopHVAC:Unitary:Furnace:HeatOnly', 'AirLoopHVAC:Unitary:Furnace:HeatCool', @@ -3673,6 +3688,25 @@ namespace SimAirServingZones { AirLoopControlInfo(AirLoopNum).HighHumCtrlActive); // Ducts + } else if (SELECT_CASE_var == ZoneVRFasAirLoopEquip) { // 'ZoneHVAC:TerminalUnit:VariableRefrigerantFlow' + int ControlledZoneNum = 0; + int const OAUnitNum = 0; + Real64 const OAUCoilOutTemp = 0.0; + bool const ZoneEquipment = false; + Real64 sysOut = 0.0; + Real64 latOut = 0.0; + HVACVariableRefrigerantFlow::SimulateVRF(CompName, + FirstHVACIteration, + ControlledZoneNum, + CompIndex, + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + sysOut, + latOut); + } else if (SELECT_CASE_var == Duct) { // 'Duct' SimDuct(CompName, FirstHVACIteration, CompIndex); diff --git a/src/EnergyPlus/SimAirServingZones.hh b/src/EnergyPlus/SimAirServingZones.hh index 581a0edc985..7936e850101 100644 --- a/src/EnergyPlus/SimAirServingZones.hh +++ b/src/EnergyPlus/SimAirServingZones.hh @@ -52,8 +52,8 @@ #include // EnergyPlus Headers +#include #include -#include namespace EnergyPlus { @@ -98,6 +98,7 @@ namespace SimAirServingZones { extern int const CoilUserDefined; extern int const Fan_System_Object; extern int const UnitarySystemModel; + extern int const ZoneVRFasAirLoopEquip; // DERIVED TYPE DEFINITIONS: // na @@ -170,7 +171,7 @@ namespace SimAirServingZones { bool const FirstHVACIteration, // TRUE if first full HVAC iteration in an HVAC timestep int const AirLoopNum, // Primary air loop number int &CompIndex, // numeric pointer for CompType/CompName -- passed back from other routines - UnitarySystems::UnitarySys *CompPointer); + HVACSystemData *CompPointer); void UpdateBranchConnections(int const AirLoopNum, // primary air system number int const BranchNum, // branch reference number diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index 35d4222e672..51b3fb6cd21 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -3920,6 +3920,11 @@ namespace SystemReports { SOLARCOLLECTOR_FLATPLATE_PHOTOVOLTAICTHERMAL, SOLARCOLLECTOR_UNGLAZEDTRANSPIRED, ZONEHVAC_AIRDISTRIBUTIONUNIT, + ZONEHVAC_TERMINALUNIT_VRF, + COIL_COOLING_VRF, + COIL_HEATING_VRF, + COIL_COOLING_VRF_FTC, + COIL_HEATING_VRF_FTC, n_ComponentTypes, Unknown_ComponentType }; @@ -4008,7 +4013,12 @@ namespace SystemReports { {"OUTDOORAIR:MIXER", OUTDOORAIR_MIXER}, {"SOLARCOLLECTOR:FLATPLATE:PHOTOVOLTAICTHERMAL", SOLARCOLLECTOR_FLATPLATE_PHOTOVOLTAICTHERMAL}, {"SOLARCOLLECTOR:UNGLAZEDTRANSPIRED", SOLARCOLLECTOR_UNGLAZEDTRANSPIRED}, - {"ZONEHVAC:AIRDISTRIBUTIONUNIT", ZONEHVAC_AIRDISTRIBUTIONUNIT}}; + {"ZONEHVAC:AIRDISTRIBUTIONUNIT", ZONEHVAC_AIRDISTRIBUTIONUNIT}, + {"ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW",ZONEHVAC_TERMINALUNIT_VRF}, + {"COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW",COIL_COOLING_VRF}, + {"COIL:HEATING:DX:VARIABLEREFRIGERANTFLOW",COIL_HEATING_VRF}, + {"COIL:COOLING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL", COIL_COOLING_VRF_FTC}, + {"COIL:HEATING:DX:VARIABLEREFRIGERANTFLOW:FLUIDTEMPERATURECONTROL", COIL_HEATING_VRF_FTC}}; assert(component_map.size() == n_ComponentTypes); // INTERFACE BLOCK SPECIFICATIONS @@ -4092,6 +4102,8 @@ namespace SystemReports { case COIL_COOLING_WATER_DETAILEDGEOMETRY: case COIL_COOLING_WATER: case COIL_COOLING_DX_SINGLESPEED_THERMALSTORAGE: + case COIL_COOLING_VRF: + case COIL_COOLING_VRF_FTC: case COIL_WATERHEATING_AIRTOWATERHEATPUMP_VARIABLESPEED: if (CompLoadFlag) SysCCCompCLNG(AirLoopNum) += std::abs(CompLoad); @@ -4163,6 +4175,8 @@ namespace SystemReports { // DX Systems break; + case COIL_HEATING_VRF: + case COIL_HEATING_VRF_FTC: case AIRLOOPHVAC_UNITARYSYSTEM: // All energy transfers accounted for in subcomponent models break; @@ -4195,9 +4209,11 @@ namespace SystemReports { break; case AIRLOOPHVAC_UNITARYHEATPUMP_AIRTOAIR_MULTISPEED: // All energy transfers accounted for in subcomponent models - - // Humidifier Types for the air system simulation break; + case ZONEHVAC_TERMINALUNIT_VRF: + // All energy transfers accounted for in subcomponent models + break; + // Humidifier Types for the air system simulation case HUMIDIFIER_STEAM_GAS: case HUMIDIFIER_STEAM_ELECTRIC: if (CompLoadFlag) SysHumidHTNG(AirLoopNum) += std::abs(CompLoad); @@ -4507,7 +4523,6 @@ namespace SystemReports { } else if (SELECT_CASE_var == VRFTerminalUnit_Num) { OutAirNode = GetVRFTUOutAirNode(ZoneEquipList(ZoneEquipConfig(CtrlZoneNum).EquipListIndex).EquipIndex(thisZoneEquipNum)); if (OutAirNode > 0) ZFAUOutAirFlow += Node(OutAirNode).MassFlowRate; - ZoneInletAirNode = GetVRFTUZoneInletAirNode(ZoneEquipList(ZoneEquipConfig(CtrlZoneNum).EquipListIndex).EquipIndex(thisZoneEquipNum)); if (ZoneInletAirNode > 0) ZFAUFlowRate = max(Node(ZoneInletAirNode).MassFlowRate, 0.0); diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index eeda89e5016..912968c5148 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -51,8 +51,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -273,31 +273,6 @@ namespace UnitarySystems { latOutputProvided); } - void UnitarySys::simulate(std::string const &Name, - bool const FirstHVACIteration, - int const &AirLoopNum, - int &CompIndex, - bool &HeatActive, - bool &CoolActive, - int const ZoneOAUnitNum, - Real64 const OAUCoilOutTemp, - bool const ZoneEquipment) - { - Real64 sysOutputProvided = 0.0; - Real64 latOutputProvided = 0.0; - simulateSys(Name, - FirstHVACIteration, - AirLoopNum, - CompIndex, - HeatActive, - CoolActive, - ZoneOAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - sysOutputProvided, - latOutputProvided); - } - void UnitarySys::simulateSys(std::string const &Name, bool const FirstHVACIteration, int const &AirLoopNum, @@ -526,7 +501,7 @@ namespace UnitarySystems { } } // namespace UnitarySystems - UnitarySys *UnitarySys::factory(int const object_type_of_num, std::string const objectName, bool const ZoneEquipment, int const ZoneOAUnitNum) + HVACSystemData *UnitarySys::factory(int const object_type_of_num, std::string const objectName, bool const ZoneEquipment, int const ZoneOAUnitNum) { if (UnitarySystems::getInputOnceFlag) { UnitarySys::getUnitarySystemInput(objectName, ZoneEquipment, ZoneOAUnitNum); @@ -594,7 +569,7 @@ namespace UnitarySystems { DataAirLoop::AirLoopControlInfo(AirLoopNum).UnitarySys = true; DataAirLoop::AirLoopControlInfo(AirLoopNum).UnitarySysSimulating = true; } - this->sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + this->sizeSystem(FirstHVACIteration, AirLoopNum); this->m_MySizingCheckFlag = false; if (AirLoopNum > 0) { DataAirLoop::AirLoopControlInfo(AirLoopNum).FanOpMode = this->m_FanOpMode; @@ -1442,7 +1417,7 @@ namespace UnitarySystems { } } - void UnitarySys::sizeUnitarySystem(bool const FirstHVACIteration, int const AirLoopNum) + void UnitarySys::sizeSystem(bool const FirstHVACIteration, int const AirLoopNum) { // SUBROUTINE INFORMATION: @@ -15089,5 +15064,35 @@ namespace UnitarySystems { } } + int UnitarySys::getAirInNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) { + if (UnitarySystems::getInputOnceFlag) { + getUnitarySystemInput(UnitarySysName, false, ZoneOAUnitNum); + UnitarySystems::getInputOnceFlag = false; + } + int airNode = 0; + for (int UnitarySysNum = 0; UnitarySysNum < numUnitarySystems; ++UnitarySysNum) { + if (UtilityRoutines::SameString(UnitarySysName, unitarySys[ UnitarySysNum ].Name)) { + airNode = this->AirInNode; + break; + } + } + return airNode; + } + + int UnitarySys::getAirOutNode(std::string const &UnitarySysName, int const ZoneOAUnitNum) { + if (UnitarySystems::getInputOnceFlag) { + getUnitarySystemInput(UnitarySysName, false, ZoneOAUnitNum); + UnitarySystems::getInputOnceFlag = false; + } + int airNode = 0; + for (int UnitarySysNum = 0; UnitarySysNum < numUnitarySystems; ++UnitarySysNum) { + if (UtilityRoutines::SameString(UnitarySysName, unitarySys[ UnitarySysNum ].Name)) { + airNode = this->AirOutNode; + break; + } + } + return airNode; + } + } // namespace UnitarySystems } // namespace EnergyPlus diff --git a/src/EnergyPlus/UnitarySystem.hh b/src/EnergyPlus/UnitarySystem.hh index b09ab605f65..8b286d2d448 100644 --- a/src/EnergyPlus/UnitarySystem.hh +++ b/src/EnergyPlus/UnitarySystem.hh @@ -50,6 +50,7 @@ #include #include +#include namespace EnergyPlus { @@ -115,7 +116,7 @@ namespace UnitarySystems { static void getDesignSpecMSHPdata(bool errorsFound); }; - struct UnitarySys + struct UnitarySys : HVACSystemData { enum class ControlType : int @@ -624,8 +625,6 @@ namespace UnitarySystems { Real64 &OnOffAirFlowRatio, Real64 &ZoneLoad); - void sizeUnitarySystem(bool const FirstHVACIteration, int const AirLoopNum); - void setOnOffMassFlowRate(Real64 &OnOffAirFlowRatio, // ratio of coil on to coil off air flow rate Real64 const PartLoadRatio // coil part-load ratio ); @@ -710,31 +709,7 @@ namespace UnitarySystems { static void getUnitarySystemInputData(std::string const &Name, bool const ZoneEquipment, int const ZoneOAUnitNum, bool &errorsFound); - static UnitarySys *factory(int const object_type_of_num, std::string const objectName, bool const ZoneEquipment, int const ZoneOAUnitNum); - - void simulate(std::string const &Name, - bool const firstHVACIteration, - int const &AirLoopNum, - int &CompIndex, - bool &HeatActive, - bool &CoolActive, - int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit - Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit - bool const ZoneEquipment, // TRUE if called as zone equipment - Real64 &sysOutputProvided, // sensible output at supply air node - Real64 &latOutputProvided // latent output at supply air node - ); - - void simulate(std::string const &Name, - bool const firstHVACIteration, - int const &AirLoopNum, - int &CompIndex, - bool &HeatActive, - bool &CoolActive, - int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit - Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit - bool const ZoneEquipment // TRUE if called as zone equipment - ); + static HVACSystemData *factory(int const object_type_of_num, std::string const objectName, bool const ZoneEquipment, int const ZoneOAUnitNum); void simulateSys(std::string const &Name, bool const firstHVACIteration, @@ -773,6 +748,23 @@ namespace UnitarySystems { static Real64 calcUnitarySystemWaterFlowResidual(Real64 const PartLoadRatio, // water mass flow rate [kg/s] std::vector const &Par // Function parameters ); + + void simulate(std::string const &Name, + bool const firstHVACIteration, + int const &AirLoopNum, + int &CompIndex, + bool &HeatActive, + bool &CoolActive, + int const OAUnitNum, // If the system is an equipment of OutdoorAirUnit + Real64 const OAUCoilOutTemp, // the coil inlet temperature of OutdoorAirUnit + bool const ZoneEquipment, // TRUE if called as zone equipment + Real64 &sysOutputProvided, // sensible output at supply air node + Real64 &latOutputProvided // latent output at supply air node + ) override; + + void sizeSystem(bool const FirstHVACIteration, int const AirLoopNum) override; + int getAirInNode(std::string const &UnitarySysName, int const ZoneOAUnitNum)override; + int getAirOutNode(std::string const &UnitarySysName, int const ZoneOAUnitNum)override; }; extern std::vector unitarySys; diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index 19df681f295..0a6926049b4 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -3641,12 +3641,22 @@ namespace ZoneEquipmentManager { LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); } else if (SELECT_CASE_var == VRFTerminalUnit_Num) { // 'ZoneHVAC:TerminalUnit:VariableRefrigerantFlow' + bool HeatingActive = false; + bool CoolingActive = false; + int const OAUnitNum = 0; + Real64 const OAUCoilOutTemp = 0.0; + bool const ZoneEquipment = true; SimulateVRF(PrioritySimOrder(EquipTypeNum).EquipName, - ControlledZoneNum, FirstHVACIteration, + ControlledZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, SysOutputProvided, - LatOutputProvided, - ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + LatOutputProvided); } else if (SELECT_CASE_var == WindowAC_Num) { // 'ZoneHVAC:WindowAirConditioner' SimWindowAC(PrioritySimOrder(EquipTypeNum).EquipName, diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index a1ca56c018c..7bd4d27b641 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -554,6 +554,7 @@ ADD_SIMULATION_TEST(IDF_FILE VSHeatPumpWaterToAirEquationFit.idf EPW_FILE USA_IL ADD_SIMULATION_TEST(IDF_FILE VSWaterHeaterHeatPumpStratifiedTank.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) ADD_SIMULATION_TEST(IDF_FILE VaryingLocationAndOrientation.idf EPW_FILE USA_CO_Golden-NREL.724666_TMY3.epw) ADD_SIMULATION_TEST(IDF_FILE VariableRefrigerantFlow_5Zone.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) +ADD_SIMULATION_TEST(IDF_FILE VariableRefrigerantFlow_5Zone_wAirloop.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) ADD_SIMULATION_TEST(IDF_FILE VariableRefrigerantFlow_FluidTCtrl_5Zone.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) ADD_SIMULATION_TEST(IDF_FILE VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf EPW_FILE USA_FL_Miami.Intl.AP.722020_TMY3.epw) ADD_SIMULATION_TEST(IDF_FILE VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw) diff --git a/testfiles/VariableRefrigerantFlow_5Zone_wAirloop.idf b/testfiles/VariableRefrigerantFlow_5Zone_wAirloop.idf new file mode 100644 index 00000000000..027fc9079b7 --- /dev/null +++ b/testfiles/VariableRefrigerantFlow_5Zone_wAirloop.idf @@ -0,0 +1,3634 @@ +! VariableRefrigerantFlow_5Zone.idf +! Basic file description: 1 story building divided into 4 exterior and one interior conditioned zones and return plenum. +! +! Highlights: Varible Refrigerant Flow AC system +! +! Simulation Location/Run: Miami Intl Ap FL USA TMY3 722020, 2 design days, 2 run periods, +! +! Location: Miami, FL +! +! Design Days: Miami Intl Ap FL USA Annual Heating 99.6%, MaxDB=8.7°C +! Miami Intl Ap FL USA Annual Cooling (DB=>MWB) .4%, MaxDB=33.2°C MWB=25.3°C +! +! Run Period (Weather File): Winter 2/1, Summer 7/1, Miami Intl Ap FL USA 722020 +! +! Run Control: Zone and System sizing with weather file run control +! +! Building: Single floor rectangular building 100 ft x 50 ft. 5 zones - 4 exterior, 1 interior, zone height 8 feet. +! Exterior zone depth is 12 feet. There is a 2 foot high return plenum: the overall building height is +! 10 feet. There are windows on all 4 facades; the south and north facades have glass doors. +! The south facing glass is shaded by overhangs. The walls are woodshingle over plywood, R11 insulation, +! and gypboard. The roof is a gravel built up roof with R-3 mineral board insulation and plywood sheathing. +! The windows are of various single and double pane construction with 3mm and 6mm glass and either 6mm or +! 13mm argon or air gap. The window to wall ratio is approximately 0.29. +! The south wall and door have overhangs. +! +! The building is oriented 30 degrees east of north. +! +! Floor Area: 463.6 m2 (5000 ft2) +! Number of Stories: 1 +! +! Zone Description Details: +! +! (0,15.2,0) (30.5,15.2,0) +! _____ ________ ____ +! |\ *** **************** /| +! | \ / | +! | \ (26.8,11.6,0) / | +! * \_____________________________/ * +! * |(3.7,11.6,0) | * +! * | | * +! * | | * +! * | (26.8,3.7,0)| * +! * |___________________________| * +! * / (3.7,3.7,0) \ * +! | / \ | +! | / \ | +! |/___******************___***________\| +! | Overhang | | +! |_______________________| | window/door = * +! |___| +! +! (0,0,0) (30.5,0,0) +! +! Internal gains description: lighting is 1.5 watts/ft2, office equip is 1.0 watts/ft2. There is 1 occupant +! per 100 ft2 of floor area. The infiltration is 0.25 air changes per hour. +! +! Interzone Surfaces: 6 interzone surfaces (see diagram) +! Internal Mass: None +! People: 50 +! Lights: 7500 W +! Windows: 4 ea.: 1) Double pane clear, 3mm glass, 13mm air gap +! 2) Double pane clear, 3mm glass, 13mm argon gap +! 3) Double pane clear, 6mm glass, 6mm air gap +! 4) Double pane lowE, 6mm lowE glass outside, 6mm air gap, 6mm clear glass +! +! Doors: 2 ea.: Single pane grey, 3mm glass +! +! Detached Shading: None +! Daylight: None +! Natural Ventilation: None +! Compact Schedules: Yes +! +! HVAC: The VRF system uses DX cooling and DX heating coils in each of 5 terminal units. +! Once all terminal units are simulated, the condenser attached to those terminal +! units is then simulated. The input is partially autosized. +! Terminal units are set to provide a fixed amount of outdoor air. +! +! Zonal Equipment: ZoneHVAC:TerminalUnit:VariableRefrigerantFlow +! Central Air Handling Equipment: No (uses AirConditioner:VariableRefrigerantFlow condenser object) +! System Equipment Autosize: Yes +! Purchased Cooling: None +! Purchased Heating: None +! Coils: Coil:Cooling:DX:VariableRefrigerantFlow, Coil:Heating:DX:VariableRefrigerantFlow +! Pumps: None +! Boilers: None +! Chillers: None +! +! Results: +! Standard Reports: None +! Timestep or Hourly Variables: Hourly +! Time bins Report: None +! HTML Report: None +! Environmental Emissions: None +! Utility Tariffs: None + + Version,9.3; + + Output:Diagnostics, + DisplayAllWarnings; !- Key 1 + + Schedule:Compact, + VRFCondAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 12:00,1.0, !- Field 3 + Until: 13:00,1.0, !- Field 5 + Until: 24:00,1.0; !- Field 7 + +! Variable Refrigerant Flow (VRF) Heat Pump +! Mitsubishi PURY-P108TGMU +! Nominal Cooling Capacity = 31.7 kW +! Nominal Cooling Power Input = 9.63 (Cooling COP = 3.2917) +! Nominal Heating Capacity = 35.2 kW +! Nominal Power Input = 9.92 kW (Heating COP = 3.5484) +! Note: Capacity performance curves are normalized to capacity at 16C indoor wet-bulb temperature +! For this reason, the similation will report that capacity as a function of temperature curves are not 1 at the rating point + + AirConditioner:VariableRefrigerantFlow, + VRF Heat Pump, !- Heat Pump Name + VRFCondAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + 3.2917, !- Gross Rated Cooling COP {W/W} + -5, !- Minimum Outdoor Temperature in Cooling Mode {C} + 43, !- Maximum Outdoor Temperature in Cooling Mode {C} + VRFCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Low Temperature Curve Name + VRFCoolCapFTBoundary, !- Cooling Capacity Ratio Boundary Curve Name + VRFCoolCapFTHi, !- Cooling Capacity Ratio Modifier Function of High Temperature Curve Name + VRFCoolEIRFT, !- Cooling Energy Input Ratio Modifier Function of Low Temperature Curve Name + VRFCoolEIRFTBoundary, !- Cooling Energy Input Ratio Boundary Curve Name + VRFCoolEIRFTHi, !- Cooling Energy Input Ratio Modifier Function of High Temperature Curve Name + CoolingEIRLowPLR, !- Cooling Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name + CoolingEIRHiPLR, !- Cooling Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name + CoolingCombRatio, !- Cooling Combination Ratio Correction Factor Curve Name + VRFCPLFFPLR, !- Cooling Part-Load Fraction Correlation Curve Name + autosize, !- Gross Rated Heating Capacity {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + 3.5484, !- Gross Rated Heating COP {W/W} + -20, !- Minimum Outdoor Temperature in Heating Mode {C} + 28, !- Maximum Outdoor Temperature in Heating Mode {C} + VRFHeatCapFT, !- Heating Capacity Ratio Modifier Function of Low Temperature Curve Name + VRFHeatCapFTBoundary, !- Heating Capacity Ratio Boundary Curve Name + VRFHeatCapFTHi, !- Heating Capacity Ratio Modifier Function of High Temperature Curve Name + VRFHeatEIRFT, !- Heating Energy Input Ratio Modifier Function of Low Temperature Curve Name + VRFHeatEIRFTBoundary, !- Heating Energy Input Ratio Boundary Curve Name + VRFHeatEIRFTHi, !- Heating Energy Input Ratio Modifier Function of High Temperature Curve Name + WetBulbTemperature, !- Heating Performance Curve Outdoor Temperature Type + HeatingEIRLowPLR, !- Heating Energy Input Ratio Modifier Function of Low Part-Load Ratio Curve Name + HeatingEIRHiPLR, !- Heating Energy Input Ratio Modifier Function of High Part-Load Ratio Curve Name + HeatingCombRatio, !- Heating Combination Ratio Correction Factor Curve Name + VRFCPLFFPLR, !- Heating Part-Load Fraction Correlation Curve Name + 0.25, !- Minimum Heat Pump Part-Load Ratio {dimensionless} + SPACE1-1, !- Zone Name for Master Thermostat Location + LoadPriority, !- Master Thermostat Priority Control Type + , !- Thermostat Priority Schedule Name + VRF Heat Pump TU List, !- Zone Terminal Unit List Name + Yes, !- Heat Pump Waste Heat Recovery + 30, !- Equivalent Piping Length used for Piping Correction Factor in Cooling Mode {m} + 10, !- Vertical Height used for Piping Correction Factor {m} + CoolingLengthCorrectionFactor, !- Piping Correction Factor for Length in Cooling Mode Curve Name + -0.000386, !- Piping Correction Factor for Height in Cooling Mode Coefficient {1/m} + 30, !- Equivalent Piping Length used for Piping Correction Factor in Heating Mode {m} + , !- Piping Correction Factor for Length in Heating Mode Curve Name + , !- Piping Correction Factor for Height in Heating Mode Coefficient {1/m} + 15, !- Crankcase Heater Power per Compressor {W} + 3, !- Number of Compressors {dimensionless} + 0.33, !- Ratio of Compressor Size to Total Compressor Capacity {W/W} + 7, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater {C} + Resistive, !- Defrost Strategy + Timed, !- Defrost Control + , !- Defrost Energy Input Ratio Modifier Function of Temperature Curve Name + , !- Defrost Time Period Fraction {dimensionless} + autosize, !- Resistive Defrost Heater Capacity {W} + 7, !- Maximum Outdoor Dry-bulb Temperature for Defrost Operation {C} + AirCooled, !- Condenser Type + MyVRFCondenserInletNode, !- Condenser Inlet Node Name + , !- Condenser Outlet Node Name + , !- Water Condenser Volume Flow Rate {m3/s} + , !- Evaporative Condenser Effectiveness {dimensionless} + , !- Evaporative Condenser Air Flow Rate {m3/s} + 0, !- Evaporative Condenser Pump Rated Power Consumption {W} + , !- Supply Water Storage Tank Name + 0, !- Basin Heater Capacity {W/K} + , !- Basin Heater Setpoint Temperature {C} + , !- Basin Heater Operating Schedule Name + Electricity; !- Fuel Type + + Curve:Biquadratic, + VRFCoolCapFT, !- Name + 0.530782692, !- Coefficient1 Constant + 0.017447952, !- Coefficient2 x + 0.000583269, !- Coefficient3 x**2 + -1.76324E-06, !- Coefficient4 y + -7.474E-09, !- Coefficient5 y**2 + -1.30413E-07, !- Coefficient6 x*y + 15, !- Minimum Value of x + 24, !- Maximum Value of x + -5, !- Minimum Value of y + 23, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + VRFCoolCapFTBoundary, !- Name + 25.73473775, !- Coefficient1 Constant + -0.03150043, !- Coefficient2 x + -0.01416595, !- Coefficient3 x**2 + 0, !- Coefficient4 x**3 + 11, !- Minimum Value of x + 30, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature; !- Output Unit Type + + Curve:Biquadratic, + VRFCoolCapFTHi, !- Name + 0.6867358, !- Coefficient1 Constant + 0.0207631, !- Coefficient2 x + 0.0005447, !- Coefficient3 x**2 + -0.0016218, !- Coefficient4 y + -4.259E-07, !- Coefficient5 y**2 + -0.0003392, !- Coefficient6 x*y + 15, !- Minimum Value of x + 24, !- Maximum Value of x + 16, !- Minimum Value of y + 43, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Biquadratic, + VRFCoolEIRFT, !- Name + 0.989010541, !- Coefficient1 Constant + -0.02347967, !- Coefficient2 x + 0.000199711, !- Coefficient3 x**2 + 0.005968336, !- Coefficient4 y + -1.0289E-07, !- Coefficient5 y**2 + -0.00015686, !- Coefficient6 x*y + 15, !- Minimum Value of x + 24, !- Maximum Value of x + -5, !- Minimum Value of y + 23, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + VRFCoolEIRFTBoundary, !- Name + 25.73473775, !- Coefficient1 Constant + -0.03150043, !- Coefficient2 x + -0.01416595, !- Coefficient3 x**2 + 0, !- Coefficient4 x**3 + 15, !- Minimum Value of x + 24, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature; !- Output Unit Type + + Curve:Biquadratic, + VRFCoolEIRFTHi, !- Name + 0.14351470, !- Coefficient1 Constant + 0.01860035, !- Coefficient2 x + -0.0003954, !- Coefficient3 x**2 + 0.02485219, !- Coefficient4 y + 0.00016329, !- Coefficient5 y**2 + -0.0006244, !- Coefficient6 x*y + 15, !- Minimum Value of x + 24, !- Maximum Value of x + 16, !- Minimum Value of y + 43, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + CoolingEIRLowPLR, !- Name + 0.4628123, !- Coefficient1 Constant + -1.0402406, !- Coefficient2 x + 2.17490997, !- Coefficient3 x**2 + -0.5974817, !- Coefficient4 x**3 + 0, !- Minimum Value of x + 1, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature; !- Output Unit Type + + Curve:Quadratic, + CoolingEIRHiPLR, !- Name + 1.0, !- Coefficient1 Constant + 0.0, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 1.0, !- Minimum Value of x + 1.5, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Linear, + CoolingCombRatio, !- Name + 0.618055, !- Coefficient1 Constant + 0.381945, !- Coefficient2 x + 1.0, !- Minimum Value of x + 1.5, !- Maximum Value of x + 1.0, !- Minimum Curve Output + 1.2, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + CURVE:QUADRATIC, + VRFCPLFFPLR, !- Name + 0.85, !- Coefficient1 Constant + 0.15, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0.0, !- Minimum Value of x + 1.0, !- Maximum Value of x + 0.85, !- Minimum Curve Output + 1.0, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Biquadratic, + VRFHeatCapFT, !- Name + 1.014599599, !- Coefficient1 Constant + -0.002506703, !- Coefficient2 x + -0.000141599, !- Coefficient3 x**2 + 0.026931595, !- Coefficient4 y + 1.83538E-06, !- Coefficient5 y**2 + -0.000358147, !- Coefficient6 x*y + 15, !- Minimum Value of x + 27, !- Maximum Value of x + -20, !- Minimum Value of y + 15, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + VRFHeatCapFTBoundary, !- Name + -7.6000882, !- Coefficient1 Constant + 3.05090016, !- Coefficient2 x + -0.1162844, !- Coefficient3 x**2 + 0.0, !- Coefficient4 x**3 + 15, !- Minimum Value of x + 27, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature; !- Output Unit Type + + Curve:Biquadratic, + VRFHeatCapFTHi, !- Name + 1.161134821, !- Coefficient1 Constant + 0.027478868, !- Coefficient2 x + -0.00168795, !- Coefficient3 x**2 + 0.001783378, !- Coefficient4 y + 2.03208E-06, !- Coefficient5 y**2 + -6.8969E-05, !- Coefficient6 x*y + 15, !- Minimum Value of x + 27, !- Maximum Value of x + -10, !- Minimum Value of y + 15, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Biquadratic, + VRFHeatEIRFT, !- Name + 0.87465501, !- Coefficient1 Constant + -0.01319754, !- Coefficient2 x + 0.00110307, !- Coefficient3 x**2 + -0.0133118, !- Coefficient4 y + 0.00089017, !- Coefficient5 y**2 + -0.00012766, !- Coefficient6 x*y + 15, !- Minimum Value of x + 27, !- Maximum Value of x + -20, !- Minimum Value of y + 12, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + VRFHeatEIRFTBoundary, !- Name + -7.6000882, !- Coefficient1 Constant + 3.05090016, !- Coefficient2 x + -0.1162844, !- Coefficient3 x**2 + 0.0, !- Coefficient4 x**3 + 15, !- Minimum Value of x + 27, !- Maximum Value of x + -20, !- Minimum Curve Output + 15, !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature; !- Output Unit Type + + Curve:Biquadratic, + VRFHeatEIRFTHi, !- Name + 2.504005146, !- Coefficient1 Constant + -0.05736767, !- Coefficient2 x + 4.07336E-05, !- Coefficient3 x**2 + -0.12959669, !- Coefficient4 y + 0.00135839, !- Coefficient5 y**2 + 0.00317047, !- Coefficient6 x*y + 15, !- Minimum Value of x + 27, !- Maximum Value of x + -10, !- Minimum Value of y + 15, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + Curve:Cubic, + HeatingEIRLowPLR, !- Name + 0.1400093, !- Coefficient1 Constant + 0.6415002, !- Coefficient2 x + 0.1339047, !- Coefficient3 x**2 + 0.0845859, !- Coefficient4 x**3 + 0, !- Minimum Value of x + 1, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Quadratic, + HeatingEIRHiPLR, !- Name + 2.4294355, !- Coefficient1 Constant + -2.235887, !- Coefficient2 x + 0.8064516, !- Coefficient3 x**2 + 1.0, !- Minimum Value of x + 1.5, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Linear, + HeatingCombRatio, !- Name + 0.96034, !- Coefficient1 Constant + 0.03966, !- Coefficient2 x + 1.0, !- Minimum Value of x + 1.5, !- Maximum Value of x + 1.0, !- Minimum Curve Output + 1.023, !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Biquadratic, + CoolingLengthCorrectionFactor, !- Name + 1.0693794, !- Coefficient1 Constant + -0.0014951, !- Coefficient2 x + 2.56E-06, !- Coefficient3 x**2 + -0.1151104, !- Coefficient4 y + 0.0511169, !- Coefficient5 y**2 + -0.0004369, !- Coefficient6 x*y + 8, !- Minimum Value of x + 175, !- Maximum Value of x + 0.5, !- Minimum Value of y + 1.5, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + + ZoneTerminalUnitList, + VRF Heat Pump TU List, !- Zone Terminal Unit List Name + TU3, !- Zone Terminal Unit Name 1 + TU4, !- Zone Terminal Unit Name 2 + TU1, !- Zone Terminal Unit Name 3 + TU2, !- Zone Terminal Unit Name 4 + TU5inAirloop, !- Zone Terminal Unit Name 5 + TU6inOASystem; !- Airloop Terminal Unit Name 6 + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU1, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + TU1 Inlet Node, !- Terminal Unit Air Inlet Node Name + TU1 Outlet Node, !- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name + drawthrough, !- Supply Air Fan Placement + Fan:SystemModel, !- Supply Air Fan Object Type + TU1 VRF Supply Fan, !- Supply Air Fan Object Name + OutdoorAir:Mixer, !- Outside Air Mixer Object Type + TU1 OA Mixer, !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU1 VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU1 VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU2, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + TU2 Inlet Node, !- Terminal Unit Air Inlet Node Name + TU2 Outlet Node, !- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name + drawthrough, !- Supply Air Fan Placement + Fan:SystemModel, !- Supply Air Fan Object Type + TU2 VRF Supply Fan, !- Supply Air Fan Object Name + OutdoorAir:Mixer, !- Outside Air Mixer Object Type + TU2 OA Mixer, !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU2 VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU2 VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU4, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + TU4 Inlet Node, !- Terminal Unit Air Inlet Node Name + TU4 Outlet Node, !- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name + drawthrough, !- Supply Air Fan Placement + Fan:SystemModel, !- Supply Air Fan Object Type + TU4 VRF Supply Fan, !- Supply Air Fan Object Name + OutdoorAir:Mixer, !- Outside Air Mixer Object Type + TU4 OA Mixer, !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU4 VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU4 VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU3, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + TU3 Inlet Node, !- Terminal Unit Air Inlet Node Name + TU3 Outlet Node, !- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name + drawthrough, !- Supply Air Fan Placement + Fan:SystemModel, !- Supply Air Fan Object Type + TU3 VRF Supply Fan, !- Supply Air Fan Object Name + OutdoorAir:Mixer, !- Outside Air Mixer Object Type + TU3 OA Mixer, !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU3 VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU3 VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + ; !- Maximum Supply Air Temperature from Supplemental Heater {C} + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU5inAirloop, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + Airloop Mixed Air Outlet, !- Terminal Unit Air Inlet Node Name + Airloop Fan Outlet Node,!- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + VRFFanSchedule, !- Supply Air Fan Operating Mode Schedule Name + drawthrough, !- Supply Air Fan Placement + Fan:SystemModel, !- Supply Air Fan Object Type + TU5 VRF Supply Fan, !- Supply Air Fan Object Name + OutdoorAir:Mixer, !- Outside Air Mixer Object Type + TU5 OA Mixer, !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU5 VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU5 VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio {W/W} + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + , !- Maximum Supply Air Temperature from Supplemental Heater {C} + , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation + SPACE5-1; !- Controlling Zone or Thermostat Location + + Sizing:System, + Main Airloop, !- AirLoop Name + Total, !- Type of Load to Size On + autosize, !- Design Outdoor Air Flow Rate {m3/s} + 1.0, !- Central Heating Maximum System Air Flow Ratio + 20.0, !- Preheat Design Temperature {C} + 0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir} + 25.0, !- Precool Design Temperature {C} + 0.011, !- Precool Design Humidity Ratio {kgWater/kgDryAir} + 12.6, !- Central Cooling Design Supply Air Temperature {C} + 30.0, !- Central Heating Design Supply Air Temperature {C} + NonCoincident, !- Type of Zone Sum to Use + Yes, !- 100% Outdoor Air in Cooling + Yes, !- 100% Outdoor Air in Heating + 0.009, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.003, !- Central Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + DesignDay, !- Cooling Supply Air Flow Rate Method + 0, !- Cooling Supply Air Flow Rate {m3/s} + , !- Cooling Supply Air Flow Rate Per Floor Area {m3/s-m2} + , !- Cooling Fraction of Autosized Cooling Supply Air Flow Rate + , !- Cooling Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W} + DesignDay, !- Heating Supply Air Flow Rate Method + 0, !- Heating Supply Air Flow Rate {m3/s} + , !- Heating Supply Air Flow Rate Per Floor Area {m3/s-m2} + , !- Heating Fraction of Autosized Heating Supply Air Flow Rate + , !- Heating Fraction of Autosized Cooling Supply Air Flow Rate + , !- Heating Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W} + ZoneSum, !- System Outdoor Air Method + 1.0, !- Zone Maximum Outdoor Air Fraction {dimensionless} + CoolingDesignCapacity, !- Cooling Design Capacity Method + autosize, !- Cooling Design Capacity {W} + , !- Cooling Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Cooling Design Capacity + HeatingDesignCapacity, !- Heating Design Capacity Method + autosize, !- Heating Design Capacity {W} + , !- Heating Design Capacity Per Floor Area {W/m2} + , !- Fraction of Autosized Heating Design Capacity + VAV; !- Central Cooling Capacity Control Method + + AirLoopHVAC, + Main Airloop, !- Name + , !- Controller List Name + Airloop Availability Managers, !- Availability Manager List Name + autosize, !- Design Supply Air Flow Rate {m3/s} + Airloop Branches, !- Branch List Name + , !- Connector List Name + Airloop Supply Inlet Node, !- Supply Side Inlet Node Name + Airloop Return Air Outlet, !- Demand Side Outlet Node Name + Zone Eq In Node, !- Demand Side Inlet Node Names + Airloop Fan Outlet Node; !- Supply Side Outlet Node Names + + SetpointManager:Scheduled, + Supply Air OA Damper Manager, !- Name + Temperature, !- Control Variable + Seasonal Reset Supply Air Temp Sch, !- Schedule Name + Airloop Fan Outlet Node; !- Setpoint Node or NodeList Name + + SetpointManager:MixedAir, + Mixed Air Temp Manager 1,!- Name + Temperature, !- Control Variable + Airloop Fan Outlet Node, !- Reference Setpoint Node Name + TU5 VRF DX HCoil Outlet Node, !- Fan Inlet Node Name + Airloop Fan Outlet Node, !- Fan Outlet Node Name + Airloop Mixed Air Outlet; !- Setpoint Node or NodeList Name + + Schedule:Compact, + Seasonal Reset Supply Air Temp Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,16.0, !- Field 3 + Through: 9/30, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00,13.0, !- Field 7 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00,16.0; !- Field 11 + + BranchList, + Airloop Branches, !- Name + Airloop Main Branch; !- Branch 1 Name + + Branch, + Airloop Main Branch, !- Name + , !- Pressure Drop Curve Name + AirLoopHVAC:OutdoorAirSystem, !- Component 1 Object Type + Airloop OA System, !- Component 1 Name + Airloop Supply Inlet Node, !- Component 1 Inlet Node Name + Airloop Mixed Air Outlet, !- Component 1 Outlet Node Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Component 3 Object Type + TU5inAirloop, !- Component 3 Name + Airloop Mixed Air Outlet, !- Component 3 Inlet Node Name + Airloop Fan Outlet Node; !- Component 4 Outlet Node Name + + AirLoopHVAC:SupplyPath, + Airloop Supply Path, !- Name + Zone Eq In Node, !- Supply Air Path Inlet Node Name + AirLoopHVAC:ZoneSplitter, !- Component 1 Object Type + Airloop Zone Splitter; !- Component 1 Name + + AirLoopHVAC:ZoneSplitter, + Airloop Zone Splitter, !- Name + Zone Eq In Node, !- Inlet Node Name + SPACE1-1 Zone Equip ATInlet, !- Outlet 1 Node Name + SPACE2-1 Zone Equip ATInlet, !- Outlet 2 Node Name + SPACE3-1 Zone Equip ATInlet, !- Outlet 3 Node Name + SPACE4-1 Zone Equip ATInlet, !- Outlet 4 Node Name + SPACE5-1 Zone Equip ATInlet; !- Outlet 5 Node Name + + AirLoopHVAC:ReturnPath, + Airloop Return Path, !- Name + Airloop Return Air Outlet, !- Return Air Path Outlet Node Name + AirLoopHVAC:ZoneMixer, !- Component 1 Object Type + Airloop Zone Mixer; !- Component 1 Name + + AirLoopHVAC:ZoneMixer, + Airloop Zone Mixer, !- Name + Airloop Return Air Outlet, !- Outlet Node Name + SPACE1-1 Out Node, !- Inlet 1 Node Name + SPACE2-1 Out Node, !- Inlet 2 Node Name + SPACE3-1 Out Node, !- Inlet 3 Node Name + SPACE4-1 Out Node, !- Inlet 4 Node Name + SPACE5-1 Out Node; !- Inlet 5 Node Name + + AirTerminal:SingleDuct:ConstantVolume:NoReheat, + Space1AirTerminal, !- Name + VRFAvailSched, !- Availability Schedule Name + SPACE1-1 Zone Equip ATInlet, !- Air Inlet Node Name + SPACE1-1 Zone Inlet, !- Air Outlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + , !- Design Specification Outdoor Air Object Name + ; !- Per Person Ventilation Rate Mode + + ZoneHVAC:AirDistributionUnit, + SPACE1-1 AirTerminal ADU, !- Name + SPACE1-1 Zone Inlet, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type + Space1AirTerminal, !- Air Terminal Name + , !- Nominal Upstream Leakage Fraction + , !- Constant Downstream Leakage Fraction + ; !- Design Specification Air Terminal Sizing Object Name + + AirTerminal:SingleDuct:ConstantVolume:NoReheat, + Space2AirTerminal, !- Name + VRFAvailSched, !- Availability Schedule Name + SPACE2-1 Zone Equip ATInlet, !- Air Inlet Node Name + SPACE2-1 Zone Inlet, !- Air Outlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + , !- Design Specification Outdoor Air Object Name + ; !- Per Person Ventilation Rate Mode + + ZoneHVAC:AirDistributionUnit, + SPACE2-1 AirTerminal ADU, !- Name + SPACE2-1 Zone Inlet, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type + Space2AirTerminal, !- Air Terminal Name + , !- Nominal Upstream Leakage Fraction + , !- Constant Downstream Leakage Fraction + ; !- Design Specification Air Terminal Sizing Object Name + + AirTerminal:SingleDuct:ConstantVolume:NoReheat, + Space3AirTerminal, !- Name + VRFAvailSched, !- Availability Schedule Name + SPACE3-1 Zone Equip ATInlet, !- Air Inlet Node Name + SPACE3-1 Zone Inlet, !- Air Outlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + , !- Design Specification Outdoor Air Object Name + ; !- Per Person Ventilation Rate Mode + + ZoneHVAC:AirDistributionUnit, + SPACE3-1 AirTerminal ADU, !- Name + SPACE3-1 Zone Inlet, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type + Space3AirTerminal, !- Air Terminal Name + , !- Nominal Upstream Leakage Fraction + , !- Constant Downstream Leakage Fraction + ; !- Design Specification Air Terminal Sizing Object Name + + AirTerminal:SingleDuct:ConstantVolume:NoReheat, + Space4AirTerminal, !- Name + VRFAvailSched, !- Availability Schedule Name + SPACE4-1 Zone Equip ATInlet, !- Air Inlet Node Name + SPACE4-1 Zone Inlet, !- Air Outlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + , !- Design Specification Outdoor Air Object Name + ; !- Per Person Ventilation Rate Mode + + ZoneHVAC:AirDistributionUnit, + SPACE4-1 AirTerminal ADU, !- Name + SPACE4-1 Zone Inlet, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type + Space4AirTerminal, !- Air Terminal Name + , !- Nominal Upstream Leakage Fraction + , !- Constant Downstream Leakage Fraction + ; !- Design Specification Air Terminal Sizing Object Name + + AirTerminal:SingleDuct:ConstantVolume:NoReheat, + Space5AirTerminal, !- Name + VRFAvailSched, !- Availability Schedule Name + SPACE5-1 Zone Equip ATInlet, !- Air Inlet Node Name + SPACE5-1 Zone Inlet, !- Air Outlet Node Name + autosize, !- Maximum Air Flow Rate {m3/s} + , !- Design Specification Outdoor Air Object Name + ; !- Per Person Ventilation Rate Mode + + ZoneHVAC:AirDistributionUnit, + SPACE5-1 AirTerminal ADU, !- Name + SPACE5-1 Zone Inlet, !- Air Distribution Unit Outlet Node Name + AirTerminal:SingleDuct:ConstantVolume:NoReheat, !- Air Terminal Object Type + Space5AirTerminal, !- Air Terminal Name + , !- Nominal Upstream Leakage Fraction + , !- Constant Downstream Leakage Fraction + ; !- Design Specification Air Terminal Sizing Object Name + + ZoneHVAC:EquipmentList, + SPACE1-1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + SPACE1-1 AirTerminal ADU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 2 Object Type + TU1, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 2, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + SPACE2-1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + SPACE2-1 AirTerminal ADU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 2 Object Type + TU2, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 2, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + SPACE3-1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + SPACE3-1 AirTerminal ADU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 2 Object Type + TU3, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 2, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + SPACE4-1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + SPACE4-1 AirTerminal ADU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + , !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, !- Zone Equipment 2 Object Type + TU4, !- Zone Equipment 2 Name + 2, !- Zone Equipment 2 Cooling Sequence + 2, !- Zone Equipment 2 Heating or No-Load Sequence + , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name + + ZoneHVAC:EquipmentList, + SPACE5-1 Eq, !- Name + SequentialLoad, !- Load Distribution Scheme + ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type + SPACE5-1 AirTerminal ADU, !- Zone Equipment 1 Name + 1, !- Zone Equipment 1 Cooling Sequence + 1, !- Zone Equipment 1 Heating or No-Load Sequence + , !- Zone Equipment 1 Sequential Cooling Fraction Schedule Name + ; !- Zone Equipment 1 Sequential Heating Fraction Schedule Name + + NodeList, + SPACE1-1 In Nodes, !- Name + TU1 Outlet Node, !- Node 1 Name + SPACE1-1 Zone Inlet; !- Node 2 Name + + NodeList, + SPACE1-1 Out Nodes, !- Name + TU1 Inlet Node; !- Node 1 Name + + NodeList, + SPACE2-1 In Nodes, !- Name + TU2 Outlet Node, !- Node 1 Name + SPACE2-1 Zone Inlet; !- Node 2 Name + + NodeList, + SPACE2-1 Out Nodes, !- Name + TU2 Inlet Node; !- Node 1 Name + + NodeList, + SPACE3-1 In Nodes, !- Name + TU3 Outlet Node, !- Node 1 Name + SPACE3-1 Zone Inlet; !- Node 2 Name + + NodeList, + SPACE3-1 Out Nodes, !- Name + TU3 Inlet Node; !- Node 1 Name + + NodeList, + SPACE4-1 In Nodes, !- Name + TU4 Outlet Node, !- Node 1 Name + SPACE4-1 Zone Inlet; !- Node 2 Name + + NodeList, + SPACE4-1 Out Nodes, !- Name + TU4 Inlet Node; !- Node 1 Name + + NodeList, + SPACE5-1 In Nodes, !- Name + SPACE5-1 Zone Inlet; !- Node 1 Name + + AirLoopHVAC:OutdoorAirSystem, + Airloop OA System, !- Name + Airloop OA System Controllers, !- Controller List Name + Airloop OA System Equipment, !- Outdoor Air Equipment List Name + Airloop Availability Managers; !- Availability Manager List Name + + AirLoopHVAC:ControllerList, + Airloop OA System Controllers, !- Name + Controller:OutdoorAir, !- Controller 1 Object Type + Airloop OA Controller; !- Controller 1 Name + + AirLoopHVAC:OutdoorAirSystem:EquipmentList, + Airloop OA System Equipment, !- Name + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU6inOASystem, !- Zone Terminal Unit Name + OutdoorAir:Mixer, !- Component 1 Object Type + Airloop OA Mixing Box; !- Component 1 Name + + OutdoorAir:Mixer, + Airloop OA Mixing Box, !- Name + Airloop Mixed Air Outlet, !- Mixed Air Node Name + TU6 Outlet Node to Mixer, !- Outdoor Air Stream Node Name + Airloop Relief Air Outlet, !- Relief Air Stream Node Name + Airloop Supply Inlet Node; !- Return Air Stream Node Name + + Controller:OutdoorAir, + Airloop OA Controller, !- Name + Airloop Relief Air Outlet, !- Relief Air Outlet Node Name + Airloop Supply Inlet Node, !- Return Air Node Name + Airloop Mixed Air Outlet, !- Mixed Air Node Name + Airloop Outdoor Air Inlet, !- Actuator Node Name + autosize, !- Minimum Outdoor Air Flow Rate {m3/s} + autosize, !- Maximum Outdoor Air Flow Rate {m3/s} + NoEconomizer, !- Economizer Control Type + ModulateFlow, !- Economizer Control Action Type + , !- Economizer Maximum Limit Dry-Bulb Temperature {C} + , !- Economizer Maximum Limit Enthalpy {J/kg} + , !- Economizer Maximum Limit Dewpoint Temperature {C} + , !- Electronic Enthalpy Limit Curve Name + , !- Economizer Minimum Limit Dry-Bulb Temperature {C} + NoLockout, !- Lockout Type + ProportionalMinimum, !- Minimum Limit Type + , !- Minimum Outdoor Air Schedule Name + , !- Minimum Fraction of Outdoor Air Schedule Name + , !- Maximum Fraction of Outdoor Air Schedule Name + ; !- Mechanical Ventilation Controller Name + + ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, + TU6inOASystem, !- Zone Terminal Unit Name + VRFAvailSched, !- Terminal Unit Availability Schedule + Airloop Outdoor Air Inlet, !- Terminal Unit Air Inlet Node Name + TU6 Outlet Node to Mixer, !- Terminal Unit Air Outlet Node Name + autosize, !- Cooling Supply Air Flow Rate {m3/s} + autosize, !- No Cooling Supply Air Flow Rate {m3/s} + autosize, !- Heating Supply Air Flow Rate {m3/s} + autosize, !- No Heating Supply Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- No Load Outdoor Air Flow Rate {m3/s} + , !- Supply Air Fan Operating Mode Schedule Name + , !- Supply Air Fan Placement + , !- Supply Air Fan Object Type + , !- Supply Air Fan Object Name + , !- Outside Air Mixer Object Type + , !- Outside Air Mixer Object Name + COIL:Cooling:DX:VariableRefrigerantFlow, !- Cooling Coil Object Type + TU6 OA VRF DX Cooling Coil, !- Cooling Coil Object Name + COIL:Heating:DX:VariableRefrigerantFlow, !- Heating Coil Object Type + TU6 OA VRF DX Heating Coil, !- Heating Coil Object Name + 30, !- Zone Terminal Unit On Parasitic Electric Energy Use {W} + 20, !- Zone Terminal Unit Off Parasitic Electric Energy Use {W} + , !- Rated Heating Capacity Sizing Ratio + , !- Availability Manager List Name + , !- Design Specification ZoneHVAC Sizing Object Name + , !- Supplemental Heating Coil Object Type + , !- Supplemental Heating Coil Name + , !- Maximum Supply Air Temperature from Supplemental Heater + , !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation + ; !- Controlling Zone or Thermostat Location + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU6 OA VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + Airloop Outdoor Air Inlet, !- Air Inlet Node Name + OA Heating Coil Air Inlet Node, !- Air Outlet Node Name + ; !- Name of Water Storage Tank for Condensate Collection + + Schedule:Compact, + OA CCoil SPM, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, 25.0; !- Field 3 + + SetpointManager:Scheduled, + OA Cooling Supply Air Temp Manager, !- Name + Temperature, !- Control Variable + OA CCoil SPM, !- Schedule Name + OA Heating Coil Air Inlet Node; !- Setpoint Node or NodeList Name + + COIL:Heating:DX:VariableRefrigerantFlow, + TU6 OA VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + OA Heating Coil Air Inlet Node, !- Air Inlet Node Name + TU6 Outlet Node to Mixer, !- Air Outlet Node Name + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + Schedule:Compact, + OA HCoil SPM, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00, 20.0; !- Field 3 + + SetpointManager:Scheduled, + OA Heating Supply Air Temp Manager, !- Name + Temperature, !- Control Variable + OA HCoil SPM, !- Schedule Name + TU6 Outlet Node to Mixer; !- Setpoint Node or NodeList Name + + AvailabilityManagerAssignmentList, + Airloop Availability Managers, !- Name + AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type + Airloop Availability; !- Availability Manager 1 Name + + AvailabilityManager:Scheduled, + Airloop Availability, !- Name + OCCUPY-1; !- Schedule Name + + OutdoorAir:Mixer, + TU1 OA Mixer, !- Name + TU1 VRF DX CCoil Inlet Node, !- Mixed Air Node Name + Outside Air Inlet Node 1,!- Outdoor Air Stream Node Name + Relief Air Outlet Node 1,!- Relief Air Stream Node Name + TU1 Inlet Node; !- Return Air Stream Node Name + + OutdoorAir:Mixer, + TU2 OA Mixer, !- Name + TU2 VRF DX CCoil Inlet Node, !- Mixed Air Node Name + Outside Air Inlet Node 2,!- Outdoor Air Stream Node Name + Relief Air Outlet Node 2,!- Relief Air Stream Node Name + TU2 Inlet Node; !- Return Air Stream Node Name + + OutdoorAir:Mixer, + TU3 OA Mixer, !- Name + TU3 VRF DX CCoil Inlet Node, !- Mixed Air Node Name + Outside Air Inlet Node 3,!- Outdoor Air Stream Node Name + Relief Air Outlet Node 3,!- Relief Air Stream Node Name + TU3 Inlet Node; !- Return Air Stream Node Name + + OutdoorAir:Mixer, + TU4 OA Mixer, !- Name + TU4 VRF DX CCoil Inlet Node, !- Mixed Air Node Name + Outside Air Inlet Node 4,!- Outdoor Air Stream Node Name + Relief Air Outlet Node 4,!- Relief Air Stream Node Name + TU4 Inlet Node; !- Return Air Stream Node Name + + OutdoorAir:Mixer, + TU5 OA Mixer, !- Name + TU5 VRF DX CCoil Inlet Node, !- Mixed Air Node Name + Outside Air Inlet Node 5, !- Outdoor Air Stream Node Name + Relief Air Outlet Node 5, !- Relief Air Stream Node Name + Airloop Mixed Air Outlet; !- Return Air Stream Node Name + + Fan:SystemModel, + TU1 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU1 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU1 Outlet Node, !- Air Outlet Node Name + AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s} + Discrete, !- Speed Control Method + 0.0, !- Electric Power Minimum Flow Rate Fraction + 600.0, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Air Stream Fraction + AUTOSIZE, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.70; !- Fan Total Efficiency + + Fan:SystemModel, + TU2 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU2 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU2 Outlet Node, !- Air Outlet Node Name + AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s} + Discrete, !- Speed Control Method + 0.0, !- Electric Power Minimum Flow Rate Fraction + 600.0, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Air Stream Fraction + AUTOSIZE, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.70; !- Fan Total Efficiency + + Fan:SystemModel, + TU3 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU3 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU3 Outlet Node, !- Air Outlet Node Name + AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s} + Discrete, !- Speed Control Method + 0.0, !- Electric Power Minimum Flow Rate Fraction + 600.0, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Air Stream Fraction + AUTOSIZE, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.70; !- Fan Total Efficiency + + Fan:SystemModel, + TU4 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU4 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + TU4 Outlet Node, !- Air Outlet Node Name + AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s} + Discrete, !- Speed Control Method + 0.0, !- Electric Power Minimum Flow Rate Fraction + 600.0, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Air Stream Fraction + AUTOSIZE, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.70; !- Fan Total Efficiency + + Fan:SystemModel, + TU5 VRF Supply Fan, !- Name + VRFAvailSched, !- Availability Schedule Name + TU5 VRF DX HCoil Outlet Node, !- Air Inlet Node Name + Airloop Fan Outlet Node, !- Air Outlet Node Name + AUTOSIZE, !- Design Maximum Air Flow Rate {m3/s} + Discrete, !- Speed Control Method + 0.0, !- Electric Power Minimum Flow Rate Fraction + 600.0, !- Design Pressure Rise {Pa} + 0.9, !- Motor Efficiency + 1.0, !- Motor In Air Stream Fraction + AUTOSIZE, !- Design Electric Power Consumption {W} + TotalEfficiencyAndPressure, !- Design Power Sizing Method + , !- Electric Power Per Unit Flow Rate {W/(m3/s)} + , !- Electric Power Per Unit Flow Rate Per Unit Pressure {W/((m3/s)-Pa)} + 0.70; !- Fan Total Efficiency + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU1 VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + TU1 VRF DX CCoil Inlet Node, !- Coil Air Inlet Node + TU1 VRF DX CCoil Outlet Node, !- Coil Air Outlet Node + ; !- Name of Water Storage Tank for Condensate Collection + + Curve:Cubic, + VRFTUCoolCapFT, !- Name + 0.464547273506488, !- Coefficient1 Constant + 0.0288891279198444, !- Coefficient2 x + -0.000010819418650677, !- Coefficient3 x**2 + 0.0000101359395177008, !- Coefficient4 x**3 + 0.0, !- Minimum Value of x + 50.0, !- Maximum Value of x + 0.5, !- Minimum Curve Output + 1.5, !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU2 VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + TU2 VRF DX CCoil Inlet Node, !- Coil Air Inlet Node + TU2 VRF DX CCoil Outlet Node, !- Coil Air Outlet Node + ; !- Name of Water Storage Tank for Condensate Collection + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU3 VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + TU3 VRF DX CCoil Inlet Node, !- Coil Air Inlet Node + TU3 VRF DX CCoil Outlet Node, !- Coil Air Outlet Node + ; !- Name of Water Storage Tank for Condensate Collection + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU4 VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + TU4 VRF DX CCoil Inlet Node, !- Coil Air Inlet Node + TU4 VRF DX CCoil Outlet Node, !- Coil Air Outlet Node + ; !- Name of Water Storage Tank for Condensate Collection + + COIL:Cooling:DX:VariableRefrigerantFlow, + TU5 VRF DX Cooling Coil, !- Name + VRFAvailSched, !- Availability Schedule Name + autosize, !- Gross Rated Total Cooling Capacity {W} + autosize, !- Gross Rated Sensible Heat Ratio + autosize, !- Rated Air Flow Rate {m3/s} + VRFTUCoolCapFT, !- Cooling Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF, !- Cooling Capacity Modifier Curve Function of Flow Fraction Name + TU5 VRF DX CCoil Inlet Node, !- Coil Air Inlet Node + TU5 VRF DX CCoil Outlet Node, !- Coil Air Outlet Node + ; !- Name of Water Storage Tank for Condensate Collection + + COIL:Heating:DX:VariableRefrigerantFlow, + TU1 VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + TU1 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node + TU1 VRF DX HCoil Outlet Node, !- Coil Air Outlet Node + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + Curve:Cubic, + VRFTUHeatCapFT, !- Name + -0.390708928227928, !- Coefficient1 Constant + 0.261815023760162, !- Coefficient2 x + -0.0130431603151873, !- Coefficient3 x**2 + 0.000178131745997821, !- Coefficient4 x**3 + 0.0, !- Minimum Value of x + 50.0, !- Maximum Value of x + 0.5, !- Minimum Curve Output + 1.5, !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + COIL:Heating:DX:VariableRefrigerantFlow, + TU2 VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + TU2 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node + TU2 VRF DX HCoil Outlet Node, !- Coil Air Outlet Node + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + COIL:Heating:DX:VariableRefrigerantFlow, + TU3 VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + TU3 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node + TU3 VRF DX HCoil Outlet Node, !- Coil Air Outlet Node + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + COIL:Heating:DX:VariableRefrigerantFlow, + TU4 VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + TU4 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node + TU4 VRF DX HCoil Outlet Node, !- Coil Air Outlet Node + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + COIL:Heating:DX:VariableRefrigerantFlow, + TU5 VRF DX Heating Coil, !- Name + VRFAvailSched, !- Availability Schedule + autosize, !- Gross Rated Heating Capacity {W} + autosize, !- Rated Air Flow Rate {m3/s} + TU5 VRF DX CCoil Outlet Node, !- Coil Air Inlet Node + TU5 VRF DX HCoil Outlet Node, !- Coil Air Outlet Node + VRFTUHeatCapFT, !- Heating Capacity Ratio Modifier Function of Temperature Curve Name + VRFACCoolCapFFF; !- Heating Capacity Modifier Function of Flow Fraction Curve Name + + Curve:Quadratic, + VRFACCoolCapFFF, !- Name + 0.8, !- Coefficient1 Constant + 0.2, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0.5, !- Minimum Value of x + 1.5; !- Maximum Value of x + + Schedule:Compact, + VRFFanSchedule, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 7:00,1.0, !- Field 3 + Until: 18:00,1.0, !- Field 5 + Until: 24:00,1.0; !- Field 7 + + Schedule:Compact, + VRFAvailSched, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0, !- Field 3 + Through: 9/30, !- Field 5 + For: WeekDays, !- Field 6 + Until: 7:00,1.0, !- Field 7 + Until: 17:00,1.0, !- Field 9 + Until: 24:00,1.0, !- Field 11 + For: SummerDesignDay WinterDesignDay, !- Field 13 + Until: 24:00,1.0, !- Field 14 + For: AllOtherDays, !- Field 16 + Until: 24:00,1.0, !- Field 17 + Through: 12/31, !- Field 19 + For: AllDays, !- Field 20 + Until: 24:00,1.0; !- Field 21 + +!*************************************************************************** + + Building, + Building, !- Name + 30., !- North Axis {deg} + City, !- Terrain + 0.04, !- Loads Convergence Tolerance Value + 0.4, !- Temperature Convergence Tolerance Value {deltaC} + FullExterior, !- Solar Distribution + 25, !- Maximum Number of Warmup Days + 6; !- Minimum Number of Warmup Days + + Timestep,4; + + SurfaceConvectionAlgorithm:Inside,Simple; + + SurfaceConvectionAlgorithm:Outside,SimpleCombined; + + HeatBalanceAlgorithm,ConductionTransferFunction; + + ZoneAirHeatBalanceAlgorithm, + AnalyticalSolution; !- Algorithm + + GlobalGeometryRules, + UpperLeftCorner, !- Starting Vertex Position + CounterClockWise, !- Vertex Entry Direction + relative; !- Coordinate System + + ScheduleTypeLimits, + Any Number; !- Name + + ScheduleTypeLimits, + Fraction, !- Name + 0.0, !- Lower Limit Value + 1.0, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + ScheduleTypeLimits, + Temperature, !- Name + -60, !- Lower Limit Value + 200, !- Upper Limit Value + CONTINUOUS, !- Numeric Type + Temperature; !- Unit Type + + ScheduleTypeLimits, + Control Type, !- Name + 0, !- Lower Limit Value + 4, !- Upper Limit Value + DISCRETE; !- Numeric Type + + ScheduleTypeLimits, + On/Off, !- Name + 0, !- Lower Limit Value + 1, !- Upper Limit Value + DISCRETE; !- Numeric Type + + ScheduleTypeLimits, + FlowRate, !- Name + 0.0, !- Lower Limit Value + 10, !- Upper Limit Value + CONTINUOUS; !- Numeric Type + + RunPeriod, + Run Period 1, !- Name + 7, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 7, !- End Month + 4, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + RunPeriod, + Run Period 2, !- Name + 2, !- Begin Month + 1, !- Begin Day of Month + , !- Begin Year + 2, !- End Month + 4, !- End Day of Month + , !- End Year + Tuesday, !- Day of Week for Start Day + Yes, !- Use Weather File Holidays and Special Days + Yes, !- Use Weather File Daylight Saving Period + No, !- Apply Weekend Holiday Rule + Yes, !- Use Weather File Rain Indicators + Yes; !- Use Weather File Snow Indicators + + SimulationControl, + Yes, !- Do Zone Sizing Calculation + Yes, !- Do System Sizing Calculation + No, !- Do Plant Sizing Calculation + Yes, !- Run Simulation for Sizing Periods + Yes; !- Run Simulation for Weather File Run Periods + + ! Data Source=ASHRAE 2009 Annual Design Conditions + + Site:Location, + Miami Intl Ap FL USA TMY3 WMO=722020, !- Name + 25.82, !- Latitude {deg} + -80.30, !- Longitude {deg} + -5.00, !- Time Zone {hr} + 11.00; !- Elevation {m} + + ! Miami Intl Ap FL USA Annual Heating Design Conditions Wind Speed=3.8m/s Wind Dir=340 + ! Coldest Month=January + ! Miami Intl Ap FL USA Annual Heating 99.6%, MaxDB=8.7°C + + SizingPeriod:DesignDay, + Miami Intl Ap Ann Htg 99.6% Condns DB, !- Name + 1, !- Month + 21, !- Day of Month + WinterDesignDay, !- Day Type + 8.7, !- Maximum Dry-Bulb Temperature {C} + 0.0, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 8.7, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 101217., !- Barometric Pressure {Pa} + 3.8, !- Wind Speed {m/s} + 340, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 0.00; !- Sky Clearness + + ! Miami Intl Ap Annual Cooling Design Conditions Wind Speed=4.5m/s Wind Dir=140 + ! Hottest Month=July + ! Miami Intl Ap FL USA Annual Cooling (DB=>MWB) .4%, MaxDB=33.2°C MWB=25.3°C + + SizingPeriod:DesignDay, + Miami Intl Ap Ann Clg .4% Condns DB=>MWB, !- Name + 7, !- Month + 21, !- Day of Month + SummerDesignDay, !- Day Type + 33.2, !- Maximum Dry-Bulb Temperature {C} + 6.7, !- Daily Dry-Bulb Temperature Range {deltaC} + , !- Dry-Bulb Temperature Range Modifier Type + , !- Dry-Bulb Temperature Range Modifier Day Schedule Name + Wetbulb, !- Humidity Condition Type + 25.3, !- Wetbulb or DewPoint at Maximum Dry-Bulb {C} + , !- Humidity Condition Day Schedule Name + , !- Humidity Ratio at Maximum Dry-Bulb {kgWater/kgDryAir} + , !- Enthalpy at Maximum Dry-Bulb {J/kg} + , !- Daily Wet-Bulb Temperature Range {deltaC} + 101217., !- Barometric Pressure {Pa} + 4.5, !- Wind Speed {m/s} + 140, !- Wind Direction {deg} + No, !- Rain Indicator + No, !- Snow Indicator + No, !- Daylight Saving Time Indicator + ASHRAEClearSky, !- Solar Model Indicator + , !- Beam Solar Day Schedule Name + , !- Diffuse Solar Day Schedule Name + , !- ASHRAE Clear Sky Optical Depth for Beam Irradiance (taub) {dimensionless} + , !- ASHRAE Clear Sky Optical Depth for Diffuse Irradiance (taud) {dimensionless} + 1.00; !- Sky Clearness + + Site:GroundTemperature:BuildingSurface,20.03,20.03,20.13,20.30,20.43,20.52,20.62,20.77,20.78,20.55,20.44,20.20; + + Material, + WD10, !- Name + MediumSmooth, !- Roughness + 0.667, !- Thickness {m} + 0.115, !- Conductivity {W/m-K} + 513, !- Density {kg/m3} + 1381, !- Specific Heat {J/kg-K} + 0.9, !- Thermal Absorptance + 0.78, !- Solar Absorptance + 0.78; !- Visible Absorptance + + Material, + RG01, !- Name + Rough, !- Roughness + 1.2700000E-02, !- Thickness {m} + 1.442000, !- Conductivity {W/m-K} + 881.0000, !- Density {kg/m3} + 1674.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Material, + BR01, !- Name + VeryRough, !- Roughness + 9.4999997E-03, !- Thickness {m} + 0.1620000, !- Conductivity {W/m-K} + 1121.000, !- Density {kg/m3} + 1464.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7000000, !- Solar Absorptance + 0.7000000; !- Visible Absorptance + + Material, + IN46, !- Name + VeryRough, !- Roughness + 7.6200001E-02, !- Thickness {m} + 2.3000000E-02, !- Conductivity {W/m-K} + 24.00000, !- Density {kg/m3} + 1590.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.5000000, !- Solar Absorptance + 0.5000000; !- Visible Absorptance + + Material, + WD01, !- Name + MediumSmooth, !- Roughness + 1.9099999E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 513.0000, !- Density {kg/m3} + 1381.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + + Material, + PW03, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1150000, !- Conductivity {W/m-K} + 545.0000, !- Density {kg/m3} + 1213.000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7800000, !- Solar Absorptance + 0.7800000; !- Visible Absorptance + + Material, + IN02, !- Name + Rough, !- Roughness + 9.0099998E-02, !- Thickness {m} + 4.3000001E-02, !- Conductivity {W/m-K} + 10.00000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + GP01, !- Name + MediumSmooth, !- Roughness + 1.2700000E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + GP02, !- Name + MediumSmooth, !- Roughness + 1.5900001E-02, !- Thickness {m} + 0.1600000, !- Conductivity {W/m-K} + 801.0000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material, + CC03, !- Name + MediumRough, !- Roughness + 0.1016000, !- Thickness {m} + 1.310000, !- Conductivity {W/m-K} + 2243.000, !- Density {kg/m3} + 837.0000, !- Specific Heat {J/kg-K} + 0.9000000, !- Thermal Absorptance + 0.6500000, !- Solar Absorptance + 0.6500000; !- Visible Absorptance + + Material:NoMass, + CP01, !- Name + Rough, !- Roughness + 0.3670000, !- Thermal Resistance {m2-K/W} + 0.9000000, !- Thermal Absorptance + 0.7500000, !- Solar Absorptance + 0.7500000; !- Visible Absorptance + + Material:NoMass, + MAT-SB-U, !- Name + Rough, !- Roughness + 0.117406666, !- Thermal Resistance {m2-K/W} + 0.65, !- Thermal Absorptance + 0.65, !- Solar Absorptance + 0.65; !- Visible Absorptance + + Material:NoMass, + MAT-CLNG-1, !- Name + Rough, !- Roughness + 0.652259290, !- Thermal Resistance {m2-K/W} + 0.65, !- Thermal Absorptance + 0.65, !- Solar Absorptance + 0.65; !- Visible Absorptance + + Material:NoMass, + MAT-FLOOR-1, !- Name + Rough, !- Roughness + 3.522199631, !- Thermal Resistance {m2-K/W} + 0.65, !- Thermal Absorptance + 0.65, !- Solar Absorptance + 0.65; !- Visible Absorptance + + Material:AirGap, + AL21, !- Name + 0.1570000; !- Thermal Resistance {m2-K/W} + + Material:AirGap, + AL23, !- Name + 0.1530000; !- Thermal Resistance {m2-K/W} + + Construction, + ROOF-1, !- Name + RG01, !- Outside Layer + BR01, !- Layer 2 + IN46, !- Layer 3 + WD01; !- Layer 4 + + Construction, + WALL-1, !- Name + WD01, !- Outside Layer + PW03, !- Layer 2 + IN02, !- Layer 3 + GP01; !- Layer 4 + + Construction, + CLNG-1, !- Name + MAT-CLNG-1; !- Outside Layer + + Construction, + FLOOR-SLAB-1, !- Name + CC03, !- Outside Layer + CP01; !- Layer 2 + + Construction, + INT-WALL-1, !- Name + GP02, !- Outside Layer + AL21, !- Layer 2 + GP02; !- Layer 3 + + WindowMaterial:Gas, + AIR 6MM, !- Name + Air, !- Gas Type + 0.0063; !- Thickness {m} + + WindowMaterial:Gas, + AIR 13MM, !- Name + Air, !- Gas Type + 0.0127; !- Thickness {m} + + WindowMaterial:Gas, + ARGON 13MM, !- Name + Argon, !- Gas Type + 0.0127; !- Thickness {m} + + WindowMaterial:Glazing, + CLEAR 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.837, !- Solar Transmittance at Normal Incidence + 0.075, !- Front Side Solar Reflectance at Normal Incidence + 0.075, !- Back Side Solar Reflectance at Normal Incidence + 0.898, !- Visible Transmittance at Normal Incidence + 0.081, !- Front Side Visible Reflectance at Normal Incidence + 0.081, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + WindowMaterial:Glazing, + GREY 3MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.003, !- Thickness {m} + 0.626, !- Solar Transmittance at Normal Incidence + 0.061, !- Front Side Solar Reflectance at Normal Incidence + 0.061, !- Back Side Solar Reflectance at Normal Incidence + 0.611, !- Visible Transmittance at Normal Incidence + 0.061, !- Front Side Visible Reflectance at Normal Incidence + 0.061, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + WindowMaterial:Glazing, + CLEAR 6MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.006, !- Thickness {m} + 0.775, !- Solar Transmittance at Normal Incidence + 0.071, !- Front Side Solar Reflectance at Normal Incidence + 0.071, !- Back Side Solar Reflectance at Normal Incidence + 0.881, !- Visible Transmittance at Normal Incidence + 0.080, !- Front Side Visible Reflectance at Normal Incidence + 0.080, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.84, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + WindowMaterial:Glazing, + LoE CLEAR 6MM, !- Name + SpectralAverage, !- Optical Data Type + , !- Window Glass Spectral Data Set Name + 0.006, !- Thickness {m} + 0.600, !- Solar Transmittance at Normal Incidence + 0.170, !- Front Side Solar Reflectance at Normal Incidence + 0.220, !- Back Side Solar Reflectance at Normal Incidence + 0.840, !- Visible Transmittance at Normal Incidence + 0.055, !- Front Side Visible Reflectance at Normal Incidence + 0.078, !- Back Side Visible Reflectance at Normal Incidence + 0.0, !- Infrared Transmittance at Normal Incidence + 0.84, !- Front Side Infrared Hemispherical Emissivity + 0.10, !- Back Side Infrared Hemispherical Emissivity + 0.9; !- Conductivity {W/m-K} + + Construction, + Dbl Clr 3mm/13mm Air, !- Name + CLEAR 3MM, !- Outside Layer + AIR 13MM, !- Layer 2 + CLEAR 3MM; !- Layer 3 + + Construction, + Sgl Grey 3mm, !- Name + GREY 3MM; !- Outside Layer + + Schedule:Compact, + OCCUPY-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.0, !- Field 3 + Until: 11:00,1.00, !- Field 5 + Until: 12:00,0.80, !- Field 7 + Until: 13:00,0.40, !- Field 9 + Until: 14:00,0.80, !- Field 11 + Until: 18:00,1.00, !- Field 13 + Until: 19:00,0.50, !- Field 15 + Until: 21:00,0.10, !- Field 17 + Until: 24:00,0.0, !- Field 19 + For: Weekends WinterDesignDay Holiday, !- Field 21 + Until: 24:00,0.0; !- Field 22 + + Schedule:Compact, + LIGHTS-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.05, !- Field 3 + Until: 9:00,0.9, !- Field 5 + Until: 10:00,0.95, !- Field 7 + Until: 11:00,1.00, !- Field 9 + Until: 12:00,0.95, !- Field 11 + Until: 13:00,0.8, !- Field 13 + Until: 14:00,0.9, !- Field 15 + Until: 18:00,1.00, !- Field 17 + Until: 19:00,0.60, !- Field 19 + Until: 21:00,0.20, !- Field 21 + Until: 24:00,0.05, !- Field 23 + For: Weekends WinterDesignDay Holiday, !- Field 25 + Until: 24:00,0.05; !- Field 26 + + Schedule:Compact, + EQUIP-1, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: WeekDays SummerDesignDay CustomDay1 CustomDay2, !- Field 2 + Until: 8:00,0.02, !- Field 3 + Until: 9:00,0.4, !- Field 5 + Until: 14:00,0.9, !- Field 7 + Until: 15:00,0.8, !- Field 9 + Until: 16:00,0.7, !- Field 11 + Until: 18:00,0.5, !- Field 13 + Until: 20:00,0.3, !- Field 15 + Until: 24:00,0.02, !- Field 17 + For: Weekends WinterDesignDay Holiday, !- Field 19 + Until: 24:00,0.2; !- Field 20 + + Schedule:Compact, + INFIL-SCH, !- Name + Fraction, !- Schedule Type Limits Name + Through: 3/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,1.0, !- Field 3 + Through: 10/31, !- Field 5 + For: AllDays, !- Field 6 + Until: 24:00,0.0, !- Field 7 + Through: 12/31, !- Field 9 + For: AllDays, !- Field 10 + Until: 24:00,1.0; !- Field 11 + + Schedule:Compact, + ActSchd, !- Name + Any Number, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,117.239997864; !- Field 3 + + !- Field 4 + + Schedule:Compact, + ShadeTransSch, !- Name + Fraction, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,0.0; !- Field 3 + + Zone, + PLENUM-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 0.609600067, !- Ceiling Height {m} + 283.2; !- Volume {m3} + + BuildingSurface:Detailed, + WALL-1PF, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PR, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,3.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PB, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + WALL-1PL, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + PLENUM-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + TOP-1, !- Name + ROOF, !- Surface Type + ROOF-1, !- Construction Name + PLENUM-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.00000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,3.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,3.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,3.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,3.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C1-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + Surface, !- Outside Boundary Condition + C1-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C2-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + Surface, !- Outside Boundary Condition + C2-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + Surface, !- Outside Boundary Condition + C3-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C4-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + Surface, !- Outside Boundary Condition + C4-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C5-1P, !- Name + FLOOR, !- Surface Type + CLNG-1, !- Construction Name + PLENUM-1, !- Zone Name + Surface, !- Outside Boundary Condition + C5-1, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + SPACE1-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + SPACE1-1 Infil 1, !- Name + SPACE1-1, !- Zone or ZoneList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.0167, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + SPACE1-1 People 1, !- Name + SPACE1-1, !- Zone or ZoneList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Zone Floor Area {person/m2} + , !- Zone Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + AutoCalculate, !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + SPACE1-1 Lights 1, !- Name + SPACE1-1, !- Zone or ZoneList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 16.15, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.0, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + SPACE1-1 ElecEq 1, !- Name + SPACE1-1, !- Zone or ZoneList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + FRONT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WF-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 3.0,0.0,2.1, !- X,Y,Z ==> Vertex 1 {m} + 3.0,0.0,0.9, !- X,Y,Z ==> Vertex 2 {m} + 16.8,0.0,0.9, !- X,Y,Z ==> Vertex 3 {m} + 16.8,0.0,2.1; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + DF-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + FRONT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 21.3,0.0,2.1, !- X,Y,Z ==> Vertex 1 {m} + 21.3,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 23.8,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 23.8,0.0,2.1; !- X,Y,Z ==> Vertex 4 {m} + + Shading:Zone:Detailed, + Main South Overhang, !- Name + FRONT-1, !- Base Surface Name + ShadeTransSch, !- Transmittance Schedule Name + 4, !- Number of Vertices + 0.0,-1.3,2.2, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.2, !- X,Y,Z ==> Vertex 2 {m} + 19.8,0.0,2.2, !- X,Y,Z ==> Vertex 3 {m} + 19.8,-1.3,2.2; !- X,Y,Z ==> Vertex 4 {m} + + Shading:Zone:Detailed, + South Door Overhang, !- Name + FRONT-1, !- Base Surface Name + ShadeTransSch, !- Transmittance Schedule Name + 4, !- Number of Vertices + 21.0,-2.0,2.6, !- X,Y,Z ==> Vertex 1 {m} + 21.0,0.0,2.6, !- X,Y,Z ==> Vertex 2 {m} + 24.1,0.0,2.6, !- X,Y,Z ==> Vertex 3 {m} + 24.1,-2.0,2.6; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C1-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE1-1, !- Zone Name + Surface, !- Outside Boundary Condition + C1-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F1-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE1-1, !- Zone Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB12, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB21, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB14, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB41, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB15, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE1-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB51, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + SPACE2-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + SPACE2-1 Infil 1, !- Name + SPACE2-1, !- Zone or ZoneList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.00717, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + SPACE2-1 People 1, !- Name + SPACE2-1, !- Zone or ZoneList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Zone Floor Area {person/m2} + , !- Zone Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + AutoCalculate, !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + SPACE2-1 Lights 1, !- Name + SPACE2-1, !- Zone or ZoneList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 16.15, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.0, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + SPACE2-1 ElecEq 1, !- Name + SPACE2-1, !- Zone or ZoneList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + RIGHT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WR-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + RIGHT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 30.5,3.8,2.1, !- X,Y,Z ==> Vertex 1 {m} + 30.5,3.8,0.9, !- X,Y,Z ==> Vertex 2 {m} + 30.5,11.4,0.9, !- X,Y,Z ==> Vertex 3 {m} + 30.5,11.4,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C2-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE2-1, !- Zone Name + Surface, !- Outside Boundary Condition + C2-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,0.0,2.4, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F2-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE2-1, !- Zone Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB21, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB12, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB23, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB32, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB25, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE2-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB52, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + SPACE3-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 239.247360229; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + SPACE3-1 Infil 1, !- Name + SPACE3-1, !- Zone or ZoneList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.0167, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + SPACE3-1 People 1, !- Name + SPACE3-1, !- Zone or ZoneList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 11, !- Number of People + , !- People per Zone Floor Area {person/m2} + , !- Zone Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + AutoCalculate, !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + SPACE3-1 Lights 1, !- Name + SPACE3-1, !- Zone or ZoneList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 16.15, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.0, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + SPACE3-1 ElecEq 1, !- Name + SPACE3-1, !- Zone or ZoneList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + BACK-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WB-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + BACK-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 27.4,15.2,2.1, !- X,Y,Z ==> Vertex 1 {m} + 27.4,15.2,0.9, !- X,Y,Z ==> Vertex 2 {m} + 13.7,15.2,0.9, !- X,Y,Z ==> Vertex 3 {m} + 13.7,15.2,2.1; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + DB-1, !- Name + GLASSDOOR, !- Surface Type + Sgl Grey 3mm, !- Construction Name + BACK-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 9.1,15.2,2.1, !- X,Y,Z ==> Vertex 1 {m} + 9.1,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 7.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 7.0,15.2,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C3-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE3-1, !- Zone Name + Surface, !- Outside Boundary Condition + C3-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 30.5,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F3-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE3-1, !- Zone Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB32, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB23, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 30.5,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 30.5,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB34, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB43, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB35, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE3-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB53, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + SPACE4-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 103.311355591; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + SPACE4-1 Infil 1, !- Name + SPACE4-1, !- Zone or ZoneList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.00717, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + SPACE4-1 People 1, !- Name + SPACE4-1, !- Zone or ZoneList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 5, !- Number of People + , !- People per Zone Floor Area {person/m2} + , !- Zone Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + AutoCalculate, !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + SPACE4-1 Lights 1, !- Name + SPACE4-1, !- Zone or ZoneList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 16.15, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.0, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + SPACE4-1 ElecEq 1, !- Name + SPACE4-1, !- Zone or ZoneList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + LEFT-1, !- Name + WALL, !- Surface Type + WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + Outdoors, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + SunExposed, !- Sun Exposure + WindExposed, !- Wind Exposure + 0.50000, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,0.0,2.4; !- X,Y,Z ==> Vertex 4 {m} + + FenestrationSurface:Detailed, + WL-1, !- Name + WINDOW, !- Surface Type + Dbl Clr 3mm/13mm Air, !- Construction Name + LEFT-1, !- Building Surface Name + , !- Outside Boundary Condition Object + 0.50000, !- View Factor to Ground + , !- Frame and Divider Name + 1, !- Multiplier + 4, !- Number of Vertices + 0.0,11.4,2.1, !- X,Y,Z ==> Vertex 1 {m} + 0.0,11.4,0.9, !- X,Y,Z ==> Vertex 2 {m} + 0.0,3.8,0.9, !- X,Y,Z ==> Vertex 3 {m} + 0.0,3.8,2.1; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + C4-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE4-1, !- Zone Name + Surface, !- Outside Boundary Condition + C4-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,15.2,2.4, !- X,Y,Z ==> Vertex 2 {m} + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F4-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE4-1, !- Zone Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB41, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB14, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 0.0,0.0,2.4, !- X,Y,Z ==> Vertex 1 {m} + 0.0,0.0,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB43, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB34, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 0.0,15.2,0.0, !- X,Y,Z ==> Vertex 3 {m} + 0.0,15.2,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB45, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE4-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB54, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Zone, + SPACE5-1, !- Name + 0, !- Direction of Relative North {deg} + 0, !- X Origin {m} + 0, !- Y Origin {m} + 0, !- Z Origin {m} + 1, !- Type + 1, !- Multiplier + 2.438400269, !- Ceiling Height {m} + 447.682556152; !- Volume {m3} + + ZoneInfiltration:DesignFlowRate, + SPACE5-1 Infil 1, !- Name + SPACE5-1, !- Zone or ZoneList Name + INFIL-SCH, !- Schedule Name + flow/zone, !- Design Flow Rate Calculation Method + 0.031089, !- Design Flow Rate {m3/s} + , !- Flow per Zone Floor Area {m3/s-m2} + , !- Flow per Exterior Surface Area {m3/s-m2} + , !- Air Changes per Hour {1/hr} + 0, !- Constant Term Coefficient + 0, !- Temperature Term Coefficient + 0.2237, !- Velocity Term Coefficient + 0; !- Velocity Squared Term Coefficient + + People, + SPACE5-1 People 1, !- Name + SPACE5-1, !- Zone or ZoneList Name + OCCUPY-1, !- Number of People Schedule Name + people, !- Number of People Calculation Method + 20, !- Number of People + , !- People per Zone Floor Area {person/m2} + , !- Zone Floor Area per Person {m2/person} + 0.3, !- Fraction Radiant + AutoCalculate, !- Sensible Heat Fraction + ActSchd; !- Activity Level Schedule Name + + Lights, + SPACE5-1 Lights 1, !- Name + SPACE5-1, !- Zone or ZoneList Name + LIGHTS-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Lighting Level {W} + 16.15, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0.0, !- Return Air Fraction + 0.59, !- Fraction Radiant + 0.2, !- Fraction Visible + 0, !- Fraction Replaceable + GeneralLights; !- End-Use Subcategory + + ElectricEquipment, + SPACE5-1 ElecEq 1, !- Name + SPACE5-1, !- Zone or ZoneList Name + EQUIP-1, !- Schedule Name + Watts/Area, !- Design Level Calculation Method + , !- Design Level {W} + 10.76, !- Watts per Zone Floor Area {W/m2} + , !- Watts per Person {W/person} + 0, !- Fraction Latent + 0.3, !- Fraction Radiant + 0; !- Fraction Lost + + BuildingSurface:Detailed, + C5-1, !- Name + CEILING, !- Surface Type + CLNG-1, !- Construction Name + SPACE5-1, !- Zone Name + Surface, !- Outside Boundary Condition + C5-1P, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + F5-1, !- Name + FLOOR, !- Surface Type + FLOOR-SLAB-1, !- Construction Name + SPACE5-1, !- Zone Name + Ground, !- Outside Boundary Condition + , !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,0.0; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB51, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB15, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB52, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB25, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,3.7,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,3.7,0.0, !- X,Y,Z ==> Vertex 2 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 26.8,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB53, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB35, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 26.8,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 26.8,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,11.6,2.4; !- X,Y,Z ==> Vertex 4 {m} + + BuildingSurface:Detailed, + SB54, !- Name + WALL, !- Surface Type + INT-WALL-1, !- Construction Name + SPACE5-1, !- Zone Name + Surface, !- Outside Boundary Condition + SB45, !- Outside Boundary Condition Object + NoSun, !- Sun Exposure + NoWind, !- Wind Exposure + 0.0, !- View Factor to Ground + 4, !- Number of Vertices + 3.7,11.6,2.4, !- X,Y,Z ==> Vertex 1 {m} + 3.7,11.6,0.0, !- X,Y,Z ==> Vertex 2 {m} + 3.7,3.7,0.0, !- X,Y,Z ==> Vertex 3 {m} + 3.7,3.7,2.4; !- X,Y,Z ==> Vertex 4 {m} + + Sizing:Parameters, + 1.15, !- Heating Sizing Factor + 1.15; !- Cooling Sizing Factor + + Sizing:Zone, + SPACE1-1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12.5, !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA SPACE1-1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + ; !- Heating Maximum Air Flow Fraction + + DesignSpecification:OutdoorAir, + SZ DSOA SPACE1-1, !- Name + Sum, !- Outdoor Air Method + 0.00472, !- Outdoor Air Flow per Person {m3/s-person} + 0.000508, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + SPACE2-1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12.5, !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA SPACE2-1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + ; !- Heating Maximum Air Flow Fraction + + DesignSpecification:OutdoorAir, + SZ DSOA SPACE2-1, !- Name + Sum, !- Outdoor Air Method + 0.00472, !- Outdoor Air Flow per Person {m3/s-person} + 0.000508, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + SPACE3-1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12.5, !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA SPACE3-1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + ; !- Heating Maximum Air Flow Fraction + + DesignSpecification:OutdoorAir, + SZ DSOA SPACE3-1, !- Name + Sum, !- Outdoor Air Method + 0.00472, !- Outdoor Air Flow per Person {m3/s-person} + 0.000508, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + SPACE4-1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 12.5, !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA SPACE4-1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + ; !- Heating Maximum Air Flow Fraction + + DesignSpecification:OutdoorAir, + SZ DSOA SPACE4-1, !- Name + Sum, !- Outdoor Air Method + 0.00472, !- Outdoor Air Flow per Person {m3/s-person} + 0.000508, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Sizing:Zone, + SPACE5-1, !- Zone or ZoneList Name + SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method + 13.5, !- Zone Cooling Design Supply Air Temperature {C} + , !- Zone Cooling Design Supply Air Temperature Difference {deltaC} + SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method + 50., !- Zone Heating Design Supply Air Temperature {C} + , !- Zone Heating Design Supply Air Temperature Difference {deltaC} + 0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir} + 0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir} + SZ DSOA SPACE5-1, !- Design Specification Outdoor Air Object Name + 0.0, !- Zone Heating Sizing Factor + 0.0, !- Zone Cooling Sizing Factor + DesignDay, !- Cooling Design Air Flow Method + 0, !- Cooling Design Air Flow Rate {m3/s} + , !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2} + , !- Cooling Minimum Air Flow {m3/s} + , !- Cooling Minimum Air Flow Fraction + DesignDay, !- Heating Design Air Flow Method + 0, !- Heating Design Air Flow Rate {m3/s} + , !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2} + , !- Heating Maximum Air Flow {m3/s} + ; !- Heating Maximum Air Flow Fraction + + DesignSpecification:OutdoorAir, + SZ DSOA SPACE5-1, !- Name + Sum, !- Outdoor Air Method + 0.00472, !- Outdoor Air Flow per Person {m3/s-person} + 0.000508, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2} + 0.0; !- Outdoor Air Flow per Zone {m3/s} + + Schedule:Compact, + Htg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,21.1, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,21.1, !- Field 6 + For: WeekDays, !- Field 8 + Until: 7:00,21.1, !- Field 9 + Until: 18:00,21.1, !- Field 11 + Until: 24:00,21.1, !- Field 13 + For: WeekEnds Holiday, !- Field 15 + Until: 7:00,21.1, !- Field 16 + Until: 13:00,21.1, !- Field 18 + Until: 24:00,21.1, !- Field 20 + For: AllOtherDays, !- Field 22 + Until: 7:00,21.1, !- Field 23 + Until: 18:00,21.1, !- Field 25 + Until: 24:00,21.1; !- Field 27 + + Schedule:Compact, + PlenumHtg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,12.8; !- Field 3 + + Schedule:Compact, + Clg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,23.9, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,23.9, !- Field 6 + For: WeekDays, !- Field 8 + Until: 7:00,23.9, !- Field 9 + Until: 18:00,23.9, !- Field 11 + Until: 24:00,23.9, !- Field 13 + For: WeekEnds Holiday, !- Field 15 + Until: 7:00,23.9, !- Field 16 + Until: 13:00,23.9, !- Field 18 + Until: 24:00,23.9, !- Field 20 + For: AllOtherDays, !- Field 22 + Until: 7:00,23.9, !- Field 23 + Until: 18:00,23.9, !- Field 25 + Until: 24:00,23.9; !- Field 27 + + Schedule:Compact, + PlenumClg-SetP-Sch, !- Name + Temperature, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: AllDays, !- Field 2 + Until: 24:00,40.0; !- Field 3 + + Schedule:Compact, + Zone Control Type Sched, !- Name + Control Type, !- Schedule Type Limits Name + Through: 12/31, !- Field 1 + For: SummerDesignDay, !- Field 2 + Until: 24:00,4, !- Field 3 + For: WinterDesignDay, !- Field 5 + Until: 24:00,4, !- Field 6 + For: AllOtherDays, !- Field 8 + Until: 24:00,4; !- Field 9 + +! same as Doe-2 SDL-C4 + + Curve:Biquadratic, + VarSpeedCoolCapFT, !- Name + 0.476428E+00, !- Coefficient1 Constant + 0.401147E-01, !- Coefficient2 x + 0.226411E-03, !- Coefficient3 x**2 + -0.827136E-03, !- Coefficient4 y + -0.732240E-05, !- Coefficient5 y**2 + -0.446278E-03, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 23.88889, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + +! same as Doe-2 SDL-C82 + + Curve:Biquadratic, + VarSpeedCoolEIRFT, !- Name + 0.632475E+00, !- Coefficient1 Constant + -0.121321E-01, !- Coefficient2 x + 0.507773E-03, !- Coefficient3 x**2 + 0.155377E-01, !- Coefficient4 y + 0.272840E-03, !- Coefficient5 y**2 + -0.679201E-03, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 23.88889, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + +! same as Doe-2 SDL-C4 + + Curve:Biquadratic, + VarSpeedCoolCapLSFT, !- Name + 0.476428E+00, !- Coefficient1 Constant + 0.401147E-01, !- Coefficient2 x + 0.226411E-03, !- Coefficient3 x**2 + -0.827136E-03, !- Coefficient4 y + -0.732240E-05, !- Coefficient5 y**2 + -0.446278E-03, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 23.88889, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + +! same as Doe-2 SDL-C132 + + Curve:Biquadratic, + VarSpeedCoolEIRLSFT, !- Name + 0.774645E+00, !- Coefficient1 Constant + -0.343731E-01, !- Coefficient2 x + 0.783173E-03, !- Coefficient3 x**2 + 0.146596E-01, !- Coefficient4 y + 0.488851E-03, !- Coefficient5 y**2 + -0.752036E-03, !- Coefficient6 x*y + 12.77778, !- Minimum Value of x + 23.88889, !- Maximum Value of x + 23.88889, !- Minimum Value of y + 46.11111, !- Maximum Value of y + , !- Minimum Curve Output + , !- Maximum Curve Output + Temperature, !- Input Unit Type for X + Temperature, !- Input Unit Type for Y + Dimensionless; !- Output Unit Type + +! same as Doe-2 SDL-C78 + + Curve:Cubic, + PackagedRatedCoolCapFFlow, !- Name + 0.47278589, !- Coefficient1 Constant + 1.2433415, !- Coefficient2 x + -1.0387055, !- Coefficient3 x**2 + 0.32257813, !- Coefficient4 x**3 + 0.5, !- Minimum Value of x + 1.5, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + +! same as Doe-2 SDL-C93 + + Curve:Cubic, + PackagedRatedCoolEIRFFlow, !- Name + 1.0079484, !- Coefficient1 Constant + 0.34544129, !- Coefficient2 x + -.6922891, !- Coefficient3 x**2 + 0.33889943, !- Coefficient4 x**3 + 0.5, !- Minimum Value of x + 1.5, !- Maximum Value of x + , !- Minimum Curve Output + , !- Maximum Curve Output + Dimensionless, !- Input Unit Type for X + Dimensionless; !- Output Unit Type + + Curve:Quadratic, + VarSpeedCyclingPLFFPLR, !- Name + 0.85, !- Coefficient1 Constant + 0.15, !- Coefficient2 x + 0.0, !- Coefficient3 x**2 + 0.0, !- Minimum Value of x + 1.0; !- Maximum Value of x + + OutdoorAir:NodeList, + OutsideAirInletNodes; !- Node or NodeList Name 1 + + NodeList, + OutsideAirInletNodes, !- Name + Outside Air Inlet Node 1,!- Node 1 Name + Outside Air Inlet Node 2,!- Node 2 Name + Outside Air Inlet Node 3,!- Node 3 Name + Outside Air Inlet Node 4,!- Node 4 Name + Outside Air Inlet Node 5,!- Node 5 Name + MyVRFCondenserInletNode, !- Node 6 Name + Airloop Outdoor Air Inlet; !- Node 7 Name + + ZoneHVAC:EquipmentConnections, + SPACE1-1, !- Zone Name + SPACE1-1 Eq, !- Zone Conditioning Equipment List Name + SPACE1-1 In Nodes, !- Zone Air Inlet Node or NodeList Name + SPACE1-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name + SPACE1-1 Node, !- Zone Air Node Name + SPACE1-1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + SPACE2-1, !- Zone Name + SPACE2-1 Eq, !- Zone Conditioning Equipment List Name + SPACE2-1 In Nodes, !- Zone Air Inlet Node or NodeList Name + SPACE2-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name + SPACE2-1 Node, !- Zone Air Node Name + SPACE2-1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + SPACE3-1, !- Zone Name + SPACE3-1 Eq, !- Zone Conditioning Equipment List Name + SPACE3-1 In Nodes, !- Zone Air Inlet Node or NodeList Name + SPACE3-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name + SPACE3-1 Node, !- Zone Air Node Name + SPACE3-1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + SPACE4-1, !- Zone Name + SPACE4-1 Eq, !- Zone Conditioning Equipment List Name + SPACE4-1 In Nodes, !- Zone Air Inlet Node or NodeList Name + SPACE4-1 Out Nodes, !- Zone Air Exhaust Node or NodeList Name + SPACE4-1 Node, !- Zone Air Node Name + SPACE4-1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneHVAC:EquipmentConnections, + SPACE5-1, !- Zone Name + SPACE5-1 Eq, !- Zone Conditioning Equipment List Name + SPACE5-1 In Nodes, !- Zone Air Inlet Node or NodeList Name + , !- Zone Air Exhaust Node or NodeList Name + SPACE5-1 Node, !- Zone Air Node Name + SPACE5-1 Out Node; !- Zone Return Air Node or NodeList Name + + ZoneControl:Thermostat, + SPACE1-1 Control, !- Name + SPACE1-1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + DualSetPoint; !- Control 1 Name + + ZoneControl:Thermostat, + SPACE2-1 Control, !- Name + SPACE2-1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + DualSetPoint; !- Control 1 Name + + ZoneControl:Thermostat, + SPACE3-1 Control, !- Name + SPACE3-1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + DualSetPoint; !- Control 1 Name + + ZoneControl:Thermostat, + SPACE4-1 Control, !- Name + SPACE4-1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + DualSetPoint; !- Control 1 Name + + ZoneControl:Thermostat, + SPACE5-1 Control, !- Name + SPACE5-1, !- Zone or ZoneList Name + Zone Control Type Sched, !- Control Type Schedule Name + ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type + DualSetPoint; !- Control 1 Name + + ThermostatSetpoint:SingleHeating, + HeatingSetpoint, !- Name + Htg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleCooling, + CoolingSetpoint, !- Name + Clg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleHeating, + PlenumHeatingSetpoint, !- Name + PlenumHtg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:SingleCooling, + PlenumCoolingSetpoint, !- Name + PlenumClg-SetP-Sch; !- Setpoint Temperature Schedule Name + + ThermostatSetpoint:DualSetpoint, + DualSetPoint, !- Name + Htg-SetP-Sch, !- Heating Setpoint Temperature Schedule Name + Clg-SetP-Sch; !- Cooling Setpoint Temperature Schedule Name + + Output:Variable,*,Site Outdoor Air Drybulb Temperature,timestep; + + Output:Variable,*,Zone Air Temperature,timestep; + + Output:Variable,*,Zone Air System Sensible Cooling Rate,timestep; + + Output:Variable,*,Zone Air System Sensible Heating Rate,timestep; + + Output:Variable,*,Zone Predicted Sensible Load to Setpoint Heat Transfer Rate,timestep; + + Output:Variable,*,Zone Predicted Sensible Load to Heating Setpoint Heat Transfer Rate,timestep; + + Output:Variable,*,Zone Predicted Sensible Load to Cooling Setpoint Heat Transfer Rate,timestep; + + Output:Variable,*,Heating Coil Heating Rate,timestep; + + Output:Variable,*,Cooling Coil Total Cooling Rate,timestep; + + Output:Variable,*,Cooling Coil Sensible Cooling Rate,timestep; + + Output:Variable,*,Cooling Coil Latent Cooling Rate,timestep; + + Output:Variable,*,Cooling Coil Runtime Fraction,timestep; + + Output:Variable,*,Heating Coil Runtime Fraction,timestep; + + Output:Variable,*,VRF Heat Pump Heating Electric Power,timestep; + + Output:Variable,*,VRF Heat Pump Cooling Electric Power,timestep; + + Output:Variable,*,VRF Heat Pump Heating Electric Energy,timestep; + + Output:Variable,*,VRF Heat Pump Cooling Electric Energy,timestep; + + Output:Variable,*,Fan Electric Power,timestep; + + Output:Variable,*,VRF Heat Pump Total Cooling Rate,timestep; + + Output:Variable,*,VRF Heat Pump Total Heating Rate,timestep; + + Output:Variable,*,VRF Heat Pump Part Load Ratio,timestep; + + Output:Variable,*,VRF Heat Pump Runtime Fraction,timestep; + + Output:Variable,*,VRF Heat Pump Cycling Ratio,timestep; + + Output:Variable,*,VRF Heat Pump Operating Mode,timestep; + + Output:Variable,*,VRF Heat Pump Crankcase Heater Electric Power,timestep; + + Output:Variable,*,VRF Heat Pump Crankcase Heater Electric Energy,timestep; + + Output:Variable,*,VRF Heat Pump Defrost Electric Power,timestep; + + Output:Variable,*,VRF Heat Pump Defrost Electric Energy,timestep; + + Output:Variable,*,VRF Heat Pump Maximum Capacity Cooling Rate,timestep; + + Output:Variable,*,VRF Heat Pump Maximum Capacity Heating Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Cooling Electric Power,timestep; + + Output:Variable,*,Zone VRF Air Terminal Heating Electric Power,timestep; + + Output:Variable,*,Zone VRF Air Terminal Cooling Electric Energy,timestep; + + Output:Variable,*,Zone VRF Air Terminal Heating Electric Energy,timestep; + + Output:Variable,*,Zone VRF Air Terminal Total Cooling Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Sensible Cooling Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Latent Cooling Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Total Heating Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Sensible Heating Rate,timestep; + + Output:Variable,*,Zone VRF Air Terminal Latent Heating Rate,timestep; + + Output:Variable,TU1 VRF DX CCoil Inlet Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Outside Air Inlet Node 1,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Relief Air Outlet Node 1,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,TU1 Inlet Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,TU1 Outlet Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,SPACE5-1 Zone Inlet,System Node Temperature,timestep; + + Output:Variable,SPACE5-1 Zone Inlet,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Airloop Outdoor Air Inlet,System Node Temperature,timestep; + + Output:Variable,Airloop Outdoor Air Inlet,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,TU6 Outlet Node to Mixer,System Node Temperature,timestep; + + Output:Variable,Airloop Mixed Air Outlet,System Node Temperature,timestep; + + Output:Variable,Airloop Supply Inlet Node,System Node Temperature,timestep; + + Output:Variable,Airloop Supply Inlet Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Airloop Return Air Outlet,System Node Temperature,timestep; + + Output:Variable,Airloop Return Air Outlet,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Zone Eq In Node,System Node Temperature,timestep; + + Output:Variable,Zone Eq In Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,Airloop Fan Outlet Node,System Node Temperature,timestep; + + Output:Variable,Airloop Fan Outlet Node,System Node Standard Density Volume Flow Rate,timestep; + + Output:Variable,TU5 VRF DX CCoil Inlet Node,System Node Temperature,timestep; + + Output:Variable,TU5 VRF DX CCoil Outlet Node,System Node Temperature,timestep; + + Output:Variable,TU5 VRF DX HCoil Outlet Node,System Node Temperature,timestep; + + Output:Variable,*,Cooling Coil Runtime Fraction,timestep; + + Output:Variable,*,Heating Coil Runtime Fraction,timestep; + + Output:Meter,Cooling:Electricity,monthly; + + Output:Meter,Fans:Electricity,monthly; + + Output:Meter,HeatingCoils:EnergyTransfer,monthly; + + Output:Meter,CoolingCoils:EnergyTransfer,monthly; + + Output:Meter,InteriorLights:Electricity,monthly; + + Output:Meter,InteriorEquipment:Electricity,monthly; + + Output:Meter,Cooling:Electricity,runperiod; + + Output:Meter,Fans:Electricity,runperiod; + + Output:Meter,HeatingCoils:EnergyTransfer,runperiod; + + Output:Meter,CoolingCoils:EnergyTransfer,runperiod; + + Output:Meter,InteriorLights:Electricity,runperiod; + + Output:Meter,InteriorEquipment:Electricity,runperiod; + + Output:VariableDictionary,Regular; + + Output:Surfaces:Drawing,dxf; + + Output:Meter:MeterFileOnly,Electricity:Facility,monthly; + + Output:Meter:MeterFileOnly,Electricity:Building,monthly; + + Output:Meter:MeterFileOnly,Electricity:HVAC,monthly; + + Output:Meter:MeterFileOnly,Electricity:Facility,runperiod; + + Output:Meter:MeterFileOnly,Electricity:Building,runperiod; + + Output:Meter:MeterFileOnly,Electricity:HVAC,runperiod; + + OutputControl:Table:Style, + HTML; !- Column Separator + + Output:Table:SummaryReports, + AllSummary; !- Report 1 Name + diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index f6eb8cbd358..c0ba6522de7 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -2470,6 +2470,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRF_ATMInletSide) VRFNum = 1; VRFTUNum = 1; VRFTU(VRFTUNum).OpMode = ContFanCycCoil; + VRFTU(VRFTUNum).isInZone = true; + VRFTU(VRFTUNum).ZoneAirNode = ZoneEquipConfig(1).ZoneNode; // VRFTU( VRFTUNum ).VRFTUOutletNodeNum // initialize mass flow rates Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate = HVACInletMassFlowRate; @@ -4897,6 +4899,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMInletSi VRFNum = 1; VRFTUNum = 1; VRFTU(VRFTUNum).OpMode = CycFanCycCoil; + VRFTU(VRFTUNum).isInZone = true; + VRFTU(VRFTUNum).ZoneAirNode = ZoneEquipConfig(1).ZoneNode; // initialize mass flow rates Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate = HVACInletMassFlowRate; Node(VRFTU(VRFTUNum).ATMixerPriNode).MassFlowRate = PrimaryAirMassFlowRate; @@ -6647,6 +6651,8 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimVRFfluidCntrl_ATMSupplyS VRFNum = 1; VRFTUNum = 1; VRFTU(VRFTUNum).OpMode = CycFanCycCoil; + VRFTU(VRFTUNum).isInZone = true; + VRFTU(VRFTUNum).ZoneAirNode = ZoneEquipConfig(1).ZoneNode; // initialize mass flow rates Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate = HVACInletMassFlowRate; Node(VRFTU(VRFTUNum).ATMixerPriNode).MassFlowRate = PrimaryAirMassFlowRate; diff --git a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc index 4eacad62467..d68efdf79a7 100644 --- a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc +++ b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -394,8 +395,6 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) DataZoneEquipment::ZoneEquipList(1).EquipIndex.allocate(1); DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySystems::UnitarySys thisSys; - UnitarySystems::UnitarySys *mySys; int AirLoopNum = 0; int CompIndex = 0; bool HeatingActive = false; @@ -404,18 +403,21 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) Real64 OAUCoilOutTemp = 0.0; std::string compName = "GASHEAT DXAC FURNACE 1"; bool zoneEquipment = true; - mySys = thisSys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + Real64 sensOut = 0.0; + Real64 latOut = 0.0; + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - mySys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects - DataGlobals::SysSizingCalc = - false; // DISABLE SIZING - don't call UnitarySystems::sizeUnitarySystem, much more work needed to set up sizing arrays + // DISABLE SIZING - don't call UnitarySystems::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = false; - InletNode = mySys->AirInNode; - OutletNode = mySys->AirOutNode; - ControlZoneNum = mySys->NodeNumOfControlledZone; + InletNode = thisSys->AirInNode; + OutletNode = thisSys->AirOutNode; + ControlZoneNum = thisSys->NodeNumOfControlledZone; // set up unitary system inlet condtions DataLoopNode::Node(InletNode).Temp = 26.666667; // AHRI condition 80F dry-bulb temp @@ -458,10 +460,11 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) ScheduleManager::Schedule(1).CurrentValue = 1.0; DataGlobals::BeginEnvrnFlag = true; DataEnvironment::StdRhoAir = Psychrometrics::PsyRhoAirFnPbTdbW(101325.0, 20.0, 0.0); // initialize RhoAir - DataLoopNode::Node(InletNode).MassFlowRateMaxAvail = mySys->m_MaxCoolAirVolFlow * DataEnvironment::StdRhoAir; + DataLoopNode::Node(InletNode).MassFlowRateMaxAvail = thisSys->m_MaxCoolAirVolFlow * DataEnvironment::StdRhoAir; OutputReportPredefined::SetPredefinedTables(); - mySys->simulate(compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, zoneEquipment); + thisSys->simulate( + compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, zoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -475,6 +478,7 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) MinHumRatio = DataLoopNode::Node(OutletNode).HumRat; // use lower of zone and outlet humidity ratio Qsens_sys = DataLoopNode::Node(InletNode).MassFlowRate * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(OutletNode).Temp, MinHumRatio) - Psychrometrics::PsyHFnTdbW(ZoneTemp, MinHumRatio)); + EXPECT_NEAR(DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired, Qsens_sys, 1.0); // Watts DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired = -1000.0; // cooling load DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).OutputRequiredToCoolingSP = -1000.0; @@ -493,7 +497,8 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 30.0; - mySys->simulate(compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, zoneEquipment); + thisSys->simulate( + compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, zoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -511,8 +516,8 @@ TEST_F(EnergyPlusFixture, HXAssistCCUnitarySystem_VStest1) // TODO: FIXME: Need to fix this in future, it is failing now, probably due to object ordering. Unit test failure message below // The difference between DataZoneEnergyDemands::ZoneSysEnergyDemand( ControlZoneNum ).RemainingOutputRequired and Qsens_sys is 1000, which // exceeds 1.0, where DataZoneEnergyDemands::ZoneSysEnergyDemand( ControlZoneNum ).RemainingOutputRequired evaluates to -1000, Qsens_sys evaluates - // to 0, and 1.0 evaluates to 1. test model performance EXPECT_NEAR( DataZoneEnergyDemands::ZoneSysEnergyDemand( ControlZoneNum - // ).RemainingOutputRequired, Qsens_sys, 1.0 ); // Watts + // to 0, and 1.0 evaluates to 1. test model performance + EXPECT_NEAR( DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired, Qsens_sys, 1.0 ); // Watts EXPECT_DOUBLE_EQ(DataLoopNode::Node(InletNode).MassFlowRate, DataLoopNode::Node(OutletNode).MassFlowRate); } diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index c1795a1e795..c29398842d4 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -62,10 +62,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -79,6 +82,7 @@ #include #include #include +#include #include #include #include @@ -119,7 +123,542 @@ using namespace EnergyPlus::SizingManager; namespace EnergyPlus { -class HVACVRFFixture : public EnergyPlusFixture {}; +class HVACVRFFixture: public EnergyPlusFixture {}; +class AirLoopFixture: public EnergyPlusFixture { + +public: + int NumAirloops = 1; + int NumZoneInletNodes = 1; // number of zone inlet nodes + int NumZoneExhaustNodes = 1; // number of zone exhaust nodes + bool ErrorsFound = false; + Real64 const CpWater = 4180.0; // For estimating the expected result + Real64 const RhoWater = 1000.0; // For estimating the expected result + +protected: + virtual void SetUp() + { + EnergyPlusFixture::SetUp(); // Sets up the base fixture first. + + DataEnvironment::StdRhoAir = Psychrometrics::PsyRhoAirFnPbTdbW(101325.0, 20.0, 0.0); // initialize StdRhoAir + DataEnvironment::OutBaroPress = 101325.0; + DataSizing::DesDayWeath.allocate(1); + DataSizing::DesDayWeath(1).Temp.allocate(1); + DataSizing::DesDayWeath(1).Temp(1) = 35.0; + DataGlobals::BeginEnvrnFlag = true; + DataEnvironment::OutDryBulbTemp = 35.0; + DataEnvironment::OutHumRat = 0.012; + DataEnvironment::OutWetBulbTemp = Psychrometrics::PsyTwbFnTdbWPb( + DataEnvironment::OutDryBulbTemp, DataEnvironment::OutHumRat, DataEnvironment::StdPressureSeaLevel); + DataEnvironment::OutBaroPress = 101325; // sea level + DataZoneEquipment::ZoneEquipInputsFilled = true; // denotes zone equipment has been read in + + int numZones = DataGlobals::NumOfZones = 5; + int numAirloops = 5; + DataLoopNode::Node.allocate(50); + DataLoopNode::NodeID.allocate(50); + + DataHeatBalance::Zone.allocate(numZones); + DataZoneEquipment::ZoneEquipConfig.allocate(numZones); + DataZoneEquipment::ZoneEquipList.allocate(numZones); + DataZoneEquipment::ZoneEquipAvail.dimension(numZones, DataHVACGlobals::NoAction); + DataZoneEquipment::NumOfZoneEquipLists = numZones; + DataSizing::FinalZoneSizing.allocate(numZones); + DataSizing::FinalSysSizing.allocate(numAirloops); + DataSizing::OASysEqSizing.allocate(numAirloops); + DataSizing::OASysEqSizing(1).SizingMethod.allocate(30); + DataSizing::ZoneEqSizing.allocate(numZones); + DataSizing::ZoneEqSizing(1).SizingMethod.allocate(30); + DataSizing::UnitarySysEqSizing.allocate(numZones); + DataSizing::UnitarySysEqSizing(1).SizingMethod.allocate(30); + DataSizing::ZoneHVACSizing.allocate(50); + ZoneHVACSizing(1).MaxCoolAirVolFlow = DataSizing::AutoSize; + ZoneHVACSizing(1).MaxHeatAirVolFlow = DataSizing::AutoSize; + DXCoils::DXCoil.allocate(10); + DXCoils::DXCoilOutletTemp.allocate(10); + DXCoils::DXCoilOutletHumRat.allocate(10); + DXCoils::DXCoilFullLoadOutAirTemp.allocate(10); + DXCoils::DXCoilFullLoadOutAirHumRat.allocate(10); + DXCoils::DXCoilPartLoadRatio.allocate(10); + DXCoils::DXCoilFanOpMode.allocate(10); + DXCoils::DXCoilTotalCooling.allocate(10); + DXCoils::DXCoilCoolInletAirWBTemp.allocate(10); + DXCoils::DXCoilTotalHeating.allocate(10); + DXCoils::DXCoilHeatInletAirDBTemp.allocate(10); + DXCoils::DXCoilHeatInletAirWBTemp.allocate(10); + + DXCoils::CheckEquipName.allocate(10); + DXCoils::DXCoilNumericFields.allocate(10); + DataHeatBalance::HeatReclaimDXCoil.allocate(10); + DXCoils::NumDXCoils = 10; + MixedAir::OAMixer.allocate(5); + DataSizing::NumSysSizInput = 1; + DataSizing::SysSizInput.allocate(1); + DataSizing::SysSizInput(1).AirLoopNum = 1; + CurveManager::NumCurves = 10; + CurveManager::PerfCurve.allocate(10); + CurveManager::PerfCurve(1).InterpolationType = EvaluateCurveToLimits; + CurveManager::PerfCurve(1).CurveType = CurveManager::Linear; + CurveManager::PerfCurve(1).Coeff1 = 1.0; + CurveManager::PerfCurve(1).CurveMax = 1.0; + CurveManager::PerfCurve(2).InterpolationType = EvaluateCurveToLimits; + CurveManager::PerfCurve(2).CurveType = CurveManager::Linear; + CurveManager::PerfCurve(2).Coeff1 = 1.0; + CurveManager::PerfCurve(2).CurveMax = 1.0; + + int NumAirLoops = DataHVACGlobals::NumPrimaryAirSys = 1; // allocate to 1 air loop and adjust/resize as needed + DataAirSystems::PrimaryAirSystem.allocate(NumAirLoops); + int thisAirLoop = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch.allocate(1); + DataAirLoop::AirLoopControlInfo.allocate(1); + + ZoneSysEnergyDemand.allocate(numZones); + + DataSizing::ZoneSizingRunDone = true; + DataSizing::SysSizingRunDone = true; + + // set up zone 1 + + int zoneNum = 1; + // zone nodes + int zoneNode = 1; + int zoneRetNode1 = 2; + int zoneInletNode1 = 3; + int zoneExhNode1 = 4; + + DataSizing::ZoneEqSizing(zoneNum).SizingMethod.allocate(25); + ZoneEqSizing(zoneNum).SizingMethod.allocate(25); + ZoneEqSizing(zoneNum).SizingMethod(DataHVACGlobals::SystemAirflowSizing) = DataSizing::SupplyAirFlowRate; + + auto &thisZoneEqConfig(DataZoneEquipment::ZoneEquipConfig(zoneNum)); + thisZoneEqConfig.IsControlled = true; + thisZoneEqConfig.ActualZoneNum = 1; + thisZoneEqConfig.ZoneName = "ZONE1"; + thisZoneEqConfig.EquipListName = "ZONE1EQUIPMENT"; + thisZoneEqConfig.ZoneNode = zoneNode; + thisZoneEqConfig.NumReturnNodes = 1; + thisZoneEqConfig.ReturnNode.allocate(1); + thisZoneEqConfig.ReturnNode(1) = zoneRetNode1; + thisZoneEqConfig.FixedReturnFlow.allocate(1); + thisZoneEqConfig.NumInletNodes = NumZoneInletNodes; + thisZoneEqConfig.InletNode.allocate(NumZoneInletNodes); + thisZoneEqConfig.AirDistUnitCool.allocate(NumZoneInletNodes); + thisZoneEqConfig.AirDistUnitHeat.allocate(NumZoneInletNodes); + thisZoneEqConfig.InletNode(1) = zoneInletNode1; + thisZoneEqConfig.NumExhaustNodes = NumZoneExhaustNodes; + thisZoneEqConfig.ExhaustNode.allocate(NumZoneExhaustNodes); + thisZoneEqConfig.ExhaustNode(1) = zoneExhNode1; + thisZoneEqConfig.EquipListIndex = zoneNum; + thisZoneEqConfig.ReturnFlowSchedPtrNum = DataGlobals::ScheduleAlwaysOn; + + auto &thisZone(DataHeatBalance::Zone(zoneNum)); + thisZone.Name = "ZONE1"; + thisZone.IsControlled = true; + thisZone.SystemZoneNodeNumber = zoneNode; + + auto &thisZoneEqList(DataZoneEquipment::ZoneEquipList(zoneNum)); + thisZoneEqList.Name = "ZONE1EQUIPMENT"; + int maxEquipCount1 = 1; + thisZoneEqList.NumOfEquipTypes = maxEquipCount1; + thisZoneEqList.EquipType.allocate(maxEquipCount1); + thisZoneEqList.EquipType_Num.allocate(maxEquipCount1); + thisZoneEqList.EquipName.allocate(maxEquipCount1); + thisZoneEqList.EquipIndex.allocate(maxEquipCount1); + thisZoneEqList.EquipIndex = 1; + thisZoneEqList.EquipData.allocate(maxEquipCount1); + thisZoneEqList.CoolingPriority.allocate(maxEquipCount1); + thisZoneEqList.HeatingPriority.allocate(maxEquipCount1); + thisZoneEqList.EquipType(1) = "NOT A VRF TU"; + thisZoneEqList.EquipName(1) = "NO NAME"; + thisZoneEqList.CoolingPriority(1) = 1; + thisZoneEqList.HeatingPriority(1) = 1; + thisZoneEqList.EquipType_Num(1) = DataZoneEquipment::ZoneUnitarySys_Num; + + auto &finalZoneSizing(DataSizing::FinalZoneSizing(zoneNum)); + finalZoneSizing.DesCoolVolFlow = 1.5; + finalZoneSizing.DesHeatVolFlow = 1.2; + finalZoneSizing.DesCoolCoilInTemp = 25.0; + finalZoneSizing.ZoneTempAtCoolPeak = 25.0; + finalZoneSizing.DesCoolCoilInHumRat = 0.009; + finalZoneSizing.ZoneHumRatAtCoolPeak = 0.009; + finalZoneSizing.CoolDesTemp = 15.0; + finalZoneSizing.CoolDesHumRat = 0.006; + finalZoneSizing.DesHeatCoilInTemp = 20.0; + finalZoneSizing.ZoneTempAtHeatPeak = 20.0; + finalZoneSizing.HeatDesTemp = 30.0; + finalZoneSizing.HeatDesHumRat = 0.007; + finalZoneSizing.DesHeatMassFlow = finalZoneSizing.DesHeatVolFlow * DataEnvironment::StdRhoAir; + finalZoneSizing.TimeStepNumAtCoolMax = 1; + finalZoneSizing.CoolDDNum = 1; + + auto &finalSysSizing(DataSizing::FinalSysSizing(thisAirLoop)); + finalSysSizing.DesCoolVolFlow = 0.566337; // 400 cfm * 3 tons = 1200 cfm + finalSysSizing.DesHeatVolFlow = 0.566337; + finalSysSizing.CoolSupTemp = 12.7; + finalSysSizing.CoolSupHumRat = 0.008; + finalSysSizing.HeatSupTemp = 35.0; + finalSysSizing.HeatSupHumRat = 0.006; + finalSysSizing.DesMainVolFlow = 0.566337; + finalSysSizing.OutTempAtCoolPeak = 35.0; + finalSysSizing.HeatOutTemp = 5.0; + finalSysSizing.HeatRetTemp = 21.0; + finalSysSizing.HeatMixTemp = 15.0; + finalSysSizing.MixTempAtCoolPeak = 26.0; + finalSysSizing.MixHumRatAtCoolPeak = 0.009; + + // set up air loop + DataAirSystems::PrimaryAirSystem(thisAirLoop).NumBranches = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).NumInletBranches = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).InletBranchNum.allocate(1); + DataAirSystems::PrimaryAirSystem(thisAirLoop).InletBranchNum(1) = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).NumOutletBranches = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).OutletBranchNum.allocate(1); + DataAirSystems::PrimaryAirSystem(thisAirLoop).OutletBranchNum(1) = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch.allocate(1); + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch(1).TotalComponents = 1; + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch(1).Comp.allocate(1); + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch(1).Comp(1).Name = "VRFTU1"; + DataAirSystems::PrimaryAirSystem(thisAirLoop).Branch(1).Comp(1).TypeOf = "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW"; + + // set up plant loop for water equipment + DataPlant::TotNumLoops = 2; + DataPlant::PlantLoop.allocate(DataPlant::TotNumLoops); + DataSizing::PlantSizData.allocate(DataPlant::TotNumLoops); + // int NumPltSizInput = DataPlant::TotNumLoops; + DataSizing::NumPltSizInput = 2; + + for (int loopindex = 1; loopindex <= DataPlant::TotNumLoops; ++loopindex) { + auto &loop(DataPlant::PlantLoop(loopindex)); + loop.LoopSide.allocate(2); + auto &loopside(DataPlant::PlantLoop(loopindex).LoopSide(1)); + loopside.TotalBranches = 1; + loopside.Branch.allocate(1); + auto &loopsidebranch(DataPlant::PlantLoop(loopindex).LoopSide(1).Branch(1)); + loopsidebranch.TotalComponents = 2; + loopsidebranch.Comp.allocate(2); + } + DataPlant::PlantLoop(1).Name = "Hot Water Loop"; + DataPlant::PlantLoop(1).FluidName = "WATER"; + DataPlant::PlantLoop(1).FluidIndex = 1; + + DataPlant::PlantLoop(2).Name = "Chilled Water Loop"; + DataPlant::PlantLoop(2).FluidName = "WATER"; + DataPlant::PlantLoop(2).FluidIndex = 1; + + DataSizing::PlantSizData(1).PlantLoopName = "Hot Water Loop"; + DataSizing::PlantSizData(1).ExitTemp = 80.0; + DataSizing::PlantSizData(1).DeltaT = 10.0; + + DataSizing::PlantSizData(2).PlantLoopName = "Chilled Water Loop"; + DataSizing::PlantSizData(2).ExitTemp = 6.0; + DataSizing::PlantSizData(2).DeltaT = 5.0; + + // set up VRF system + int numVRFCond = HVACVariableRefrigerantFlow::NumVRFCond = 1; // total number of condenser units + HVACVariableRefrigerantFlow::VRF.allocate(numVRFCond); + HVACVariableRefrigerantFlow::CoolCombinationRatio.allocate(1); + HVACVariableRefrigerantFlow::HeatCombinationRatio.allocate(1); + + int condNum = 1; + auto &VRFCond(HVACVariableRefrigerantFlow::VRF(condNum)); + + int condNodeNum = 1; + + VRFCond.VRFSystemTypeNum = 1; + VRFCond.VRFAlgorithmTypeNum = 1; + VRFCond.SchedPtr = 1; + VRFCond.CoolingCapacity = 10000.0; + VRFCond.CoolingCOP = 3.0; + VRFCond.CoolingCombinationRatio = 1.0; + VRFCond.HeatingCapacity = 10000.0; + VRFCond.HeatingCOP = 3.0; + VRFCond.CondenserNodeNum = condNodeNum; + VRFCond.ZoneTUListPtr = 1; + VRFCond.MaxOATCooling = 40.0; + VRFCond.MaxOATHeating = 30.0; + VRFCond.ThermostatPriority = HVACVariableRefrigerantFlow::LoadPriority; + HVACVariableRefrigerantFlow::MaxCoolingCapacity.allocate(1); + HVACVariableRefrigerantFlow::MaxCoolingCapacity(1) = 1.0E20; + HVACVariableRefrigerantFlow::MaxHeatingCapacity.allocate(1); + HVACVariableRefrigerantFlow::MaxHeatingCapacity(1) = 1.0E20; + + int Sch1 = 1; + int Sch2 = 2; + + int numTU = 1; // total number of TUs + HVACVariableRefrigerantFlow::VRFTUNumericFields.allocate(numTU); + VRFTUNumericFields(1).FieldNames.allocate(25); + VRFTUNumericFields(1).FieldNames = " "; + HVACVariableRefrigerantFlow::NumVRFTU = numTU; + HVACVariableRefrigerantFlow::VRFTU.allocate(numTU); + HVACVariableRefrigerantFlow::NumVRFTULists = numTU; + HVACVariableRefrigerantFlow::TerminalUnitList.allocate(numTU); + HVACVariableRefrigerantFlow::CheckEquipName.allocate(numTU); + HVACVariableRefrigerantFlow::CheckEquipName = true; + + // set up terminal unit list + int thisTUList = 1; + auto &terminalUnitList(HVACVariableRefrigerantFlow::TerminalUnitList(thisTUList)); + terminalUnitList.NumTUInList = 1; + terminalUnitList.ZoneTUPtr.allocate(1); + terminalUnitList.ZoneTUPtr(thisTUList) = 1; + terminalUnitList.TerminalUnitNotSizedYet.allocate(1); + terminalUnitList.HRCoolRequest.allocate(1); + terminalUnitList.HRHeatRequest.allocate(1); + terminalUnitList.CoolingCoilPresent.allocate(1); + terminalUnitList.CoolingCoilPresent = true; + terminalUnitList.HeatingCoilPresent.allocate(1); + terminalUnitList.HeatingCoilPresent = true; + terminalUnitList.CoolingCoilAvailSchPtr.allocate(1); + terminalUnitList.CoolingCoilAvailSchPtr = Sch1; + terminalUnitList.HeatingCoilAvailSchPtr.allocate(1); + terminalUnitList.HeatingCoilAvailSchPtr = Sch1; + terminalUnitList.CoolingCoilAvailable.allocate(1); + terminalUnitList.HeatingCoilAvailable.allocate(1); + + // set up VRF Terminal Unit + int TUNum = 1; // index to this TU + auto &VRFTU(HVACVariableRefrigerantFlow::VRFTU(TUNum)); + + int coolCoilIndex = 1; + int heatCoilIndex = 2; + int VRFTUInletNodeNum = 30; + int VRFTUOutletNodeNum = 31; + int VRFTUOAMixerOANodeNum = 32; + int VRFTUOAMixerRelNodeNum = 33; + int VRFTUOAMixerRetNodeNum = 34; + int VRFTUOAMixerMixNodeNum = 35; + int coolCoilAirInNode = VRFTUOAMixerMixNodeNum; + int coolCoilAirOutNode = 36; + int heatCoilAirInNode = coolCoilAirOutNode; + int heatCoilAirOutNode = VRFTUOutletNodeNum; + + MixedAir::OAMixer(1).RetNode = VRFTUOAMixerRetNodeNum; + MixedAir::OAMixer(1).InletNode = VRFTUOAMixerOANodeNum; + MixedAir::OAMixer(1).RelNode = VRFTUOAMixerRelNodeNum; + MixedAir::OAMixer(1).MixNode = VRFTUOAMixerMixNodeNum; + + VRFTU.Name = "VRFTU1"; + VRFTU.VRFTUType_Num = DataHVACGlobals::VRFTUType_ConstVolume; + VRFTU.SchedPtr = Sch1; + VRFTU.VRFSysNum = numVRFCond; + VRFTU.TUListIndex = TUNum; + VRFTU.IndexToTUInTUList = TUNum; + VRFTU.VRFTUInletNodeNum = VRFTUInletNodeNum; + VRFTU.VRFTUOutletNodeNum = VRFTUOutletNodeNum; + VRFTU.VRFTUOAMixerOANodeNum = VRFTUOAMixerOANodeNum; + VRFTU.VRFTUOAMixerRelNodeNum = VRFTUOAMixerRelNodeNum; + VRFTU.VRFTUOAMixerRetNodeNum = VRFTUOAMixerRetNodeNum; + VRFTU.MaxCoolAirVolFlow = DataSizing::AutoSize; + VRFTU.MaxHeatAirVolFlow = DataSizing::AutoSize; + VRFTU.MaxNoCoolAirVolFlow = DataSizing::AutoSize; + VRFTU.MaxNoHeatAirVolFlow = DataSizing::AutoSize; + VRFTU.MaxCoolAirMassFlow = DataSizing::AutoSize; + VRFTU.MaxHeatAirMassFlow = DataSizing::AutoSize; + VRFTU.MaxNoCoolAirMassFlow = DataSizing::AutoSize; + VRFTU.MaxNoHeatAirMassFlow = DataSizing::AutoSize; + VRFTU.CoolOutAirVolFlow = DataSizing::AutoSize; + VRFTU.HeatOutAirVolFlow = DataSizing::AutoSize; + VRFTU.NoCoolHeatOutAirVolFlow = DataSizing::AutoSize; + VRFTU.MinOperatingPLR = 0.1; + VRFTU.fanType_Num = 0; + VRFTU.FanOpModeSchedPtr = Sch2; + VRFTU.FanAvailSchedPtr = Sch1; + VRFTU.FanIndex = 0; + VRFTU.FanPlace = 0; + VRFTU.OAMixerName = "OAMixer1"; + VRFTU.OAMixerIndex = 1; + VRFTU.OAMixerUsed = true; + VRFTU.CoolCoilIndex = coolCoilIndex; + VRFTU.coolCoilAirInNode = coolCoilAirInNode; + VRFTU.coolCoilAirOutNode = coolCoilAirOutNode; + VRFTU.HeatCoilIndex = heatCoilIndex; + VRFTU.heatCoilAirInNode = heatCoilAirInNode; + VRFTU.heatCoilAirOutNode = heatCoilAirOutNode; + VRFTU.DXCoolCoilType_Num = DataHVACGlobals::CoilVRF_Cooling; + VRFTU.DXHeatCoilType_Num = DataHVACGlobals::CoilVRF_Heating; + VRFTU.CoolingCoilPresent = true; + VRFTU.HeatingCoilPresent = true; + VRFTU.HVACSizingIndex = 0; + + // DX coil set up + DXCoils::DXCoilNumericFields(1).PerfMode.allocate(5); + DXCoils::DXCoilNumericFields(1).PerfMode(1).FieldNames.allocate(30); + DXCoils::DXCoil(1).Name = "VRFTUDXCOOLCOIL"; + DXCoils::DXCoil(1).DXCoilType = "Coil:Cooling:DX:VariableRefrigerantFlow"; + DXCoils::DXCoil(1).AirInNode = coolCoilAirInNode; + DXCoils::DXCoil(1).AirOutNode = coolCoilAirOutNode; + DXCoils::DXCoil(1).DXCoilType_Num = CoilVRF_Cooling; + DXCoils::DXCoil(1).RatedAirVolFlowRate = DataSizing::AutoSize; + DXCoils::DXCoil(1).RatedTotCap = DataSizing::AutoSize; + DXCoils::DXCoil(1).RatedSHR = DataSizing::AutoSize; + DXCoils::DXCoil(1).SchedPtr = Sch1; + DXCoils::DXCoil(1).CCapFTemp.allocate(1); + DXCoils::DXCoil(1).CCapFTemp(1) = Sch1; + DXCoils::DXCoil(1).CCapFFlow.allocate(1); + DXCoils::DXCoil(1).CCapFFlow(1) = Sch1; + DXCoils::DXCoil(1).PLFFPLR.allocate(1); + DXCoils::DXCoil(1).PLFFPLR(1) = Sch1; + + DXCoils::DXCoilNumericFields(2).PerfMode.allocate(5); + DXCoils::DXCoilNumericFields(2).PerfMode(1).FieldNames.allocate(30); + DXCoils::DXCoil(2).Name = "VRFTUDXHEATCOIL"; + DXCoils::DXCoil(2).DXCoilType = "Coil:Heating:DX:VariableRefrigerantFlow"; + DXCoils::DXCoil(2).AirInNode = heatCoilAirInNode; + DXCoils::DXCoil(2).AirOutNode = heatCoilAirOutNode; + DXCoils::DXCoil(2).DXCoilType_Num = CoilVRF_Heating; + DXCoils::DXCoil(2).RatedAirVolFlowRate = DataSizing::AutoSize; + DXCoils::DXCoil(2).RatedTotCap = DataSizing::AutoSize; + DXCoils::DXCoil(2).RatedSHR = DataSizing::AutoSize; + DXCoils::DXCoil(2).SchedPtr = Sch1; + DXCoils::DXCoil(2).CCapFTemp.allocate(1); + DXCoils::DXCoil(2).CCapFTemp(1) = Sch1; + DXCoils::DXCoil(2).CCapFFlow.allocate(1); + DXCoils::DXCoil(2).CCapFFlow(1) = Sch1; + DXCoils::DXCoil(2).PLFFPLR.allocate(1); + DXCoils::DXCoil(2).PLFFPLR(1) = Sch1; + + // set up schedules + ScheduleManager::Schedule.allocate(10); + + } + + virtual void TearDown() + { + EnergyPlusFixture::TearDown(); // Remember to tear down the base fixture after cleaning up derived fixture! + } + + +}; + +TEST_F(AirLoopFixture, VRF_SysModel_inAirloop) +{ + + static std::string const RoutineName("VRF_SysModel_inAirloop"); + StdRhoAir = PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, 20.0, 0.0); + int curSysNum = DataSizing::CurSysNum = 1; + int curZoneNum = 1; + int curTUNum = 1; + + // turn off GetInput for AirLoopFixture unit tests, everything is set up in fixture + HVACVariableRefrigerantFlow::GetVRFInputFlag = false; + DXCoils::GetCoilsInputFlag = false; + // trigger a mining function (will bypass GetInput) + int ZoneInletAirNode = GetVRFTUZoneInletAirNode(1); + auto &thisTU(HVACVariableRefrigerantFlow::VRFTU(curTUNum)); + // node number set up in fixture + EXPECT_EQ(ZoneInletAirNode, thisTU.VRFTUOutletNodeNum); + + Schedule(VRF(curSysNum).SchedPtr).CurrentValue = 1.0; // enable the VRF condenser + Schedule(thisTU.SchedPtr).CurrentValue = 1.0; // enable the terminal unit + Schedule(thisTU.FanAvailSchedPtr).CurrentValue = 1.0; // turn on fan + Schedule(thisTU.FanOpModeSchedPtr).CurrentValue = 0.0; // set cycling fan operating mode + + ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = 0.0; // set load = 0 + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToCoolSP = 0.0; + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToHeatSP = 0.0; + + DataAirLoop::AirLoopInputsFilled = true; + + Node(VRF(curSysNum).CondenserNodeNum).Temp = 35.0; + + int VRFTUOAMixerOANodeNum = thisTU.VRFTUOAMixerOANodeNum; + int VRFTUOAMixerRetNodeNum = thisTU.VRFTUOAMixerRetNodeNum; + Node(VRFTUOAMixerOANodeNum).Temp = 35.0; + Node(VRFTUOAMixerOANodeNum).HumRat = 0.01; + Node(VRFTUOAMixerOANodeNum).Enthalpy = PsyHFnTdbW(Node(VRFTUOAMixerOANodeNum).Temp, Node(VRFTUOAMixerOANodeNum).HumRat); + Node(VRFTUOAMixerOANodeNum).Press = DataEnvironment::OutBaroPress; + + Node(VRFTUOAMixerRetNodeNum).Temp = 24.0; + Node(VRFTUOAMixerRetNodeNum).HumRat = 0.01; + Node(VRFTUOAMixerRetNodeNum).Enthalpy = PsyHFnTdbW(Node(VRFTUOAMixerRetNodeNum).Temp, Node(VRFTUOAMixerRetNodeNum).HumRat); + Node(VRFTUOAMixerRetNodeNum).Press = DataEnvironment::OutBaroPress; + + bool FirstHVACIteration = true; + Real64 SysOutputProvided = 0.0; + Real64 LatOutputProvided = 0.0; + Real64 OnOffAirFlowRatio = 1.0; + Real64 QZnReq = ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired; + + auto &tuInletNode(DataLoopNode::Node(thisTU.VRFTUInletNodeNum)); + tuInletNode.Temp = 24.0; + tuInletNode.HumRat = 0.01; + tuInletNode.Enthalpy = PsyHFnTdbW(tuInletNode.Temp, tuInletNode.HumRat); + + DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).TempSetPoint = 20.0; // select 20 C as TU outlet set point temperature + + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters + + ASSERT_EQ(1, NumVRFCond); + EXPECT_TRUE(thisTU.isInAirLoop); // initialization found TU in main air loop + EXPECT_TRUE(thisTU.isSetPointControlled); // initialization found TU is set point controlled + EXPECT_EQ(20.0, thisTU.coilTempSetPoint); // set point is initialized + + SimVRF(curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); + + EXPECT_EQ(0.0, QZnReq); + + tuInletNode.MassFlowRate = thisTU.MaxCoolAirMassFlow; // set mass flow rate at TU inlet + + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); + EXPECT_LT(QZnReq, 0.0); // cooling load exists + EXPECT_TRUE(thisTU.coolSPActive); // cooling set point control active + EXPECT_NEAR(DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).Temp, 24.0, 0.01); // verify outlet node is not at set point = 20 + + SimVRF(curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); + EXPECT_LT(SysOutputProvided, 0.0); + EXPECT_NEAR(DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).Temp, thisTU.coilTempSetPoint, 0.01); + EXPECT_NEAR(DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).Temp, 20.0, 0.01); // TU outlet is at set point = 20 + + tuInletNode.Temp = 18.0; + tuInletNode.HumRat = 0.007; + tuInletNode.Enthalpy = PsyHFnTdbW(tuInletNode.Temp, tuInletNode.HumRat); + Node(VRFTUOAMixerRetNodeNum).Temp = 18.0; + Node(VRFTUOAMixerRetNodeNum).HumRat = 0.007; + Node(VRFTUOAMixerRetNodeNum).Enthalpy = PsyHFnTdbW(Node(VRFTUOAMixerRetNodeNum).Temp, Node(VRFTUOAMixerRetNodeNum).HumRat); + DataEnvironment::OutDryBulbTemp = 10.0; + Node(VRF(curSysNum).CondenserNodeNum).Temp = 10.0; + Node(VRFTUOAMixerOANodeNum).Temp = 10.0; + + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); + EXPECT_GT(QZnReq, 0.0); // heating load exists + EXPECT_FALSE(thisTU.coolSPActive); // verify cooling set point control is not active + EXPECT_TRUE(thisTU.heatSPActive); // verify heating set point control is active + EXPECT_NEAR(18.0, tuInletNode.Temp, 0.001); // verify TU inlet node = 18 + EXPECT_NEAR(18.0, DataLoopNode::Node(thisTU.coolCoilAirInNode).Temp, 0.001); // verify cooling coil inlet node = 18 + SimVRF(curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); + EXPECT_GT(SysOutputProvided, 0.0); // TU provides heating + EXPECT_NEAR(DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).Temp, thisTU.coilTempSetPoint, 0.01); // TU outlet is at SP target + EXPECT_NEAR(DataLoopNode::Node(thisTU.VRFTUOutletNodeNum).Temp, 20.0, 0.01); + + // switch to load based control + thisTU.isSetPointControlled = false; + thisTU.ZoneAirNode = 1; + thisTU.ZoneNum = 1; + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters + EXPECT_EQ(0.0, QZnReq); + EXPECT_FALSE(CoolingLoad(curSysNum)); // verify no load on TU + EXPECT_FALSE(HeatingLoad(curSysNum)); + + ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = 1000.0; // set heating load + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToCoolSP = 2000.0; + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToHeatSP = 1000.0; + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters + EXPECT_GT(QZnReq, 0.0); + EXPECT_FALSE(CoolingLoad(curSysNum)); + EXPECT_TRUE(HeatingLoad(curSysNum)); + SimVRF(curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); + EXPECT_NEAR(SysOutputProvided, QZnReq, 1.0); + + ZoneSysEnergyDemand(curZoneNum).RemainingOutputRequired = -1000.0; // set cooling load + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToCoolSP = -1000.0; + ZoneSysEnergyDemand(curZoneNum).RemainingOutputReqToHeatSP = -2000.0; + InitVRF(curTUNum, curZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); // Initialize all VRFTU related parameters + EXPECT_LT(QZnReq, 0.0); + EXPECT_TRUE(CoolingLoad(curSysNum)); + EXPECT_FALSE(HeatingLoad(curSysNum)); + SimVRF(curTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); + EXPECT_NEAR(SysOutputProvided, QZnReq, 1.0); +} //*****************VRF-FluidTCtrl Model TEST_F(HVACVRFFixture, VRF_FluidTCtrl_VRFOU_Compressor) @@ -2418,8 +2957,6 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_CalcVRFIUAirFlow) EXPECT_NEAR(Houtlet, 49113, 1); EXPECT_NEAR(SCact, 5.00, 0.01); - // Clean up - ZoneSysEnergyDemand.deallocate(); } TEST_F(HVACVRFFixture, VRF_FluidTCtrl_CalcVRFIUTeTc) @@ -2509,10 +3046,10 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_CalcVRFIUTeTc) CoolingLoad(1) = true; HeatingLoad(1) = false; DataZoneEnergyDemands::ZoneSysEnergyDemand.allocate(2); - DataZoneEnergyDemands::ZoneSysEnergyDemand(1).OutputRequiredToCoolingSP = -100.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(1).OutputRequiredToHeatingSP = -200.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(2).OutputRequiredToCoolingSP = -1100.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(2).OutputRequiredToHeatingSP = -1200.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputReqToCoolSP = -100.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputReqToHeatSP = -200.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(2).RemainingOutputReqToCoolSP = -1100.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(2).RemainingOutputReqToHeatSP = -1200.0; CompOnMassFlow = 0.0; // system is off // Run and Check @@ -2553,10 +3090,10 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_CalcVRFIUTeTc) VRFTU(2).coilInNodeW = Node(2).HumRat; CoolingLoad(1) = false; HeatingLoad(1) = true; - DataZoneEnergyDemands::ZoneSysEnergyDemand(1).OutputRequiredToCoolingSP = 300.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(1).OutputRequiredToHeatingSP = 200.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(2).OutputRequiredToCoolingSP = 2000.0; - DataZoneEnergyDemands::ZoneSysEnergyDemand(2).OutputRequiredToHeatingSP = 1900.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputReqToCoolSP = 300.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputReqToHeatSP = 200.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(2).RemainingOutputReqToCoolSP = 2000.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(2).RemainingOutputReqToHeatSP = 1900.0; // system is on in heating mode VRF(IndexVRFCondenser).CalcVRFIUTeTc_FluidTCtrl(); // default value, coil inlet temps higher than default @@ -3173,7 +3710,7 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) DataZoneEquipment::ZoneEquipInputsFilled = true; // denotes zone equipment has been read in StdRhoAir = PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, 20.0, 0.0); ZoneEqSizing.allocate(1); - ZoneSizingRunDone = true; + DataSizing::ZoneSizingRunDone = true; ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent = false; ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(25); ZoneEqSizing(CurZoneEqNum).SizingMethod(DataHVACGlobals::SystemAirflowSizing) = DataSizing::SupplyAirFlowRate; @@ -3189,10 +3726,6 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) GetZoneData(ErrorsFound); // read zone data EXPECT_FALSE(ErrorsFound); - DXCoils::GetCoilsInputFlag = true; // remove this when clear_state gets added to DXCoils - GlobalNames::NumCoils = 0; // remove this when clear_state gets added to GlobalNames - GlobalNames::CoilNames.clear(); // remove this when clear_state gets added to GlobalNames - GetZoneEquipmentData(); // read equipment list and connections ZoneInletAirNode = GetVRFTUZoneInletAirNode(VRFTUNum); // trigger GetVRFInput by calling a mining function @@ -3206,6 +3739,7 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired = 0.0; // set load = 0 ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 0.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 0.0; + DataAirLoop::AirLoopInputsFilled = true; FinalZoneSizing(CurZoneEqNum).ZoneRetTempAtCoolPeak = 26.66667; FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak = 0.01117049470250416; // AHRI condition at 80 F db / 67 F wb @@ -3221,8 +3755,24 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) FinalZoneSizing(CurZoneEqNum).CoolDesTemp = 13.1; // 55.58 F FinalZoneSizing(CurZoneEqNum).CoolDesHumRat = 0.009297628698818194; // humrat at 12.77777 C db / 12.6 C wb - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + bool HeatingActive = false; + bool CoolingActive = false; + int OAUnitNum = 0; + Real64 OAUCoilOutTemp = 0.0; + bool ZoneEquipment = true; + DataAirLoop::AirLoopInputsFilled = true; + + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); ASSERT_EQ(1, NumVRFCond); ASSERT_EQ(ZoneInletAirNode, @@ -3245,8 +3795,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) VRF(VRFCond).HeatingCapacity + 1000.0; // simulates a dual Tstat with load to cooling SP > load to heating SP ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = VRF(VRFCond).HeatingCapacity; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); ASSERT_TRUE(VRF(VRFCond).DefrostPower > 0.0); // defrost power should be greater than 0 DefrostWatts = VRF(VRFCond).VRFCondRTF * (VRF(VRFCond).HeatingCapacity / 1.01667) * VRF(VRFCond).DefrostFraction; @@ -3322,8 +3881,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) Node(VRFTU(VRFCond).VRFTUInletNodeNum).Temp = 20; // 20 C at 13 C WB (44.5 % RH) for indoor heating condition Node(VRFTU(VRFCond).VRFTUInletNodeNum).HumRat = 0.0064516; // need to set these so OA mixer will get proper mixed air condition Node(VRFTU(VRFCond).VRFTUInletNodeNum).Enthalpy = 36485.3142; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); outWB = Node(VRF(VRFCond).CondenserNodeNum).OutAirWetBulb; // no defrost adjustment to OA WB InletAirDryBulbC = DXCoils::DXCoilHeatInletAirDBTemp(DXHeatingCoilIndex); // load weighted average but only 1 coil here @@ -3378,6 +3946,7 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) TempControlType = 4; ZT.allocate(1); ZT = 25.0; + Node(VRFTU(VRFTUNum).ZoneAirNode).Temp = 27.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired = -VRF(VRFCond).CoolingCapacity * 0.75; // set load equal to the VRF cooling capacity adjusted for SHR @@ -3397,8 +3966,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) VRF(VRFCond).MasterZoneTUIndex = 0; VRF(VRFCond).ThermostatPriority = ThermostatOffsetPriority; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired, 5.0); // system output should be less than 0 and approx = to VRF capacity * SHR @@ -3449,14 +4027,27 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) // ensure that TU turns off when fan heat exceeds the heating load ZT = 20.0; // set zone temp below heating SP (SP=21) to ensure heating mode - Node(VRF(VRFCond).CondenserNodeNum).Temp = 19.0; // within the heating temperature range of VRF outdoor unit + Node(VRFTU(VRFTUNum).ZoneAirNode).Temp = 20.0; + Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Temp = 20; // 20 C at 13 C WB (44.5 % RH) for indoor heating condition + Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).HumRat = 0.0064516; // need to set these so OA mixer will get proper mixed air condition + Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Enthalpy = 36485.3142; + Node(VRF(VRFCond).CondenserNodeNum).Temp = 20.0; // within the heating temperature range of VRF outdoor unit Node(VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum).Temp = 19.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired = 400.0; // set load equal to small value less than expected fan heat ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 500.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 400.0; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(SysOutputProvided, 0.0); // for this system with 0 no load flow rate output should be = 0 when fan heat at very low TU PLR (1E-20) is greater than load EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off @@ -3469,15 +4060,33 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP = 900.0; ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = 800.0; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputRequired, 5.0); // system should meet the heating load EXPECT_GT(VRF(VRFCond).VRFCondPLR, 0.0); // system should be on Node(VRF(VRFCond).CondenserNodeNum).Temp = 21.0; // outside the heating temperature range (-20 to 20) of VRF outdoor unit Node(VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum).Temp = 21.0; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 at no load flow rate for constant fan mode in this example @@ -3485,8 +4094,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve) 0.0); // flow should be = 0 at no load flow rate for constant fan mode in this example Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 0.0; // set cycling fan operating mode - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should also be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUOutletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode @@ -4093,12 +4711,10 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_GetInputFailers) GetVRFInputData(ErrorsFound); EXPECT_TRUE(ErrorsFound); EXPECT_EQ(0, VRFTU(VRFTUNum).VRFSysNum); - EXPECT_EQ(0, VRFTU(VRFTUNum).ZoneNum); + EXPECT_EQ(1, VRFTU(VRFTUNum).ZoneNum); EXPECT_EQ(0, VRFTU(VRFTUNum).TUListIndex); EXPECT_EQ(0, VRFTU(VRFTUNum).IndexToTUInTUList); - // clean up - ZoneSysEnergyDemand.deallocate(); } TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) @@ -4953,6 +5569,7 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) HVACVariableRefrigerantFlow::MyEnvrnFlag = true; ZoneInletAirNode = GetVRFTUZoneInletAirNode(VRFTUNum); // trigger GetVRFInput by calling a mining function + DataAirLoop::AirLoopInputsFilled = true; Schedule(VRF(VRFCond).SchedPtr).CurrentValue = 1.0; // enable the VRF condenser Schedule(VRFTU(VRFTUNum).SchedPtr).CurrentValue = 1.0; // enable the terminal unit @@ -4984,7 +5601,23 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) PlantManager::SizePlantLoop(1, true); PlantManager::InitLoopEquip = true; // call air-side VRF - SimulateVRF(VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + bool HeatingActive = false; + bool CoolingActive = false; + int OAUnitNum = 0; + Real64 OAUCoilOutTemp = 0.0; + bool ZoneEquipment = true; + + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); // call plant-side VRF auto vrfCondPtr = HVACVariableRefrigerantFlow::VRFCondenserEquipment::factory(VRF(VRFCond).Name); @@ -4997,6 +5630,9 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) DataZoneEnergyDemands::ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP = -2000.0; BeginEnvrnFlag = true; + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).Temp = 24.0; + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).HumRat = 0.0093; + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).Enthalpy = 47794.1; DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Temp = 24.0; DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).HumRat = 0.0093; DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Enthalpy = 47794.1; @@ -5004,8 +5640,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) DataEnvironment::OutHumRat = 0.017767; // 50% RH DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 26.045; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_TRUE(VRF(VRFCond).VRFCondPLR > 0.0); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToCoolSP, 1.0); @@ -5032,12 +5677,24 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Temp = 20.0; // TU inlet air temp DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).HumRat = 0.0056; // TU inlet air humrat DataLoopNode::Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).Enthalpy = 34823.5; // TU inlet air enthalpy + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).Temp = 20.0; // also set zone conditions + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).HumRat = 0.0056; + DataLoopNode::Node(VRFTU(VRFTUNum).ZoneAirNode).Enthalpy = 34823.5; DataEnvironment::OutDryBulbTemp = 5.0; DataEnvironment::OutHumRat = 0.00269; // 50% RH DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 1.34678; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_TRUE(VRF(VRFCond).VRFCondPLR > 0.0); EXPECT_NEAR(SysOutputProvided, ZoneSysEnergyDemand(CurZoneNum).RemainingOutputReqToHeatSP, 1.0); @@ -5048,8 +5705,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) Node(VRF(VRFCond).CondenserNodeNum).Temp = 21.0; // outside the heating temperature range (-20 to 20) of VRF outdoor unit Node(VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum).Temp = 21.0; - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should be off EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode EXPECT_EQ(Node(VRFTU(VRFTUNum).VRFTUOutletNodeNum).MassFlowRate, 0.0); // flow should be = 0 for cycling fan mode @@ -5058,8 +5724,17 @@ TEST_F(HVACVRFFixture, VRFTest_SysCurve_WaterCooled) DataHeatBalFanSys::TempControlType(1) = DataHVACGlobals::DualSetPointWithDeadBand; Schedule(VRFTU(VRFTUNum).FanOpModeSchedPtr).CurrentValue = 1.0; // set constant fan operating mode - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); EXPECT_EQ(VRF(VRFCond).VRFCondPLR, 0.0); // system should also be off EXPECT_GT(Node(VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate, 0.0); // flow should be > 0 at no load flow rate for constant fan mode in this example @@ -5746,12 +6421,14 @@ TEST_F(HVACVRFFixture, VRFTest_TU_NoLoad_OAMassFlowRateTest) DataGlobals::SysSizingCalc = true; DataGlobals::NumOfTimeStepInHour = 1; DataGlobals::MinutesPerTimeStep = 60; + DataSizing::ZoneEqSizing.allocate(1); CurveManager::GetCurveInput(); // read curves HeatBalanceManager::GetZoneData(ErrorsFound); // read zone data EXPECT_FALSE(ErrorsFound); DataZoneEquipment::GetZoneEquipmentData(); // read equipment list and connections + DataAirLoop::AirLoopInputsFilled = true; HVACVariableRefrigerantFlow::MyEnvrnFlag = true; ZoneInletAirNode = GetVRFTUZoneInletAirNode(VRFTUNum); // trigger GetVRFInput by calling a mining function OutsideAirNode = VRFTU(VRFTUNum).VRFTUOAMixerOANodeNum; // outside air air inlet node num @@ -5769,8 +6446,6 @@ TEST_F(HVACVRFFixture, VRFTest_TU_NoLoad_OAMassFlowRateTest) AverageOAMassFlow = DataEnvironment::StdRhoAir * VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow; EXPECT_EQ(AverageOAMassFlow, Node(OutsideAirNode).MassFlowRate); - // clean up - ZoneSysEnergyDemand.deallocate(); } TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) @@ -5898,7 +6573,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) TerminalUnitList(1).TotalHeatLoad(4) = 0.0; TerminalUnitList(1).TotalHeatLoad(5) = 0.0; - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_DOUBLE_EQ(VRF(VRFCond).ElecCoolingPower, 0.0); EXPECT_DOUBLE_EQ(VRF(VRFCond).ElecHeatingPower, 0.0); @@ -5932,7 +6607,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) TerminalUnitList(1).TotalCoolLoad(4) = 1000.0; TerminalUnitList(1).TotalCoolLoad(5) = 1000.0; - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_FALSE(VRF(VRFCond).HRHeatingActive); EXPECT_FALSE(VRF(VRFCond).HRCoolingActive); EXPECT_EQ(VRF(VRFCond).TotalCoolingCapacity, 5000.0); @@ -5963,7 +6638,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) TerminalUnitList(1).TotalHeatLoad(4) = 1000.0; TerminalUnitList(1).TotalHeatLoad(5) = 1000.0; - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_FALSE(VRF(VRFCond).HRHeatingActive); EXPECT_FALSE(VRF(VRFCond).HRCoolingActive); EXPECT_EQ(VRF(VRFCond).TotalCoolingCapacity, 0.0); @@ -6006,7 +6681,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) // set heat recovery time constant to non-zero value (means mode change will degrade performance) VRF(VRFCond).HRHeatCapTC = 0.25; // 15 min exponential rise // last operating mode was heating - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_TRUE(VRF(VRFCond).HRHeatingActive); EXPECT_FALSE(VRF(VRFCond).HRCoolingActive); EXPECT_EQ(VRF(VRFCond).TotalCoolingCapacity, 0.0); @@ -6035,7 +6710,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 0.75 - CalcVRFCondenser saves last time stamp for use in exponential curve, increment by // 1 time step to get same answer - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_TRUE(VRF(VRFCond).HRHeatingActive); EXPECT_FALSE(VRF(VRFCond).HRCoolingActive); EXPECT_EQ(VRF(VRFCond).TotalCoolingCapacity, 0.0); @@ -6058,7 +6733,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) LastModeCooling(VRFCond) = false; LastModeHeating(VRFCond) = true; - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); HREIRAdjustment = HRInitialEIRFrac + (HREIRFTConst - HRInitialEIRFrac) * VRF(VRFCond).SUMultiplier; @@ -6068,7 +6743,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) // simulate again and see that power has exponential changed from previous time step DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 1.25 - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); HREIRAdjustment = HRInitialEIRFrac + (HREIRFTConst - HRInitialEIRFrac) * VRF(VRFCond).SUMultiplier; EXPECT_NEAR(VRF(VRFCond).SUMultiplier, 0.95021, 0.00001); // will exponentially rise towards 1.0 EXPECT_EQ(VRF(VRFCond).ElecHeatingPower, VRF(VRFCond).RatedHeatingPower * VRF(VRFCond).VRFCondPLR * HREIRAdjustment); @@ -6076,7 +6751,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) // simulate again and see that power has exponential changed from previous time step DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 1.5 - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); HREIRAdjustment = HRInitialEIRFrac + (HREIRFTConst - HRInitialEIRFrac) * VRF(VRFCond).SUMultiplier; EXPECT_NEAR(VRF(VRFCond).SUMultiplier, 0.98168, 0.00001); // will exponentially rise towards 1.0 EXPECT_EQ(VRF(VRFCond).ElecHeatingPower, VRF(VRFCond).RatedHeatingPower * VRF(VRFCond).VRFCondPLR * HREIRAdjustment); @@ -6084,7 +6759,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest) // simulate again and see that power has exponential changed from previous time step DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 1.75 - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); HREIRAdjustment = HRInitialEIRFrac + (HREIRFTConst - HRInitialEIRFrac) * VRF(VRFCond).SUMultiplier; EXPECT_NEAR(VRF(VRFCond).SUMultiplier, 1.0, 0.00001); // will exponentially rise towards 1.0 EXPECT_EQ(VRF(VRFCond).ElecHeatingPower, VRF(VRFCond).RatedHeatingPower * VRF(VRFCond).VRFCondPLR * HREIRAdjustment); @@ -9873,7 +10548,11 @@ TEST_F(HVACVRFFixture, VRFFluidControl_FanSysModel_OnOffModeTest) // test cooling mode fan operation ZoneSysEnergyDemand(1).RemainingOutputRequired = -5000.0; ZoneSysEnergyDemand(1).RemainingOutputReqToCoolSP = -5000.0; + ZoneSysEnergyDemand(1).OutputRequiredToCoolingSP = -5000.0; ZoneSysEnergyDemand(1).RemainingOutputReqToHeatSP = -7000.0; + ZoneSysEnergyDemand(1).OutputRequiredToHeatingSP = -7000.0; + ZoneEqSizing.allocate(1); + DataAirLoop::AirLoopInputsFilled = true; InitVRF(VRFTUNum, ZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); EXPECT_EQ(QZnReq, -5000.0); SimVRF(VRFTUNum, FirstHVACIteration, OnOffAirFlowRatio, SysOutputProvided, LatOutputProvided, QZnReq); @@ -9881,14 +10560,16 @@ TEST_F(HVACVRFFixture, VRFFluidControl_FanSysModel_OnOffModeTest) Real64 Result_AirMassFlowRateDesign = HVACFan::fanObjs[0]->maxAirMassFlowRate(); EXPECT_NEAR(Result_AirMassFlowRateDesign, 0.347040, 0.000001); Real64 Result_AirMassFlowRate = DataLoopNode::Node(HVACFan::fanObjs[0]->outletNodeNum).MassFlowRate; - EXPECT_NEAR(Result_AirMassFlowRate, 0.347040, 0.000001); + EXPECT_NEAR(Result_AirMassFlowRate, DXCoils::DXCoil(1).RatedAirMassFlowRate(1), 0.000001); Real64 Result_FanPower = HVACFan::fanObjs[0]->fanPower(); - EXPECT_NEAR(Result_FanPower, 41.22, 0.001); + EXPECT_NEAR(Result_FanPower, 39.588, 0.001); // test no load mode fan operation ZoneSysEnergyDemand(1).RemainingOutputRequired = 0.0; ZoneSysEnergyDemand(1).RemainingOutputReqToCoolSP = 0.0; + ZoneSysEnergyDemand(1).OutputRequiredToCoolingSP = 0.0; ZoneSysEnergyDemand(1).RemainingOutputReqToHeatSP = 0.0; + ZoneSysEnergyDemand(1).OutputRequiredToHeatingSP = 0.0; QZnReq = ZoneSysEnergyDemand(1).RemainingOutputReqToCoolSP; InitVRF(VRFTUNum, ZoneNum, FirstHVACIteration, OnOffAirFlowRatio, QZnReq); EXPECT_EQ(QZnReq, 0.0); @@ -10454,6 +11135,7 @@ TEST_F(HVACVRFFixture, VRFTU_SysCurve_ReportOutputVerificationTest) DataZoneEquipment::ZoneEquipInputsFilled = true; // denotes zone equipment has been read in StdRhoAir = PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, 20.0, 0.0); ZoneEqSizing.allocate(1); + DataAirLoop::AirLoopInputsFilled = true; ZoneSizingRunDone = true; ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent = false; ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(25); @@ -10490,6 +11172,9 @@ TEST_F(HVACVRFFixture, VRFTU_SysCurve_ReportOutputVerificationTest) Node(thisVRFTU.VRFTUInletNodeNum).HumRat = 0.0075; Node(thisVRFTU.VRFTUInletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); + Node(thisVRFTU.ZoneAirNode).Temp = 24.0; + Node(thisVRFTU.ZoneAirNode).HumRat = 0.0075; + Node(thisVRFTU.ZoneAirNode).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); DataEnvironment::OutDryBulbTemp = 35.0; DataEnvironment::OutHumRat = 0.0100; @@ -10511,8 +11196,24 @@ TEST_F(HVACVRFFixture, VRFTU_SysCurve_ReportOutputVerificationTest) auto &thisDXCoolingCoil(DXCoil(1)); auto &thisDXHeatingCoil(DXCoil(2)); // run the model - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + bool HeatingActive = false; + bool CoolingActive = false; + int OAUnitNum = 0; + Real64 OAUCoilOutTemp = 0.0; + bool ZoneEquipment = true; + + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); + // check model inputs ASSERT_EQ(1, NumVRFCond); ASSERT_EQ(1, NumVRFTU); @@ -12163,6 +12864,7 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) DataZoneEquipment::ZoneEquipInputsFilled = true; // denotes zone equipment has been read in StdRhoAir = PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, 20.0, 0.0); ZoneEqSizing.allocate(1); + DataAirLoop::AirLoopInputsFilled = true; ZoneSizingRunDone = true; ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent = false; ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(25); @@ -12178,7 +12880,6 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) EXPECT_FALSE(ErrorsFound); // get zone input and connections GetZoneEquipmentData(); - // ZoneInletAirNode = GetVRFTUZoneInletAirNode(VRFTUNum); GetVRFInput(); GetVRFInputFlag = false; Schedule(VRF(VRFCond).SchedPtr).CurrentValue = 1.0; @@ -12201,6 +12902,9 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) Node(thisVRFTU.VRFTUInletNodeNum).HumRat = 0.0075; Node(thisVRFTU.VRFTUInletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); + Node(thisVRFTU.ZoneAirNode).Temp = 24.0; + Node(thisVRFTU.ZoneAirNode).HumRat = 0.0075; + Node(thisVRFTU.ZoneAirNode).Enthalpy = Psychrometrics::PsyHFnTdbW(Node(thisVRFTU.VRFTUInletNodeNum).Temp, Node(thisVRFTU.VRFTUInletNodeNum).HumRat); DataEnvironment::OutDryBulbTemp = 35.0; DataEnvironment::OutHumRat = 0.0100; @@ -12223,8 +12927,24 @@ TEST_F(HVACVRFFixture, VRF_FluidTCtrl_ReportOutputVerificationTest) auto &thisDXCoolingCoil(DXCoil(1)); auto &thisDXHeatingCoil(DXCoil(2)); // run the model - SimulateVRF( - VRFTU(VRFTUNum).Name, CurZoneNum, FirstHVACIteration, SysOutputProvided, LatOutputProvided, ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr)); + bool HeatingActive = false; + bool CoolingActive = false; + int OAUnitNum = 0; + Real64 OAUCoilOutTemp = 0.0; + bool ZoneEquipment = true; + + SimulateVRF(VRFTU(VRFTUNum).Name, + FirstHVACIteration, + CurZoneNum, + ZoneEquipList(CurZoneEqNum).EquipIndex(EquipPtr), + HeatingActive, + CoolingActive, + OAUnitNum, + OAUCoilOutTemp, + ZoneEquipment, + SysOutputProvided, + LatOutputProvided); + // check model inputs ASSERT_EQ(1, NumVRFCond); ASSERT_EQ(1, NumVRFTU); @@ -12390,7 +13110,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest_HREIRFTHeat) TerminalUnitList(1).HRCoolRequest = false; TerminalUnitList(1).TotalHeatLoad = 0.0; TerminalUnitList(1).HRHeatRequest = false; - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); // increment time step DataGlobals::CurrentTime += DataGlobals::TimeStepZone; // 0.5 @@ -12427,7 +13147,7 @@ TEST_F(HVACVRFFixture, VRFTest_CondenserCalcTest_HREIRFTHeat) VRF(VRFCond).HRHeatCapTC = 0.25; // 15 min exponential rise // VRF(VRFCond).HRHeatEIRTC = 0.0; // (default) // last operating mode was heating - CalcVRFCondenser(VRFCond, false); + CalcVRFCondenser(VRFCond); EXPECT_TRUE(VRF(VRFCond).ModeChange); EXPECT_FALSE(VRF(VRFCond).HRModeChange); EXPECT_EQ(VRF(VRFCond).OperatingMode, 2); // ModeHeatingOnly diff --git a/tst/EnergyPlus/unit/UnitarySystem.unit.cc b/tst/EnergyPlus/unit/UnitarySystem.unit.cc index 74c264935e9..1c468c81d96 100644 --- a/tst/EnergyPlus/unit/UnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/UnitarySystem.unit.cc @@ -418,17 +418,16 @@ TEST_F(ZoneUnitarySysTest, Test_UnitarySystemModel_factory) ASSERT_TRUE(process_idf(idf_objects)); // call the UnitarySystem factory - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above - // verify the size of the vector and the processed names + + // verify the size of the vector and the processed names // 1 UnitarySystem objects EXPECT_EQ(1u, unitarySys.size()); @@ -468,11 +467,13 @@ TEST_F(ZoneUnitarySysTest, Test_UnitarySystemModel_factory) bool CoolingActive = false; int OAUnitNum = 0; Real64 OAUCoilOutTemp = 0.0; - bool ZoneEquipFlag = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; DataGlobals::SysSizingCalc = false; // permits unitary system sizing EXPECT_EQ(compName, thisSys->Name); // simulate function is overloaded, but only to report back SysOutputProvided and LatOutputProvided. Either signature should give same result. - thisSys->simulate(compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, ZoneEquipFlag); + thisSys->simulate( + compName, FirstHVACIteration, AirLoopNum, CompIndex, HeatingActive, CoolingActive, OAUnitNum, OAUCoilOutTemp, zoneEquipment, sensOut, latOut); EXPECT_EQ(compName, thisSys->Name); } @@ -611,13 +612,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects // call the UnitarySystem factory - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -645,8 +644,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -670,7 +672,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_TwoSpeedDXCoolCoil_Only) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // COOLING mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that cooling coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -872,13 +875,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoolCoil_Only) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects // call the UnitarySystem factory - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -906,8 +907,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoolCoil_Only) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -931,7 +935,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiSpeedDXCoolCoil_Only) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // COOLING mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that cooling coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1072,13 +1077,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -1098,8 +1101,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -1123,7 +1129,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // Heating mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1138,7 +1145,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only) DataLoopNode::Node(2).TempSetPoint = 34.0; // Heating mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate( + thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1277,13 +1285,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Only) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -1306,17 +1312,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Only) Real64 sensOut = 0.0; Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, - FirstHVACIteration, - AirLoopNum, - CompIndex, - HeatActive, - CoolActive, - ZoneOAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - sensOut, - latOut); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // expect no output since mass flow rate is 0 here since it's not defined yet EXPECT_EQ(0.0, sensOut); @@ -1344,17 +1341,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Only) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // Heating mode - thisSys->simulate(thisSys->Name, - FirstHVACIteration, - AirLoopNum, - CompIndex, - HeatActive, - CoolActive, - ZoneOAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - sensOut, - latOut); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1375,7 +1363,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageElecHeatCoil_Only) // Heating coil air outlet node = 2 DataLoopNode::Node(2).TempSetPoint = 34.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1500,13 +1489,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_ElecHeatCoil_Only) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -1526,8 +1513,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_ElecHeatCoil_Only) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -1551,7 +1541,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_ElecHeatCoil_Only) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // Heating mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1694,13 +1685,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only_ContFan ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -1720,8 +1709,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only_ContFan int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -1745,7 +1737,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only_ContFan DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // Heating mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -1761,7 +1754,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultiStageGasHeatCoil_Only_ContFan DataLoopNode::Node(2).TempSetPoint = 34.0; // Heating mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that heating coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(2).Temp, DataLoopNode::Node(2).TempSetPoint, 0.001); @@ -2155,13 +2149,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -2190,8 +2182,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node = 1 @@ -2216,7 +2211,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // COOLING mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that cooling coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(4).Temp, DataLoopNode::Node(4).TempSetPoint, 0.001); @@ -2233,7 +2229,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_MultispeedPerformance) DataLoopNode::Node(1).HumRat = 0.00693; // 11C wb DataLoopNode::Node(1).Enthalpy = 31598.76; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // cooling coil air inlet node temp is equal to cooling coil air outlet node temp since cooling coil is off EXPECT_EQ(DataLoopNode::Node(3).Temp, DataLoopNode::Node(4).Temp); @@ -2486,13 +2483,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -2533,8 +2528,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); auto unitarySystemAirInletNodeIndex = UtilityRoutines::FindItemInList("ZONE EXHAUST NODE", DataLoopNode::NodeID); // was Node 1 auto coolingCoilAirInletNodeIndex = UtilityRoutines::FindItemInList("WATER COOLING COIL AIR INLET NODE", DataLoopNode::NodeID); // was Node 3 @@ -2583,7 +2581,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl) DataGlobals::BeginEnvrnFlag = true; // act as if simulation is beginning // COOLING mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that CW coil air outlet node is at set point // TODO: FIXME: following is failing for some reason even after correcting nodes. @@ -2642,7 +2641,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl) thisSys->m_RunOnLatentLoad = true; DataLoopNode::Node(thisSys->AirOutNode).HumRatMax = 0.008; // COOLING mode - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // why doesn't water cooling coil decrease outlet air hum rat when PLR is increased? EXPECT_GT(thisSys->m_CoolingPartLoadFrac, sensOnlyPartLoadFrac); @@ -2659,7 +2659,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl) DataLoopNode::Node(unitarySystemAirInletNodeIndex).HumRat = 0.00693; // 11C wb DataLoopNode::Node(unitarySystemAirInletNodeIndex).Enthalpy = 31598.76; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // CW air inlet node temp is equal to CW air outlet node temp EXPECT_EQ(DataLoopNode::Node(coolingCoilAirInletNodeIndex).Temp, DataLoopNode::Node(coolingCoilAirOutletNodeIndex).Temp); @@ -2806,13 +2807,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) ASSERT_TRUE(process_idf(idf_objects)); // read idf objects - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -2844,8 +2843,11 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // set up node conditions to test UnitarySystem set point based control // Unitary system air inlet node @@ -2872,7 +2874,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) // Case 0 - COOLING mode - no load, sensible or latent DataLoopNode::Node(coolingCoilAirOutletNodeIndex).HumRatMax = 0.02; DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint = 30.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that CW coil air outlet node is < setpoint EXPECT_LT(DataLoopNode::Node(coolingCoilAirOutletNodeIndex).Temp, DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint); @@ -2895,7 +2898,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) // Case 1 - COOLING mode - sensible control only, no extra dehumidification required DataLoopNode::Node(coolingCoilAirOutletNodeIndex).HumRatMax = 0.02; DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint = 20.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that CW coil air outlet node is at set point EXPECT_NEAR(DataLoopNode::Node(coolingCoilAirOutletNodeIndex).Temp, DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint, 0.001); @@ -2918,7 +2922,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) // Case 2 - COOLING mode - sensible and latent load, extra dehumidification required DataLoopNode::Node(coolingCoilAirOutletNodeIndex).HumRatMax = 0.009; DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint = 20.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that CW coil air outlet node is below set point EXPECT_LT(DataLoopNode::Node(coolingCoilAirOutletNodeIndex).Temp, DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint); @@ -2941,7 +2946,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) // Case 3 - COOLING mode - only latent load DataLoopNode::Node(coolingCoilAirOutletNodeIndex).HumRatMax = 0.009; DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint = 30.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // check that CW coil air outlet node is below set point EXPECT_LT(DataLoopNode::Node(coolingCoilAirOutletNodeIndex).Temp, DataLoopNode::Node(coolingCoilAirOutletNodeIndex).TempSetPoint); @@ -2966,7 +2972,8 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_WaterCoilSPControl_Latent) DataLoopNode::Node(thisSys->AirOutNode).HumRatMax = 0.009; Real64 partLoadRatio = thisSys->m_CoolingPartLoadFrac; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // should get same answer as before EXPECT_NEAR(thisSys->m_CoolingPartLoadFrac, partLoadRatio, 0.0000001); } @@ -3257,6 +3264,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) DataEnvironment::StdRhoAir = 1.0; // Prevent divide by zero in ReportSizingManager UnitarySys thisSys; + UnitarySys *mySys(&thisSys); UnitarySystems::numUnitarySystems = 1; thisSys.UnitType = "AirLoopHVAC:UnitarySystem"; @@ -3301,7 +3309,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) // for FlowPerCoolingCapacity, do the division so sizing will yield 1.005 if (iSizingType == DataSizing::FlowPerCoolingCapacity) thisSys.m_MaxCoolAirVolFlow = 1.005 / 18827.616766698276; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1.005, thisSys.m_DesignFanVolFlowRate); EXPECT_EQ(1.005, thisSys.m_MaxCoolAirVolFlow); @@ -3320,7 +3328,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) thisSys.m_MaxNoCoolHeatAirVolFlow = DataSizing::AutoSize; thisSys.m_DesignFanVolFlowRate = DataSizing::AutoSize; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1.005, thisSys.m_DesignFanVolFlowRate); EXPECT_EQ(1.005, thisSys.m_MaxCoolAirVolFlow); @@ -3361,7 +3369,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) // for FlowPerHeatingCapacity, do the division so sizing will yield 1.005 if (iSizingType == DataSizing::FlowPerHeatingCapacity) thisSys.m_MaxHeatAirVolFlow = 1.005 / 15148.243236712493; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_NEAR(1.005, thisSys.m_DesignFanVolFlowRate, 0.0000000001); EXPECT_NEAR(1.005, thisSys.m_MaxCoolAirVolFlow, 0.0000000001); @@ -3380,7 +3388,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) thisSys.m_MaxNoCoolHeatAirVolFlow = DataSizing::AutoSize; thisSys.m_DesignFanVolFlowRate = DataSizing::AutoSize; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1.005, thisSys.m_DesignFanVolFlowRate); EXPECT_EQ(0.0, thisSys.m_MaxCoolAirVolFlow); @@ -3436,7 +3444,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ConfirmUnitarySystemSizingTest) // for FlowPerHeatingCapacity, do the division so sizing will yield 1.005 if (iHeatingSizingType == DataSizing::FlowPerHeatingCapacity) thisSys.m_MaxHeatAirVolFlow = 1.005 / 1431.9234900374995; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_NEAR(1.005, thisSys.m_DesignFanVolFlowRate, 0.0000000001); EXPECT_NEAR(1.005, thisSys.m_MaxCoolAirVolFlow, 0.0000000001); @@ -3964,13 +3972,12 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInput) DataZoneEquipment::ZoneEquipList(1).EquipIndex.allocate(1); DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -3979,7 +3986,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInput) ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects EXPECT_EQ(thisSys->UnitType, DataHVACGlobals::cFurnaceTypes(compTypeOfNum)); // compare UnitarySystem type string to valid type - DataGlobals::SysSizingCalc = true; // DISABLE SIZING - don't call UnitarySystem::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = true; // DISABLE SIZING - don't call UnitarySystem::sizeSystem, much more work needed to set up sizing arrays InletNode = thisSys->AirInNode; OutletNode = thisSys->AirOutNode; @@ -4031,8 +4038,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInput) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -4073,7 +4083,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInput) DXCoils::DXCoil(1).RatedCBF(1) = 0.1; // autosizing is disabled so initialize coil bypass factor DXCoils::DXCoil(1).RatedAirMassFlowRate(1) = 1.9268939689375426; // autosizing is disabled so initialize cooling coil rated air mass flow rate - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -4103,26 +4114,15 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInput) thisSys->m_ControlType = UnitarySys::ControlType::CCMASHRAE; // control type = 3 thisSys->m_ValidASHRAECoolCoil = true; thisSys->m_ValidASHRAEHeatCoil = true; - Real64 sysOutputProvided = 0.0; - Real64 latOutputProvided = 0.0; - - thisSys->simulate(thisSys->Name, - FirstHVACIteration, - AirLoopNum, - CompIndex, - HeatActive, - CoolActive, - ZoneOAUnitNum, - OAUCoilOutTemp, - ZoneEquipment, - sysOutputProvided, - latOutputProvided); + + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // test model performance Qsens_sys = DataLoopNode::Node(InletNode).MassFlowRate * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(OutletNode).Temp, MinHumRatio) - Psychrometrics::PsyHFnTdbW(ZoneTemp, MinHumRatio)); EXPECT_NEAR(DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired, Qsens_sys, 0.025); // Watts // test simulate function return value for sysOutputRequired - EXPECT_NEAR(DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired, sysOutputProvided, 0.025); // Watts + EXPECT_NEAR(DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired, sensOut, 0.025); // Watts EXPECT_DOUBLE_EQ(DataLoopNode::Node(InletNode).MassFlowRate, thisSys->MaxCoolAirMassFlow * thisSys->m_PartLoadFrac); // cycling fan EXPECT_DOUBLE_EQ(DataLoopNode::Node(InletNode).MassFlowRate, DataLoopNode::Node(OutletNode).MassFlowRate); } @@ -4484,12 +4484,10 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VSDXCoilSizing) DataZoneEquipment::ZoneEquipList(1).EquipIndex.allocate(1); DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInput(compName, zoneEquipment, 0); // get UnitarySystem input from object above @@ -4824,12 +4822,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils) DataZoneEquipment::ZoneEquipList(1).EquipIndex.allocate(1); DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInput(compName, zoneEquipment, 0); // get UnitarySystem input from object above @@ -4837,7 +4834,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils) ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects EXPECT_EQ(thisSys->UnitType, DataHVACGlobals::cFurnaceTypes(compTypeOfNum)); // compare UnitarySystem type string to valid type - DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeSystem, much more work needed to set up sizing arrays InletNode = thisSys->AirInNode; OutletNode = thisSys->AirOutNode; @@ -4898,8 +4895,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -4936,7 +4936,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils) DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 30.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -5283,12 +5284,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils_CyclingFan) DataZoneEquipment::ZoneEquipList(1).EquipIndex.allocate(1); DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInput(compName, zoneEquipment, 0); // get UnitarySystem input from object above @@ -5296,7 +5296,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils_CyclingFan) ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects EXPECT_EQ(thisSys->UnitType, DataHVACGlobals::cFurnaceTypes(compTypeOfNum)); // compare UnitarySystem type string to valid type - DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeSystem, much more work needed to set up sizing arrays InletNode = thisSys->AirInNode; OutletNode = thisSys->AirOutNode; @@ -5354,8 +5354,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils_CyclingFan) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -5399,7 +5402,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_VarSpeedCoils_CyclingFan) DataEnvironment::OutBaroPress = 101325.0; DataEnvironment::OutWetBulbTemp = 30.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -5602,11 +5606,10 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetBadSupplyAirMethodInput) HeatingCoils::GetCoilsInputFlag = true; HeatingCoils::HeatingCoil.deallocate(); - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -6037,12 +6040,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ReportingTest) EXPECT_FALSE(ErrorsFound); // expect no errors DataZoneEquipment::GetZoneEquipmentData(); // read zone equipment - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -6773,12 +6775,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultispeedDXCoilSizing) DataSizing::CurZoneEqNum = 1; DataSizing::ZoneEqSizing.allocate(1); - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; bool ErrorsFound = false; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -6793,7 +6794,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultispeedDXCoilSizing) bool FirstHVACIteration = true; int AirLoopNum = 0; - thisSys->sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + thisSys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects @@ -7126,12 +7127,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_WaterToAirHeatPump) DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).TypeOf_Num = DataPlant::TypeOf_CoilWAHPHeatingEquationFit; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = 9; - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool zoneEquipment = true; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -7140,7 +7140,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_WaterToAirHeatPump) ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects EXPECT_EQ(thisSys->UnitType, DataHVACGlobals::cFurnaceTypes(compTypeOfNum)); // compare UnitarySystem type string to valid type - DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeSystem, much more work needed to set up sizing arrays InletNode = thisSys->AirInNode; OutletNode = thisSys->AirOutNode; @@ -7200,8 +7200,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_WaterToAirHeatPump) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7239,7 +7242,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_WaterToAirHeatPump) DataEnvironment::OutWetBulbTemp = 30.0; // system output should match RemainingOutputRequired = -1000.0 W (cooling mode) - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7459,12 +7463,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = 6; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumOut = 7; - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -7473,7 +7476,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects EXPECT_EQ(thisSys->UnitType, DataHVACGlobals::cFurnaceTypes(compTypeOfNum)); // compare UnitarySystem type string to valid type - DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeUnitarySystem, much more work needed to set up sizing arrays + DataGlobals::SysSizingCalc = false; // DISABLE SIZING - don't call UnitarySystem::sizeSystem, much more work needed to set up sizing arrays InletNode = thisSys->AirInNode; OutletNode = thisSys->AirOutNode; @@ -7533,8 +7536,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = true; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // reset air flow control since schedule value was not update prior to GetInput usage thisSys->m_AirFlowControl = UnitarySys::UseCompFlow::UseCompressorOffFlow; @@ -7547,7 +7553,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) // HEATING LOAD // Heating Test 1 - low load, operate at min fan flow, modulate water flow to meet load // system output should match RemainingOutputRequired = 2000.0 W (heating mode) - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7584,7 +7591,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) thisSys->MaxHeatCoilFluidFlow = 0.0; // use a smaller heat load so fan heat exceeds the load and the SZVAV model will be called DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired = 800.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // test that heating coil was NOT operating due to this specific test // the fact that the unit test proceeded to here means the program did not crash EXPECT_EQ(1.0, thisSys->m_HeatingPartLoadFrac); // model tried to turn on coil @@ -7592,7 +7600,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) EXPECT_EQ(0.0, WaterCoils::WaterCoil(thisSys->m_HeatingCoilIndex).TotWaterHeatingCoilRate); EXPECT_EQ(DataLoopNode::Node(thisSys->HeatCoilInletNodeNum).Temp, DataLoopNode::Node(thisSys->HeatCoilOutletNodeNum).Temp); // reset for next unit tests - thisSys->MaxHeatCoilFluidFlow = saveSystemHeatWaterFlowRate; + UnitarySystems::unitarySys[0].MaxHeatCoilFluidFlow = saveSystemHeatWaterFlowRate; // increase heating load so that upper temperature limit is reached DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputRequired = 6000.0; // heating load @@ -7606,7 +7614,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Heating Test 2 - moderate load, operate above min fan flow, modulate water flow to meet load - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7640,7 +7649,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Heating Test 3 - high load, operate at max fan flow, modulate water flow to meet load - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7670,7 +7680,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Heating Test 4 - very high load, operate at max fan and water flow, load not met - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7715,7 +7726,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) // Cooling Test 1 - low load, operate at min fan flow, modulate water flow to meet load // system output should match RemainingOutputRequired = -2000.0 W (cooling mode) - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7751,7 +7763,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Cooling Test 2 - moderate load, operate above min fan flow, modulate water flow to meet load - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7778,7 +7791,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) EXPECT_GT(WaterCoils::WaterCoil(thisSys->m_CoolingCoilIndex).TotWaterCoolingCoilRate, 0.0); EXPECT_GT(DataLoopNode::Node(thisSys->CoolCoilInletNodeNum).Temp, DataLoopNode::Node(thisSys->CoolCoilOutletNodeNum).Temp); thisSys->MaxCoolCoilFluidFlow = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); // test that cooling coil was NOT operating due to this specific test // the fact that the unit test proceeded to here means the program did not crash EXPECT_EQ(1.0, thisSys->m_CoolingPartLoadFrac); // model tried to turn on coil @@ -7799,7 +7813,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Cooling Test 3 - high load, operate at max fan flow, modulate water flow to meet load - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -7829,7 +7844,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_ASHRAEModel_WaterCoils) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).RemainingOutputReqToHeatSP; // Cooling Test 4 - very high load, operate at max fan and water flow, load not met - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); ZoneTemp = DataLoopNode::Node(ControlZoneNum).Temp; CpAir = Psychrometrics::PsyCpAirFnW(DataLoopNode::Node(InletNode).HumRat); @@ -8358,12 +8374,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultispeedDXHeatingCoilOnly) DataSizing::CurZoneEqNum = 1; DataSizing::ZoneEqSizing.allocate(1); - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; bool ErrorsFound = false; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -8378,7 +8393,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultispeedDXHeatingCoilOnly) bool FirstHVACIteration = true; int AirLoopNum = 0; - thisSys->sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + thisSys->sizeSystem(FirstHVACIteration, AirLoopNum); DXCoils::SizeDXCoil(1); ASSERT_EQ(1, UnitarySystems::numUnitarySystems); // only 1 unitary system above so expect 1 as number of unitary system objects @@ -9155,11 +9170,10 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedCoils_SingleMode) DataZoneEquipment::ZoneEquipList(1).EquipIndex(1) = 1; // initialize equipment index for ZoneHVAC - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -9285,8 +9299,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedCoils_SingleMode) int const ZoneOAUnitNum = 0; Real64 const OAUCoilOutTemp = 0.0; bool const ZoneEquipment = false; + Real64 sensOut = 0.0; + Real64 latOut = 0.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); EXPECT_NEAR(0.953404, thisSys->m_CycRatio, 0.0001); // cycling ratio EXPECT_EQ(2, thisSys->m_CoolingSpeedNum); @@ -9307,7 +9324,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedCoils_SingleMode) DataEnvironment::OutHumRat = 0.0001; DataEnvironment::OutBaroPress = 101325.0; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); EXPECT_NEAR(0.16177, thisSys->m_CycRatio, 0.0001); // cycling ratio EXPECT_EQ(1, thisSys->m_HeatingSpeedNum); EXPECT_EQ(0.0, thisSys->m_HeatingSpeedRatio); @@ -9323,7 +9341,8 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultiSpeedCoils_SingleMode) DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).SequencedOutputRequiredToHeatingSP(1) = DataZoneEnergyDemands::ZoneSysEnergyDemand(ControlZoneNum).OutputRequiredToHeatingSP; - thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment); + thisSys->simulate(thisSys->Name, FirstHVACIteration, AirLoopNum, CompIndex, HeatActive, CoolActive, + ZoneOAUnitNum, OAUCoilOutTemp, ZoneEquipment, sensOut, latOut); EXPECT_NEAR(0.920083, thisSys->m_CycRatio, 0.0001); // cycling ratio EXPECT_EQ(3, thisSys->m_HeatingSpeedNum); EXPECT_EQ(1.0, thisSys->m_HeatingSpeedRatio); @@ -10216,12 +10235,11 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_MultispeedDXCoilHeatRecoveryHandlin DataSizing::CurZoneEqNum = 1; DataSizing::ZoneEqSizing.allocate(1); - UnitarySys mySys; - UnitarySys *thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; bool ErrorsFound = false; - thisSys = mySys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -10363,6 +10381,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_SizingWithFans) int AirLoopNum(1); bool FirstHVACIteration(true); UnitarySys thisSys; + UnitarySys *mySys(&thisSys); UnitarySystems::numUnitarySystems = 1; DataEnvironment::StdRhoAir = 1.2; // Prevent divide by zero in ReportSizingManager @@ -10391,7 +10410,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_SizingWithFans) thisSys.m_FanIndex = 2; // Fan:SystemModel is zero-based subscripts, so 2 is 3 Real64 expectedSize = 18976.394 + locDesignHeatGain3; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1.005, thisSys.m_MaxCoolAirVolFlow); EXPECT_NEAR(expectedSize, thisSys.m_DesignCoolingCapacity, 0.001); @@ -10408,7 +10427,7 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_SizingWithFans) thisSys.m_FanIndex = 1; // Fan:ConstantVolume is one-based subscripts, so 1 is 1 expectedSize = 18976.394 + locDesignHeatGain4; - thisSys.sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + mySys->sizeSystem(FirstHVACIteration, AirLoopNum); EXPECT_EQ(1.005, thisSys.m_MaxCoolAirVolFlow); EXPECT_NEAR(expectedSize, thisSys.m_DesignCoolingCapacity, 0.001); @@ -10557,15 +10576,18 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputATMixerInlet) std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - UnitarySys *thisSys = DataZoneEquipment::ZoneEquipList(1).compPointer[2]; // UnitarySystem is the 2nd in the zone equipment list + UnitarySys mySys; + HVACSystemData *thisSys = DataZoneEquipment::ZoneEquipList(1).compPointer[2]; // UnitarySystem is the 2nd in the zone equipment list DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + mySys.getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + mySys = UnitarySystems::unitarySys[0]; + EXPECT_NE(nullptr, thisSys); EXPECT_FALSE(ErrorsFound); // expect no errors - EXPECT_TRUE(thisSys->ATMixerExists); - EXPECT_EQ(DataHVACGlobals::ATMixer_InletSide, thisSys->ATMixerType); - // EXPECT_FALSE(thisSys->m_AirLoopEquipment); - EXPECT_EQ(0, thisSys->ControlZoneNum); // control zone name/index not required for setpoint control + EXPECT_TRUE(mySys.ATMixerExists); + EXPECT_EQ(DataHVACGlobals::ATMixer_InletSide, mySys.ATMixerType); + // EXPECT_FALSE(mySys.m_AirLoopEquipment); + EXPECT_EQ(0, mySys.ControlZoneNum); // control zone name/index not required for setpoint control } TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputATMixerSupply) @@ -10703,14 +10725,17 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputATMixerSupply) std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - UnitarySys *thisSys = DataZoneEquipment::ZoneEquipList(1).compPointer[2]; // UnitarySystem is the 2nd in the zone equipment list + UnitarySys mySys; + HVACSystemData *thisSys = DataZoneEquipment::ZoneEquipList(1).compPointer[2]; // UnitarySystem is the 2nd in the zone equipment list DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + mySys.getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + mySys = UnitarySystems::unitarySys[0]; + EXPECT_TRUE(thisSys); EXPECT_FALSE(ErrorsFound); // expect no errors - EXPECT_TRUE(thisSys->ATMixerExists); - EXPECT_EQ(DataHVACGlobals::ATMixer_SupplySide, thisSys->ATMixerType); - // EXPECT_FALSE(thisSys.m_AirLoopEquipment); - EXPECT_EQ(0, thisSys->ControlZoneNum); // control zone name/index not required for setpoint control + EXPECT_TRUE(mySys.ATMixerExists); + EXPECT_EQ(DataHVACGlobals::ATMixer_SupplySide, mySys.ATMixerType); + // EXPECT_FALSE(mySys.m_AirLoopEquipment); + EXPECT_EQ(0, mySys.ControlZoneNum); // control zone name/index not required for setpoint control } TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputZoneEquipment) @@ -10825,24 +10850,23 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputZoneEquipment) ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(); // call the UnitarySystem factory - UnitarySys thisSys; - UnitarySys *mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - mySys = thisSys.factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - mySys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input + thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input EXPECT_FALSE(ErrorsFound); // expect no errors - EXPECT_FALSE(mySys->ATMixerExists); - EXPECT_EQ(1, mySys->ControlZoneNum); + EXPECT_FALSE(thisSys->ATMixerExists); + EXPECT_EQ(1, thisSys->ControlZoneNum); EXPECT_EQ(DataLoopNode::NodeID(2), "EAST ZONE UNITARY SYSTEM INLET"); - EXPECT_EQ(2, mySys->AirInNode); + EXPECT_EQ(2, thisSys->AirInNode); EXPECT_EQ(DataLoopNode::NodeID(3), "EAST ZONE SUPPLY INLET"); - EXPECT_EQ(3, mySys->AirOutNode); + EXPECT_EQ(3, thisSys->AirOutNode); EXPECT_EQ(DataLoopNode::NodeID(5), "HEATING COIL AIR INLET NODE"); - EXPECT_EQ(5, mySys->HeatCoilInletNodeNum); + EXPECT_EQ(5, thisSys->HeatCoilInletNodeNum); } TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputZoneEquipmentBlankCtrlZone) @@ -10955,11 +10979,12 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputZoneEquipmentBlankCtrlZone) ASSERT_FALSE(ErrorsFound); DataZoneEquipment::GetZoneEquipmentData1(); ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(); + UnitarySys thisSys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - DataZoneEquipment::ZoneEquipList(1).compPointer[1]->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input + thisSys.getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input EXPECT_TRUE(ErrorsFound); // expect errors when control zone name is blank and Control Type = Load } @@ -11068,11 +11093,9 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FractionOfAutoSizedCoolingValueTes // call the UnitarySystem factory bool ErrorsFound = false; bool zoneEquipment = true; - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -11100,7 +11123,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FractionOfAutoSizedCoolingValueTes bool FirstHVACIteration = true; int AirLoopNum = 0; - thisSys->sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + thisSys->sizeSystem(FirstHVACIteration, AirLoopNum); // check autosized cooling and heating flow rates EXPECT_EQ(thisSys->m_MaxCoolAirVolFlow, 1.5); EXPECT_EQ(thisSys->m_MaxHeatAirVolFlow, 1.5); @@ -11213,11 +11236,9 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) // call the UnitarySystem factory bool ErrorsFound = false; bool zoneEquipment = true; - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above @@ -11244,7 +11265,7 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) bool FirstHVACIteration = true; int AirLoopNum = 0; - thisSys->sizeUnitarySystem(FirstHVACIteration, AirLoopNum); + thisSys->sizeSystem(FirstHVACIteration, AirLoopNum); // check autosized cooling and heating flow rates EXPECT_EQ(thisSys->m_MaxCoolAirVolFlow, 1.5); EXPECT_EQ(thisSys->m_MaxHeatAirVolFlow, 1.5); @@ -11252,10 +11273,10 @@ TEST_F(ZoneUnitarySysTest, UnitarySystemModel_FlowPerCoolingCapacityTest) EXPECT_EQ(thisSys->m_MaxNoCoolHeatAirVolFlow, userspecifiedFlowPerCoolingCapacityValue * thisSys->m_DesignCoolingCapacity); } -TEST_F( ZoneUnitarySysTest, UnitarySystemModel_getUnitarySystemInputDataTest ) +TEST_F(ZoneUnitarySysTest, UnitarySystemModel_getUnitarySystemInputDataTest) { - std::string const idf_objects = delimited_string( { + std::string const idf_objects = delimited_string({ " AirLoopHVAC:UnitarySystem,", " Unitary System Model, !- Name", @@ -11380,65 +11401,64 @@ TEST_F( ZoneUnitarySysTest, UnitarySystemModel_getUnitarySystemInputDataTest ) " Supplemental Heating Coil Inlet Node, !- Air Inlet Node Name", " Node 30; !- Air Outlet Node Name", - } ); + }); - ASSERT_TRUE( process_idf( idf_objects ) ); // read idf objects + ASSERT_TRUE(process_idf(idf_objects)); // read idf objects // call the UnitarySystem factory bool ErrorsFound = false; bool zoneEquipment = true; - UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; - UnitarySys *thisSys; - thisSys = mySys.factory( compTypeOfNum, compName, zoneEquipment, 0 ); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; - DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available - thisSys->getUnitarySystemInputData( compName, zoneEquipment, 0, ErrorsFound ); // get UnitarySystem input from object above - EXPECT_FALSE( ErrorsFound ); // expect no errors + DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available + thisSys->getUnitarySystemInputData(compName, zoneEquipment, 0, ErrorsFound); // get UnitarySystem input from object above + EXPECT_FALSE(ErrorsFound); // expect no errors // check each input fields of unitary system - EXPECT_EQ("UNITARY SYSTEM MODEL", thisSys->Name ); // checks object name - EXPECT_EQ(UnitarySys::ControlType::Load, thisSys->m_ControlType ); // checks control type - EXPECT_EQ(UnitarySys::DehumCtrlType::None, thisSys->m_DehumidControlType_Num ); // checks Dehumidification Control type type - EXPECT_EQ(UtilityRoutines::FindItemInList("EAST ZONE", DataHeatBalance::Zone), thisSys->ControlZoneNum ); // checks zone ID - EXPECT_EQ(DataGlobals::ScheduleAlwaysOn, thisSys->m_SysAvailSchedPtr ); // checks availability schedule name - EXPECT_EQ("NODE 29", DataLoopNode::NodeID(thisSys->AirInNode) ); // checks air inlet node name - EXPECT_EQ("NODE 30", DataLoopNode::NodeID(thisSys->AirOutNode) ); // checks air outlet node name - EXPECT_EQ(DataHVACGlobals::FanType_SimpleOnOff, thisSys->m_FanType_Num ); // checks fan object type "FAN:ONOFF" - EXPECT_EQ("SUPPLY FAN", thisSys->m_FanName ); // checks fan object name - EXPECT_EQ(UnitarySys::FanPlace::DrawThru, thisSys->m_FanPlace ); // checks fan placement, "DrawThrough" - EXPECT_EQ(0, thisSys->m_FanOpModeSchedPtr ); // checks Supply Air Fan Operating Mode Schedule Name - EXPECT_EQ("COIL:HEATING:WATER", thisSys->m_HeatingCoilTypeName ); // checks heating coil object type - EXPECT_EQ("WATER HEATING COIL", thisSys->m_HeatingCoilName ); // checks heating coil object type - EXPECT_EQ(1, thisSys->m_HeatingSizingRatio ); // checks dx heating coil sizing ratio - EXPECT_EQ(DataHVACGlobals::Coil_CoolingWater, thisSys->m_CoolingCoilType_Num ); // checks cooling coil object type - EXPECT_EQ("WATER COOLING COIL", thisSys->m_CoolingCoilName ); // checks cooling coil name - EXPECT_FALSE( thisSys->m_ISHundredPercentDOASDXCoil ); // checks DX Coil is for DOAS use - EXPECT_EQ(7.0, thisSys->DesignMinOutletTemp ); // checks minimum supply air temperature - EXPECT_TRUE( thisSys->m_RunOnSensibleLoad ); // checks for "SENSIBLEONLYLOADCONTROL" - EXPECT_EQ("COIL:HEATING:FUEL", thisSys->m_SuppHeatCoilTypeName ); // checks supplemental heating coil object type - EXPECT_EQ("SUPPLEMENTAL HEATING COIL", thisSys->m_SuppHeatCoilName ); // checks supplemental heating coil name - EXPECT_EQ(4, thisSys->m_CoolingSAFMethod ); // checks cooling supply air flow rate sizing method, FractionOfAutosizedCoolingAirflow - EXPECT_EQ(0.5, thisSys->m_MaxCoolAirVolFlow ); // checks Cooling Fraction of Autosized Cooling Supply Air Flow Rate value - EXPECT_EQ(5, thisSys->m_HeatingSAFMethod ); // checks cooling supply air flow rate sizing method, FractionOfAutosizedHeatingAirflow - EXPECT_EQ(0.8, thisSys->m_MaxHeatAirVolFlow ); // checks Heating Fraction of Autosized Heating Supply Air Flow Rate value - EXPECT_EQ(6, thisSys->m_NoCoolHeatSAFMethod ); // checks cooling supply air flow rate sizing method, FlowPerCoolingCapacity - EXPECT_EQ(0.0000462180155978106, thisSys->m_MaxNoCoolHeatAirVolFlow ); // checks Heating Fraction of Autosized Heating Supply Air Flow Rate value - EXPECT_EQ(30.0, thisSys->DesignMaxOutletTemp ); // checks Maximum Supply Air Temperature value - EXPECT_EQ(20.0, thisSys->m_MaxOATSuppHeat ); // checks Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation value - EXPECT_EQ("SYSTEM OUTDOOR AIR NODE", DataLoopNode::NodeID(thisSys->m_CondenserNodeNum) ); // checks condenser air inlet node name - EXPECT_EQ(3.0, thisSys->m_MaxONOFFCyclesperHour ); // checks Maximum Cycling Rate value - EXPECT_EQ(120.0, thisSys->m_HPTimeConstant ); // checks Heat Pump Time Constant value - EXPECT_EQ(0.02, thisSys->m_OnCyclePowerFraction ); // checks Fraction of On-Cycle Power Use value - EXPECT_EQ(90.0, thisSys->m_FanDelayTime ); // checks Heat Pump Fan Delay Time value - EXPECT_EQ(40.0, thisSys->m_AncillaryOnPower ); // checks Ancillary On-Cycle Electric Power value - EXPECT_EQ(10.0, thisSys->m_AncillaryOffPower ); // checks Ancillary Off-Cycle Electric Power value - EXPECT_EQ(0.005, thisSys->m_DesignHRWaterVolumeFlow ); // checks Design Heat Recovery Water Flow Rate value - EXPECT_EQ(75.0, thisSys->m_MaxHROutletWaterTemp ); // checks Maximum Temperature for Heat Recovery value - EXPECT_EQ("WATER INLET NODE NAME", DataLoopNode::NodeID(thisSys->m_HeatRecoveryInletNodeNum) ); // checks Heat Recovery Water Inlet Node Name ID - EXPECT_EQ("WATER OUTLET NODE NAME", DataLoopNode::NodeID(thisSys->m_HeatRecoveryOutletNodeNum) ); // checks Heat Recovery Water Outlet Node Name ID - EXPECT_EQ("UNITARYSYSTEMPERFORMANCE:MULTISPEED", thisSys->m_DesignSpecMultispeedHPType ); // checks design_specification_multispeed_object_type value - EXPECT_EQ("MULTISPEED PERFORMANCE", thisSys->m_DesignSpecMultispeedHPName ); // checks design_specification_multispeed_object_name value + EXPECT_EQ("UNITARY SYSTEM MODEL", thisSys->Name); // checks object name + EXPECT_EQ(UnitarySys::ControlType::Load, thisSys->m_ControlType); // checks control type + EXPECT_EQ(UnitarySys::DehumCtrlType::None, thisSys->m_DehumidControlType_Num); // checks Dehumidification Control type type + EXPECT_EQ(UtilityRoutines::FindItemInList("EAST ZONE", DataHeatBalance::Zone), thisSys->ControlZoneNum); // checks zone ID + EXPECT_EQ(DataGlobals::ScheduleAlwaysOn, thisSys->m_SysAvailSchedPtr); // checks availability schedule name + EXPECT_EQ("NODE 29", DataLoopNode::NodeID(thisSys->AirInNode)); // checks air inlet node name + EXPECT_EQ("NODE 30", DataLoopNode::NodeID(thisSys->AirOutNode)); // checks air outlet node name + EXPECT_EQ(DataHVACGlobals::FanType_SimpleOnOff, thisSys->m_FanType_Num); // checks fan object type "FAN:ONOFF" + EXPECT_EQ("SUPPLY FAN", thisSys->m_FanName); // checks fan object name + EXPECT_EQ(UnitarySys::FanPlace::DrawThru, thisSys->m_FanPlace); // checks fan placement, "DrawThrough" + EXPECT_EQ(0, thisSys->m_FanOpModeSchedPtr); // checks Supply Air Fan Operating Mode Schedule Name + EXPECT_EQ("COIL:HEATING:WATER", thisSys->m_HeatingCoilTypeName); // checks heating coil object type + EXPECT_EQ("WATER HEATING COIL", thisSys->m_HeatingCoilName); // checks heating coil object type + EXPECT_EQ(1, thisSys->m_HeatingSizingRatio); // checks dx heating coil sizing ratio + EXPECT_EQ(DataHVACGlobals::Coil_CoolingWater, thisSys->m_CoolingCoilType_Num); // checks cooling coil object type + EXPECT_EQ("WATER COOLING COIL", thisSys->m_CoolingCoilName); // checks cooling coil name + EXPECT_FALSE(thisSys->m_ISHundredPercentDOASDXCoil); // checks DX Coil is for DOAS use + EXPECT_EQ(7.0, thisSys->DesignMinOutletTemp); // checks minimum supply air temperature + EXPECT_TRUE(thisSys->m_RunOnSensibleLoad); // checks for "SENSIBLEONLYLOADCONTROL" + EXPECT_EQ("COIL:HEATING:FUEL", thisSys->m_SuppHeatCoilTypeName); // checks supplemental heating coil object type + EXPECT_EQ("SUPPLEMENTAL HEATING COIL", thisSys->m_SuppHeatCoilName); // checks supplemental heating coil name + EXPECT_EQ(4, thisSys->m_CoolingSAFMethod); // checks cooling supply air flow rate sizing method, FractionOfAutosizedCoolingAirflow + EXPECT_EQ(0.5, thisSys->m_MaxCoolAirVolFlow); // checks Cooling Fraction of Autosized Cooling Supply Air Flow Rate value + EXPECT_EQ(5, thisSys->m_HeatingSAFMethod); // checks cooling supply air flow rate sizing method, FractionOfAutosizedHeatingAirflow + EXPECT_EQ(0.8, thisSys->m_MaxHeatAirVolFlow); // checks Heating Fraction of Autosized Heating Supply Air Flow Rate value + EXPECT_EQ(6, thisSys->m_NoCoolHeatSAFMethod); // checks cooling supply air flow rate sizing method, FlowPerCoolingCapacity + EXPECT_EQ(0.0000462180155978106, thisSys->m_MaxNoCoolHeatAirVolFlow); // checks Heating Fraction of Autosized Heating Supply Air Flow Rate value + EXPECT_EQ(30.0, thisSys->DesignMaxOutletTemp); // checks Maximum Supply Air Temperature value + EXPECT_EQ(20.0, thisSys->m_MaxOATSuppHeat); // checks Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation value + EXPECT_EQ("SYSTEM OUTDOOR AIR NODE", DataLoopNode::NodeID(thisSys->m_CondenserNodeNum)); // checks condenser air inlet node name + EXPECT_EQ(3.0, thisSys->m_MaxONOFFCyclesperHour); // checks Maximum Cycling Rate value + EXPECT_EQ(120.0, thisSys->m_HPTimeConstant); // checks Heat Pump Time Constant value + EXPECT_EQ(0.02, thisSys->m_OnCyclePowerFraction); // checks Fraction of On-Cycle Power Use value + EXPECT_EQ(90.0, thisSys->m_FanDelayTime); // checks Heat Pump Fan Delay Time value + EXPECT_EQ(40.0, thisSys->m_AncillaryOnPower); // checks Ancillary On-Cycle Electric Power value + EXPECT_EQ(10.0, thisSys->m_AncillaryOffPower); // checks Ancillary Off-Cycle Electric Power value + EXPECT_EQ(0.005, thisSys->m_DesignHRWaterVolumeFlow); // checks Design Heat Recovery Water Flow Rate value + EXPECT_EQ(75.0, thisSys->m_MaxHROutletWaterTemp); // checks Maximum Temperature for Heat Recovery value + EXPECT_EQ("WATER INLET NODE NAME", DataLoopNode::NodeID(thisSys->m_HeatRecoveryInletNodeNum)); // checks Heat Recovery Water Inlet Node Name ID + EXPECT_EQ("WATER OUTLET NODE NAME", DataLoopNode::NodeID(thisSys->m_HeatRecoveryOutletNodeNum)); // checks Heat Recovery Water Outlet Node Name ID + EXPECT_EQ("UNITARYSYSTEMPERFORMANCE:MULTISPEED", + thisSys->m_DesignSpecMultispeedHPType); // checks design_specification_multispeed_object_type value + EXPECT_EQ("MULTISPEED PERFORMANCE", thisSys->m_DesignSpecMultispeedHPName); // checks design_specification_multispeed_object_name value } TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputwithTradeOff) @@ -11660,10 +11680,9 @@ TEST_F(EnergyPlusFixture, UnitarySystemModel_GetInputwithTradeOff) UnitarySys mySys; std::string compName = "UNITARY SYSTEM MODEL"; bool zoneEquipment = true; - int compTypeOfNum = DataHVACGlobals::UnitarySys_AnyCoilType; FirstHVACIteration = true; - UnitarySys *thisSys; - thisSys = mySys.factory(compTypeOfNum, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys::factory(DataHVACGlobals::UnitarySys_AnyCoilType, compName, zoneEquipment, 0); + UnitarySystems::UnitarySys *thisSys = &UnitarySystems::unitarySys[0]; DataGlobals::DoCoilDirectSolutions = true; DataZoneEquipment::ZoneEquipInputsFilled = true; // indicate zone data is available