diff --git a/bin/IDFEditor/IDFEditor.exe b/bin/IDFEditor/IDFEditor.exe index 42e6fe818d3..0e4434456c8 100644 Binary files a/bin/IDFEditor/IDFEditor.exe and b/bin/IDFEditor/IDFEditor.exe differ diff --git a/doc/engineering-reference/src/alternative-modeling-processes.tex b/doc/engineering-reference/src/alternative-modeling-processes.tex index 0bd5d41fe17..16d9c3c1a77 100644 --- a/doc/engineering-reference/src/alternative-modeling-processes.tex +++ b/doc/engineering-reference/src/alternative-modeling-processes.tex @@ -404,14 +404,14 @@ \subsubsection{Step 3}\label{step-3} {\scriptsize \begin{equation} -T_{fl} = (C_{air,fl} \cdot (3 \cdot T_{ - 1,fl} - (3/2) \cdot T_{ - 2,fl} + (1/3) \cdot T_{ - 3,fl}) + HAT_{fl} + MCPT_{tot}) / ((11/6) \cdot C_{air,fl} + HA_{fl} + MCP_{tot}) +T_{fl} = (C_{air,fl} \cdot (3 \cdot T_{ - 1,fl} - (3/2) \cdot T_{ - 2,fl} + (1/3) \cdot T_{ - 3,fl}) + HAT_{fl} + MCPT_{tot} + 0.6 \cdot T_{oc} \cdot MCPT_{tot}) / ((11/6) \cdot C_{air,fl} + HA_{fl} + 1.6 \cdot MCP_{tot}) \end{equation}} {\scriptsize \begin{equation} \begin{array}{l} - T_{oc} = (C_{air,oc} \cdot (3 \cdot T_{ - 1,oc} - (3/2) \cdot T_{ - 2,oc} + (1/3) \cdot T_{ - 3,oc}) + \dot Q_{ocz} \cdot Fr_{gains} + HAT_{oc} + T_{fl} \cdot MCP_{tot}) \\ - / ((11/6) \cdot C_{air,oc} + HA_{oc} + MCP_{tot}) + T_{oc} = (C_{air,oc} \cdot (3 \cdot T_{ - 1,oc} - (3/2) \cdot T_{ - 2,oc} + (1/3) \cdot T_{ - 3,oc}) + \dot Q_{ocz} \cdot Fr_{gains} + HAT_{oc} + 1.6 \cdot T_{fl} \cdot MCP_{tot}) \\ + / ((11/6) \cdot C_{air,oc} + HA_{oc} + 1.6 \cdot MCP_{tot}) \end{array} \end{equation}} diff --git a/doc/engineering-reference/src/surface-heat-balance-manager-processes/ground-heat-transfer-calculations-using-kiva.tex b/doc/engineering-reference/src/surface-heat-balance-manager-processes/ground-heat-transfer-calculations-using-kiva.tex index dde62424a39..94baf7fde25 100644 --- a/doc/engineering-reference/src/surface-heat-balance-manager-processes/ground-heat-transfer-calculations-using-kiva.tex +++ b/doc/engineering-reference/src/surface-heat-balance-manager-processes/ground-heat-transfer-calculations-using-kiva.tex @@ -289,9 +289,9 @@ \subsection{Warm-Up}\label{warm-up} history and likely take much longer to converge. \end{itemize} -In light of these limitations, the ground is initialized using a -steady-state solution with the boundary conditions defined at the -beginning of the year. +Instead, Kiva instances are initialized independently from the rest of the simulation using the accelerated initialization method developed by Kruis (2015). This method looks back in the weather file and simulates long timestep (on the order of weeks or months) calculations using an implicit numerical scheme. These long timesteps allow Kiva to capture a long term history of the ground without running the entire building model. + +The initialization of the ground relies on assumptions of indoor air temperatures (as they are not yet calculated by EnergyPlus). When a thermostat is assigned to a zone with Kiva foundation surfaces, the assumed temperature is equal to the setpoint (or a weighted average of heating and cooling setpoints depending on outdoor temperature). For zones without thermostats, a constant 22 \textsuperscript{o}C indoor temperature is assumed. \subsection{Validation}\label{validation} @@ -304,17 +304,15 @@ \subsection{References}\label{references} Framework for Improving Foundation Heat Transfer Calculations,'' Journal of Building Performance Simulation, vol.~8, no. 6, pp.~449-468, 2015. -{[}2{]} N. Kruis and M. Krarti, ``Three-dimensional accuracy with +{[}2{]} N. Kruis, ``Development and Application of a Numerical Framework for Improving Building Foundation Heat Transfer Calculations,'' +Ph.D. Dissertation. University of Colorado, 2015. + +{[}3{]} N. Kruis and M. Krarti, ``Three-dimensional accuracy with two-dimensional computation speed: using the Kiva\textsuperscript{TM} numerical framework to improve foundation heat transfer calculations,'' Journal of Building Performance Simulation, vol.~10, no. 2, pp.~161?182, 2017. -{[}3{]} N. Kruis and M. Krarti, ``Three-Dimensional Accuracy with -Two-Dimensional Computation Speed: Using the Kiva\textsuperscript{TM} -Numerical Framework to Improve Foundation Heat Transfer Calculations,'' -Journal of Building Performance Simulation, in-publication. - {[}4{]} T. Williams and A. Williamson, ``Estimating Water-Table Altitudes for Regional Ground-Water Flow Modeling, U.S. Gulf Coast,'' Ground Water, vol.~27, no. 3, pp.~333-340, 1989. diff --git a/doc/input-output-reference/src/overview/group-fans.tex b/doc/input-output-reference/src/overview/group-fans.tex index 757961bd77d..5d85cc7645f 100644 --- a/doc/input-output-reference/src/overview/group-fans.tex +++ b/doc/input-output-reference/src/overview/group-fans.tex @@ -76,11 +76,11 @@ \subsubsection{Inputs}\label{inputs-fansysmodel} \paragraph{Field: Design Power Sizing Method}\label{field-design-power-sizing-method} -This field is used to select how the fan's Design Electric Power Consumption is sized when the previous field is set to autosize. There are three choices: PowerPerFlow, PowerPerFlowPerPressure, or TotalEfficiency. The default is PowerPerFlowPerPressure. +This field is used to select how the fan's Design Electric Power Consumption is sized when the previous field is set to autosize. There are three choices: PowerPerFlow, PowerPerFlowPerPressure, or TotalEfficiencyAndPressure. The default is PowerPerFlowPerPressure. When PowerPerFlow is selected, the value entered in the input field called Electric Power Per Unit Flow Rate is used to size the Design Electric Power Consumption. This method is useful during early-phase design modeling when little information is available for determining the Design Pressure Rise. Although the pressure rise is not used to size the Design Electric Power Consumption it is still used to determine the heat added to the air stream as a result of the work done by the fan. When PowerPerFlowPerPressure is selected, the value entered in the input field called Electric Power Per Unit Flow Rate Per Unit Pressure is used to size the power. This method takes into account the Design Pressure Rise when sizing the Design Electric Power Consumption. -When TotalEfficiency is selected, the value entered in the input field called Fan Total Efficiency is used to size the power. This is the legacy method used by the older fan objects prior to verson 8.6. +When TotalEfficiencyAndPressure is selected, the values entered in the input fields called Fan Total Efficiency and Design Pressure Rise are used to size the power. This is the legacy method used by the older fan objects prior to verson 8.6. \paragraph{Field: Electric Power Per Unit Flow Rate}\label{field-power-per-unit-flow-fansysmodel} diff --git a/doc/input-output-reference/src/overview/group-setpoint-managers.tex b/doc/input-output-reference/src/overview/group-setpoint-managers.tex index c307eb8290f..374360f9a8f 100644 --- a/doc/input-output-reference/src/overview/group-setpoint-managers.tex +++ b/doc/input-output-reference/src/overview/group-setpoint-managers.tex @@ -738,7 +738,7 @@ \subsubsection{Inputs}\label{inputs-10-018} \subsection{SetpointManager:Coldest}\label{setpointmanagercoldest} -The Coldest Setpoint Manager is used in dual duct systems to reset the setpoint temperature of the air in the heating supply duct. Usually it is used in conjunction with a SetpointManager:Warmest resetting the temperature of the air in the cooling supply duct. For each zone in the system at each system timestep, the manager calculates a supply air temperature that will meet the zone heating load at the maximum zone supply air flow rate. The highest of the possible supply air temperatures becomes the new supply air temperature setpoint, subject to minimum and maximum supply air temperature constraints. The resulting temperature setpoint is the lowest supply air temperature that will meet the heating requirements of all the zones. When compared to a fixed heating supply air temperature setpoint, this strategy minimizes central boiler energy consumption (if the hot water temperature is also reset or there are variable speed pumps) at the cost of possible increased fan energy (if there is variable volume control in the air system). +The Coldest Setpoint Manager is used in dual duct systems to reset the setpoint temperature of the air in the heating supply duct or in single duct systems to reset the setpoint temperature of the air for central heating coils. Usually it is used in conjunction with a SetpointManager:Warmest resetting the temperature of the air in the cooling supply duct. For each zone in the system at each system timestep, the manager calculates a supply air temperature that will meet the zone heating load at the maximum zone supply air flow rate. The highest of the possible supply air temperatures becomes the new supply air temperature setpoint, subject to minimum and maximum supply air temperature constraints. The resulting temperature setpoint is the lowest supply air temperature that will meet the heating requirements of all the zones. When compared to a fixed heating supply air temperature setpoint, this strategy minimizes central boiler energy consumption (if the hot water temperature is also reset or there are variable speed pumps) at the cost of possible increased fan energy (if there is variable volume control in the air system). \subsubsection{Inputs}\label{inputs-11-017} diff --git a/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex b/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex index 71fe8501566..efe4948f8d8 100644 --- a/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex +++ b/doc/input-output-reference/src/overview/group-thermal-zone-description-geometry.tex @@ -217,7 +217,7 @@ \subsubsection{Zone Air Heat Balance Outdoor Air Transfer Rate {[}W{]}}\label{zo \subsubsection{Zone Air Heat Balance System Air Transfer Rate {[}W{]}}\label{zone-air-heat-balance-system-air-transfer-rate-w} -The Zone Air Heat Balance System Air Transfer Rate is the sum, in watts, of heat transferred to the zone air by HVAC forced-air systems and air terminal units. Such HVAC systems are connected to the zone by an inlet node (see ZoneHVAC:EquipmentConnections input field called Zone Air Inlet Node or Node List Name) This field is not multiplied by zone or group multipliers. +The Zone Air Heat Balance System Air Transfer Rate is the sum, in watts, of heat transferred to the zone air by HVAC forced-air systems and air terminal units. Such HVAC systems are connected to the zone by an inlet node (see ZoneHVAC:EquipmentConnections input field called Zone Air Inlet Node or Node List Name) This field is not multiplied by zone or group multipliers. The Zone Air Heat Balance System Air Transfer Rate may not agree exactly with the equipment-level delivered energy transfer rate when the zone temperature is changing significantly over a timestep (e.g. during thermostat setback and setup), but the energy will balance out over time. \subsubsection{Zone Air Heat Balance System Convective Heat Gain Rate {[}W{]}}\label{zone-air-heat-balance-system-convective-heat-gain-rate-w} @@ -4853,11 +4853,11 @@ \subsubsection{Zone Air System Sensible Cooling Energy {[}J{]}}\label{zone-air-s \subsubsection{Zone Air System Sensible Heating Rate {[}W{]}}\label{zone-air-system-sensible-heating-rate-w-1} -This field represents the sensible heating rate in Watts that is actually supplied by the system to that zone for the timestep reported. This is calculated and reported from the Correct step in the Zone Predictor-Corrector module. This field is not multiplied by zone or group multipliers. +This field represents the sensible heating rate in Watts that is actually supplied by the system to that zone for the timestep reported. This is calculated and reported from the Correct step in the Zone Predictor-Corrector module. This field is not multiplied by zone or group multipliers. The Zone Air System Sensible Heating Rate may not agree exactly with the equipment-level delivered energy transfer rate when the zone temperature is changing significantly over a timestep (e.g. during thermostat setback and setup), but the energy will balance out over time. \subsubsection{Zone Air System Sensible Cooling Rate {[}W{]}}\label{zone-air-system-sensible-cooling-rate-w-1} -This field represents the sensible cooling rate in Watts that is actually supplied by the system to that zone for the timestep reported. This is calculated and reported from the Correct step in the Zone Predictor-Corrector module. This field is not multiplied by zone or group multipliers. +This field represents the sensible cooling rate in Watts that is actually supplied by the system to that zone for the timestep reported. This is calculated and reported from the Correct step in the Zone Predictor-Corrector module. This field is not multiplied by zone or group multipliers. The Zone Air System Sensible Cooling Rate may not agree exactly with the equipment-level delivered energy transfer rate when the zone temperature is changing significantly over a timestep (e.g. during thermostat setback and setup), but the energy will balance out over time. \subsubsection{Zone Air Humidity Ratio{[}kgWater/kgDryAir{]}}\label{zone-air-humidity-ratiokgwaterkgdryair} diff --git a/src/EnergyPlus/AirflowNetworkBalanceManager.cc b/src/EnergyPlus/AirflowNetworkBalanceManager.cc index 94c78b64684..5997ff92fb0 100644 --- a/src/EnergyPlus/AirflowNetworkBalanceManager.cc +++ b/src/EnergyPlus/AirflowNetworkBalanceManager.cc @@ -4602,7 +4602,10 @@ namespace AirflowNetworkBalanceManager { AirflowNetworkVentingControl( i, MultizoneSurfaceData( i ).OpenFactor ); } MultizoneSurfaceData( i ).OpenFactor *= MultizoneSurfaceData( i ).WindModifier; - if ( MultizoneSurfaceData( i ).HybridVentClose ) MultizoneSurfaceData( i ).OpenFactor = 0.0; + if ( MultizoneSurfaceData( i ).HybridVentClose ) { + MultizoneSurfaceData( i ).OpenFactor = 0.0; + if ( SurfaceWindow( j ).VentingOpenFactorMultRep > 0.0 ) SurfaceWindow( j ).VentingOpenFactorMultRep = 0.0; + } if ( AirflowNetworkFanActivated && ( SimulateAirflowNetwork > AirflowNetworkControlMultizone ) && MultizoneSurfaceData( i ).OpenFactor > 0.0 && ( Surface( j ).ExtBoundCond == ExternalEnvironment || ( Surface( MultizoneSurfaceData( i ).SurfNum ).ExtBoundCond == OtherSideCoefNoCalcExt && Surface( MultizoneSurfaceData( i ).SurfNum ).ExtWind ) ) && ! WarmupFlag ) { // Exterior Large opening only diff --git a/src/EnergyPlus/BoilerSteam.cc b/src/EnergyPlus/BoilerSteam.cc index 5881b5535d4..5666971fb62 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -686,7 +686,6 @@ namespace BoilerSteam { LatentEnthSteam = EnthSteamOutDry - EnthSteamOutWet; CpWater = GetSatSpecificHeatRefrig( FluidNameSteam, SizingTemp, 0.0, Boiler( BoilerNum ).FluidIndex, RoutineName ); tmpNomCap = ( CpWater * SteamDensity * Boiler( BoilerNum ).SizFac * PlantSizData( PltSizNum ).DeltaT * PlantSizData( PltSizNum ).DesVolFlowRate + PlantSizData( PltSizNum ).DesVolFlowRate * SteamDensity * LatentEnthSteam ); - if ( ! Boiler( BoilerNum ).NomCapWasAutoSized ) tmpNomCap = Boiler( BoilerNum ).NomCap; } else { if ( Boiler( BoilerNum ).NomCapWasAutoSized ) tmpNomCap = 0.0; } diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index 5a0603cbdac..fcaa4bc4cc2 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -728,8 +728,6 @@ namespace Boilers { rho = GetDensityGlycol( PlantLoop( Boiler( BoilerNum ).LoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( Boiler( BoilerNum ).LoopNum ).FluidIndex, RoutineName ); Cp = GetSpecificHeatGlycol( PlantLoop( Boiler( BoilerNum ).LoopNum ).FluidName, Boiler( BoilerNum ).TempDesBoilerOut, PlantLoop( Boiler( BoilerNum ).LoopNum ).FluidIndex, RoutineName ); tmpNomCap = Cp * rho * Boiler( BoilerNum ).SizFac * PlantSizData( PltSizNum ).DeltaT * PlantSizData( PltSizNum ).DesVolFlowRate; - if ( ! Boiler( BoilerNum ).NomCapWasAutoSized ) tmpNomCap = Boiler( BoilerNum ).NomCap; - } else { if ( Boiler( BoilerNum ).NomCapWasAutoSized ) tmpNomCap = 0.0; @@ -781,7 +779,6 @@ namespace Boilers { if ( PltSizNum > 0 ) { if ( PlantSizData( PltSizNum ).DesVolFlowRate >= SmallWaterVolFlow ) { tmpBoilerVolFlowRate = PlantSizData( PltSizNum ).DesVolFlowRate * Boiler( BoilerNum ).SizFac; - if ( ! Boiler( BoilerNum ).VolFlowRateWasAutoSized ) tmpBoilerVolFlowRate = Boiler( BoilerNum ).VolFlowRate; } else { if ( Boiler( BoilerNum ).VolFlowRateWasAutoSized ) tmpBoilerVolFlowRate = 0.0; } diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 6c45ed6bb02..5bfc1bed0e2 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1176,10 +1176,7 @@ namespace ChillerElectricEIR { Real64 CondVolFlowRateUser( 0.0 ); if ( ElectricEIRChiller( EIRChillNum ).CondenserType == WaterCooled ) { - if ( ElectricEIRChiller( EIRChillNum ).CondVolFlowRateWasAutoSized ) { - PltSizCondNum = PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).PlantSizNum; - } - + PltSizCondNum = PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).PlantSizNum; } // find the appropriate Plant Sizing object @@ -1188,8 +1185,6 @@ namespace ChillerElectricEIR { if ( PltSizNum > 0 ) { if ( PlantSizData( PltSizNum ).DesVolFlowRate >= SmallWaterVolFlow ) { tmpEvapVolFlowRate = PlantSizData( PltSizNum ).DesVolFlowRate * ElectricEIRChiller( EIRChillNum ).SizFac; - if ( ! ElectricEIRChiller( EIRChillNum ).EvapVolFlowRateWasAutoSized ) tmpEvapVolFlowRate = ElectricEIRChiller( EIRChillNum ).EvapVolFlowRate; - } else { if ( ElectricEIRChiller( EIRChillNum ).EvapVolFlowRateWasAutoSized ) tmpEvapVolFlowRate = 0.0; @@ -1245,7 +1240,6 @@ namespace ChillerElectricEIR { rho = GetDensityGlycol( PlantLoop( ElectricEIRChiller( EIRChillNum ).CWLoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( ElectricEIRChiller( EIRChillNum ).CWLoopNum ).FluidIndex, RoutineName ); tmpNomCap = Cp * rho * PlantSizData( PltSizNum ).DeltaT * tmpEvapVolFlowRate; - if ( ! ElectricEIRChiller( EIRChillNum ).RefCapWasAutoSized ) tmpNomCap = ElectricEIRChiller( EIRChillNum ).RefCap; } else { tmpNomCap = 0.0; } @@ -1298,10 +1292,8 @@ namespace ChillerElectricEIR { if ( PlantSizData( PltSizNum ).DesVolFlowRate >= SmallWaterVolFlow && tmpNomCap > 0.0 ) { rho = GetDensityGlycol( PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).FluidIndex, RoutineName ); - Cp = GetSpecificHeatGlycol( PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).FluidName, ElectricEIRChiller( EIRChillNum ).TempRefCondIn, PlantLoop( ElectricEIRChiller( EIRChillNum ).CDLoopNum ).FluidIndex, RoutineName ); tmpCondVolFlowRate = tmpNomCap * ( 1.0 + ( 1.0 / ElectricEIRChiller( EIRChillNum ).RefCOP ) * ElectricEIRChiller( EIRChillNum ).CompPowerToCondenserFrac ) / ( PlantSizData( PltSizCondNum ).DeltaT * Cp * rho ); - if ( ! ElectricEIRChiller( EIRChillNum ).CondVolFlowRateWasAutoSized ) tmpCondVolFlowRate = ElectricEIRChiller( EIRChillNum ).CondVolFlowRate; } else { if ( ElectricEIRChiller( EIRChillNum ).CondVolFlowRateWasAutoSized ) tmpCondVolFlowRate = 0.0; diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index 75775d4ac96..f5a68dd8a2c 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -1006,7 +1006,10 @@ namespace ChillerReformulatedEIR { tmpNomCap = ElecReformEIRChiller( EIRChillNum ).RefCap; tmpEvapVolFlowRate = ElecReformEIRChiller( EIRChillNum ).EvapVolFlowRate; tmpCondVolFlowRate = ElecReformEIRChiller( EIRChillNum ).CondVolFlowRate; - PltSizCondNum = PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).PlantSizNum; + + if ( ElecReformEIRChiller( EIRChillNum ).CondenserType == WaterCooled ) { + PltSizCondNum = PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).PlantSizNum; + } // find the appropriate Plant Sizing object PltSizNum = PlantLoop( ElecReformEIRChiller( EIRChillNum ).CWLoopNum ).PlantSizNum; @@ -1014,8 +1017,6 @@ namespace ChillerReformulatedEIR { if ( PltSizNum > 0 ) { if ( PlantSizData( PltSizNum ).DesVolFlowRate >= SmallWaterVolFlow ) { tmpEvapVolFlowRate = PlantSizData( PltSizNum ).DesVolFlowRate * ElecReformEIRChiller( EIRChillNum ).SizFac; - if ( ! ElecReformEIRChiller( EIRChillNum ).EvapVolFlowRateWasAutoSized ) tmpEvapVolFlowRate = ElecReformEIRChiller( EIRChillNum ).EvapVolFlowRate; - } else { if ( ElecReformEIRChiller( EIRChillNum ).EvapVolFlowRateWasAutoSized ) tmpEvapVolFlowRate = 0.0; @@ -1077,13 +1078,9 @@ namespace ChillerReformulatedEIR { SizingCondOutletTemp = ElecReformEIRChiller( EIRChillNum ).TempRefCondOut; } Cp = GetSpecificHeatGlycol( PlantLoop( ElecReformEIRChiller( EIRChillNum ).CWLoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( ElecReformEIRChiller( EIRChillNum ).CWLoopNum ).FluidIndex, RoutineName ); - rho = GetDensityGlycol( PlantLoop( ElecReformEIRChiller( EIRChillNum ).CWLoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( ElecReformEIRChiller( EIRChillNum ).CWLoopNum ).FluidIndex, RoutineName ); - RefCapFT = CurveValue( ElecReformEIRChiller( EIRChillNum ).ChillerCapFT, SizingEvapOutletTemp, SizingCondOutletTemp ); tmpNomCap = ( Cp * rho * PlantSizData( PltSizNum ).DeltaT * tmpEvapVolFlowRate ) / RefCapFT; - if ( ! ElecReformEIRChiller( EIRChillNum ).RefCapWasAutoSized ) tmpNomCap = ElecReformEIRChiller( EIRChillNum ).RefCap; - } else { if ( ElecReformEIRChiller( EIRChillNum ).RefCapWasAutoSized ) tmpNomCap = 0.0; @@ -1134,10 +1131,8 @@ namespace ChillerReformulatedEIR { if ( PltSizCondNum > 0 && PltSizNum > 0 ) { if ( PlantSizData( PltSizNum ).DesVolFlowRate >= SmallWaterVolFlow && tmpNomCap > 0.0 ) { rho = GetDensityGlycol( PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).FluidName, DataGlobals::CWInitConvTemp, PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).FluidIndex, RoutineName ); - Cp = GetSpecificHeatGlycol( PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).FluidName, ElecReformEIRChiller( EIRChillNum ).TempRefCondIn, PlantLoop( ElecReformEIRChiller( EIRChillNum ).CDLoopNum ).FluidIndex, RoutineName ); tmpCondVolFlowRate = tmpNomCap * ( 1.0 + ( 1.0 / ElecReformEIRChiller( EIRChillNum ).RefCOP ) * ElecReformEIRChiller( EIRChillNum ).CompPowerToCondenserFrac ) / ( PlantSizData( PltSizCondNum ).DeltaT * Cp * rho ); - if ( ! ElecReformEIRChiller( EIRChillNum ).CondVolFlowRateWasAutoSized ) tmpCondVolFlowRate = ElecReformEIRChiller( EIRChillNum ).CondVolFlowRate; //IF (PlantFirstSizesOkayToFinalize) ElecReformEIRChiller(EIRChillNum)%CondVolFlowRate = tmpCondVolFlowRate } else { if ( ElecReformEIRChiller( EIRChillNum ).CondVolFlowRateWasAutoSized ) tmpCondVolFlowRate = 0.0; diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index e5b6fed44e6..92fc33db430 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -5573,7 +5573,7 @@ namespace DXCoils { } // Check for valid range of (Rated Air Volume Flow Rate / Rated Total Capacity) - if( DXCoil( DXCoilNum ).DXCoilType_Num != CoilVRF_FluidTCtrl_Cooling ){ // the VolFlowPerRatedTotCap check is not applicable for VRF-FluidTCtrl coil + if ( DXCoil( DXCoilNum ).DXCoilType_Num != CoilVRF_FluidTCtrl_Cooling ){ // the VolFlowPerRatedTotCap check is not applicable for VRF-FluidTCtrl coil RatedVolFlowPerRatedTotCap = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) / DXCoil( DXCoilNum ).RatedTotCap( Mode ); if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - RatedVolFlowPerRatedTotCap ) > SmallDifferenceTest ) || ( ( RatedVolFlowPerRatedTotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { ShowSevereError( "Sizing: " + DXCoil( DXCoilNum ).DXCoilType + " \"" + DXCoil( DXCoilNum ).Name + "\": Rated air volume flow rate per watt of rated total cooling capacity is out of range." ); @@ -5639,7 +5639,7 @@ namespace DXCoils { DXCoil( DXCoilNum ).RatedAirMassFlowRate( Mode ) = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) * PsyRhoAirFnPbTdbW( StdBaroPress, RatedHeatPumpIndoorAirTemp, RatedHeatPumpIndoorHumRat, RoutineName ); // Check for valid range of (Rated Air Volume Flow Rate / Rated Total Capacity) - if( DXCoil( DXCoilNum ).DXCoilType_Num != CoilVRF_FluidTCtrl_Heating ){ // the VolFlowPerRatedTotCap check is not applicable for VRF-FluidTCtrl coil + if ( DXCoil( DXCoilNum ).DXCoilType_Num != CoilVRF_FluidTCtrl_Heating ){ // the VolFlowPerRatedTotCap check is not applicable for VRF-FluidTCtrl coil RatedVolFlowPerRatedTotCap = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) / DXCoil( DXCoilNum ).RatedTotCap( Mode ); if ( ( ( MinRatedVolFlowPerRatedTotCap( DXCT ) - RatedVolFlowPerRatedTotCap ) > SmallDifferenceTest ) || ( ( RatedVolFlowPerRatedTotCap - MaxRatedVolFlowPerRatedTotCap( DXCT ) ) > SmallDifferenceTest ) ) { ShowSevereError( "Sizing: " + DXCoil( DXCoilNum ).DXCoilType + ' ' + DXCoil( DXCoilNum ).Name + ": Rated air volume flow rate per watt of rated total heating capacity is out of range." ); @@ -5995,7 +5995,7 @@ namespace DXCoils { } else { PrintFlag = true; FieldNum = 0; - if( DXCoil( DXCoilNum ).DXCoilType_Num == CoilDX_CoolingTwoStageWHumControl ) { + if ( DXCoil( DXCoilNum ).DXCoilType_Num == CoilDX_CoolingTwoStageWHumControl ) { SizingMethod = CoolingAirflowSizing; CompName = DXCoil( DXCoilNum ).Name + ":" + DXCoil( DXCoilNum ).CoilPerformanceName( Mode ); FieldNum = 4; @@ -6025,10 +6025,12 @@ namespace DXCoils { CompName = DXCoil( DXCoilNum ).Name; } else if ( DXCoil( DXCoilNum ).DXCoilType_Num == CoilDX_MultiSpeedCooling ) { SizingMethod = CoolingAirflowSizing; + DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( DXCoil( DXCoilNum ).NumOfSpeeds ); CompName = DXCoil( DXCoilNum ).Name; PrintFlag = false; } else if ( DXCoil( DXCoilNum ).DXCoilType_Num == CoilDX_MultiSpeedHeating ) { SizingMethod = HeatingAirflowSizing; + DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ) = DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( DXCoil( DXCoilNum ).NumOfSpeeds ); CompName = DXCoil( DXCoilNum ).Name; PrintFlag = false; } else { @@ -6038,7 +6040,7 @@ namespace DXCoils { } TempSize = DXCoil( DXCoilNum ).RatedAirVolFlowRate( Mode ); - if( FieldNum > 0 ){ + if ( FieldNum > 0 ){ SizingString = DXCoilNumericFields( DXCoilNum ).PerfMode( Mode ).FieldNames( FieldNum ) + " [m3/s]"; } else { SizingString = "Rated Air Flow Rate [m3/s]"; @@ -6819,29 +6821,66 @@ namespace DXCoils { // Sizing rated air flow rate if ( Mode == DXCoil( DXCoilNum ).NumOfSpeeds ) { if ( CurSysNum > 0 ) { - if ( SizingDesRunThisAirSys ) HardSizeNoDesRun = false; - if ( ! IsAutoSize && ! SizingDesRunThisAirSys ) { - HardSizeNoDesRun = true; - if ( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { - ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + if ( UnitarySysEqSizing.allocated() ) { + if( UnitarySysEqSizing( CurSysNum ).HeatingAirFlow ) { + MSRatedAirVolFlowRateDes = UnitarySysEqSizing( CurSysNum ).HeatingAirVolFlow; + } else { + if( SizingDesRunThisAirSys ) HardSizeNoDesRun = false; + if( !IsAutoSize && !SizingDesRunThisAirSys ) { + HardSizeNoDesRun = true; + if( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { + ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + } + } else { + CheckSysSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); + if( CurOASysNum > 0 ) { + MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesOutAirVolFlow; + } else { + MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesMainVolFlow; + } + } } } else { - CheckSysSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); - if ( CurOASysNum > 0 ) { - MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesOutAirVolFlow; + if( SizingDesRunThisAirSys ) HardSizeNoDesRun = false; + if( !IsAutoSize && !SizingDesRunThisAirSys ) { + HardSizeNoDesRun = true; + if( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { + ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + } } else { - MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesMainVolFlow; + CheckSysSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); + if( CurOASysNum > 0 ) { + MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesOutAirVolFlow; + } else { + MSRatedAirVolFlowRateDes = FinalSysSizing( CurSysNum ).DesMainVolFlow; + } } } - } else if ( CurZoneEqNum > 0 ) { - if ( ! IsAutoSize && ! SizingDesRunThisZone ) { - HardSizeNoDesRun = true; - if ( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { - ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + } else if( CurZoneEqNum > 0 ) { + if ( ZoneEqSizing.allocated() ) { + if( ZoneEqSizing( CurZoneEqNum ).HeatingAirFlow ) { + MSRatedAirVolFlowRateDes = ZoneEqSizing( CurZoneEqNum ).HeatingAirVolFlow; + } else { + if( !IsAutoSize && !SizingDesRunThisZone ) { + HardSizeNoDesRun = true; + if( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { + ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + } + } else { + CheckZoneSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); + MSRatedAirVolFlowRateDes = max( FinalZoneSizing( CurZoneEqNum ).DesCoolVolFlow, FinalZoneSizing( CurZoneEqNum ).DesHeatVolFlow ); + } } } else { - CheckZoneSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); - MSRatedAirVolFlowRateDes = max( FinalZoneSizing( CurZoneEqNum ).DesCoolVolFlow, FinalZoneSizing( CurZoneEqNum ).DesHeatVolFlow ); + if( !IsAutoSize && !SizingDesRunThisZone ) { + HardSizeNoDesRun = true; + if( DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) > 0.0 ) { + ReportSizingOutput( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name, "Speed " + TrimSigDigits( Mode ) + " User-Specified Rated Air Flow Rate [m3/s]", DXCoil( DXCoilNum ).MSRatedAirVolFlowRate( Mode ) ); + } + } else { + CheckZoneSizing( DXCoil( DXCoilNum ).DXCoilType, DXCoil( DXCoilNum ).Name ); + MSRatedAirVolFlowRateDes = max( FinalZoneSizing( CurZoneEqNum ).DesCoolVolFlow, FinalZoneSizing( CurZoneEqNum ).DesHeatVolFlow ); + } } } if ( MSRatedAirVolFlowRateDes < SmallAirVolFlow ) { @@ -6918,10 +6957,15 @@ namespace DXCoils { } if ( Mode == DXCoil( DXCoilNum ).NumOfSpeeds ) { // Heating capacity is assumed to be equal to the cooling capacity - NumOfSpeedCompanion = DXCoil( DXCoil( DXCoilNum ).CompanionUpstreamDXCoil ).NumOfSpeeds; - MSRatedTotCapDes = DXCoil( DXCoil( DXCoilNum ).CompanionUpstreamDXCoil ).MSRatedTotCap( NumOfSpeedCompanion ); + if ( DXCoil(DXCoilNum).CompanionUpstreamDXCoil > 0 ) { + NumOfSpeedCompanion = DXCoil(DXCoil(DXCoilNum).CompanionUpstreamDXCoil).NumOfSpeeds; + MSRatedTotCapDes = DXCoil(DXCoil(DXCoilNum).CompanionUpstreamDXCoil).MSRatedTotCap(NumOfSpeedCompanion); + } else { + MSRatedTotCapDes = DXCoil( DXCoilNum ).RatedTotCap( 1 ); // sized above + } } else { MSRatedTotCapDes = DXCoil( DXCoilNum ).MSRatedTotCap( DXCoil( DXCoilNum ).NumOfSpeeds ) * Mode / DXCoil( DXCoilNum ).NumOfSpeeds; + MSRatedTotCapDes = max(0.0, MSRatedTotCapDes); } if ( IsAutoSize ) { DXCoil( DXCoilNum ).MSRatedTotCap( Mode ) = MSRatedTotCapDes; @@ -9088,7 +9132,7 @@ Label50: ; InputPowerMultiplier = 1.0; // Check outdoor temperature to determine of defrost is active - if( OutdoorDryBulb <= DXCoil( DXCoilNum ).MaxOATDefrost && DXCoil( DXCoilNum ).CondenserType( Mode ) != WaterCooled ) { + if ( OutdoorDryBulb <= DXCoil( DXCoilNum ).MaxOATDefrost && DXCoil( DXCoilNum ).CondenserType( Mode ) != WaterCooled ) { // Calculate defrost adjustment factors depending on defrost control type if ( DXCoil( DXCoilNum ).DefrostControl == Timed ) { FractionalDefrostTime = DXCoil( DXCoilNum ).DefrostTime; @@ -9326,12 +9370,10 @@ Label50: ; Real64 OutletAirDryBulbTemp; // outlet air dry bulb temperature [C] Real64 OutletAirEnthalpy; // outlet air enthalpy [J/kg] Real64 OutletAirHumRat; // outlet air humidity ratio [kg/kg] - // REAL(r64) :: OutletAirRH ! outlet air relative humudity [fraction] Real64 OutletAirDryBulbTempSat; // outlet air dry bulb temp at saturation at the outlet enthalpy [C] Real64 LSOutletAirDryBulbTemp; // low speed outlet air dry bulb temperature [C] Real64 LSOutletAirEnthalpy; // low speed outlet air enthalpy [J/kg] Real64 LSOutletAirHumRat; // low speed outlet air humidity ratio [kg/kg] - Real64 LSOutletAirRH; // low speed outlet air relative humudity [fraction] Real64 hDelta; // Change in air enthalpy across the cooling coil [J/kg] Real64 hTinwout; // Enthalpy at inlet dry-bulb and outlet humidity ratio [J/kg] Real64 hADP; // Apparatus dew point enthalpy [J/kg] @@ -9504,7 +9546,7 @@ Label50: ; OutletAirDryBulbTemp = OutletAirDryBulbTempSat; OutletAirHumRat = PsyWFnTdbH( OutletAirDryBulbTemp, OutletAirEnthalpy, RoutineNameHighSpeedOutlet ); } - //LSOutletAirRH = PsyRhFnTdbWPb(OutletAirDryBulbTemp,OutletAirHumRat,OutdoorPressure,'CalcMultiSpeedDXCoil:highspeedoutlet') + } else { // Adjust CBF for off-nominal flow CBF = AdjustCBF( CBFNom, AirMassFlowNom, AirMassFlow ); @@ -9529,14 +9571,7 @@ Label50: ; OutletAirHumRat = PsyWFnTdbH( InletAirDryBulbTemp, hTinwout ); OutletAirDryBulbTemp = PsyTdbFnHW( OutletAirEnthalpy, OutletAirHumRat ); - // OutletAirRH = PsyRhFnTdbWPb(OutletAirDryBulbTemp,OutletAirHumRat,OutBaroPress) - // IF (OutletAirRH >= 1.0d0) THEN ! Limit to saturated conditions at OutletAirEnthalpy - // OutletAirDryBulbTemp = PsyTsatFnHPb(OutletAirEnthalpy,OutBaroPress) - // OutletAirHumRat = PsyWFnTdbH(OutletAirDryBulbTemp,OutletAirEnthalpy) - // END IF OutletAirDryBulbTempSat = PsyTsatFnHPb( OutletAirEnthalpy, OutdoorPressure ); - // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line - // OutletAirDryBulbTempSat = PsyTsatFnHPb(OutletAirEnthalpy,InletAirPressure) if ( OutletAirDryBulbTemp < OutletAirDryBulbTempSat ) { // Limit to saturated conditions at OutletAirEnthalpy OutletAirDryBulbTemp = OutletAirDryBulbTempSat; OutletAirHumRat = PsyWFnTdbH( OutletAirDryBulbTemp, OutletAirEnthalpy ); @@ -9599,7 +9634,7 @@ Label50: ; LSOutletAirDryBulbTemp = OutletAirDryBulbTempSat; LSOutletAirHumRat = PsyWFnTdbH( LSOutletAirDryBulbTemp, LSOutletAirEnthalpy, RoutineNameLowSpeedOutlet ); } - LSOutletAirRH = PsyRhFnTdbWPb( LSOutletAirDryBulbTemp, LSOutletAirHumRat, OutdoorPressure, RoutineNameLowSpeedOutlet ); + } else { // Adjust CBF for off-nominal flow CBF = AdjustCBF( DXCoil( DXCoilNum ).RatedCBF2, DXCoil( DXCoilNum ).RatedAirMassFlowRate2, AirMassFlow ); @@ -9622,15 +9657,12 @@ Label50: ; hTinwout = InletAirEnthalpy - ( 1.0 - SHR ) * hDelta; LSOutletAirHumRat = PsyWFnTdbH( InletAirDryBulbTemp, hTinwout ); LSOutletAirDryBulbTemp = PsyTdbFnHW( LSOutletAirEnthalpy, LSOutletAirHumRat ); - LSOutletAirRH = PsyRhFnTdbWPb( LSOutletAirDryBulbTemp, LSOutletAirHumRat, OutdoorPressure, RoutineNameLowSpeedOutlet ); OutletAirDryBulbTempSat = PsyTsatFnHPb( LSOutletAirEnthalpy, OutdoorPressure, RoutineNameLowSpeedOutlet ); - // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line - // LSOutletAirRH = PsyRhFnTdbWPb(LSOutletAirDryBulbTemp,LSOutletAirHumRat,InletAirPressure) - // OutletAirDryBulbTempSat = PsyTsatFnHPb(LSOutletAirEnthalpy,InletAirPressure) if ( LSOutletAirDryBulbTemp < OutletAirDryBulbTempSat ) { // Limit to saturated conditions at OutletAirEnthalpy LSOutletAirDryBulbTemp = OutletAirDryBulbTempSat; LSOutletAirHumRat = PsyWFnTdbH( LSOutletAirDryBulbTemp, LSOutletAirEnthalpy, RoutineNameLowSpeedOutlet ); } + } // outlet conditions are average of inlet and low speed weighted by CycRatio OutletAirEnthalpy = CycRatio * LSOutletAirEnthalpy + ( 1.0 - CycRatio ) * InletAirEnthalpy; @@ -9907,6 +9939,7 @@ Label50: ; Real64 DeltaT( 0.0 ); // Temperature drop across evaporator at given conditions [C] Real64 DeltaHumRat( 0.0 ); // Humidity ratio drop across evaporator at given conditions [kg/kg] Real64 OutletAirTemp( InletAirTemp ); // Outlet dry-bulb temperature from evaporator at given conditions [C] + Real64 OutletAirTempSat( InletAirTemp ); // Saturation dry-bulb temperature from evaporator at outlet air enthalpy [C] Real64 OutletAirEnthalpy; // Enthalpy of outlet air at given conditions [J/kg] Real64 OutletAirHumRat( InletAirHumRat ); // Outlet humidity ratio from evaporator at given conditions [kg/kg] Real64 OutletAirRH; // relative humidity of the outlet air @@ -9955,7 +9988,13 @@ Label50: ; } } ShowContinueErrorTimeStamp( "" ); - ShowFatalError( "Check and revise the input data for this coil before rerunning the simulation." ); + ShowContinueError( "SHR adjusted to achieve valid outlet air properties and the simulation continues." ); + OutletAirTempSat = PsyTsatFnHPb(OutletAirEnthalpy, BaroPress, RoutineName); + if (OutletAirTemp < OutletAirTempSat) { // Limit to saturated conditions at OutletAirEnthalpy + OutletAirTemp = OutletAirTempSat + 0.005; + OutletAirHumRat = PsyWFnTdbH( OutletAirTemp, OutletAirEnthalpy, RoutineName ); + DeltaHumRat = InletAirHumRat - OutletAirHumRat; + } } DeltaT = InletAirTemp - OutletAirTemp; if ( DeltaT <= 0.0 ) { @@ -10026,14 +10065,19 @@ Label50: ; // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line // Pressure will have to be pass into this subroutine to fix this one - ADPHumRat = PsyWFnTdpPb( ADPTemp, BaroPress ); - Slope = ( InletAirHumRat - ADPHumRat ) / ( InletAirTemp - ADPTemp ); + ADPHumRat = min( OutletAirHumRat, PsyWFnTdpPb( ADPTemp, BaroPress ) ); + Slope = ( InletAirHumRat - ADPHumRat ) / max( 0.001, ( InletAirTemp - ADPTemp ) ); // check for convergence (slopes are equal to within error tolerance) Error = ( Slope - SlopeAtConds ) / SlopeAtConds; - if ( ( Error > 0.0 ) && ( ErrorLast < 0.0 ) ) DeltaADPTemp = -DeltaADPTemp / 2.0; - if ( ( Error < 0.0 ) && ( ErrorLast > 0.0 ) ) DeltaADPTemp = -DeltaADPTemp / 2.0; + if ( ( Error > 0.0 ) && ( ErrorLast < 0.0 ) ) { + DeltaADPTemp = -DeltaADPTemp / 2.0; + } else if ( ( Error < 0.0 ) && ( ErrorLast > 0.0 ) ) { + DeltaADPTemp = -DeltaADPTemp / 2.0; + } else if ( abs( Error ) > abs( ErrorLast ) ) { + DeltaADPTemp = -DeltaADPTemp / 2.0; + } ErrorLast = Error; Tolerance = std::abs( Error ); @@ -10160,7 +10204,7 @@ Label50: ; if ( OutletAirRH >= 1.0 ) { // if RH > 1, reduce SHR until it crosses the saturation curve SHR -= 0.001; bReversePerturb = true; - if( SHR < 0.5 ) bStillValidating = false; // have to stop somewhere, this is lower than the lower limit of SHR empirical model (see ReportSizingManager SizingType == CoolingSHRSizing) + if ( SHR < 0.5 ) bStillValidating = false; // have to stop somewhere, this is lower than the lower limit of SHR empirical model (see ReportSizingManager SizingType == CoolingSHRSizing) } else { if ( bReversePerturb ) { bStillValidating = false; // stop iterating once SHR causes ADP to cross back under saturation curve, take what you get @@ -10548,16 +10592,13 @@ Label50: ; Real64 OutletAirDryBulbTemp; // outlet air dry bulb temperature [C] Real64 OutletAirEnthalpy; // outlet air enthalpy [J/kg] Real64 OutletAirHumRat; // outlet air humidity ratio [kg/kg] - //REAL(r64) :: OutletAirRH ! outlet air relative humudity [fraction] Real64 OutletAirDryBulbTempSat; // outlet air dry bulb temp at saturation at the outlet enthalpy [C] Real64 LSOutletAirDryBulbTemp; // low speed outlet air dry bulb temperature [C] Real64 LSOutletAirEnthalpy; // low speed outlet air enthalpy [J/kg] Real64 LSOutletAirHumRat; // low speed outlet air humidity ratio [kg/kg] - Real64 LSOutletAirRH; // low speed outlet air relative humudity [fraction] Real64 HSOutletAirDryBulbTemp; // hihg speed outlet air dry bulb temperature [C] Real64 HSOutletAirEnthalpy; // high speed outlet air enthalpy [J/kg] Real64 HSOutletAirHumRat; // high speed outlet air humidity ratio [kg/kg] - Real64 HSOutletAirRH; // high speed outlet air relative humudity [fraction] Real64 hDelta; // Change in air enthalpy across the cooling coil [J/kg] Real64 hTinwout; // Enthalpy at inlet dry-bulb and outlet humidity ratio [J/kg] Real64 hADP; // Apparatus dew point enthalpy [J/kg] @@ -10769,11 +10810,7 @@ Label50: ; hTinwout = InletAirEnthalpy - ( 1.0 - SHRLS ) * hDelta; LSOutletAirHumRat = PsyWFnTdbH( InletAirDryBulbTemp, hTinwout, RoutineName ); LSOutletAirDryBulbTemp = PsyTdbFnHW( LSOutletAirEnthalpy, LSOutletAirHumRat ); - LSOutletAirRH = PsyRhFnTdbWPb( LSOutletAirDryBulbTemp, LSOutletAirHumRat, OutdoorPressure, RoutineNameHighSpeed ); OutletAirDryBulbTempSat = PsyTsatFnHPb( LSOutletAirEnthalpy, OutdoorPressure, RoutineName ); - // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line - // LSOutletAirRH = PsyRhFnTdbWPb(LSOutletAirDryBulbTemp,LSOutletAirHumRat,InletAirPressure) - // OutletAirDryBulbTempSat = PsyTsatFnHPb(LSOutletAirEnthalpy,InletAirPressure) if ( LSOutletAirDryBulbTemp < OutletAirDryBulbTempSat ) { // Limit to saturated conditions at OutletAirEnthalpy LSOutletAirDryBulbTemp = OutletAirDryBulbTempSat; LSOutletAirHumRat = PsyWFnTdbH( LSOutletAirDryBulbTemp, LSOutletAirEnthalpy, RoutineName ); @@ -10815,11 +10852,7 @@ Label50: ; hTinwout = InletAirEnthalpy - ( 1.0 - SHRHS ) * hDelta; HSOutletAirHumRat = PsyWFnTdbH( InletAirDryBulbTemp, hTinwout, RoutineName ); HSOutletAirDryBulbTemp = PsyTdbFnHW( HSOutletAirEnthalpy, HSOutletAirHumRat ); - HSOutletAirRH = PsyRhFnTdbWPb( HSOutletAirDryBulbTemp, HSOutletAirHumRat, OutdoorPressure, RoutineNameHighSpeedOutlet ); OutletAirDryBulbTempSat = PsyTsatFnHPb( HSOutletAirEnthalpy, OutdoorPressure, RoutineName ); - // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line - // LSOutletAirRH = PsyRhFnTdbWPb(LSOutletAirDryBulbTemp,LSOutletAirHumRat,InletAirPressure) - // OutletAirDryBulbTempSat = PsyTsatFnHPb(LSOutletAirEnthalpy,InletAirPressure) if ( HSOutletAirDryBulbTemp < OutletAirDryBulbTempSat ) { // Limit to saturated conditions at OutletAirEnthalpy HSOutletAirDryBulbTemp = OutletAirDryBulbTempSat; HSOutletAirHumRat = PsyWFnTdbH( HSOutletAirDryBulbTemp, HSOutletAirEnthalpy, RoutineName ); @@ -11026,11 +11059,7 @@ Label50: ; hTinwout = InletAirEnthalpy - ( 1.0 - SHR ) * hDelta; LSOutletAirHumRat = PsyWFnTdbH( InletAirDryBulbTemp, hTinwout, RoutineName ); LSOutletAirDryBulbTemp = PsyTdbFnHW( LSOutletAirEnthalpy, LSOutletAirHumRat ); - LSOutletAirRH = PsyRhFnTdbWPb( LSOutletAirDryBulbTemp, LSOutletAirHumRat, OutdoorPressure, RoutineNameLowSpeedOutlet ); OutletAirDryBulbTempSat = PsyTsatFnHPb( LSOutletAirEnthalpy, OutdoorPressure, RoutineName ); - // Eventually inlet air conditions will be used in DX Coil, these lines are commented out and marked with this comment line - // LSOutletAirRH = PsyRhFnTdbWPb(LSOutletAirDryBulbTemp,LSOutletAirHumRat,InletAirPressure) - // OutletAirDryBulbTempSat = PsyTsatFnHPb(LSOutletAirEnthalpy,InletAirPressure) if ( LSOutletAirDryBulbTemp < OutletAirDryBulbTempSat ) { // Limit to saturated conditions at OutletAirEnthalpy LSOutletAirDryBulbTemp = OutletAirDryBulbTempSat; LSOutletAirHumRat = PsyWFnTdbH( LSOutletAirDryBulbTemp, LSOutletAirEnthalpy, RoutineName ); @@ -12875,7 +12904,7 @@ Label50: ; if ( WhichCoil != 0 ) { CoilCapacity = DXCoil( WhichCoil ).RatedTotCap( 1 ); } - } else if ( SameString( CoilType, "Coil:Cooling:DX:MultiSpeed" ) ) { + } else if ( SameString( CoilType, "Coil:Cooling:DX:MultiSpeed" ) || SameString( CoilType, "Coil:Heating:DX:MultiSpeed" ) ) { WhichCoil = FindItem( CoilName, DXCoil ); if ( WhichCoil != 0 ) { CoilCapacity = DXCoil( WhichCoil ).MSRatedTotCap( DXCoil( WhichCoil ).NumOfSpeeds ); @@ -14779,7 +14808,7 @@ Label50: ; TotCap = DXCoil( DXCoilNum ).RatedTotCap( Mode ); QCoilReq = -PartLoadRatio * TotCap; - if( PartLoadRatio == 0.0 ){ + if ( PartLoadRatio == 0.0 ){ AirMassFlowMin = OACompOffMassFlow; } else { AirMassFlowMin = OACompOnMassFlow; @@ -15098,7 +15127,7 @@ Label50: ; TotCap = DXCoil( DXCoilNum ).RatedTotCap( Mode ); QCoilReq = PartLoadRatio * TotCap; - if( PartLoadRatio == 0.0 ){ + if ( PartLoadRatio == 0.0 ){ AirMassFlowMin = OACompOffMassFlow; } else { AirMassFlowMin = OACompOnMassFlow; @@ -15692,10 +15721,10 @@ Label50: ; BFC_rate = DXCoil( CoilNum ).RateBFVRFIUEvap; BFH_rate = DXCoil( CoilNum ).RateBFVRFIUCond; - if( OperationMode == FlagCoolMode ) { + if ( OperationMode == FlagCoolMode ) { //Cooling: OperationMode 0 - if( present( BF ) ) { + if ( present( BF ) ) { BF_real = BF; } else { BF_real = BFC_rate; diff --git a/src/EnergyPlus/DataOutputs.cc b/src/EnergyPlus/DataOutputs.cc index 016c659ac87..e2c9187eabf 100644 --- a/src/EnergyPlus/DataOutputs.cc +++ b/src/EnergyPlus/DataOutputs.cc @@ -50,7 +50,6 @@ // EnergyPlus Headers #include #include -#include "re2/re2.h" #include "UtilityRoutines.hh" namespace EnergyPlus { @@ -101,10 +100,32 @@ namespace DataOutputs { int iTotalAutoCalculatableFields; // number of fields that can be autocalculated // Object Data - Array1D< OutputReportingVariables > OutputVariablesForSimulation; - std::unordered_map OutputVariablesNames; + std::unordered_map < std::string, std::unordered_map< std::string, OutputReportingVariables > > OutputVariablesForSimulation; // Functions + OutputReportingVariables::OutputReportingVariables( + std::string const & KeyValue, + std::string const & VariableName + ) : + key( KeyValue ), + variableName( VariableName ) + { + if ( KeyValue == "*" ) return; + for ( auto const & c : KeyValue ) { + if ( c == ' ' || c == '_' || std::isalnum( c ) ) continue; + is_simple_string = false; + break; + } + if ( is_simple_string ) return; + pattern = std::unique_ptr< RE2 >( new RE2( KeyValue ) ); + case_insensitive_pattern = std::unique_ptr< RE2 >( new RE2( "(?i)" + KeyValue ) ); + if ( ! pattern->ok() ) { + ShowSevereError( "Regular expression \"" + KeyValue + "\" for variable name \"" + VariableName + "\" in input file is incorrect" ); + ShowContinueError( pattern->error() ); + ShowFatalError( "Error found in regular expression. Previous error(s) cause program termination." ); + } + } + // Clears the global data in DataOutputs. // Needed for unit tests, should not be normally called. void @@ -119,8 +140,7 @@ namespace DataOutputs { iTotalAutoSizableFields = int(); iNumberOfAutoCalcedFields = int(); iTotalAutoCalculatableFields = int(); - OutputVariablesForSimulation.deallocate(); - OutputVariablesNames.clear(); + OutputVariablesForSimulation.clear(); } bool @@ -140,38 +160,25 @@ namespace DataOutputs { // This function looks up a key and variable name value and determines if they are // in the list of required variables for a simulation. - int Found = 0; - std::string LowerCaseVarName; - // case-insensitive search - ConvertCaseToLower( VariableName, LowerCaseVarName); - auto const FirstIndex = OutputVariablesNames.find( LowerCaseVarName ); - - if ( FirstIndex != OutputVariablesNames.end() ) { - Found = FirstIndex->second; - } - if ( Found != 0 ) { - do { - if ( OutputVariablesForSimulation( Found ).Key == "*" ) { - return true; - } else { - RE2 pattern( OutputVariablesForSimulation( Found ).Key ); - if ( ! pattern.ok() ) { - ShowSevereError( "Regular expression \"" + OutputVariablesForSimulation( Found ).Key + "\" for variable name \"" + VariableName + "\" in input file is incorrect" ); - ShowContinueError( pattern.error() ); - ShowFatalError( "Error found in regular expression. Previous error(s) cause program termination." ); - break; - } - if ( - RE2::FullMatch( KeyedValue, pattern ) || // match against regex as written - equali( KeyedValue, OutputVariablesForSimulation( Found ).Key ) || // straight case-insensitive string comparison - RE2::FullMatch( KeyedValue, "(?i)" + OutputVariablesForSimulation( Found ).Key ) // attempt case-insensitive regex comparison - ) - { - return true; - } - } - Found = OutputVariablesForSimulation( Found ).Next; - } while ( Found != 0 ); + auto const found_variable = OutputVariablesForSimulation.find( InputProcessor::MakeUPPERCase( VariableName ) ); + if ( found_variable == OutputVariablesForSimulation.end() ) return false; + + auto found_key = found_variable->second.find( KeyedValue ); + if ( found_key != found_variable->second.end() ) return true; + + found_key = found_variable->second.find( "*" ); + if ( found_key != found_variable->second.end() ) return true; + + for ( auto it = found_variable->second.begin(); it != found_variable->second.end(); ++it ) { + if ( equali( KeyedValue, it->second.key ) ) return true; + if ( it->second.is_simple_string ) continue; + if ( + ( it->second.pattern != nullptr && RE2::FullMatch( KeyedValue, *it->second.pattern ) ) || // match against regex as written + ( it->second.case_insensitive_pattern != nullptr && RE2::FullMatch( KeyedValue, *it->second.case_insensitive_pattern ) ) // attempt case-insensitive regex comparison + ) + { + return true; + } } return false; } diff --git a/src/EnergyPlus/DataOutputs.hh b/src/EnergyPlus/DataOutputs.hh index 82f4a593557..b7287a5bfda 100644 --- a/src/EnergyPlus/DataOutputs.hh +++ b/src/EnergyPlus/DataOutputs.hh @@ -54,6 +54,9 @@ #include #include #include +#include +#include +#include "re2/re2.h" namespace EnergyPlus { @@ -80,26 +83,20 @@ namespace DataOutputs { extern int iTotalAutoCalculatableFields; // number of fields that can be autocalculated // Types - - struct OutputReportingVariables // Linked list of variables and keys - { - // Members - std::string Key; // could be a key or "*" (upper case) - std::string VarName; // variable name (upper case) - int Previous; // Pointer to Previous of same variable name - int Next; // Pointer to Next of same variable name - - // Default Constructor - OutputReportingVariables() : - Previous( 0 ), - Next( 0 ) - {} - + struct OutputReportingVariables { + OutputReportingVariables( + std::string const & KeyValue, + std::string const & VariableName + ); + + std::string const key; + std::string const variableName; + bool is_simple_string = true; + std::unique_ptr< RE2 > pattern; + std::unique_ptr< RE2 > case_insensitive_pattern; }; + extern std::unordered_map < std::string, std::unordered_map< std::string, OutputReportingVariables > > OutputVariablesForSimulation; - // Object Data - extern Array1D< OutputReportingVariables > OutputVariablesForSimulation; - extern std::unordered_map OutputVariablesNames; // Functions // Clears the global data in DataOutputs. diff --git a/src/EnergyPlus/DisplacementVentMgr.cc b/src/EnergyPlus/DisplacementVentMgr.cc index 65fcdb74ed3..82d51a99a0f 100644 --- a/src/EnergyPlus/DisplacementVentMgr.cc +++ b/src/EnergyPlus/DisplacementVentMgr.cc @@ -576,6 +576,22 @@ namespace DisplacementVentMgr { //************************************************************************************************** + Real64 + calculateThirdOrderFloorTemperature( + Real64 temperatureHistoryTerm, + Real64 HAT_floor, + Real64 HA_floor, + Real64 MCpT_Total, + Real64 MCp_Total, + Real64 occupiedTemp, + Real64 nonAirSystemResponse, + Real64 zoneMultiplier, + Real64 airCap + ) { + static const Real64 elevenOverSix = 11.0 / 6.0; + return ( temperatureHistoryTerm + HAT_floor + MCpT_Total + 0.6 * occupiedTemp * MCp_Total + nonAirSystemResponse / zoneMultiplier ) / ( elevenOverSix * airCap + HA_floor + 1.6 * MCp_Total ); + } + void CalcUCSDDV( int const ZoneNum ) // Which Zonenum { @@ -873,7 +889,7 @@ namespace DisplacementVentMgr { TempIndCoef = HAT_FLOOR + MCpT_Total + NonAirSystemResponse( ZoneNum ) / ZoneMult; { auto const SELECT_CASE_var( ZoneAirSolutionAlgo ); if ( SELECT_CASE_var == Use3rdOrder ) { - ZTFloor( ZoneNum ) = ( TempHistTerm + HAT_FLOOR + MCpT_Total + NonAirSystemResponse( ZoneNum ) / ZoneMult ) / ( ( 11.0 / 6.0 ) * AirCap + HA_FLOOR + MCp_Total ); + ZTFloor( ZoneNum ) = calculateThirdOrderFloorTemperature( TempHistTerm, HAT_FLOOR, HA_FLOOR, MCpT_Total, MCp_Total, ZTOC( ZoneNum ), NonAirSystemResponse( ZoneNum ), ZoneMult, AirCap ); } else if ( SELECT_CASE_var == UseAnalyticalSolution ) { if ( TempDepCoef == 0.0 ) { // B=0 ZTFloor( ZoneNum ) = Zone1Floor( ZoneNum ) + TempIndCoef / AirCap; @@ -889,7 +905,7 @@ namespace DisplacementVentMgr { TempIndCoef = ConvGainsOccupiedSubzone * GainsFrac + HAT_OC + ZTFloor( ZoneNum ) * MCp_Total; { auto const SELECT_CASE_var( ZoneAirSolutionAlgo ); if ( SELECT_CASE_var == Use3rdOrder ) { - ZTOC( ZoneNum ) = ( TempHistTerm + ConvGainsOccupiedSubzone * GainsFrac + HAT_OC + ZTFloor( ZoneNum ) * MCp_Total ) / ( ( 11.0 / 6.0 ) * AirCap + HA_OC + MCp_Total ); + ZTOC( ZoneNum ) = ( TempHistTerm + ConvGainsOccupiedSubzone * GainsFrac + HAT_OC + 1.6 * ZTFloor( ZoneNum ) * MCp_Total ) / ( ( 11.0 / 6.0 ) * AirCap + HA_OC + 1.6 * MCp_Total ); } else if ( SELECT_CASE_var == UseAnalyticalSolution ) { if ( TempDepCoef == 0.0 ) { // B=0 ZTOC( ZoneNum ) = Zone1OC( ZoneNum ) + TempIndCoef / AirCap; diff --git a/src/EnergyPlus/DisplacementVentMgr.hh b/src/EnergyPlus/DisplacementVentMgr.hh index e8bb0d18068..43a09afd31b 100644 --- a/src/EnergyPlus/DisplacementVentMgr.hh +++ b/src/EnergyPlus/DisplacementVentMgr.hh @@ -94,6 +94,19 @@ namespace DisplacementVentMgr { //************************************************************************************************** + Real64 + calculateThirdOrderFloorTemperature( + Real64 temperatureHistoryTerm, + Real64 HAT_floor, + Real64 HA_floor, + Real64 MCpT_Total, + Real64 MCp_Total, + Real64 occupiedTemp, + Real64 nonAirSystemResponse, + Real64 zoneMultiplier, + Real64 airCap + ); + void CalcUCSDDV( int const ZoneNum ); // Which Zonenum diff --git a/src/EnergyPlus/ElectricPowerServiceManager.cc b/src/EnergyPlus/ElectricPowerServiceManager.cc index 80e80e4b2ff..68c95e638d2 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.cc +++ b/src/EnergyPlus/ElectricPowerServiceManager.cc @@ -237,7 +237,8 @@ namespace EnergyPlus { // if user input did not include an Electric Load center, create a simple default one here for reporting purposes // but only if there are any other electricity components set up (yet) for metering int anyElectricityPresent = GetMeterIndex( "ELECTRICITY:FACILITY" ); - if ( anyElectricityPresent > 0 ) { + int anyPlantLoadProfilePresent = InputProcessor::GetNumObjectsFound( "LoadProfile:Plant" ); + if ( anyElectricityPresent > 0 || anyPlantLoadProfilePresent > 0 ) { elecLoadCenterObjs.emplace_back( new ElectPowerLoadCenter ( 0 ) ); numLoadCenters_ = 1; } @@ -287,7 +288,7 @@ namespace EnergyPlus { } } // if transformers - if ( numLoadCenters_ > 0 ) { + if ( numLoadCenters_ > 0 ) { SetupOutputVariable( "Facility Total Purchased Electric Power [W]", electPurchRate_, "System", "Average", name_ ); SetupOutputVariable( "Facility Total Purchased Electric Energy [J]", electricityPurch_, "System", "Sum", name_, _, "ElectricityPurchased", "COGENERATION", _, "Plant" ); diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index 48c059b3e1c..3a82c1f33d3 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -6373,7 +6373,7 @@ namespace Furnaces { // because Node(FurnaceOutletNode)%Temp will have been calc'd with full DX heat in last faux call to CalcFurnaceOutput deltaT = ( Furnace( FurnaceNum ).DesignMaxOutletTemp - TempOutHeatingCoil ); - HeatCoilLoad -= ( Node( FurnaceInletNode ).MassFlowRate * cpair * deltaT ); + HeatCoilLoad += ( Node( FurnaceInletNode ).MassFlowRate * cpair * deltaT ); HeatCoilLoad = max( 0.0, HeatCoilLoad ); } } else { diff --git a/src/EnergyPlus/HVACFan.cc b/src/EnergyPlus/HVACFan.cc index e9e06534f91..aefb69b7415 100644 --- a/src/EnergyPlus/HVACFan.cc +++ b/src/EnergyPlus/HVACFan.cc @@ -129,7 +129,12 @@ namespace HVACFan { Optional< Real64 const > flowFraction, // when used, this directs the fan to set the flow at this flow fraction = current flow/ max design flow rate. It is not exactly the same as the legacy speed ratio that was used with SimulateFanComponents. Optional_bool_const zoneCompTurnFansOn, // can be used as turn fans ON signal from ZoneHVAC component Optional_bool_const zoneCompTurnFansOff, // can be used as turn Fans OFF signal from ZoneHVAC component - Optional< Real64 const > pressureRise // Pressure difference to use for DeltaPress, for rating DX coils at a different pressure without entire duct system + Optional< Real64 const > pressureRise, // Pressure difference to use for DeltaPress, for rating DX coils at a different pressure without entire duct system + Optional< Real64 const > flowRatio1, // Flow ratio in operating mode 1 + Optional< Real64 const > runTimeFraction1, // Run time fraction in operating mode 1 + Optional< Real64 const > flowRatio2, // Flow ratio in operating mode 2 + Optional< Real64 const > runTimeFraction2, // Run time fraction in opearating mode 2 + Optional< Real64 const > pressureRise2 // Pressure difference for operating mode 2 ) { @@ -153,14 +158,18 @@ namespace HVACFan { m_objTurnFansOn = DataHVACGlobals::TurnFansOn; m_objTurnFansOff = DataHVACGlobals::TurnFansOff; } - if ( present( pressureRise ) && present( flowFraction ) ) { - calcSimpleSystemFan( flowFraction, pressureRise ); + if ( present( pressureRise ) && present( flowRatio1 ) && present( runTimeFraction1 ) && present( flowRatio2 ) && present( runTimeFraction2 ) && present( pressureRise2 ) ) { + calcSimpleSystemFan( _, pressureRise, flowRatio1, runTimeFraction1, flowRatio2, runTimeFraction2, pressureRise2 ); + } else if ( !present( pressureRise ) && present( flowRatio1 ) && present( runTimeFraction1 ) && present( flowRatio2 ) && present( runTimeFraction2 ) && !present( pressureRise2 ) ) { + calcSimpleSystemFan( flowFraction, _, flowRatio1, runTimeFraction1, flowRatio2, runTimeFraction2, _ ); + } else if ( present( pressureRise ) && present( flowFraction ) ) { + calcSimpleSystemFan( flowFraction, pressureRise, _, _, _, _, _ ); } else if ( present( pressureRise ) && ! present( flowFraction ) ){ - calcSimpleSystemFan( _, pressureRise ); + calcSimpleSystemFan( _, pressureRise, _, _, _, _, _ ); } else if ( ! present( pressureRise ) && present( flowFraction ) ) { - calcSimpleSystemFan( flowFraction, _ ); + calcSimpleSystemFan( flowFraction, _, _, _, _, _, _ ); } else { - calcSimpleSystemFan( _ , _ ); + calcSimpleSystemFan( _ , _, _, _, _, _, _ ); } update(); @@ -179,12 +188,14 @@ namespace HVACFan { if ( DataGlobals::BeginEnvrnFlag && m_objEnvrnFlag ) { - m_minAirFlowRate = designAirVolFlowRate * m_minPowerFlowFrac; - m_minAirMassFlowRate = m_minAirFlowRate * m_rhoAirStdInit; + // Currently, fan does not force minimum mass flow, only used for power calculation + //m_minAirFlowRate = designAirVolFlowRate * m_minPowerFlowFrac; + //m_minAirMassFlowRate = m_minAirFlowRate * m_rhoAirStdInit; //Init the Node Control variables DataLoopNode::Node( outletNodeNum ).MassFlowRateMax = m_maxAirMassFlowRate; - DataLoopNode::Node( outletNodeNum ).MassFlowRateMin = m_minAirMassFlowRate; + // Currently, fan does not force minimum mass flow, only used for power calculation + // DataLoopNode::Node( outletNodeNum ).MassFlowRateMin = m_minAirMassFlowRate; //Initialize all report variables to a known state at beginning of simulation m_fanPower = 0.0; @@ -329,9 +340,7 @@ namespace HVACFan { m_numSpeeds( 0 ), m_inletAirMassFlowRate( 0.0 ), m_outletAirMassFlowRate( 0.0 ), - m_minAirFlowRate( 0.0 ), m_maxAirMassFlowRate( 0.0 ), - m_minAirMassFlowRate( 0.0 ), m_inletAirTemp( 0.0 ), m_outletAirTemp( 0.0 ), m_inletAirHumRat( 0.0 ), @@ -597,19 +606,35 @@ namespace HVACFan { void FanSystem::calcSimpleSystemFan( - Optional< Real64 const > flowFraction, - Optional< Real64 const > pressureRise + Optional< Real64 const > flowFraction, // Flow fraction for entire timestep (not used if flow ratios are present) + Optional< Real64 const > pressureRise, // Pressure difference to use for DeltaPress + Optional< Real64 const > flowRatio1, // Flow ratio in operating mode 1 + Optional< Real64 const > runTimeFrac1, // Run time fraction in operating mode 1 + Optional< Real64 const > flowRatio2, // Flow ratio in operating mode 2 + Optional< Real64 const > runTimeFrac2, // Run time fraction in operating mode 2 + Optional< Real64 const > pressureRise2 // Pressure difference to use for operating mode 2 ) { - Real64 localPressureRise; + std::vector< Real64 > localPressureRise; // [0] is operating mode 1, [1] is operating mode 2 Real64 localFlowFraction; Real64 localFanTotEff; - Real64 localAirMassFlow; + std::vector< Real64 > localAirMassFlow; + std::vector< Real64 > localFlowRatio; + std::vector< Real64 > localRunTimeFrac; + bool localUseFlowRatiosAndRunTimeFracs = false; + + int localNumModes = 1; // Number of operating modes, 1 or 2 ( e.g. heating, ventilating, cooling) + if ( present( flowRatio2 ) && present( runTimeFrac2 ) ) localNumModes = 2; + localPressureRise.resize( 2, 0.0 ); + localAirMassFlow.resize( 2, 0.0 ); + localFlowRatio.resize( 2, 0.0 ); + localRunTimeFrac.resize( 2, 1.0 ); if ( DataHVACGlobals::NightVentOn ) { // assume if non-zero inputs for night data then this fan is to be used with that data if ( m_nightVentPressureDelta > 0.0 ) { - localPressureRise = m_nightVentPressureDelta; + localPressureRise[ 0 ] = m_nightVentPressureDelta; + localPressureRise[ 1 ] = m_nightVentPressureDelta; } if ( m_maxAirMassFlowRate > 0.0 ) { // protect div by 0 @@ -617,24 +642,41 @@ namespace HVACFan { } else { localFlowFraction = 1.0; } - localAirMassFlow = m_inletAirMassFlowRate; + localAirMassFlow[ 0 ] = m_inletAirMassFlowRate; } else { // not in night mode if ( present( pressureRise ) ) { - localPressureRise = pressureRise; + localPressureRise[ 0 ] = pressureRise; } else { - localPressureRise = deltaPress; + localPressureRise[ 0 ] = deltaPress; + } + if ( present( pressureRise2 ) ) { + localPressureRise[ 1 ] = pressureRise2; + } else { + localPressureRise[ 1 ] = deltaPress; } if ( present( flowFraction ) ) { localFlowFraction = flowFraction; - localAirMassFlow = localFlowFraction * m_maxAirMassFlowRate; + localAirMassFlow[ 0 ] = localFlowFraction * m_maxAirMassFlowRate; } else { if ( m_maxAirMassFlowRate > 0.0 ) { // protect div by 0 localFlowFraction = m_inletAirMassFlowRate / m_maxAirMassFlowRate; } else { localFlowFraction = 1.0; } - localAirMassFlow = m_inletAirMassFlowRate; + localAirMassFlow[ 0 ] = m_inletAirMassFlowRate; + } + if ( present( flowRatio1 ) && present( flowRatio2 ) && present( runTimeFrac1 ) && present( runTimeFrac2 ) ) { + localUseFlowRatiosAndRunTimeFracs = true; + localRunTimeFrac[ 0 ] = runTimeFrac1; + localRunTimeFrac[ 1 ] = runTimeFrac2; + localFlowRatio[ 0 ] = flowRatio1; + localAirMassFlow[ 0 ] = localFlowRatio[ 0 ] * m_maxAirMassFlowRate * localRunTimeFrac[ 0 ]; + localFlowRatio[ 1 ] = flowRatio2; + localAirMassFlow[ 1 ] = localFlowRatio[ 1 ] * m_maxAirMassFlowRate * localRunTimeFrac[ 1 ]; + } else { + localRunTimeFrac[ 0 ] = 1.0; // if runTimeFracs are not present, assume single-mode operation + localRunTimeFrac[ 1 ] = 0.0; // if runTimeFracs are not present, assume single-mode operation } } @@ -655,144 +697,215 @@ namespace HVACFan { } } - //EMS override MassFlow, DeltaPress, and FanEff - if ( m_eMSFanPressureOverrideOn ) localPressureRise = m_eMSFanPressureValue; - if ( m_eMSFanEffOverrideOn ) localFanTotEff = m_eMSFanEffValue; - if ( m_eMSMaxMassFlowOverrideOn ) { - localAirMassFlow = m_eMSAirMassFlowValue; - } + for ( int mode = 0; mode < localNumModes; ++mode ) { + //EMS override MassFlow, DeltaPress, and FanEff + if ( m_eMSFanPressureOverrideOn ) localPressureRise[ mode ] = m_eMSFanPressureValue; + if ( m_eMSFanEffOverrideOn ) localFanTotEff = m_eMSFanEffValue; + if ( m_eMSMaxMassFlowOverrideOn ) { + localAirMassFlow[ mode ] = m_eMSAirMassFlowValue; + } - localAirMassFlow = min( localAirMassFlow, m_maxAirMassFlowRate ); - if ( faultActive ) { - localAirMassFlow = min( localAirMassFlow, localFaultMaxAirMassFlow ); - localPressureRise = localFaultPressureRise; + localAirMassFlow[ mode ] = min( localAirMassFlow[ mode ], m_maxAirMassFlowRate ); + if ( faultActive ) { + localAirMassFlow[ mode ] = min( localAirMassFlow[ mode ], localFaultMaxAirMassFlow ); + localPressureRise[ mode ] = localFaultPressureRise; + } + localFlowFraction = localAirMassFlow[ 0 ] / m_maxAirMassFlowRate; + localFlowFraction = min( 1.0, localFlowFraction); + + if ( localRunTimeFrac[ mode ] > 0.0 ) { + localFlowRatio[ mode ] = localAirMassFlow[ mode ] / ( m_maxAirMassFlowRate * localRunTimeFrac[ mode ] ); + } + localFlowRatio[ mode ] = min( 1.0, localFlowRatio[ mode ]); } - localFlowFraction = localAirMassFlow / m_maxAirMassFlowRate; - localFlowFraction = min( 1.0, localFlowFraction); + // zero these now, because the may accumulate across multiple operating modes m_powerLossToAir = 0.0; + m_fanPower = 0.0; + m_outletAirMassFlowRate = 0.0; + if( speedControl == SpeedControlMethod::Discrete ) { + for ( auto loop = 0; loop < m_numSpeeds; ++loop ) { + m_fanRunTimeFractionAtSpeed[ loop ] = 0.0; + } + } - if ( ( ScheduleManager::GetCurrentScheduleValue( availSchedIndex ) > 0.0 || m_objTurnFansOn ) && ! m_objTurnFansOff && localAirMassFlow > 0.0 ) { + if ( ( ScheduleManager::GetCurrentScheduleValue( availSchedIndex ) > 0.0 || m_objTurnFansOn ) && ! m_objTurnFansOff && ( ( localAirMassFlow[ 0 ] + localAirMassFlow[ 1 ] ) > 0.0 ) ) { //fan is running + for ( int mode = 0; mode < localNumModes; ++mode ) { - switch ( speedControl ) { + // if no flow for this mode then continue to the next mode + if ( localAirMassFlow[ mode ] == 0.0 ) continue; + + switch ( speedControl ) { - case SpeedControlMethod::Discrete: { - // - if ( DataHVACGlobals::OnOffFanPartLoadFraction <= 0.0 ) { - DataHVACGlobals::OnOffFanPartLoadFraction = 1.0; - } - if ( DataHVACGlobals::OnOffFanPartLoadFraction < 0.7 ) { - DataHVACGlobals::OnOffFanPartLoadFraction = 0.7; // a warning message is already issued from the DX coils or gas heating coil - } - Real64 locFanRunTimeFraction( 0.0 ); - if ( DataHVACGlobals::OnOffFanPartLoadFraction >= 1.0 ){ - locFanRunTimeFraction = localFlowFraction; - } else { - locFanRunTimeFraction = max( 0.0, min( 1.0, localFlowFraction/DataHVACGlobals::OnOffFanPartLoadFraction ) ); + case SpeedControlMethod::Discrete: { + // + if ( DataHVACGlobals::OnOffFanPartLoadFraction <= 0.0 ) { + DataHVACGlobals::OnOffFanPartLoadFraction = 1.0; + } + if ( DataHVACGlobals::OnOffFanPartLoadFraction < 0.7 ) { + DataHVACGlobals::OnOffFanPartLoadFraction = 0.7; // a warning message is already issued from the DX coils or gas heating coil + } + if ( localUseFlowRatiosAndRunTimeFracs ) { + // Use flow ratios and runtimefractions pass from parent (allows fan to cycle at a specified speed) + Real64 locRunTimeFraction( 0.0 ); + if ( DataHVACGlobals::OnOffFanPartLoadFraction >= 1.0 ){ + locRunTimeFraction = localRunTimeFrac[ mode ]; + } else { + locRunTimeFraction = max( 0.0, min( 1.0, localRunTimeFrac[ mode ]/DataHVACGlobals::OnOffFanPartLoadFraction ) ); + } + Real64 locFlowRatio = localFlowRatio[ mode ]; // Current mode flow rate / max flow rate + if ( m_numSpeeds == 1 ) { // CV or OnOff + localFanTotEff = m_fanTotalEff; + m_fanRunTimeFractionAtSpeed[ 0 ] += locRunTimeFraction * locFlowRatio; + m_fanPower += m_fanRunTimeFractionAtSpeed[ 0 ] * m_maxAirMassFlowRate * localPressureRise[ mode ] / ( localFanTotEff * m_rhoAirStdInit ); + } else if ( m_numSpeeds > 1 ) { // multi speed + + // find which two speed levels bracket flow ratios and calculate runtimefraction at each speed + // ideally the flow ratios passed in will match one of the fan m_flowFractionAtSpeed but it is not required + int lowSideSpeed = -1; + int hiSideSpeed = -1; + Real64 locLowSpeedFanRunTimeFrac = 0.0; + Real64 locHiSpeedFanRunTimeFrac = 0.0; + + if ( locFlowRatio <= m_flowFractionAtSpeed[ 0 ] ) { // on/off at lowest speed + hiSideSpeed = 0; + locHiSpeedFanRunTimeFrac = locFlowRatio * locRunTimeFraction / m_flowFractionAtSpeed[ 0 ]; + m_fanRunTimeFractionAtSpeed[ 0 ] += locHiSpeedFanRunTimeFrac; + } else { + for ( auto loop = 0; loop < m_numSpeeds - 1; ++loop ) { + if ( ( m_flowFractionAtSpeed[ loop ] <= locFlowRatio ) && ( locFlowRatio <= m_flowFractionAtSpeed[ loop + 1 ] ) ) { + lowSideSpeed = loop; + hiSideSpeed = loop +1; + break; + } + } + Real64 locLowSpeedTimeFrac = ( m_flowFractionAtSpeed[ hiSideSpeed ] - locFlowRatio ) / ( m_flowFractionAtSpeed[ hiSideSpeed ] - m_flowFractionAtSpeed[ lowSideSpeed ] ); + locLowSpeedFanRunTimeFrac = locLowSpeedTimeFrac * localRunTimeFrac[ mode ]; + locHiSpeedFanRunTimeFrac = ( 1 - locLowSpeedTimeFrac ) * localRunTimeFrac[ mode ]; + m_fanRunTimeFractionAtSpeed[ lowSideSpeed ] += locLowSpeedFanRunTimeFrac; + m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] += locHiSpeedFanRunTimeFrac; + } + if ( lowSideSpeed != -1 && hiSideSpeed != -1 ) { + m_fanPower += locLowSpeedFanRunTimeFrac * m_massFlowAtSpeed[ lowSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ lowSideSpeed ] * m_rhoAirStdInit ) + locHiSpeedFanRunTimeFrac * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); + } else if ( lowSideSpeed == -1 && hiSideSpeed == 0 ) { + m_fanPower += locHiSpeedFanRunTimeFrac * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); + } + } + } else { + // Use localFlowFraction which is not locked at a particular flow ratio (legacy method for fan:onoff) + Real64 locFanRunTimeFraction( 0.0 ); + if ( DataHVACGlobals::OnOffFanPartLoadFraction >= 1.0 ){ + locFanRunTimeFraction = localFlowFraction; + } else { + locFanRunTimeFraction = max( 0.0, min( 1.0, localFlowFraction/DataHVACGlobals::OnOffFanPartLoadFraction ) ); + } + if ( m_numSpeeds == 1 ) { // CV or OnOff + localFanTotEff = m_fanTotalEff; + m_fanRunTimeFractionAtSpeed[ 0 ] += locFanRunTimeFraction; + m_fanPower += m_fanRunTimeFractionAtSpeed[ 0 ] * m_maxAirMassFlowRate * localPressureRise[ mode ] / ( localFanTotEff * m_rhoAirStdInit ); + } else if ( m_numSpeeds > 1 ) { // multi speed + + // find which two speed levels bracket flow fraction and calculate runtimefraction + int lowSideSpeed = -1; + int hiSideSpeed = -1; + + if ( locFanRunTimeFraction < m_flowFractionAtSpeed[ 0 ] ) { // on/off between zero and lowest speed + hiSideSpeed = 0; + m_fanRunTimeFractionAtSpeed[ 0 ] += locFanRunTimeFraction / m_flowFractionAtSpeed[ 0 ]; + } else { + for ( auto loop = 0; loop < m_numSpeeds - 1; ++loop ) { + if ( ( m_flowFractionAtSpeed[ loop ] <= locFanRunTimeFraction ) && ( locFanRunTimeFraction <= m_flowFractionAtSpeed[ loop + 1 ] ) ) { + lowSideSpeed = loop; + hiSideSpeed = loop +1; + break; + } + } + m_fanRunTimeFractionAtSpeed[ lowSideSpeed ] += ( m_flowFractionAtSpeed[ hiSideSpeed ] - locFanRunTimeFraction ) / ( m_flowFractionAtSpeed[ hiSideSpeed ] - m_flowFractionAtSpeed[ lowSideSpeed ] ); + m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] += ( locFanRunTimeFraction - m_flowFractionAtSpeed[ lowSideSpeed ] ) / ( m_flowFractionAtSpeed[ hiSideSpeed ] - m_flowFractionAtSpeed[ lowSideSpeed ] ); + } + if ( lowSideSpeed != -1 && hiSideSpeed != -1 ) { + m_fanPower += m_fanRunTimeFractionAtSpeed[ lowSideSpeed ] * m_massFlowAtSpeed[ lowSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ lowSideSpeed ] * m_rhoAirStdInit ) + m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); + } else if ( lowSideSpeed == -1 && hiSideSpeed == 0 ) { + m_fanPower += m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise[ mode ] / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); + } + } + } + localFanTotEff = m_fanTotalEff; + DataHVACGlobals::OnOffFanPartLoadFraction = 1.0; // reset to 1 + break; } - if ( m_numSpeeds == 1 ) { // CV or OnOff + case SpeedControlMethod::Continuous : { localFanTotEff = m_fanTotalEff; - m_fanRunTimeFractionAtSpeed[ 0 ] = locFanRunTimeFraction; - m_fanPower = m_fanRunTimeFractionAtSpeed[ 0 ] * m_maxAirMassFlowRate * localPressureRise / ( localFanTotEff * m_rhoAirStdInit ); - Real64 fanShaftPower = m_motorEff * m_fanPower; - m_powerLossToAir = fanShaftPower + ( m_fanPower - fanShaftPower )* m_motorInAirFrac; - m_outletAirEnthalpy = m_inletAirEnthalpy + m_powerLossToAir / localAirMassFlow; - m_outletAirHumRat = m_inletAirHumRat; - m_outletAirMassFlowRate = localAirMassFlow; - m_outletAirTemp = Psychrometrics::PsyTdbFnHW( m_outletAirEnthalpy, m_outletAirHumRat ); - } else if ( m_numSpeeds > 1 ) { // multi speed - - // find which two speed levels bracket flow fraction and calculate runtimefraction - int lowSideSpeed = -1; - int hiSideSpeed = -1; - for ( auto loop = 0; loop < m_numSpeeds; ++loop ) { - m_fanRunTimeFractionAtSpeed[ loop ] = 0.0; + Real64 locFlowRatio( 0.0 ); + Real64 locFanRunTimeFraction( 0.0 ); + if ( localUseFlowRatiosAndRunTimeFracs ){ + locFlowRatio = localFlowRatio[ mode ]; + locFanRunTimeFraction = localRunTimeFrac[ mode ]; + } else { + locFlowRatio = localFlowFraction; + locFanRunTimeFraction = 1.0; } - if ( locFanRunTimeFraction < m_flowFractionAtSpeed[ 0 ] ) { // on/off between zero and lowest speed - hiSideSpeed = 0; - m_fanRunTimeFractionAtSpeed[ 0 ] = locFanRunTimeFraction / m_flowFractionAtSpeed[ 0 ]; + Real64 localFlowFractionForPower = max( m_minPowerFlowFrac, locFlowRatio ); + Real64 localPowerFraction( 0.0); + if ( DataHVACGlobals::NightVentOn ) { + localPowerFraction = 1.0; // not sure why, but legacy fan had this for night ventilation } else { - for ( auto loop = 0; loop < m_numSpeeds - 1; ++loop ) { - if ( ( m_flowFractionAtSpeed[ loop ] <= locFanRunTimeFraction ) && ( locFanRunTimeFraction <= m_flowFractionAtSpeed[ loop + 1 ] ) ) { - lowSideSpeed = loop; - hiSideSpeed = loop +1; - break; - } - } - m_fanRunTimeFractionAtSpeed[ lowSideSpeed ] = ( m_flowFractionAtSpeed[ hiSideSpeed ] - locFanRunTimeFraction ) / ( m_flowFractionAtSpeed[ hiSideSpeed ] - m_flowFractionAtSpeed[ lowSideSpeed ] ); - m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] = ( locFanRunTimeFraction - m_flowFractionAtSpeed[ lowSideSpeed ] ) / ( m_flowFractionAtSpeed[ hiSideSpeed ] - m_flowFractionAtSpeed[ lowSideSpeed ] ); + localPowerFraction = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, localFlowFractionForPower ); } - if ( lowSideSpeed != -1 && hiSideSpeed != -1 ) { - m_fanPower = m_fanRunTimeFractionAtSpeed[ lowSideSpeed ] * m_massFlowAtSpeed[ lowSideSpeed ] * localPressureRise / ( m_totEfficAtSpeed[ lowSideSpeed ] * m_rhoAirStdInit ) + m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); - } else if ( lowSideSpeed == -1 && hiSideSpeed == 0 ) { - m_fanPower = m_fanRunTimeFractionAtSpeed[ hiSideSpeed ] * m_massFlowAtSpeed[ hiSideSpeed ] * localPressureRise / ( m_totEfficAtSpeed[ hiSideSpeed ] * m_rhoAirStdInit ); + Real64 localfanPower = locFanRunTimeFraction * localPowerFraction * m_maxAirMassFlowRate * localPressureRise[ mode ] / ( localFanTotEff * m_rhoAirStdInit ); + Real64 fanShaftPower = m_motorEff * localfanPower; + Real64 localpowerLossToAir = fanShaftPower + ( localfanPower - fanShaftPower )* m_motorInAirFrac; + m_outletAirEnthalpy = m_inletAirEnthalpy + localpowerLossToAir / localAirMassFlow[ mode ]; // this will get revised later + m_outletAirHumRat = m_inletAirHumRat; // this will get revised later + m_outletAirTemp = Psychrometrics::PsyTdbFnHW( m_outletAirEnthalpy, m_outletAirHumRat ); // this will get revised later + // When fan air flow is less than 10%, the fan power curve is linearized between the 10% to 0% to + // avoid the unrealistic high temperature rise across the fan. + Real64 deltaTAcrossFan = m_outletAirTemp - m_inletAirTemp; + if ( deltaTAcrossFan > 20.0 ) { + Real64 minFlowFracLimitFanHeat = 0.10; + Real64 powerFractionAtLowMin = 0.0; + Real64 fanPoweratLowMinimum = 0.0; + if ( localFlowFractionForPower < minFlowFracLimitFanHeat ) { + powerFractionAtLowMin = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, minFlowFracLimitFanHeat ); + fanPoweratLowMinimum = powerFractionAtLowMin * m_maxAirMassFlowRate * localPressureRise[ mode ] / ( localFanTotEff * m_rhoAirStdInit ); + localfanPower = localFlowFractionForPower * fanPoweratLowMinimum / minFlowFracLimitFanHeat; + } else if ( locFlowRatio < minFlowFracLimitFanHeat ) { + powerFractionAtLowMin = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, minFlowFracLimitFanHeat ); + fanPoweratLowMinimum = powerFractionAtLowMin * m_maxAirMassFlowRate * localPressureRise[ mode ] / ( localFanTotEff * m_rhoAirStdInit ); + localfanPower = locFlowRatio * fanPoweratLowMinimum / minFlowFracLimitFanHeat; + } + m_fanPower += localfanPower; } - - Real64 fanShaftPower = m_motorEff * m_fanPower; - m_powerLossToAir = fanShaftPower + ( m_fanPower - fanShaftPower )* m_motorInAirFrac; - m_outletAirEnthalpy = m_inletAirEnthalpy + m_powerLossToAir / localAirMassFlow; - m_outletAirHumRat = m_inletAirHumRat; - m_outletAirMassFlowRate = localAirMassFlow; - m_outletAirTemp = Psychrometrics::PsyTdbFnHW( m_outletAirEnthalpy, m_outletAirHumRat ); + break; + } // continuous speed control case + case SpeedControlMethod::NotSet: { + // do nothing + break; } + } // end switch + m_outletAirMassFlowRate += localAirMassFlow[ mode ]; - localFanTotEff = m_fanTotalEff; - DataHVACGlobals::OnOffFanPartLoadFraction = 1.0; - break; - } - case SpeedControlMethod::Continuous : { - localFanTotEff = m_fanTotalEff; - Real64 localFlowFractionForPower = max( m_minPowerFlowFrac, localFlowFraction ); - Real64 localPowerFraction( 0.0); - if ( DataHVACGlobals::NightVentOn ) { - localPowerFraction = 1.0; // not sure why, but legacy fan had this for night ventilation - } else { - localPowerFraction = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, localFlowFractionForPower ); - } - m_fanPower = localPowerFraction * m_maxAirMassFlowRate * localPressureRise / ( localFanTotEff * m_rhoAirStdInit ); - Real64 fanShaftPower = m_motorEff * m_fanPower; + } // end of operating mode loop + + if ( m_outletAirMassFlowRate > 0.0 ){ + Real64 fanShaftPower = m_motorEff * m_fanPower; // power delivered to shaft m_powerLossToAir = fanShaftPower + ( m_fanPower - fanShaftPower )* m_motorInAirFrac; - m_outletAirEnthalpy = m_inletAirEnthalpy + m_powerLossToAir / localAirMassFlow; + m_outletAirEnthalpy = m_inletAirEnthalpy + m_powerLossToAir / m_outletAirMassFlowRate; + // This fan does not change the moisture or Mass Flow across the component m_outletAirHumRat = m_inletAirHumRat; - m_outletAirMassFlowRate = localAirMassFlow; m_outletAirTemp = Psychrometrics::PsyTdbFnHW( m_outletAirEnthalpy, m_outletAirHumRat ); - - // When fan air flow is less than 10%, the fan power curve is linearized between the 10% to 0% to - // avoid the unrealistic high temperature rise across the fan. - Real64 deltaTAcrossFan = m_outletAirTemp - m_inletAirTemp; - if ( deltaTAcrossFan > 20.0 ) { - Real64 minFlowFracLimitFanHeat = 0.10; - Real64 powerFractionAtLowMin = 0.0; - Real64 fanPoweratLowMinimum = 0.0; - if ( localFlowFractionForPower < minFlowFracLimitFanHeat ) { - powerFractionAtLowMin = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, minFlowFracLimitFanHeat ); - - fanPoweratLowMinimum = powerFractionAtLowMin * m_maxAirMassFlowRate * localPressureRise / ( localFanTotEff * m_rhoAirStdInit ); - m_fanPower = localFlowFractionForPower * fanPoweratLowMinimum / minFlowFracLimitFanHeat; - } else if ( localFlowFraction < minFlowFracLimitFanHeat ) { - - powerFractionAtLowMin = CurveManager::CurveValue( powerModFuncFlowFractionCurveIndex, minFlowFracLimitFanHeat ); - fanPoweratLowMinimum = powerFractionAtLowMin * m_maxAirMassFlowRate * localPressureRise / ( localFanTotEff * m_rhoAirStdInit ); - m_fanPower = localFlowFraction * fanPoweratLowMinimum / minFlowFracLimitFanHeat; - } - fanShaftPower = m_motorEff * m_fanPower; // power delivered to shaft - m_powerLossToAir = fanShaftPower + ( m_fanPower - fanShaftPower ) * m_motorInAirFrac; - m_outletAirEnthalpy = m_inletAirEnthalpy + m_powerLossToAir / localAirMassFlow; - // This fan does not change the moisture or Mass Flow across the component - m_outletAirHumRat = m_inletAirHumRat; - m_outletAirMassFlowRate = localAirMassFlow; - m_outletAirTemp = Psychrometrics::PsyTdbFnHW( m_outletAirEnthalpy, m_outletAirHumRat ); - } - break; - } // continuous speed control case - case SpeedControlMethod::NotSet: { - // do nothing - break; + } else { + m_fanPower = 0.0; + m_powerLossToAir = 0.0; + m_outletAirHumRat = m_inletAirHumRat; + m_outletAirEnthalpy = m_inletAirEnthalpy; + m_outletAirTemp = m_inletAirTemp; + m_massFlowRateMaxAvail = 0.0; + m_massFlowRateMinAvail = 0.0; } - } // end switch } else { // fan is off //Fan is off and not operating no power consumed and mass flow rate. @@ -803,8 +916,8 @@ namespace HVACFan { m_outletAirTemp = m_inletAirTemp; // Set the Control Flow variables to 0.0 flow when OFF. if ( fanIsSecondaryDriver ) { - m_outletAirMassFlowRate = localAirMassFlow; // sometimes the air is moving with the fan off, eg. AirTerminal:SingleDuct:VAV:Reheat:VariableSpeedFan - if ( localAirMassFlow == 0.0 ) { + m_outletAirMassFlowRate = localAirMassFlow[ 0 ] + localAirMassFlow[ 1 ]; // sometimes the air is moving with the fan off, eg. AirTerminal:SingleDuct:VAV:Reheat:VariableSpeedFan + if (m_outletAirMassFlowRate == 0.0 ) { m_massFlowRateMaxAvail = 0.0; m_massFlowRateMinAvail = 0.0; } diff --git a/src/EnergyPlus/HVACFan.hh b/src/EnergyPlus/HVACFan.hh index ebaecc197da..d53d7158d8a 100644 --- a/src/EnergyPlus/HVACFan.hh +++ b/src/EnergyPlus/HVACFan.hh @@ -88,11 +88,16 @@ public: // Methods void simulate( // bool const firstHVACIteration, - Optional< Real64 const > flowFraction = _, + Optional< Real64 const > flowFraction = _, // Flow fraction in operating mode 1 Optional_bool_const zoneCompTurnFansOn = _, // Turn fans ON signal from ZoneHVAC component Optional_bool_const zoneCompTurnFansOff = _, // Turn Fans OFF signal from ZoneHVAC component - Optional< Real64 const > pressureRise = _ // Pressure difference to use for DeltaPress - ); + Optional< Real64 const > pressureRise = _, // Pressure difference to use for DeltaPress + Optional< Real64 const > flowRatio1 = _, // Flow ratio in operating mode 1 + Optional< Real64 const > runTimeFraction1 = _, // Run time fraction in operating mode 1 + Optional< Real64 const > flowRatio2= _, // Flow ratio in operating mode 2 + Optional< Real64 const > runTimeFraction2 = _, // Run time fraction in operating mode 2 + Optional< Real64 const > pressureRise2 = _ // Pressure difference to use for operating mode 2 + ); Real64 fanPower() const; @@ -148,8 +153,13 @@ private: // methods void calcSimpleSystemFan( - Optional< Real64 const > flowFraction, - Optional< Real64 const > PressureRise + Optional< Real64 const > flowFraction, // Flow fraction for entire timestep (not used if flow ratios are present) + Optional< Real64 const > pressureRise, // Pressure difference to use for DeltaPress + Optional< Real64 const > flowRatio1, // Flow ratio in operating mode 1 + Optional< Real64 const > runTimeFrac1, // Run time fraction in operating mode 1 + Optional< Real64 const > flowRatio2, // Flow ratio in operating mode 2 + Optional< Real64 const > runTimeFrac2, // Run time fraction in operating mode 2 + Optional< Real64 const > pressureRise2 // Pressure difference to use for operating mode 2 ); void @@ -200,9 +210,9 @@ private: // methods std::vector< Real64 > m_totEfficAtSpeed; Real64 m_inletAirMassFlowRate; // MassFlow through the Fan being Simulated [kg/Sec] Real64 m_outletAirMassFlowRate; - Real64 m_minAirFlowRate; // Min Specified Volume Flow Rate of Fan [m3/sec] +// Real64 m_minAirFlowRate; // Min Specified Volume Flow Rate of Fan [m3/sec] Real64 m_maxAirMassFlowRate; // Max flow rate of fan in kg/sec - Real64 m_minAirMassFlowRate; // Min flow rate of fan in kg/sec +// Real64 m_minAirMassFlowRate; // Min flow rate of fan in kg/sec // int fanMinAirFracMethod; // parameter for what method is used for min flow fraction // Real64 fanFixedMin; // Absolute minimum fan air flow [m3/s] Real64 m_inletAirTemp; diff --git a/src/EnergyPlus/HVACUnitarySystem.cc b/src/EnergyPlus/HVACUnitarySystem.cc index 67331936487..e7193a5a045 100644 --- a/src/EnergyPlus/HVACUnitarySystem.cc +++ b/src/EnergyPlus/HVACUnitarySystem.cc @@ -279,6 +279,10 @@ namespace HVACUnitarySystem { Real64 QToCoolSetPt( 0.0 ); // load to cooling set point {W} Real64 QToHeatSetPt( 0.0 ); // load to heating set point {W} Real64 TempSteamIn( 100.0 ); // steam coil steam inlet temperature + Real64 m_flowRatio1( 0.0 ); // Flow fraction in operating mode 1 (CompOn) + Real64 m_flowRatio2( 0.0 ); // Flow fraction in operating mode 2 (CompOff) + Real64 m_runTimeFraction1( 0.0 ); // Fan runtime fraction in operating mode 1 (CompOn) + Real64 m_runTimeFraction2( 0.0 ); // Fan runtime fraction in operating mode 2 (CompOff) // Allocatable types Array1D_bool CheckEquipName; @@ -961,6 +965,10 @@ namespace HVACUnitarySystem { UnitarySystem( UnitarySysNum ).HeatCoilWaterFlowRatio = 0.0; UnitarySystem( UnitarySysNum ).InitHeatPump = true; + m_flowRatio1 = 0.0; + m_flowRatio2 = 0.0; + m_runTimeFraction1 = 0.0; + m_runTimeFraction2 = 0.0; } @@ -2058,6 +2066,8 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists ) { SizingMethod = SystemAirflowSizing; + EqSizing.SystemAirFlow = true; + EqSizing.AirVolFlow = max( EqSizing.CoolingAirVolFlow, EqSizing.HeatingAirVolFlow ); if ( UnitarySystem( UnitarySysNum ).DesignFanVolFlowRate <= 0.0 ) { // attempt to catch any missed logic in GetUnitarySystem UnitarySystem( UnitarySysNum ).DesignFanVolFlowRate = AutoSize; } @@ -2069,6 +2079,7 @@ namespace HVACUnitarySystem { RequestSizing( CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); UnitarySystem( UnitarySysNum ).DesignFanVolFlowRate = TempSize; DataEMSOverrideON = false; + EqSizing.SystemAirFlow = false; } @@ -2447,11 +2458,13 @@ namespace HVACUnitarySystem { PrintFlag = true; TempSize = UnitarySystem( UnitarySysNum ).DesignCoolingCapacity; + DataFlowUsedForSizing = UnitarySystem( UnitarySysNum ).MaxCoolAirVolFlow; SizingString = "Nominal Cooling Capacity [W]"; RequestSizing( CompType, CompName, SizingMethod, SizingString, TempSize, PrintFlag, RoutineName ); UnitarySystem( UnitarySysNum ).DesignCoolingCapacity = TempSize; DataConstantUsedForSizing = 0.0; DataFractionUsedForSizing = 0.0; + DataFlowUsedForSizing = 0.0; } @@ -3542,6 +3555,8 @@ namespace HVACUnitarySystem { errFlag = false; } + UnitarySystem(UnitarySysNum).DesignHeatingCapacity = GetDXCoilCapacity(HeatingCoilType, HeatingCoilName, errFlag); + } else if ( UnitarySystem( UnitarySysNum ).HeatingCoilType_Num == Coil_HeatingElectric_MultiStage || UnitarySystem( UnitarySysNum ).HeatingCoilType_Num == Coil_HeatingGas_MultiStage ) { errFlag = false; @@ -6401,7 +6416,7 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == BlowThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -6448,7 +6463,7 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == DrawThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -8208,7 +8223,7 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == BlowThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -8237,7 +8252,7 @@ namespace HVACUnitarySystem { // If blow thru fan is used, the fan must be simulated after coil sets OnOffFanPartLoadFraction if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == BlowThru && OnOffFanPartLoadFraction < 1.0 ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -8279,7 +8294,7 @@ namespace HVACUnitarySystem { // If blow thru fan is used, the fan must be simulated after coil sets OnOffFanPartLoadFraction if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == BlowThru && OnOffFanPartLoadFraction < 1.0 ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -8304,7 +8319,7 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == DrawThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -8593,7 +8608,7 @@ namespace HVACUnitarySystem { int const AirLoopNum, // index to air loop bool const FirstHVACIteration, // True when first HVAC iteration Real64 const PartLoadRatio, // coil operating part-load ratio - int const CompOn, // comrpressor control (0=off, 1=on) + int const CompOn, // compressor control (0=off, 1=on) Real64 const OnOffAirFlowRatio, // ratio of on to off flow rate Optional< Real64 const > HeatCoilLoad // adjusted heating coil load if outlet temp exceeds max (W) ) @@ -10973,7 +10988,7 @@ namespace HVACUnitarySystem { //CALL the series of components that simulate a Unitary System if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == BlowThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -11015,7 +11030,7 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanExists && UnitarySystem( UnitarySysNum ).FanPlace == DrawThru ) { if ( UnitarySystem( UnitarySysNum ).FanType_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ UnitarySystem( UnitarySysNum ).FanIndex ]->simulate( _,_,_,_, m_flowRatio1, m_runTimeFraction1, m_flowRatio2, m_runTimeFraction2, _ ); } else { Fans::SimulateFanComponents( BlankString, FirstHVACIteration, UnitarySystem( UnitarySysNum ).FanIndex, FanSpeedRatio ); } @@ -11063,6 +11078,8 @@ namespace HVACUnitarySystem { CompOffMassFlow = 0.0; CompOffFlowRatio = 0.0; + m_flowRatio1 = 0.0; + m_flowRatio2 = 0.0; // Set the compressor or coil ON mass flow rate if ( HeatingLoad ) { @@ -11420,6 +11437,9 @@ namespace HVACUnitarySystem { } MSHPMassFlowRateHigh = CompOnMassFlow; // doesn't hurt to set these if multi-speed coils are not used + m_flowRatio1 = CompOnFlowRatio; + m_flowRatio2 = CompOffFlowRatio; + // Set the system mass flow rates SetAverageAirFlow( UnitarySysNum, PartLoadRatio, OnOffAirFlowRatio ); @@ -11458,6 +11478,9 @@ namespace HVACUnitarySystem { bool FanOn; Real64 fanPartLoadRatio; // local variable for PLR + m_runTimeFraction1 = 0.0; + m_runTimeFraction2 = 0.0; + fanPartLoadRatio = PartLoadRatio; if( UnitarySystem( UnitarySysNum ).simASHRAEModel ) fanPartLoadRatio = UnitarySystem( UnitarySysNum ).FanPartLoadRatio; SpeedNum = max( UnitarySystem( UnitarySysNum ).CoolingSpeedNum, UnitarySystem( UnitarySysNum ).HeatingSpeedNum ); @@ -11477,14 +11500,22 @@ namespace HVACUnitarySystem { if ( SpeedNum > 1 ) { if ( ( CoolingLoad && MultiOrVarSpeedCoolCoil( UnitarySysNum ) ) || ( HeatingLoad && MultiOrVarSpeedHeatCoil( UnitarySysNum ) ) ) { FanSpeedRatio = fanPartLoadRatio * CompOnFlowRatio + ( 1.0 - fanPartLoadRatio ) * CompOffFlowRatio; + m_runTimeFraction1 = fanPartLoadRatio; + m_runTimeFraction2 = 1.0 - fanPartLoadRatio; } else { FanSpeedRatio = CompOnFlowRatio; + m_runTimeFraction1 = fanPartLoadRatio; + m_runTimeFraction2 = 0.0; } } else { FanSpeedRatio = ( fanPartLoadRatio * CompOnFlowRatio ) + ( ( 1.0 - fanPartLoadRatio ) * CompOffFlowRatio ); + m_runTimeFraction1 = fanPartLoadRatio; + m_runTimeFraction2 = 1.0 - fanPartLoadRatio; } } else { FanSpeedRatio = CompOnFlowRatio; + m_runTimeFraction1 = fanPartLoadRatio; + m_runTimeFraction2 = 0.0; } if ( !( HeatingLoad && UnitarySystem( UnitarySysNum ).NumOfSpeedHeating == 0 ) ) { @@ -11492,9 +11523,13 @@ namespace HVACUnitarySystem { if ( UnitarySystem( UnitarySysNum ).FanOpMode == ContFanCycCoil ) { AverageUnitMassFlow = CompOnMassFlow; FanSpeedRatio = CompOnFlowRatio; + m_runTimeFraction1 = 1.0; + m_runTimeFraction2 = 0.0; } else { AverageUnitMassFlow = fanPartLoadRatio * CompOnMassFlow; FanSpeedRatio = fanPartLoadRatio * CompOnFlowRatio; + m_runTimeFraction1 = fanPartLoadRatio; + m_runTimeFraction2 = 0.0; } } } @@ -13654,6 +13689,10 @@ namespace HVACUnitarySystem { QToHeatSetPt = 0.0; TempSteamIn = 100.0; NumUnitarySystemsSized = 0; + m_flowRatio1 = 0.0; + m_flowRatio2 = 0.0; + m_runTimeFraction1 = 0.0; + m_runTimeFraction2 = 0.0; // Allocatable types CheckEquipName.deallocate(); diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 692e6c04766..f67ee9c5ce4 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -59,17 +59,21 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include +#include #include #include #include +#include namespace EnergyPlus { namespace HeatBalanceKivaManager { @@ -88,22 +92,221 @@ KivaInstanceMap::KivaInstanceMap( floorSurface(floorSurface), wallSurfaces(wallSurfaces), zoneNum(zoneNum), + zoneControlType(KIVAZONE_UNCONTROLLED), + zoneControlNum(0), weightedPerimeter(weightedPerimeter), constructionNum(constructionNum) -{} +{ -void KivaInstanceMap::initGround() + for (int i = 1; i <= DataZoneControls::NumTempControlledZones; ++i) { + if ( DataZoneControls::TempControlledZone(i).ActualZoneNum == zoneNum) { + zoneControlType = KIVAZONE_TEMPCONTROL; + zoneControlNum = i; + break; + } + } + for (int i = 1; i <= DataZoneControls::NumComfortControlledZones; ++i) { + if ( DataZoneControls::ComfortControlledZone(i).ActualZoneNum == zoneNum) { + zoneControlType = KIVAZONE_COMFORTCONTROL; + zoneControlNum = i; + break; + } + } + for (size_t i = 1; i <= DataZoneControls::StageControlledZone.size(); ++i) { + if ( DataZoneControls::StageControlledZone(i).ActualZoneNum == zoneNum) { + zoneControlType = KIVAZONE_STAGEDCONTROL; + zoneControlNum = i; + break; + } + } + +} + +void KivaInstanceMap::initGround(const KivaWeatherData& kivaWeather) { - // TODO Future accelerated initialization - // Figure out what times (and corresponding weather data) to read - // timestep = 168 hours - // number of timesteps = 12 + // Determine accelerated intervals + int numAccelaratedTimesteps = 3; + int acceleratedTimestep = 30; // days + int accDate = DataEnvironment::DayOfYear - 1 - acceleratedTimestep * ( numAccelaratedTimesteps + 1 ); // date time = last timestep from the day before + while (accDate < 0) { + accDate = accDate + 365 + WeatherManager::LeapYearAdd; + } + + // Use simple radiative model for initialization + ground.foundation.slab.emissivity = DataHeatBalance::Construct( DataSurfaces::Surface(floorSurface).Construction ).InsideAbsorpThermal; + if (constructionNum > 0) { + ground.foundation.wall.interiorEmissivity = DataHeatBalance::Construct( constructionNum ).InsideAbsorpThermal; + } else { + ground.foundation.wall.interiorEmissivity = 0.9; + } + + // Initialize with steady state before accelerated timestepping ground.foundation.numericalScheme = Kiva::Foundation::NS_STEADY_STATE; - setBoundaryConditions(); + setInitialBoundaryConditions( kivaWeather, accDate, 24, DataGlobals::NumOfTimeStepInHour ); ground.calculate( bcs ); + accDate += acceleratedTimestep; + while (accDate > 365 + WeatherManager::LeapYearAdd) { + accDate = accDate - (365 + WeatherManager::LeapYearAdd); + } + + // Accelerated timestepping + ground.foundation.numericalScheme = Kiva::Foundation::NS_IMPLICIT; + for (int i = 0; i < numAccelaratedTimesteps; ++i) { + setInitialBoundaryConditions( kivaWeather, accDate, 24, DataGlobals::NumOfTimeStepInHour ); + ground.calculate( bcs, acceleratedTimestep * 24 * 60 * 60 ); + accDate += acceleratedTimestep; + while (accDate > 365 + WeatherManager::LeapYearAdd) { + accDate = accDate - (365 + WeatherManager::LeapYearAdd); + } + } + + ground.calculateSurfaceAverages(); ground.foundation.numericalScheme = Kiva::Foundation::NS_ADI; + + // Reset emissivity to use EnergyPlus's IR model + ground.foundation.slab.emissivity = 0.0; + ground.foundation.wall.interiorEmissivity = 0.0; + +} + +void KivaInstanceMap::setInitialBoundaryConditions( + const KivaWeatherData& kivaWeather, + const int date, + const int hour, + const int timestep +) { + + unsigned index, indexPrev; + unsigned dataSize = kivaWeather.windSpeed.size(); + Real64 weightNow; + + if ( kivaWeather.intervalsPerHour == 1 ) { + index = (date - 1)*24 + (hour - 1); + weightNow = min( 1.0, ( double( timestep ) / double( DataGlobals::NumOfTimeStepInHour ) ) ); + } else { + index = (date - 1)*24*DataGlobals::NumOfTimeStepInHour + (hour - 1)*DataGlobals::NumOfTimeStepInHour + (timestep - 1); + weightNow = 1.0; // weather data interval must be the same as the timestep interval (i.e., no interpolation) + } + if ( index == 0) { + indexPrev = dataSize - 1; + } else { + indexPrev = index - 1; + } + + bcs.outdoorTemp = kivaWeather.dryBulb[index]*weightNow + kivaWeather.dryBulb[indexPrev]*(1.0 - weightNow) + DataGlobals::KelvinConv; + + bcs.localWindSpeed = (kivaWeather.windSpeed[index]*weightNow + kivaWeather.windSpeed[indexPrev]*(1.0 - weightNow)) * DataEnvironment::WeatherFileWindModCoeff * std::pow( ground.foundation.surfaceRoughness / DataEnvironment::SiteWindBLHeight, DataEnvironment::SiteWindExp ); + bcs.skyEmissivity = kivaWeather.skyEmissivity[index]*weightNow + kivaWeather.skyEmissivity[indexPrev]*(1.0 - weightNow); + bcs.solarAzimuth = 3.14; + bcs.solarAltitude = 0.0; + bcs.directNormalFlux = 0.0; + bcs.diffuseHorizontalFlux = 0.0; + bcs.slabAbsRadiation = 0.0; + bcs.wallAbsRadiation = 0.0; + + + // Estimate indoor temperature + const Real64 standardTemp = 22; // degC + Real64 assumedFloatingTemp = standardTemp; //*0.90 + kivaWeather.dryBulb[index]*0.10; // degC (somewhat arbitrary assumption--not knowing anything else about the building at this point) + + switch (zoneControlType) { + case KIVAZONE_UNCONTROLLED: { + bcs.indoorTemp = assumedFloatingTemp + DataGlobals::KelvinConv; + break; + } + case KIVAZONE_TEMPCONTROL: { + + int controlTypeSchId = DataZoneControls::TempControlledZone( zoneControlNum ).CTSchedIndex; + int controlType = ScheduleManager::LookUpScheduleValue(controlTypeSchId, hour, timestep); + + if (controlType == 0) { // Uncontrolled + + bcs.indoorTemp = assumedFloatingTemp + DataGlobals::KelvinConv; + + } else if (controlType == DataHVACGlobals::SingleHeatingSetPoint) { + + int schNameId = DataZoneControls::TempControlledZone( zoneControlNum ).SchIndx_SingleHeatSetPoint; + int schTypeId = DataZoneControls::TempControlledZone( zoneControlNum ).ControlTypeSchIndx(schNameId); + int spSchId = ZoneTempPredictorCorrector::SetPointSingleHeating( schTypeId ).TempSchedIndex; + Real64 setpoint = ScheduleManager::LookUpScheduleValue(spSchId, hour, timestep); + bcs.indoorTemp = setpoint + DataGlobals::KelvinConv; + + } else if (controlType == DataHVACGlobals::SingleCoolingSetPoint) { + + int schNameId = DataZoneControls::TempControlledZone( zoneControlNum ).SchIndx_SingleCoolSetPoint; + int schTypeId = DataZoneControls::TempControlledZone( zoneControlNum ).ControlTypeSchIndx(schNameId); + int spSchId = ZoneTempPredictorCorrector::SetPointSingleCooling( schTypeId ).TempSchedIndex; + Real64 setpoint = ScheduleManager::LookUpScheduleValue(spSchId, hour, timestep); + bcs.indoorTemp = setpoint + DataGlobals::KelvinConv; + + } else if (controlType == DataHVACGlobals::SingleHeatCoolSetPoint) { + + int schNameId = DataZoneControls::TempControlledZone( zoneControlNum ).SchIndx_SingleHeatCoolSetPoint; + int schTypeId = DataZoneControls::TempControlledZone( zoneControlNum ).ControlTypeSchIndx(schNameId); + int spSchId = ZoneTempPredictorCorrector::SetPointSingleHeatCool( schTypeId ).TempSchedIndex; + Real64 setpoint = ScheduleManager::LookUpScheduleValue(spSchId, hour, timestep); + bcs.indoorTemp = setpoint + DataGlobals::KelvinConv; + + } else if (controlType == DataHVACGlobals::DualSetPointWithDeadBand) { + + int schNameId = DataZoneControls::TempControlledZone( zoneControlNum ).SchIndx_DualSetPointWDeadBand; + int schTypeId = DataZoneControls::TempControlledZone( zoneControlNum ).ControlTypeSchIndx(schNameId); + int heatSpSchId = ZoneTempPredictorCorrector::SetPointDualHeatCool( schTypeId ).HeatTempSchedIndex; + int coolSpSchId = ZoneTempPredictorCorrector::SetPointDualHeatCool( schTypeId ).CoolTempSchedIndex; + Real64 heatSetpoint = ScheduleManager::LookUpScheduleValue(heatSpSchId, hour, timestep); + Real64 coolSetpoint = ScheduleManager::LookUpScheduleValue(coolSpSchId, hour, timestep); + const Real64 heatBalanceTemp = 10.0; // (assumed) degC + const Real64 coolBalanceTemp = 15.0; // (assumed) degC + + if ( bcs.outdoorTemp < heatBalanceTemp ) { + bcs.indoorTemp = heatSetpoint + DataGlobals::KelvinConv; + } else if ( bcs.outdoorTemp > coolBalanceTemp ) { + bcs.indoorTemp = coolSetpoint + DataGlobals::KelvinConv; + } else { + Real64 weight = ( coolBalanceTemp - bcs.outdoorTemp ) / ( coolBalanceTemp - heatBalanceTemp ); + bcs.indoorTemp = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobals::KelvinConv; + } + + } else { + + ShowSevereError( "Illegal control type for Zone=" + DataHeatBalance::Zone( zoneNum ).Name + ", Found value=" + General::TrimSigDigits( controlType ) + ", in Schedule=" + DataZoneControls::TempControlledZone( zoneControlNum ).ControlTypeSchedName ); + + } + break; + } + case KIVAZONE_COMFORTCONTROL: { + + bcs.indoorTemp = standardTemp + DataGlobals::KelvinConv; + break; + + } + case KIVAZONE_STAGEDCONTROL: { + + int heatSpSchId = DataZoneControls::StageControlledZone( zoneControlNum ).HSBchedIndex; + int coolSpSchId = DataZoneControls::StageControlledZone( zoneControlNum ).CSBchedIndex; + Real64 heatSetpoint = ScheduleManager::LookUpScheduleValue(heatSpSchId, hour, timestep); + Real64 coolSetpoint = ScheduleManager::LookUpScheduleValue(coolSpSchId, hour, timestep); + const Real64 heatBalanceTemp = 10.0; // (assumed) degC + const Real64 coolBalanceTemp = 15.0; // (assumed) degC + if ( bcs.outdoorTemp < heatBalanceTemp ) { + bcs.indoorTemp = heatSetpoint + DataGlobals::KelvinConv; + } else if ( bcs.outdoorTemp > coolBalanceTemp ) { + bcs.indoorTemp = coolSetpoint + DataGlobals::KelvinConv; + } else { + Real64 weight = ( coolBalanceTemp - bcs.outdoorTemp ) / ( coolBalanceTemp - heatBalanceTemp ); + bcs.indoorTemp = heatSetpoint * weight + coolSetpoint * (1.0 - weight) + DataGlobals::KelvinConv; + } + break; + + } + default: { + // error? + bcs.indoorTemp = assumedFloatingTemp + DataGlobals::KelvinConv; + break; + } + } } void KivaInstanceMap::setBoundaryConditions() @@ -242,7 +445,7 @@ void KivaManager::readWeatherData() if ( flags.end() ) ShowFatalError( "Kiva::ReadWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header=" + Header( HdLine ) ); } - /* Use headers to know how to read data to memory (e.g., number of periods, number of intervals) + // Use headers to know how to read data to memory (e.g., number of periods, number of intervals) int endcol = len( Line ); if ( endcol > 0 ) { if ( int( Line[ endcol - 1 ] ) == DataSystemVariables::iUnicode_end ) { @@ -293,13 +496,14 @@ void KivaManager::readWeatherData() if ( SELECT_CASE_var1 == 1 ) { int NumDataPeriods = InputProcessor::ProcessNumber( Line.substr( 0, Pos ), IOStatus ); NumHdArgs += 4 * NumDataPeriods; + // TODO: Error if more than one period? Less than full year? } else if ( SELECT_CASE_var1 == 2 ) { - int NumIntervalsPerHour = InputProcessor::ProcessNumber( Line.substr( 0, Pos ), IOStatus ); + kivaWeather.intervalsPerHour = InputProcessor::ProcessNumber( Line.substr( 0, Pos ), IOStatus ); }} Line.erase( 0, Pos + 1 ); ++Count; } - }}*/ + }} ++HdLine; if ( HdLine == 9 ) StillLooking = false; } @@ -350,6 +554,17 @@ void KivaManager::readWeatherData() break; } WeatherManager::InterpretWeatherDataLine( WeatherDataLine, ErrorFound, WYear, WMonth, WDay, WHour, WMinute, DryBulb, DewPoint, RelHum, AtmPress, ETHoriz, ETDirect, IRHoriz, GLBHoriz, DirectRad, DiffuseRad, GLBHorizIllum, DirectNrmIllum, DiffuseHorizIllum, ZenLum, WindDir, WindSpeed, TotalSkyCover, OpaqueSkyCover, Visibility, CeilHeight, PresWeathObs, PresWeathConds, PrecipWater, AerosolOptDepth, SnowDepth, DaysSinceLastSnow, Albedo, LiquidPrecip ); + + kivaWeather.dryBulb.push_back(DryBulb); + kivaWeather.windSpeed.push_back(WindSpeed); + + Real64 OSky = OpaqueSkyCover; + Real64 TDewK = min( DryBulb, DewPoint ) + DataGlobals::KelvinConv; + Real64 ESky = ( 0.787 + 0.764 * std::log( TDewK / DataGlobals::KelvinConv ) ) * ( 1.0 + 0.0224 * OSky - 0.0035 * pow_2( OSky ) + 0.00028 * pow_3( OSky ) ); + + kivaWeather.skyEmissivity.push_back(ESky); + + ++count; totalDB += DryBulb; @@ -365,6 +580,11 @@ bool KivaManager::setupKivaInstances() { bool ErrorsFound = false; + if ( DataZoneControls::GetZoneAirStatsInputFlag ) { + ZoneTempPredictorCorrector::GetZoneAirSetPoints(); + DataZoneControls::GetZoneAirStatsInputFlag = false; + } + readWeatherData(); auto& Surfaces = DataSurfaces::Surface; @@ -610,7 +830,7 @@ bool KivaManager::setupKivaInstances() fnd.slab.layers.push_back( tempLayer ); } - fnd.slab.emissivity = 0.0; // Long wave included in rad BC. Materials(Constructs( surface.Construction ).LayerPoint(Constructs( surface.Construction ).TotLayers)).AbsorpThermal; + fnd.slab.emissivity = 0.0; // Long wave included in rad BC. Constructs( surface.Construction ).InsideAbsorpThermal; fnd.foundationDepth = wallHeight; @@ -780,9 +1000,10 @@ void KivaManager::initKivaInstances() // initialize temperatures at the beginning of run environment if ( DataGlobals::BeginEnvrnFlag ) { + for ( auto& kv : kivaInstances ) { // Start with steady-state solution - kv.initGround(); + kv.initGround(kivaWeather); } } } diff --git a/src/EnergyPlus/HeatBalanceKivaManager.hh b/src/EnergyPlus/HeatBalanceKivaManager.hh index f743956a17f..71ef1716bef 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.hh +++ b/src/EnergyPlus/HeatBalanceKivaManager.hh @@ -58,9 +58,20 @@ namespace EnergyPlus { namespace HeatBalanceKivaManager { +const int KIVAZONE_UNCONTROLLED = 0; +const int KIVAZONE_TEMPCONTROL = 1; +const int KIVAZONE_COMFORTCONTROL = 2; +const int KIVAZONE_STAGEDCONTROL = 3; + class KivaWeatherData { public: + int intervalsPerHour; + Real64 annualAverageDrybulbTemp; + std::vector dryBulb; + std::vector windSpeed; + std::vector skyEmissivity; + }; class FoundationKiva @@ -94,13 +105,22 @@ public: int floorSurface; std::vector< int > wallSurfaces; int zoneNum; - void initGround(); + int zoneControlType; // Uncontrolled=0, Temperature=1, Operative=2, Comfort=3, HumidityAndTemperature=4 + int zoneControlNum; + void initGround(const KivaWeatherData& kivaWeather); + void setInitialBoundaryConditions( + const KivaWeatherData& kivaWeather, + const int date, + const int hour, + const int timestep + ); void setBoundaryConditions(); void reportKivaSurfaces(); void plotDomain(); Kiva::BoundaryConditions bcs; Real64 weightedPerimeter; int constructionNum; + }; class KivaManager diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index d7824515bc3..159c7bdec3a 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1323,6 +1323,7 @@ namespace HeatBalanceManager { // Using/Aliasing using General::RoundSigDigits; using General::ScanForReports; + using General::TrimSigDigits; // Locals // SUBROUTINE ARGUMENT DEFINITIONS: @@ -3251,6 +3252,16 @@ namespace HeatBalanceManager { ErrorsFound = true; } + if ( Material( MaterNum ).InitMoisture > Material( MaterNum ).Porosity ) { + ShowWarningError( CurrentModuleObject + "=\"" + MaterialNames( 1 ) + "\", Illegal value combination." ); + ShowContinueError( cNumericFieldNames( 15 ) + " is greater than " + cNumericFieldNames( 13 ) + ". It must be less or equal." ); + ShowContinueError( cNumericFieldNames( 13 ) + " = " + TrimSigDigits( Material( MaterNum ).Porosity, 3 ) + "." ); + ShowContinueError( cNumericFieldNames( 15 ) + " = " + TrimSigDigits( Material( MaterNum ).InitMoisture, 3 ) + "." ); + ShowContinueError( cNumericFieldNames( 15 ) + " is reset to the maximum (saturation) value = " + TrimSigDigits( Material( MaterNum ).Porosity, 3 ) + "." ); + ShowContinueError( "Simulation continues." ); + Material( MaterNum ).InitMoisture = Material( MaterNum ).Porosity; + } + } // Thermochromic glazing group diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index f5e2c615af0..dd98abe2704 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -5287,7 +5287,7 @@ CalcHeatBalanceInsideSurf( Optional_int_const ZoneToResimulate ) // if passed in if ( SumSysMCp > 0.0 ) { // protect div by zero RefAirTemp( SurfNum ) = SumSysMCpT / SumSysMCp; // BG changed 02-16-2005 to add index (SurfNum) } else { - RefAirTemp( SurfNum ) = NodeTemp; + RefAirTemp( SurfNum ) = MAT( ZoneNum ); } TempEffBulkAir( SurfNum ) = RefAirTemp( SurfNum ); // for reporting surf adjacent air temp } else { diff --git a/src/EnergyPlus/InputProcessor.cc b/src/EnergyPlus/InputProcessor.cc index d121250a95a..16183bdf4b5 100644 --- a/src/EnergyPlus/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessor.cc @@ -5315,9 +5315,8 @@ namespace InputProcessor { int Loop; int Loop1; - OutputVariablesForSimulation.allocate( 10000 ); + OutputVariablesForSimulation.reserve( 1024 ); MaxConsideredOutputVariables = 10000; - OutputVariablesNames.reserve(1000); // Output Variable CurrentRecord = FindFirstRecord( OutputVariable ); @@ -5432,11 +5431,6 @@ namespace InputProcessor { CurrentRecord = FindNextRecord( OutputTableSummaries, CurrentRecord ); } - if ( NumConsideredOutputVariables > 0 ) { - OutputVariablesForSimulation.redimension( NumConsideredOutputVariables ); - MaxConsideredOutputVariables = NumConsideredOutputVariables; - } - } void @@ -5932,39 +5926,14 @@ namespace InputProcessor { // SUBROUTINE INFORMATION: // AUTHOR Linda Lawrie // DATE WRITTEN July 2010 - // MODIFIED na + // MODIFIED March 2017 // RE-ENGINEERED na // PURPOSE OF THIS SUBROUTINE: // This routine adds a new record (if necessary) to the Output Variable // reporting structure. DataOutputs, OutputVariablesForSimulation - // METHODOLOGY EMPLOYED: - // OutputVariablesForSimulation is a linked list structure for later - // semi-easy perusal. - - // REFERENCES: - // na - - // Using/Aliasing - using namespace DataOutputs; - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int CurNum; - int NextNum; - bool FoundOne; std::string::size_type vnameLen; // if < length, there were units on the line/name std::string::size_type const rbpos = index( VariableName, '[' ); @@ -5973,101 +5942,18 @@ namespace InputProcessor { } else { vnameLen = len_trim( VariableName.substr( 0, rbpos ) ); } - - FoundOne = false; std::string const VarName( VariableName.substr( 0, vnameLen ) ); - for ( CurNum = 1; CurNum <= NumConsideredOutputVariables; ++CurNum ) { - if ( VarName == OutputVariablesForSimulation( CurNum ).VarName ) { - FoundOne = true; - break; - } - } - if ( ! FoundOne ) { - if ( NumConsideredOutputVariables == MaxConsideredOutputVariables ) { - ReAllocateAndPreserveOutputVariablesForSimulation(); - } - ++NumConsideredOutputVariables; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Key = KeyValue; - OutputVariablesForSimulation( NumConsideredOutputVariables ).VarName = VarName; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Previous = 0; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Next = 0; - //store first index of the list for specific VarName(in lower case) into map for faster look-up - std::string LowerCaseVarName; - ConvertCaseToLower(VarName, LowerCaseVarName); - OutputVariablesNames[LowerCaseVarName] = NumConsideredOutputVariables; + auto const found = DataOutputs::OutputVariablesForSimulation.find( VarName ); + if ( found == DataOutputs::OutputVariablesForSimulation.end() ) { + std::unordered_map< std::string, DataOutputs::OutputReportingVariables > data; + data.reserve( 32 ); + data.emplace( KeyValue, DataOutputs::OutputReportingVariables( KeyValue, VarName ) ); + DataOutputs::OutputVariablesForSimulation.emplace( VarName, std::move( data ) ); } else { - if ( KeyValue != OutputVariablesForSimulation( CurNum ).Key ) { - NextNum = CurNum; - if ( OutputVariablesForSimulation( NextNum ).Next != 0 ) { - while ( OutputVariablesForSimulation( NextNum ).Next != 0 ) { - CurNum = NextNum; - NextNum = OutputVariablesForSimulation( NextNum ).Next; - } - if ( NumConsideredOutputVariables == MaxConsideredOutputVariables ) { - ReAllocateAndPreserveOutputVariablesForSimulation(); - } - ++NumConsideredOutputVariables; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Key = KeyValue; - OutputVariablesForSimulation( NumConsideredOutputVariables ).VarName = VarName; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Previous = NextNum; - OutputVariablesForSimulation( NextNum ).Next = NumConsideredOutputVariables; - } else { - if ( NumConsideredOutputVariables == MaxConsideredOutputVariables ) { - ReAllocateAndPreserveOutputVariablesForSimulation(); - } - ++NumConsideredOutputVariables; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Key = KeyValue; - OutputVariablesForSimulation( NumConsideredOutputVariables ).VarName = VarName; - OutputVariablesForSimulation( NumConsideredOutputVariables ).Previous = CurNum; - OutputVariablesForSimulation( CurNum ).Next = NumConsideredOutputVariables; - } - } + found->second.emplace( KeyValue, DataOutputs::OutputReportingVariables( KeyValue, VarName ) ); } - - } - - void - ReAllocateAndPreserveOutputVariablesForSimulation() - { - - // SUBROUTINE INFORMATION: - // AUTHOR Linda Lawrie - // DATE WRITTEN April 2011 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // This routine does a simple reallocate for the OutputVariablesForSimulation structure, preserving - // the data that is already in the structure. - - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // Using/Aliasing - using namespace DataOutputs; - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - int const OutputVarAllocInc( ObjectsIDFAllocInc ); - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // na - - // up allocation by OutputVarAllocInc - OutputVariablesForSimulation.redimension( MaxConsideredOutputVariables += OutputVarAllocInc ); + DataOutputs::NumConsideredOutputVariables++; } void diff --git a/src/EnergyPlus/InputProcessor.hh b/src/EnergyPlus/InputProcessor.hh index 2f2b84db665..a84fc66e7ec 100644 --- a/src/EnergyPlus/InputProcessor.hh +++ b/src/EnergyPlus/InputProcessor.hh @@ -1132,9 +1132,6 @@ namespace InputProcessor { std::string const & VariableName ); - void - ReAllocateAndPreserveOutputVariablesForSimulation(); - void DumpCurrentLineBuffer( int const StartLine, diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 0a20487ef6a..4608f3b127d 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -696,17 +696,11 @@ namespace OutputProcessor { bool Dup; for ( Loop = MinIndx; Loop <= MaxIndx; ++Loop ) { + if ( ReqRepVars( Loop ).Key.empty() ) continue; if ( ! SameString( ReqRepVars( Loop ).VarName, VariableName ) ) continue; - if ( ! ( - SameString( ReqRepVars( Loop ).Key, KeyedValue ) || // straight case-insensitive string comparison - RE2::FullMatch( KeyedValue, ReqRepVars( Loop ).Key ) || // match against regex as written - RE2::FullMatch( KeyedValue, "(?i)" + ReqRepVars( Loop ).Key ) // attempt case-insensitive regex comparison - ) ) - { - continue; - } + if ( ! DataOutputs::FindItemInVariableList( KeyedValue, VariableName ) ) continue; - // A match. Make sure doesnt duplicate + // A match. Make sure doesn't duplicate ReqRepVars( Loop ).Used = true; Dup = false; @@ -5125,7 +5119,7 @@ SetupOutputVariable( int IndexType; // 1=TimeStepZone, 2=TimeStepSys int VariableType; // 1=Average, 2=Sum, 3=Min/Max int Loop; - int RepFreq; + int RepFreq( ReportHourly ); bool OnMeter; // True if this variable is on a meter std::string VarName; // Variable name without units // CHARACTER(len=MaxNameLength) :: VariableNamewithUnits ! Variable name with units std format @@ -5401,7 +5395,7 @@ SetupOutputVariable( bool invalidUnits; static std::string UnitsString; // Units for Variable (no brackets) int Loop; - int RepFreq; + int RepFreq( ReportHourly ); if ( ! OutputInitialized ) InitializeOutput(); @@ -5451,8 +5445,6 @@ SetupOutputVariable( DetermineFrequency( ReportFreq, RepFreq ); NumExtraVars = 1; ReportList = 0; - } else { - RepFreq = ReportHourly; } ThisOneOnTheList = FindItemInVariableList( KeyedValue, VarName ); diff --git a/src/EnergyPlus/PlantManager.cc b/src/EnergyPlus/PlantManager.cc index e557605eeee..3c93760ad26 100644 --- a/src/EnergyPlus/PlantManager.cc +++ b/src/EnergyPlus/PlantManager.cc @@ -3285,7 +3285,7 @@ namespace PlantManager { // Small loop mass no longer introduces instability. Checks and warnings removed by SJR 20 July 2007. if ( PlantLoop( LoopNum ).VolumeWasAutoSized ) { // There is no stability requirement (mass can be zero), autosizing is based on loop circulation time. - // Note this calculation also appears in PlantManager::ResizePlantLoopLevelSizes and SizingAnalysisObjects::ResolveDesignFlowRate + // Note this calculation also appears in PlantManager::ResizePlantLoopLevelSizes and SizingAnalysisObjects::ResolveDesignFlowRate PlantLoop( LoopNum ).Volume = PlantLoop( LoopNum ).MaxVolFlowRate * PlantLoop( LoopNum ).CirculationTime * 60.0; if (PlantFinalSizesOkayToReport) { if ( PlantLoop( LoopNum ).TypeOfLoop == LoopType_Plant ) { @@ -3450,7 +3450,7 @@ namespace PlantManager { // Small loop mass no longer introduces instability. Checks and warnings removed by SJR 20 July 2007. if ( PlantLoop( LoopNum ).VolumeWasAutoSized ) { // There is no stability requirement (mass can be zero), autosizing is based on loop circulation time. - // Note this calculation also appears in PlantManager::SizePlantLoop and SizingAnalysisObjects::ResolveDesignFlowRate + // Note this calculation also appears in PlantManager::SizePlantLoop and SizingAnalysisObjects::ResolveDesignFlowRate PlantLoop( LoopNum ).Volume = PlantLoop( LoopNum ).MaxVolFlowRate * PlantLoop( LoopNum ).CirculationTime * 60.0; if ( PlantLoop( LoopNum ).TypeOfLoop == LoopType_Plant ) { // condenser loop vs plant loop breakout needed. @@ -4399,6 +4399,10 @@ namespace PlantManager { this_component.FlowCtrl = ControlType_Active; this_component.FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn; this_component.HowLoadServed = HowMet_NoneDemand; + } else if ( SELECT_CASE_var == TypeOf_GrndHtExchgSlinky ) { // = 91 + this_component.FlowCtrl = ControlType_Active; + this_component.FlowPriority = LoopFlowStatus_TakesWhatGets; + this_component.HowLoadServed = HowMet_PassiveCap; } else { ShowSevereError( "SetBranchControlTypes: Caught unexpected equipment type of number" ); diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index b8fd1828582..fd36a6647e4 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -1519,8 +1519,7 @@ namespace PoweredInductionUnits { // SUBROUTINE INFORMATION: // AUTHOR Fred Buhl // DATE WRITTEN August 2000 - // MODIFIED na - // RE-ENGINEERED na + // MODIFIED September 2016, March 2017 // PURPOSE OF THIS SUBROUTINE: // Simulate a parallel powered induction unit; adjust its primary air flow @@ -1532,9 +1531,10 @@ namespace PoweredInductionUnits { // off. Obtains fan temperature increase. // (2) Calculates primary and secomdary air flow to meet zone load. // (a) Assume fan is off and calculate primary air flow to meet cooling load. - // (b) If calculated primary air flow is above the fan turn on ratio, fan is off. + // (b1) If calculated primary air flow is above the fan turn on ratio, fan is off. // Otherwise fan is on; calculate mixed secondary and primary air flow that // will meet the zone load + // (b2) If the fan turn on ratio is zero, then the fan is on only if reheat is needed. // (3) Simulate fan, mixer, and (off) heating coil to obtain zone inlet conditions. // If unit is on and there is a heating load // (1) sets primary air flow to a minimum. @@ -1544,10 +1544,6 @@ namespace PoweredInductionUnits { // (4) if reheat is electric or gas calls SimulateHeatingCoilComponents to // simulate coil at coil output that matches the zone load - // REFERENCES: - // na - - // Using/Aliasing using namespace DataZoneEnergyDemands; using MixerComponent::SimAirMixer; using HeatingCoils::SimulateHeatingCoilComponents; @@ -1555,17 +1551,6 @@ namespace PoweredInductionUnits { using SteamCoils::SimulateSteamCoilComponents; using PlantUtilities::SetComponentFlowRate; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - - // INTERFACE BLOCK SPECIFICATIONS - - // DERIVED TYPE DEFINITIONS - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 QZnReq; // heating or cooling needed by zone [Watts] Real64 QToHeatSetPt; // [W] remaining load to heating setpoint Real64 QActualHeating; // the heating load seen by the reheat coil [W] @@ -1588,8 +1573,6 @@ namespace PoweredInductionUnits { Real64 SecAirMassFlow; // secondary air mass flow rate [kg/s] Real64 CpAirZn; // zone air specific heat [J/kg-C] Real64 FanDeltaTemp( 0.0 ); // fan temperature rise [C] - //unusedREAL(r64) :: MaxSteamFlow - //unusedREAL(r64) :: MinSteamFlow Real64 mdot; // local fluid flow rate kg/s // FLOW @@ -1608,6 +1591,9 @@ namespace PoweredInductionUnits { QZnReq = ZoneSysEnergyDemand( ZoneNum ).RemainingOutputRequired; QToHeatSetPt = ZoneSysEnergyDemand( ZoneNum ).RemainingOutputReqToHeatSP; CpAirZn = PsyCpAirFnWTdb( Node( ZoneNode ).HumRat, Node( ZoneNode ).Temp ); + // Initialize local fan flags to global system flags + bool PIUTurnFansOn = ( DataHVACGlobals::TurnFansOn || DataHVACGlobals::TurnZoneFansOnlyOn ); // If True, overrides fan schedule and cycles PIU fan on + bool PIUTurnFansOff = DataHVACGlobals::TurnFansOff; // If True, overrides fan schedule and PIUTurnFansOn and cycles PIU fan off //On the first HVAC iteration the system values are given to the controller, but after that // the demand limits are in place and there needs to be feedback to the Zone Equipment @@ -1637,9 +1623,14 @@ namespace PoweredInductionUnits { // no primary air flow PriAirMassFlow = 0.0; // PIU fan off if FanOnFlowFrac is 0.0 and there is no heating load, also reset fan flag if fan should be off - if ( ( QZnReq <= SmallLoad ) && ( PIU( PIUNum ).FanOnFlowFrac <= 0.0 ) ) { - SecAirMassFlow = 0.0; - DataHVACGlobals::TurnFansOn = DataHVACGlobals::TurnZoneFansOnlyOn; + if ( PIU( PIUNum ).FanOnFlowFrac <= 0.0 ) { + if ( QZnReq <= SmallLoad ) { + SecAirMassFlow = 0.0; + PIUTurnFansOn = false; + } else { + SecAirMassFlow = PIU( PIUNum ).MaxSecAirMassFlow; + PIUTurnFansOn = ( DataHVACGlobals::TurnFansOn || DataHVACGlobals::TurnZoneFansOnlyOn ); + } } else { SecAirMassFlow = PIU( PIUNum ).MaxSecAirMassFlow; } @@ -1649,9 +1640,10 @@ namespace PoweredInductionUnits { // PIU fan off if FanOnFlowFrac is 0.0 and reheat is not needed, also reset fan flag if fan should be off if ( ( PIU( PIUNum ).FanOnFlowFrac <= 0.0 ) && ReheatRequired ) { SecAirMassFlow = PIU( PIUNum ).MaxSecAirMassFlow; + PIUTurnFansOn = true; } else if ( ( PIU( PIUNum ).FanOnFlowFrac <= 0.0 ) && !ReheatRequired ) { SecAirMassFlow = 0.0; - DataHVACGlobals::TurnFansOn = DataHVACGlobals::TurnZoneFansOnlyOn; + PIUTurnFansOn = false; } else { SecAirMassFlow = PIU( PIUNum ).MaxSecAirMassFlow; } @@ -1665,10 +1657,11 @@ namespace PoweredInductionUnits { Node( SecNode ).MassFlowRate = PIU( PIUNum ).MaxSecAirMassFlow; Node( SecNode ).MassFlowRateMaxAvail = PIU( PIUNum ).MaxSecAirMassFlow; Node( PriNode ).MassFlowRate = 0.0; + if ( PIU( PIUNum ).Fan_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ PIU( PIUNum ).Fan_Index ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ PIU( PIUNum ).Fan_Index ]->simulate( _, PIUTurnFansOn, PIUTurnFansOff, _ ); } else if ( PIU( PIUNum ).Fan_Num == DataHVACGlobals::FanType_SimpleConstVolume ) { - Fans::SimulateFanComponents( PIU( PIUNum ).FanName, FirstHVACIteration, PIU( PIUNum ).Fan_Index ); // fire the fan + Fans::SimulateFanComponents( PIU( PIUNum ).FanName, FirstHVACIteration, PIU( PIUNum ).Fan_Index, _, PIUTurnFansOn, PIUTurnFansOff ); // fire the fan } SimAirMixer( PIU( PIUNum ).MixerName, PIU( PIUNum ).Mixer_Num ); // fire the mixer FanDeltaTemp = Node( HCoilInAirNode ).Temp - Node( SecNode ).Temp; @@ -1679,10 +1672,11 @@ namespace PoweredInductionUnits { // check for fan on or off if ( ( PriAirMassFlow > PIU( PIUNum ).FanOnAirMassFlow ) && ( PIU( PIUNum ).FanOnFlowFrac > 0.0 ) ) { SecAirMassFlow = 0.0; // Fan is off; no secondary air + PIUTurnFansOn = false; } else if ( ( PIU( PIUNum ).FanOnFlowFrac <= 0.0 ) && !ReheatRequired ) { // if FanOnFlowFrac is 0, then fan does not run for cooling load unless reheat is required, also reset fan flag if fan should be off SecAirMassFlow = 0.0; // Fan is off; no secondary air - DataHVACGlobals::TurnFansOn = DataHVACGlobals::TurnZoneFansOnlyOn; + PIUTurnFansOn = false; } else { // fan is on; recalc primary air flow // CpAir*PriAirMassFlow*(Node(PriNode)%Temp - Node(ZoneNodeNum)%Temp) + @@ -1703,10 +1697,11 @@ namespace PoweredInductionUnits { Node( SecNode ).MassFlowRateMaxAvail = SecAirMassFlow; //now that inlet airflows have been set, the terminal box components can be simulated. // fire the fan + if ( PIU( PIUNum ).Fan_Num == DataHVACGlobals::FanType_SystemModelObject ) { - HVACFan::fanObjs[ PIU( PIUNum ).Fan_Index ]->simulate( _,_,_,_ ); + HVACFan::fanObjs[ PIU( PIUNum ).Fan_Index ]->simulate( _, PIUTurnFansOn, PIUTurnFansOff, _ ); } else if ( PIU( PIUNum ).Fan_Num == DataHVACGlobals::FanType_SimpleConstVolume ) { - Fans::SimulateFanComponents( PIU( PIUNum ).FanName, FirstHVACIteration, PIU( PIUNum ).Fan_Index ); // fire the fan + Fans::SimulateFanComponents( PIU( PIUNum ).FanName, FirstHVACIteration, PIU( PIUNum ).Fan_Index, _, PIUTurnFansOn, PIUTurnFansOff ); // fire the fan } // fire the mixer SimAirMixer( PIU( PIUNum ).MixerName, PIU( PIUNum ).Mixer_Num ); diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index fbf1c77620d..d83d6f498a2 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -347,6 +347,14 @@ void SQLite::sqliteCommit() } } +bool SQLite::sqliteWithinTransaction() +{ + if ( m_writeOutputToSQLite ) { + return SQLiteProcedures::sqliteWithinTransaction(); + } + return false; +} + void SQLite::sqliteWriteMessage(const std::string & message) { if ( m_writeOutputToSQLite ) { @@ -2807,6 +2815,11 @@ int SQLiteProcedures::sqliteResetCommand(sqlite3_stmt * stmt) return sqlite3_reset(stmt); } +bool SQLiteProcedures::sqliteWithinTransaction() +{ + return ( sqlite3_get_autocommit(m_connection) == 0 ); +} + // int SQLiteProcedures::sqliteClearBindings(sqlite3_stmt * stmt) // { // return sqlite3_clear_bindings(stmt); diff --git a/src/EnergyPlus/SQLiteProcedures.hh b/src/EnergyPlus/SQLiteProcedures.hh index 9709e703db0..60061b21e42 100644 --- a/src/EnergyPlus/SQLiteProcedures.hh +++ b/src/EnergyPlus/SQLiteProcedures.hh @@ -87,6 +87,7 @@ protected: bool sqliteStepValidity( int const rc ); int sqliteStepCommand(sqlite3_stmt * stmt); int sqliteResetCommand(sqlite3_stmt * stmt); + bool sqliteWithinTransaction(); // int sqliteClearBindings(sqlite3_stmt * stmt); // int sqliteFinalizeCommand(sqlite3_stmt * stmt); @@ -138,6 +139,9 @@ public: // Commit a transaction void sqliteCommit(); + // Within a current transaction + bool sqliteWithinTransaction(); + void createSQLiteReportDictionaryRecord( int const reportVariableReportID, int const storeTypeIndex, diff --git a/src/EnergyPlus/SetPointManager.cc b/src/EnergyPlus/SetPointManager.cc index 78203d09c60..f898a8bf41c 100644 --- a/src/EnergyPlus/SetPointManager.cc +++ b/src/EnergyPlus/SetPointManager.cc @@ -3477,9 +3477,11 @@ namespace SetPointManager { ColdestSetPtMgr( SetPtMgrNum ).AirLoopNum = AirLoopNum; } if ( AirToZoneNodeInfo( AirLoopNum ).NumZonesHeated == 0 ) { - ShowSevereError( cSetPointManagerType + "=\"" + ColdestSetPtMgr( SetPtMgrNum ).Name + "\", no zones with heating found:" ); - ShowContinueError( "Air Loop provides no heating, Air Loop=\"" + ColdestSetPtMgr( SetPtMgrNum ).AirLoopName + "\"." ); - ErrorsFound = true; + if ( AirToZoneNodeInfo( AirLoopNum ).NumZonesCooled == 0 ) { + ShowSevereError( cSetPointManagerType + "=\"" + ColdestSetPtMgr( SetPtMgrNum ).Name + "\", no zones with heating or cooling found:" ); + ShowContinueError( "Air Loop provides no heating or cooling, Air Loop=\"" + ColdestSetPtMgr( SetPtMgrNum ).AirLoopName + "\"." ); + ErrorsFound = true; + } } } else { ShowSevereError( cSetPointManagerType + "=\"" + ColdestSetPtMgr( SetPtMgrNum ).Name + "\", no AirLoopHVAC objects found:" ); @@ -5619,23 +5621,46 @@ namespace SetPointManager { TotHeatLoad = 0.0; SetPointTemp = this->MinSetTemp; - for ( ZonesHeatedIndex = 1; ZonesHeatedIndex <= AirToZoneNodeInfo( AirLoopNum ).NumZonesHeated; ++ZonesHeatedIndex ) { - CtrlZoneNum = AirToZoneNodeInfo( AirLoopNum ).HeatCtrlZoneNums( ZonesHeatedIndex ); - ZoneInletNode = AirToZoneNodeInfo( AirLoopNum ).HeatZoneInletNodes( ZonesHeatedIndex ); - ZoneNode = ZoneEquipConfig( CtrlZoneNum ).ZoneNode; - ZoneNum = ZoneEquipConfig( CtrlZoneNum ).ActualZoneNum; - ZoneMassFlowMax = Node( ZoneInletNode ).MassFlowRateMax; - ZoneLoad = ZoneSysEnergyDemand( ZoneNum ).TotalOutputRequired; - ZoneTemp = Node( ZoneNode ).Temp; - ZoneSetPointTemp = this->MinSetTemp; - if ( ZoneLoad > 0.0 ) { - TotHeatLoad += ZoneLoad; - CpAir = PsyCpAirFnWTdb( Node( ZoneInletNode ).HumRat, Node( ZoneInletNode ).Temp ); - if ( ZoneMassFlowMax > SmallMassFlow ) { - ZoneSetPointTemp = ZoneTemp + ZoneLoad / ( CpAir * ZoneMassFlowMax ); + if ( AirToZoneNodeInfo( AirLoopNum ).NumZonesHeated > 0 ) { + // dual-duct heated only zones + for ( ZonesHeatedIndex = 1; ZonesHeatedIndex <= AirToZoneNodeInfo( AirLoopNum ).NumZonesHeated; ++ZonesHeatedIndex ) { + CtrlZoneNum = AirToZoneNodeInfo( AirLoopNum ).HeatCtrlZoneNums( ZonesHeatedIndex ); + ZoneInletNode = AirToZoneNodeInfo( AirLoopNum ).HeatZoneInletNodes( ZonesHeatedIndex ); + ZoneNode = ZoneEquipConfig( CtrlZoneNum ).ZoneNode; + ZoneNum = ZoneEquipConfig( CtrlZoneNum ).ActualZoneNum; + ZoneMassFlowMax = Node( ZoneInletNode ).MassFlowRateMax; + ZoneLoad = ZoneSysEnergyDemand( ZoneNum ).TotalOutputRequired; + ZoneTemp = Node( ZoneNode ).Temp; + ZoneSetPointTemp = this->MinSetTemp; + if ( ZoneLoad > 0.0 ) { + TotHeatLoad += ZoneLoad; + CpAir = PsyCpAirFnWTdb( Node( ZoneInletNode ).HumRat, Node( ZoneInletNode ).Temp ); + if (ZoneMassFlowMax > SmallMassFlow) { + ZoneSetPointTemp = ZoneTemp + ZoneLoad / ( CpAir * ZoneMassFlowMax ); + } + } + SetPointTemp = max( SetPointTemp, ZoneSetPointTemp ); + } + } else { + // single-duct or central heated and cooled zones + for ( ZonesHeatedIndex = 1; ZonesHeatedIndex <= AirToZoneNodeInfo( AirLoopNum ).NumZonesCooled; ++ZonesHeatedIndex ) { + CtrlZoneNum = AirToZoneNodeInfo( AirLoopNum ).CoolCtrlZoneNums( ZonesHeatedIndex ); + ZoneInletNode = AirToZoneNodeInfo( AirLoopNum ).CoolZoneInletNodes( ZonesHeatedIndex ); + ZoneNode = ZoneEquipConfig( CtrlZoneNum ).ZoneNode; + ZoneNum = ZoneEquipConfig( CtrlZoneNum ).ActualZoneNum; + ZoneMassFlowMax = Node( ZoneInletNode ).MassFlowRateMax; + ZoneLoad = ZoneSysEnergyDemand( ZoneNum ).TotalOutputRequired; + ZoneTemp = Node( ZoneNode ).Temp; + ZoneSetPointTemp = this->MinSetTemp; + if ( ZoneLoad > 0.0 ) { + TotHeatLoad += ZoneLoad; + CpAir = PsyCpAirFnWTdb( Node( ZoneInletNode ).HumRat, Node( ZoneInletNode ).Temp ); + if ( ZoneMassFlowMax > SmallMassFlow ) { + ZoneSetPointTemp = ZoneTemp + ZoneLoad / ( CpAir * ZoneMassFlowMax ); + } } + SetPointTemp = max( SetPointTemp, ZoneSetPointTemp ); } - SetPointTemp = max( SetPointTemp, ZoneSetPointTemp ); } SetPointTemp = min( this->MaxSetTemp, max( SetPointTemp, this->MinSetTemp ) ); diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index 9d978eaeca7..3762958bd9d 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -861,6 +861,7 @@ ShowFatalError( ShowErrorMessage( " ..... Last severe error=" + LastSevereError, OutUnit1, OutUnit2 ); if ( sqlite ) { sqlite->createSQLiteErrorRecord( 1, 2, ErrorMessage, 1 ); + if( sqlite->sqliteWithinTransaction() ) sqlite->sqliteCommit(); } throw std::runtime_error( ErrorMessage ); @@ -1150,6 +1151,9 @@ ShowMessage( ShowErrorMessage( " *************", OutUnit1, OutUnit2 ); } else { ShowErrorMessage( " ************* " + Message, OutUnit1, OutUnit2 ); + if ( sqlite ) { + sqlite->createSQLiteErrorRecord( 1, -1, Message, 0 ); + } } } diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index c1584d8b5a6..a3859cd0be5 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -2774,7 +2774,13 @@ namespace ZoneEquipmentManager { // initialize sizing conditions if they have not been set (i.e., no corresponding load) to zone condition if ( FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak == 0.0 ) { - FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak = ZoneSizing( DDNumF, CtrlZoneNum ).DesCoolSetPtSeq( TimeStepAtPeakF ); + // issue 6006, heating coils sizing to 0 when no heating load in zone + if ( ZoneSizing( DDNumF, CtrlZoneNum ).DesCoolSetPtSeq.empty() ) { + ShowSevereError( RoutineName + ": Thermostat cooling set point temperatures are not initialized for Zone = " + FinalZoneSizing( CtrlZoneNum ).ZoneName ); + ShowFatalError( "Please send your input file to the EnergyPlus support/development team for further investigation." ); + } else { + FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak = *std::min_element( ZoneSizing( DDNumF, CtrlZoneNum ).DesCoolSetPtSeq.begin(), ZoneSizing( DDNumF, CtrlZoneNum ).DesCoolSetPtSeq.end() ); + } FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak = ZoneSizing( DDNumF, CtrlZoneNum ).CoolZoneHumRatSeq( TimeStepAtPeakF ); if ( FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak > 0.0 ) { FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak = min( FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak, PsyWFnTdpPb( FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak, StdBaroPress, RoutineName ) ); @@ -2782,6 +2788,8 @@ namespace ZoneEquipmentManager { } else { FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak = ZoneSizing( DDNumF, CtrlZoneNum ).CoolDesHumRat; } + CalcFinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak; + CalcFinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak = FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak; FinalZoneSizing( CtrlZoneNum ).DesCoolCoilInTemp = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak; FinalZoneSizing( CtrlZoneNum ).DesCoolCoilInHumRat = FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtCoolPeak; FinalZoneSizing( CtrlZoneNum ).ZoneRetTempAtCoolPeak = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtCoolPeak; @@ -2894,13 +2902,21 @@ namespace ZoneEquipmentManager { // initialize sizing conditions if they have not been set (i.e., no corresponding load) to zone condition if ( FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak == 0.0 ) { - FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak = ZoneSizing( DDNumF, CtrlZoneNum ).DesHeatSetPtSeq( TimeStepAtPeakF ); + // issue 6006, heating coils sizing to 0 when no heating load in zone + if ( ZoneSizing( DDNumF, CtrlZoneNum ).DesHeatSetPtSeq.empty() ) { + ShowSevereError( RoutineName + ": Thermostat heating set point temperatures not initialized for Zone = " + FinalZoneSizing( CtrlZoneNum ).ZoneName ); + ShowFatalError( "Please send your input file to the EnergyPlus support/development team for further investigation." ); + } else { + FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak = *std::max_element( ZoneSizing( DDNumF, CtrlZoneNum ).DesHeatSetPtSeq.begin(), ZoneSizing( DDNumF, CtrlZoneNum ).DesHeatSetPtSeq.end() ); + } FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak = ZoneSizing( DDNumF, CtrlZoneNum ).HeatZoneHumRatSeq( TimeStepAtPeakF ); if ( FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak > 0.0 ) { FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak = min( FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak, PsyWFnTdpPb( FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak, StdBaroPress, RoutineName ) ); } else { FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak = ZoneSizing( DDNumF, CtrlZoneNum ).HeatDesHumRat; } + CalcFinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak; + CalcFinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak = FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak; FinalZoneSizing( CtrlZoneNum ).DesHeatCoilInTemp = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak; FinalZoneSizing( CtrlZoneNum ).DesHeatCoilInHumRat = FinalZoneSizing( CtrlZoneNum ).ZoneHumRatAtHeatPeak; FinalZoneSizing( CtrlZoneNum ).ZoneRetTempAtHeatPeak = FinalZoneSizing( CtrlZoneNum ).ZoneTempAtHeatPeak; diff --git a/src/IDF_Editor/IDFEd-main.frm b/src/IDF_Editor/IDFEd-main.frm index 5e5d0f038e1..d0c73564695 100644 --- a/src/IDF_Editor/IDFEd-main.frm +++ b/src/IDF_Editor/IDFEd-main.frm @@ -4,16 +4,16 @@ Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "MSCOMCTL.OCX" Object = "{C0A63B80-4B21-11D3-BD95-D426EF2C7949}#1.0#0"; "Vsflex7L.ocx" Begin VB.Form IDFEdit Caption = "IDF Edit" - ClientHeight = 7275 - ClientLeft = 150 + ClientHeight = 7272 + ClientLeft = 156 ClientTop = 720 - ClientWidth = 10035 + ClientWidth = 10032 Icon = "IDFEd-main.frx":0000 LinkTopic = "Form1" LockControls = -1 'True MDIChild = -1 'True - ScaleHeight = 7275 - ScaleWidth = 10035 + ScaleHeight = 7272 + ScaleWidth = 10032 Begin VB.Timer timerJumpList Interval = 100 Left = 1680 @@ -53,8 +53,8 @@ Begin VB.Form IDFEdit Height = 4215 Left = 9840 MousePointer = 7 'Size N S - ScaleHeight = 4215 - ScaleWidth = 135 + ScaleHeight = 4212 + ScaleWidth = 132 TabIndex = 20 Top = 3000 Visible = 0 'False @@ -69,8 +69,8 @@ Begin VB.Form IDFEdit Height = 1455 Left = 5160 MousePointer = 7 'Size N S - ScaleHeight = 1455 - ScaleWidth = 135 + ScaleHeight = 1452 + ScaleWidth = 132 TabIndex = 19 Top = 2880 Visible = 0 'False @@ -85,8 +85,8 @@ Begin VB.Form IDFEdit Height = 135 Left = 7320 MousePointer = 7 'Size N S - ScaleHeight = 135 - ScaleWidth = 2535 + ScaleHeight = 132 + ScaleWidth = 2532 TabIndex = 18 Top = 4320 Visible = 0 'False @@ -101,8 +101,8 @@ Begin VB.Form IDFEdit Height = 135 Left = 7320 MousePointer = 7 'Size N S - ScaleHeight = 135 - ScaleWidth = 2535 + ScaleHeight = 132 + ScaleWidth = 2532 TabIndex = 17 Top = 2400 Visible = 0 'False @@ -152,8 +152,8 @@ Begin VB.Form IDFEdit Begin MSComctlLib.ImageList ilToolBar Left = 7680 Top = 480 - _ExtentX = 1005 - _ExtentY = 1005 + _ExtentX = 995 + _ExtentY = 995 BackColor = -2147483643 ImageWidth = 16 ImageHeight = 16 @@ -213,15 +213,15 @@ Begin VB.Form IDFEdit End Begin MSComctlLib.Toolbar Toolbar1 Align = 1 'Align Top - Height = 420 + Height = 336 Left = 0 TabIndex = 0 Top = 0 - Width = 10035 - _ExtentX = 17701 - _ExtentY = 741 - ButtonWidth = 609 - ButtonHeight = 582 + Width = 10032 + _ExtentX = 17695 + _ExtentY = 593 + ButtonWidth = 487 + ButtonHeight = 466 AllowCustomize = 0 'False Appearance = 1 ImageList = "ilToolBar" @@ -282,7 +282,7 @@ Begin VB.Form IDFEdit Enabled = -1 'True BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" - Size = 8.25 + Size = 7.8 Charset = 0 Weight = 400 Underline = 0 'False @@ -389,7 +389,7 @@ Begin VB.Form IDFEdit Width = 4575 End Begin VB.ListBox lstObjectTypes - Height = 2400 + Height = 2352 Left = 120 TabIndex = 9 Top = 1725 @@ -2121,22 +2121,10 @@ End Sub ' EDIT MENU STUBS '----------------------------------------------------------------------------- Private Sub mnuEditDelete_Click() -Call cmdDeleteObject_Click +Call IDFDeleteObject End Sub Private Sub mnuEditDuplicate_Click() -Dim li As Long -li = lstObjectTypes.ListIndex Call IDFDuplicateObject -Call FillList -Call FillGrid -If li > lstObjectTypes.ListCount - 1 Then - li = 0 -End If -lstObjectTypes.ListIndex = li -grdNew.Col = grdNew.Cols - 1 -grdNew.ShowCell grdNew.TopRow, grdNew.Cols - 1 -Call selectCell -Call ShowFileAltered End Sub Private Sub mnuEditNew_Click() Dim li As Long @@ -2537,39 +2525,10 @@ Select Case Button.Key End Select End Sub Private Sub cmdDeleteObject_Click() -Dim li As Long -Dim colPreserve As Long -li = lstObjectTypes.ListIndex -colPreserve = grdNew.Col Call IDFDeleteObject -Call FillList -Call FillGrid -If li > lstObjectTypes.ListCount - 1 Then - li = 0 -End If -lstObjectTypes.ListIndex = li -Call lstObjectTypes_Click -If colPreserve > 2 And colPreserve < grdNew.Cols Then - grdNew.Col = colPreserve - Call selectCell - grdNew.ShowCell grdNew.TopRow, grdNew.Col -End If -Call ShowFileAltered End Sub Private Sub cmdDuplicateObject_Click() -Dim li As Long -li = lstObjectTypes.ListIndex Call IDFDuplicateObject -Call FillList -Call FillGrid -If li > lstObjectTypes.ListCount - 1 Then - li = 0 -End If -lstObjectTypes.ListIndex = li -grdNew.Col = grdNew.Cols - 1 -grdNew.ShowCell grdNew.TopRow, grdNew.Cols - 1 -Call selectCell -Call ShowFileAltered End Sub Private Sub cmdNewObject_Click() Dim li As Long @@ -3028,7 +2987,7 @@ If IDDClassDat(IDDClassCur).specialMultiUnit Then If refFieldVal <> "" Then unitFound = 0 For iUnit = 1 To maxUsedConvUnits - If refFieldVal = convUnits(iUnit).multiUnitName Then + If UCase(refFieldVal) = UCase(convUnits(iUnit).multiUnitName) Then unitFound = iUnit Exit For End If @@ -4186,16 +4145,34 @@ End Sub ' selected object into the new object '----------------------------------------------------------------------------- Sub IDFDuplicateObject() +Dim rowSt As Long, rowEnd As Long, colSt As Long, colEnd As Long Dim iVal As Long, i As Long, numFields As Long +Dim li As Long +Dim iCol As Long, iObj As Long +li = lstObjectTypes.ListIndex +grdNew.GetSelection rowSt, colSt, rowEnd, colEnd If actObject = 0 Then Exit Sub 'can't duplicate if not on a selected object -iVal = IDFObject(actObject).valueStart -numFields = IDDClassDat(actClass).fieldEnd - IDDClassDat(actClass).fieldStart + 1 -Call IDFNewObject 'first make a new object -' now copy values into new object -For i = 0 To numFields - 1 - IDFValue(maxUsedValue + i - numFields).entry = IDFValue(iVal + i).entry - Debug.Print "dup "; IDFValue(iVal + i).entry -Next i +For iCol = colSt To colEnd + iObj = grdNew.ColData(iCol) + iVal = IDFObject(iObj).valueStart + numFields = IDDClassDat(actClass).fieldEnd - IDDClassDat(actClass).fieldStart + 1 + Call IDFNewObject 'first make a new object + ' now copy values into new object + For i = 0 To numFields - 1 + IDFValue(maxUsedValue + i - numFields).entry = IDFValue(iVal + i).entry + Debug.Print "dup "; IDFValue(iVal + i).entry + Next i +Next iCol +Call FillList +Call FillGrid +If li > lstObjectTypes.ListCount - 1 Then + li = 0 +End If +lstObjectTypes.ListIndex = li +grdNew.Col = grdNew.Cols - 1 +grdNew.ShowCell grdNew.TopRow, grdNew.Cols - 1 +Call selectCell +Call ShowFileAltered End Sub '----------------------------------------------------------------------------- @@ -4261,39 +4238,108 @@ End Sub ' This routine removes the currently selected object '----------------------------------------------------------------------------- Sub IDFDeleteObject() +Dim rowSt As Long, rowEnd As Long, colSt As Long, colEnd As Long +Dim li As Long +Dim numColSelected As Long +Dim iCol As Long +Dim colPreserve As Long Dim objPoint As Long, lastObjectWithPt As Long +Dim actObjSt As Long, actObjEnd As Long +grdNew.GetSelection rowSt, colSt, rowEnd, colEnd +li = lstObjectTypes.ListIndex +numColSelected = 1 + colEnd - colSt +colPreserve = colSt ' walk through pointers to find next empty class pointer If actCol < 0 Then Exit Sub 'if not a selected "data" column can't delete If actClass = 0 Then Exit Sub 'if not active can't delete If IDDClassObjPt(actClass).objectCount = 0 Then Exit Sub 'no more objects objPoint = IDDClassObjPt(actClass).objectStart -If IDDClassObjPt(actClass).objectCount = 1 Then 'this is the case where only one object is defined and it should be deleted - IDDClassObjPt(actClass).objectStart = 0 - IDDClassObjPt(actClass).objectCount = 0 - IDFObject(objPoint).nextObjectInClass = isDeleted -ElseIf objPoint = actObject Then 'if pointing to first object (remember objPoint is on first) - If objPoint = 0 Then Exit Sub - If IDFObject(objPoint).nextObjectInClass > 0 Then - IDDClassObjPt(actClass).objectStart = IDFObject(objPoint).nextObjectInClass - IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - 1 'reduce the count on the objects - IDFObject(objPoint).nextObjectInClass = isDeleted 'flag that the object has been deleted - Else 'should never occur - MsgBox "Delete Object Error" - End If -Else 'the case when something other than the first object is selected - If objPoint = 0 Then Exit Sub - Do While objPoint <> actObject - lastObjectWithPt = objPoint 'preserve previous pointer since that is where we need to write +If numColSelected = 1 Then + If IDDClassObjPt(actClass).objectCount = 1 Then 'this is the case where only one object is defined and it should be deleted and only one object is selected + IDDClassObjPt(actClass).objectStart = 0 + IDDClassObjPt(actClass).objectCount = 0 + IDFObject(objPoint).nextObjectInClass = isDeleted + ElseIf objPoint = actObject Then 'if pointing to first object (remember objPoint is on first) and only one object is selected If objPoint = 0 Then Exit Sub - objPoint = IDFObject(objPoint).nextObjectInClass 'follow chain of objects (linked list) - Loop - If lastObjectWithPt > 0 Then + If IDFObject(objPoint).nextObjectInClass > 0 Then + IDDClassObjPt(actClass).objectStart = IDFObject(objPoint).nextObjectInClass + IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - 1 'reduce the count on the objects + IDFObject(objPoint).nextObjectInClass = isDeleted 'flag that the object has been deleted + Else 'should never occur + MsgBox "Delete Object Error" + End If + Else 'the case when something other than the first object is selected but only one object is selected If objPoint = 0 Then Exit Sub - IDFObject(lastObjectWithPt).nextObjectInClass = IDFObject(objPoint).nextObjectInClass 'remove link to current object - IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - 1 'reduce the count on the objects - IDFObject(objPoint).nextObjectInClass = isDeleted 'flag that the object has been deleted + Do While objPoint <> actObject + lastObjectWithPt = objPoint 'preserve previous pointer since that is where we need to write + If objPoint = 0 Then Exit Sub + objPoint = IDFObject(objPoint).nextObjectInClass 'follow chain of objects (linked list) + Loop + If lastObjectWithPt > 0 Then + If objPoint = 0 Then Exit Sub + IDFObject(lastObjectWithPt).nextObjectInClass = IDFObject(objPoint).nextObjectInClass 'remove link to current object + IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - 1 'reduce the count on the objects + IDFObject(objPoint).nextObjectInClass = isDeleted 'flag that the object has been deleted + End If + End If +Else ' more than one object is selected + actObjSt = grdNew.ColData(colSt) ' first object selected + actObjEnd = grdNew.ColData(colEnd) ' last object selected + If actObjSt = 0 Or actObjEnd = 0 Then Exit Sub + If IDDClassObjPt(actClass).objectCount = numColSelected Then 'this is the case where all the objects for a class are selected + IDDClassObjPt(actClass).objectStart = 0 + IDDClassObjPt(actClass).objectCount = 0 + For iCol = colSt To colEnd + objPoint = grdNew.ColData(iCol) + If objPoint > 0 Then + IDFObject(objPoint).nextObjectInClass = isDeleted + End If + Next iCol + ElseIf objPoint = actObjSt Then 'if first object pointed to is first possible object + If IDFObject(actObjEnd).nextObjectInClass > 0 Then + IDDClassObjPt(actClass).objectStart = IDFObject(actObjEnd).nextObjectInClass + IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - numColSelected 'reduce the count on the objects + For iCol = colSt To colEnd + objPoint = grdNew.ColData(iCol) + If objPoint > 0 Then + IDFObject(objPoint).nextObjectInClass = isDeleted + End If + Next iCol + Else 'should never occur + MsgBox "Delete Object Error" + End If + Else 'the case when something other than the first object is selected and a group of objects is selected + Do While objPoint <> actObjSt + lastObjectWithPt = objPoint 'preserve previous pointer since that is where we need to write + If objPoint = 0 Then Exit Sub + objPoint = IDFObject(objPoint).nextObjectInClass 'follow chain of objects (linked list) + Loop + If lastObjectWithPt > 0 Then + If objPoint = 0 Then Exit Sub + IDFObject(lastObjectWithPt).nextObjectInClass = IDFObject(actObjEnd).nextObjectInClass 'remove link to current object + IDDClassObjPt(actClass).objectCount = IDDClassObjPt(actClass).objectCount - numColSelected 'reduce the count on the objects + For iCol = colSt To colEnd + objPoint = grdNew.ColData(iCol) + If objPoint > 0 Then + IDFObject(objPoint).nextObjectInClass = isDeleted + End If + Next iCol + End If End If End If +Call FillList +Call FillGrid +If li > lstObjectTypes.ListCount - 1 Then + li = 0 +End If +lstObjectTypes.ListIndex = li +Call lstObjectTypes_Click +If colPreserve > 2 And colPreserve < grdNew.Cols Then + grdNew.Col = colPreserve + Call selectCell + grdNew.ShowCell grdNew.TopRow, grdNew.Col +End If +Call ShowFileAltered End Sub '----------------------------------------------------------------------------- @@ -5354,6 +5400,14 @@ For iObject = 1 To maxUsedObject newMsg = "Invalid reference" End If End Select + ' if user wants macros to be ignored + If ignoreValidatingMacros Then + If InStr(IDFValue(valueIndx).entry, "[") > 0 Then newMsg = "" + If InStr(IDFValue(valueIndx).entry, "@") > 0 Then newMsg = "" + If InStr(IDFValue(valueIndx).entry, "$") > 0 Then newMsg = "" + If InStr(IDFValue(valueIndx).entry, "=") > 0 Then newMsg = "" + If InStr(IDFValue(valueIndx).entry, "#") > 0 Then newMsg = "" + End If If IDDField(fieldIndx).required And Trim(curAlphaValue) = "" And Not IDDField(fieldIndx).defSpecified Then newMsg = "Blank value for required field" End If diff --git a/src/IDF_Editor/IDFEd-project.VBP b/src/IDF_Editor/IDFEd-project.VBP index 61b35c7731a..d7035e1f024 100644 --- a/src/IDF_Editor/IDFEd-project.VBP +++ b/src/IDF_Editor/IDFEd-project.VBP @@ -26,12 +26,12 @@ HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=4 -RevisionVer=8 +RevisionVer=9 AutoIncrementVer=0 ServerSupportFiles=0 -VersionComments="1.48b" +VersionComments="1.49a" VersionCompanyName="GARD Analytics" -VersionLegalCopyright="(c) 2000-2016 GARD Analytics" +VersionLegalCopyright="(c) 2000-2017 GARD Analytics" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 diff --git a/src/IDF_Editor/IDFEd-project.vbw b/src/IDF_Editor/IDFEd-project.vbw index 2e1547f362a..bd0946e41b1 100644 --- a/src/IDF_Editor/IDFEd-project.vbw +++ b/src/IDF_Editor/IDFEd-project.vbw @@ -1,11 +1,11 @@ -About = 153, 30, 1480, 773, C, 47, 79, 1374, 852, C +About = 153, 30, 1480, 773, , 47, 79, 1374, 852, C IDFEdit = 48, 9, 1381, 891, , 363, 158, 1696, 805, C -IDFMain = 175, 175, 1569, 775, Z +IDFMain = 175, 174, 1569, 775, Z parentMDI = 132, 174, 1459, 947, , 74, 106, 1401, 879, C LayoutOption = 0, 0, 0, 0, C, 44, 58, 1371, 831, C frmFind = 0, 0, 0, 0, C, 66, 87, 1393, 860, C -saveOption = 66, 87, 1481, 617, C, 88, 116, 1415, 889, C +saveOption = 66, 87, 1481, 617, , 88, 116, 1415, 889, C frmWhatsNew = 104, 191, 1473, 964, , 198, 261, 1525, 1034, C frmNodeSelect = 132, 174, 1341, 879, , 110, 145, 1437, 918, C -frmSearch = 176, 232, 1591, 762, C, 132, 174, 1459, 947, C +frmSearch = 176, 232, 1591, 762, , 132, 174, 1459, 947, C frmErrorCheck = 74, 56, 1407, 703, , 100, 100, 1433, 747, C diff --git a/src/IDF_Editor/IDFEditMain.bas b/src/IDF_Editor/IDFEditMain.bas index ff649735daa..34903d0409b 100644 --- a/src/IDF_Editor/IDFEditMain.bas +++ b/src/IDF_Editor/IDFEditMain.bas @@ -34,7 +34,7 @@ Attribute VB_Name = "IDFMain" ' command line argument /idd:iddfilename ' -Public Const ver = "1.48" 'current version of IDFEditor - less than 1 is a beta +Public Const ver = "1.49" 'current version of IDFEditor - less than 1 is a beta Option Explicit Option Base 1 @@ -295,6 +295,7 @@ Public Const specFormNo = 1 Public checkRangeOnSave As Integer Public Const checkRangeYes = 1 Public Const checkRangeNo = 2 +Public ignoreValidatingMacros As Boolean Public useWordWrap As Boolean @@ -626,7 +627,7 @@ End Sub '----------------------------------------------------------------------------- Sub setUnits() Dim i As Long -maxUsedConvUnits = 153 +maxUsedConvUnits = 154 unitsDimensionless = 56 ReDim convUnits(maxUsedConvUnits) ' the following is pasted in from the unitsIPandSI.xls file @@ -783,6 +784,7 @@ convUnits(150).siName = "m3/hr-person" convUnits(151).siName = "m3/m2" convUnits(152).siName = "m3/hr-m2" convUnits(153).siName = "m3/hr" +convUnits(154).siName = "W/((m3/s)-Pa)" convUnits(1).ipName = "ft" convUnits(2).ipName = "in" @@ -937,6 +939,7 @@ convUnits(150).ipName = "gal/hr-person" convUnits(151).ipName = "gal/ft2" convUnits(152).ipName = "gal/hr-ft2" convUnits(153).ipName = "gal/hr" +convUnits(154).ipName = "W/((ft3/min)-inH2O)" convUnits(1).mult = 3.28083989501312 convUnits(2).mult = 39.3700787401575 @@ -1091,6 +1094,7 @@ convUnits(150).mult = 264.172037284185 convUnits(151).mult = 24.5423853466941 convUnits(152).mult = 24.5423853466941 convUnits(153).mult = 264.172037284185 +convUnits(154).mult = 0.117556910599482 convUnits(7).offset = 32 convUnits(19).offset = 7.686 @@ -1113,6 +1117,7 @@ convUnits(150).alt = True convUnits(151).alt = True convUnits(152).alt = True convUnits(153).alt = True +convUnits(154).alt = True convUnits(1).multiUnitName = "Distance" convUnits(3).multiUnitName = "Capacity" diff --git a/src/IDF_Editor/about.frm b/src/IDF_Editor/about.frm index 0b05b6bb519..9bf24fa7309 100644 --- a/src/IDF_Editor/about.frm +++ b/src/IDF_Editor/about.frm @@ -81,7 +81,7 @@ Begin VB.Form About Begin VB.Label lblVersion Alignment = 1 'Right Justify AutoSize = -1 'True - Caption = "Version 1.48b" + Caption = "Version 1.49a" BeginProperty Font Name = "Arial" Size = 12 @@ -92,10 +92,10 @@ Begin VB.Form About Strikethrough = 0 'False EndProperty Height = 285 - Left = 1560 + Left = 1575 TabIndex = 1 Top = 960 - Width = 1560 + Width = 1545 End Begin VB.Label lblProductName AutoSize = -1 'True diff --git a/src/IDF_Editor/whatsNew.frm b/src/IDF_Editor/whatsNew.frm index 5c888b1a601..41d0cd87d9e 100644 --- a/src/IDF_Editor/whatsNew.frm +++ b/src/IDF_Editor/whatsNew.frm @@ -3,12 +3,12 @@ Begin VB.Form frmWhatsNew BorderStyle = 3 'Fixed Dialog Caption = "New Features of IDF Editor" ClientHeight = 8280 - ClientLeft = 45 - ClientTop = 435 - ClientWidth = 10905 + ClientLeft = 48 + ClientTop = 432 + ClientWidth = 10908 BeginProperty Font Name = "MS Sans Serif" - Size = 9.75 + Size = 9.6 Charset = 0 Weight = 700 Underline = 0 'False @@ -19,13 +19,13 @@ Begin VB.Form frmWhatsNew MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 8280 - ScaleWidth = 10905 + ScaleWidth = 10908 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.TextBox txtWhatsNew BeginProperty Font Name = "MS Sans Serif" - Size = 9.75 + Size = 9.6 Charset = 0 Weight = 400 Underline = 0 'False @@ -45,7 +45,7 @@ Begin VB.Form frmWhatsNew Caption = "Close" BeginProperty Font Name = "MS Sans Serif" - Size = 8.25 + Size = 7.8 Charset = 0 Weight = 400 Underline = 0 'False @@ -62,7 +62,7 @@ Begin VB.Form frmWhatsNew Caption = "This dialog box is shown at start up one time and then can be found under HELP .. WHATS NEW" BeginProperty Font Name = "MS Sans Serif" - Size = 8.25 + Size = 7.8 Charset = 0 Weight = 700 Underline = 0 'False @@ -90,6 +90,17 @@ End Sub Private Sub Form_Load() Dim t As String t = "" +t = t & "New Features of IDF Editor Version 1.49" & vbCrLf +t = t & "-------------------------------------------------------------------------------" & vbCrLf +t = t & "In EDIT .. VALIDITY CHECK now have an option to IGNORE MACROS which will not perform validity checking on fields that contain characters " _ + & "typically used for macros: # [ @ $ = " & vbCrLf & vbCrLf + +t = t & "Allow multiple objects to be duplicated or deleted at the same time when multiple columns are selected." & vbCrLf & vbCrLf + +t = t & "New Features of IDF Editor Version 1.48" & vbCrLf +t = t & "-------------------------------------------------------------------------------" & vbCrLf +t = t & "Added warning when trying to open file with Unix file line endings." & vbCrLf & vbCrLf + t = t & "New Features of IDF Editor Version 1.44" & vbCrLf t = t & "-------------------------------------------------------------------------------" & vbCrLf t = t & "The new JUMP menu allows you to easily navigate between fields in different objects that are using the same name. For example, it can be " _ @@ -151,15 +162,15 @@ End Sub ' NOTICE ' -' The contents of this file are subject to the EnergyPlus Open Source License -' Version 1.0 (the "License"); you may not use this file except in compliance -' with the License. You may obtain a copy of the License at +' The contents of this file are subject to the EnergyPlus Open Source License +' Version 1.0 (the "License"); you may not use this file except in compliance +' with the License. You may obtain a copy of the License at ' ' http://apps1.eere.energy.gov/buildings/energyplus/energyplus_licensing.cfm ' -' Software distributed under the License is distributed on an "AS IS" basis, -' WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -' the specific language governing rights and limitations under the License. +' Software distributed under the License is distributed on an "AS IS" basis, +' WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for +' the specific language governing rights and limitations under the License. ' ' Copyright © 1996-2014 GARD Analytics. All rights reserved. ' diff --git a/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf b/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf index ed0bf07ecca..0d638a9161f 100644 --- a/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf +++ b/testfiles/1ZoneDataCenterCRAC_wPumpedDXCoolingCoil.idf @@ -1060,8 +1060,6 @@ Output:Variable,*,Facility Total Electric Demand Power,Hourly; - Output:Variable,*,Zone Electric Equipment Total Heating Rate,Hourly; - Output:Variable,*,Site Outdoor Air Drybulb Temperature,Hourly; Output:Variable,*,Site Outdoor Air Dewpoint Temperature,Hourly; diff --git a/third_party/kiva-ep/src/libkiva/CMakeLists.txt b/third_party/kiva-ep/src/libkiva/CMakeLists.txt index 20ba25d093a..813e9036464 100644 --- a/third_party/kiva-ep/src/libkiva/CMakeLists.txt +++ b/third_party/kiva-ep/src/libkiva/CMakeLists.txt @@ -42,10 +42,14 @@ endif() if(${git_exit_status} MATCHES "0") set(VERSION_NUMBER "${kiva_version} (${build_architecture})") - message("-- Building Kiva version: ${VERSION_NUMBER}") + if(KIVA_EXE_BUILD) + message("-- Building Kiva version: ${VERSION_NUMBER}") + endif() else() set(VERSION_NUMBER "v?.?.?") - message("Cannot determine version number.") + if(KIVA_EXE_BUILD) + message("Cannot determine version number.") + endif() endif() string(TIMESTAMP YEAR %Y) diff --git a/third_party/kiva-ep/src/libkiva/Domain.cpp b/third_party/kiva-ep/src/libkiva/Domain.cpp index 7deb3ae90f3..61da4c7b2f6 100755 --- a/third_party/kiva-ep/src/libkiva/Domain.cpp +++ b/third_party/kiva-ep/src/libkiva/Domain.cpp @@ -94,8 +94,7 @@ void Domain::setDomain(Foundation &foundation) cell[i][j][k].specificHeat = foundation.blocks[b].material.specificHeat; cell[i][j][k].conductivity = foundation.blocks[b].material.conductivity; - cell[i][j][k].block = foundation.blocks[b]; - + cell[i][j][k].blockPtr = &foundation.blocks[b]; if (foundation.blocks[b].blockType == Block::INTERIOR_AIR) { @@ -119,7 +118,7 @@ void Domain::setDomain(Foundation &foundation) { cell[i][j][k].cellType = Cell::BOUNDARY; - cell[i][j][k].surface = foundation.surfaces[s]; + cell[i][j][k].surfacePtr = &foundation.surfaces[s]; // Point/Line cells not on the boundary should be // zero-thickness cells @@ -165,8 +164,8 @@ void Domain::setDomain(Foundation &foundation) if (foundation.numberOfDimensions == 2 && foundation.coordinateSystem == Foundation::CS_CYLINDRICAL) { - if (cell[i][j][k].surface.orientation == Surface::X_POS || - cell[i][j][k].surface.orientation == Surface::X_NEG) + if (cell[i][j][k].surfacePtr->orientation == Surface::X_POS || + cell[i][j][k].surfacePtr->orientation == Surface::X_NEG) { cell[i][j][k].area = 2.0*PI*meshX.centers[i]*meshZ.deltas[k]; } @@ -180,8 +179,8 @@ void Domain::setDomain(Foundation &foundation) else if (foundation.numberOfDimensions == 2 && foundation.coordinateSystem == Foundation::CS_CARTESIAN) { - if (cell[i][j][k].surface.orientation == Surface::X_POS || - cell[i][j][k].surface.orientation == Surface::X_NEG) + if (cell[i][j][k].surfacePtr->orientation == Surface::X_POS || + cell[i][j][k].surfacePtr->orientation == Surface::X_NEG) { cell[i][j][k].area = 2.0*meshZ.deltas[k]*foundation.linearAreaMultiplier; } @@ -193,13 +192,13 @@ void Domain::setDomain(Foundation &foundation) } else if (foundation.numberOfDimensions == 3) { - if (cell[i][j][k].surface.orientation == Surface::X_POS || - cell[i][j][k].surface.orientation == Surface::X_NEG) + if (cell[i][j][k].surfacePtr->orientation == Surface::X_POS || + cell[i][j][k].surfacePtr->orientation == Surface::X_NEG) { cell[i][j][k].area = meshY.deltas[j]*meshZ.deltas[k]; } - else if (cell[i][j][k].surface.orientation == Surface::Y_POS || - cell[i][j][k].surface.orientation == Surface::Y_NEG) + else if (cell[i][j][k].surfacePtr->orientation == Surface::Y_POS || + cell[i][j][k].surfacePtr->orientation == Surface::Y_NEG) { cell[i][j][k].area = meshX.deltas[i]*meshZ.deltas[k]; } diff --git a/third_party/kiva-ep/src/libkiva/Domain.hpp b/third_party/kiva-ep/src/libkiva/Domain.hpp index c23f580922c..12722907622 100755 --- a/third_party/kiva-ep/src/libkiva/Domain.hpp +++ b/third_party/kiva-ep/src/libkiva/Domain.hpp @@ -9,6 +9,7 @@ #include "Functions.hpp" #include +#include #include namespace Kiva { @@ -47,11 +48,9 @@ class Cell }; CellType cellType; - //size_t blockNumber; - Block block; + Block* blockPtr; - //size_t surfaceNumber; - Surface surface; + Surface* surfacePtr; }; class Domain diff --git a/third_party/kiva-ep/src/libkiva/Ground.cpp b/third_party/kiva-ep/src/libkiva/Ground.cpp index 022254f4f79..26f151f3d0f 100644 --- a/third_party/kiva-ep/src/libkiva/Ground.cpp +++ b/third_party/kiva-ep/src/libkiva/Ground.cpp @@ -128,18 +128,18 @@ void Ground::calculateADEUpwardSweep() case Cell::BOUNDARY: { double tilt; - if (domain.cell[i][j][k].surface.orientation == Surface::Z_POS) + if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_POS) tilt = 0; - else if (domain.cell[i][j][k].surface.orientation == Surface::Z_NEG) + else if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_NEG) tilt = PI; else tilt = PI/2.0; - switch (domain.cell[i][j][k].surface.boundaryConditionType) + switch (domain.cell[i][j][k].surfacePtr->boundaryConditionType) { case Surface::ZERO_FLUX: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: U[i][j][k] = UOld[i+1][j][k]; @@ -165,7 +165,7 @@ void Ground::calculateADEUpwardSweep() case Surface::CONSTANT_TEMPERATURE: - U[i][j][k] = domain.cell[i][j][k].surface.temperature; + U[i][j][k] = domain.cell[i][j][k].surfacePtr->temperature; break; case Surface::INTERIOR_TEMPERATURE: @@ -185,10 +185,10 @@ void Ground::calculateADEUpwardSweep() double hc = getConvectionCoeff(TOld[i][j][k], Tair,0.0,0.00208,false,tilt); // TODO Make roughness a property of the interior surfaces - double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TOld[i][j][k],Tair); - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: U[i][j][k] = (domain.getKXP(i,j,k)*UOld[i+1][j][k]/domain.getDXP(i) + @@ -225,10 +225,10 @@ void Ground::calculateADEUpwardSweep() double eSky = bcs.skyEmissivity; double F = getEffectiveExteriorViewFactor(eSky,tilt); double hc = getConvectionCoeff(TOld[i][j][k],Tair,v,foundation.surfaceRoughness,true,tilt); - double hr = getExteriorIRCoeff(domain.cell[i][j][k].surface.emissivity,TOld[i][j][k],Tair,eSky,tilt); + double hr = getExteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity,TOld[i][j][k],Tair,eSky,tilt); double q = domain.cell[i][j][k].heatGain; - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: U[i][j][k] = (domain.getKXP(i,j,k)*UOld[i+1][j][k]/domain.getDXP(i) + @@ -338,18 +338,18 @@ void Ground::calculateADEDownwardSweep() case Cell::BOUNDARY: { double tilt; - if (domain.cell[i][j][k].surface.orientation == Surface::Z_POS) + if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_POS) tilt = 0; - else if (domain.cell[i][j][k].surface.orientation == Surface::Z_NEG) + else if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_NEG) tilt = PI; else tilt = PI/2.0; - switch (domain.cell[i][j][k].surface.boundaryConditionType) + switch (domain.cell[i][j][k].surfacePtr->boundaryConditionType) { case Surface::ZERO_FLUX: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: V[i][j][k] = V[i+1][j][k]; @@ -375,7 +375,7 @@ void Ground::calculateADEDownwardSweep() case Surface::CONSTANT_TEMPERATURE: - V[i][j][k] = domain.cell[i][j][k].surface.temperature; + V[i][j][k] = domain.cell[i][j][k].surfacePtr->temperature; break; case Surface::INTERIOR_TEMPERATURE: @@ -395,10 +395,10 @@ void Ground::calculateADEDownwardSweep() double hc = getConvectionCoeff(TOld[i][j][k], Tair,0.0,0.00208,false,tilt); - double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TOld[i][j][k],Tair); - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: V[i][j][k] = (domain.getKXP(i,j,k)*V[i+1][j][k]/domain.getDXP(i) + @@ -435,10 +435,10 @@ void Ground::calculateADEDownwardSweep() double& eSky = bcs.skyEmissivity; double F = getEffectiveExteriorViewFactor(eSky,tilt); double hc = getConvectionCoeff(TOld[i][j][k],Tair,v,foundation.surfaceRoughness,true,tilt); - double hr = getExteriorIRCoeff(domain.cell[i][j][k].surface.emissivity,TOld[i][j][k],Tair,eSky,tilt); + double hr = getExteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity,TOld[i][j][k],Tair,eSky,tilt); double q = domain.cell[i][j][k].heatGain; - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: V[i][j][k] = (domain.getKXP(i,j,k)*V[i+1][j][k]/domain.getDXP(i) + @@ -548,18 +548,18 @@ void Ground::calculateExplicit() case Cell::BOUNDARY: { double tilt; - if (domain.cell[i][j][k].surface.orientation == Surface::Z_POS) + if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_POS) tilt = 0; - else if (domain.cell[i][j][k].surface.orientation == Surface::Z_NEG) + else if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_NEG) tilt = PI; else tilt = PI/2.0; - switch (domain.cell[i][j][k].surface.boundaryConditionType) + switch (domain.cell[i][j][k].surfacePtr->boundaryConditionType) { case Surface::ZERO_FLUX: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: TNew[i][j][k] = TOld[i+1][j][k]; @@ -585,7 +585,7 @@ void Ground::calculateExplicit() case Surface::CONSTANT_TEMPERATURE: - TNew[i][j][k] = domain.cell[i][j][k].surface.temperature; + TNew[i][j][k] = domain.cell[i][j][k].surfacePtr->temperature; break; case Surface::INTERIOR_TEMPERATURE: @@ -605,10 +605,10 @@ void Ground::calculateExplicit() double hc = getConvectionCoeff(TOld[i][j][k], Tair,0.0,0.00208,false,tilt); - double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TOld[i][j][k],Tair); - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: TNew[i][j][k] = (domain.getKXP(i,j,k)*TOld[i+1][j][k]/domain.getDXP(i) + @@ -645,10 +645,10 @@ void Ground::calculateExplicit() double& eSky = bcs.skyEmissivity; double F = getEffectiveExteriorViewFactor(eSky,tilt); double hc = getConvectionCoeff(TOld[i][j][k],Tair,v,foundation.surfaceRoughness,true,tilt); - double hr = getExteriorIRCoeff(domain.cell[i][j][k].surface.emissivity,TOld[i][j][k],Tair,eSky,tilt); + double hr = getExteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity,TOld[i][j][k],Tair,eSky,tilt); double q = domain.cell[i][j][k].heatGain; - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: TNew[i][j][k] = (domain.getKXP(i,j,k)*TOld[i+1][j][k]/domain.getDXP(i) + @@ -777,18 +777,18 @@ void Ground::calculateMatrix(Foundation::NumericalScheme scheme) case Cell::BOUNDARY: { double tilt; - if (domain.cell[i][j][k].surface.orientation == Surface::Z_POS) + if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_POS) tilt = 0; - else if (domain.cell[i][j][k].surface.orientation == Surface::Z_NEG) + else if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_NEG) tilt = PI; else tilt = PI/2.0; - switch (domain.cell[i][j][k].surface.boundaryConditionType) + switch (domain.cell[i][j][k].surfacePtr->boundaryConditionType) { case Surface::ZERO_FLUX: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = 1.0; @@ -849,7 +849,7 @@ void Ground::calculateMatrix(Foundation::NumericalScheme scheme) break; case Surface::CONSTANT_TEMPERATURE: A = 1.0; - bVal = domain.cell[i][j][k].surface.temperature; + bVal = domain.cell[i][j][k].surfacePtr->temperature; setAmatValue(index,index,A); setbValue(index,bVal); @@ -875,10 +875,10 @@ void Ground::calculateMatrix(Foundation::NumericalScheme scheme) double hc = getConvectionCoeff(TOld[i][j][k], Tair,0.0,0.00208,false,tilt); - double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TOld[i][j][k],Tair); - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = domain.getKXP(i,j,k)/domain.getDXP(i) + (hc + hr); @@ -945,10 +945,10 @@ void Ground::calculateMatrix(Foundation::NumericalScheme scheme) double& eSky = bcs.skyEmissivity; double F = getEffectiveExteriorViewFactor(eSky,tilt); double hc = getConvectionCoeff(TOld[i][j][k],Tair,v,foundation.surfaceRoughness,true,tilt); - double hr = getExteriorIRCoeff(domain.cell[i][j][k].surface.emissivity,TOld[i][j][k],Tair,eSky,tilt); + double hr = getExteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity,TOld[i][j][k],Tair,eSky,tilt); double q = domain.cell[i][j][k].heatGain; - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = domain.getKXP(i,j,k)/domain.getDXP(i) + (hc + hr); @@ -1245,18 +1245,18 @@ void Ground::calculateADI(int dim) case Cell::BOUNDARY: { double tilt; - if (domain.cell[i][j][k].surface.orientation == Surface::Z_POS) + if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_POS) tilt = 0; - else if (domain.cell[i][j][k].surface.orientation == Surface::Z_NEG) + else if (domain.cell[i][j][k].surfacePtr->orientation == Surface::Z_NEG) tilt = PI; else tilt = PI/2.0; - switch (domain.cell[i][j][k].surface.boundaryConditionType) + switch (domain.cell[i][j][k].surfacePtr->boundaryConditionType) { case Surface::ZERO_FLUX: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = 1.0; @@ -1366,7 +1366,7 @@ void Ground::calculateADI(int dim) break; case Surface::CONSTANT_TEMPERATURE: A = 1.0; - bVal = domain.cell[i][j][k].surface.temperature; + bVal = domain.cell[i][j][k].surfacePtr->temperature; setAmatValue(index,index,A); setbValue(index,bVal); @@ -1392,10 +1392,10 @@ void Ground::calculateADI(int dim) double hc = getConvectionCoeff(TOld[i][j][k], Tair,0.0,0.00208,false,tilt); - double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + double hr = getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TOld[i][j][k],Tair); - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = domain.getKXP(i,j,k)/domain.getDXP(i) + (hc + hr); @@ -1510,10 +1510,10 @@ void Ground::calculateADI(int dim) double eSky = bcs.skyEmissivity; double F = getEffectiveExteriorViewFactor(eSky,tilt); double hc = getConvectionCoeff(TOld[i][j][k],Tair,v,foundation.surfaceRoughness,true,tilt); - double hr = getExteriorIRCoeff(domain.cell[i][j][k].surface.emissivity,TOld[i][j][k],Tair,eSky,tilt); + double hr = getExteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity,TOld[i][j][k],Tair,eSky,tilt); double q = domain.cell[i][j][k].heatGain; - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: A = domain.getKXP(i,j,k)/domain.getDXP(i) + (hc + hr); @@ -2014,7 +2014,7 @@ void Ground::calculateSurfaceAverages(){ std::size_t k = std::get<2>(foundation.surfaces[s].indices[index]); double h = getConvectionCoeff(TNew[i][j][k],Tair,0.0,0.00208,false,tilt) - + getSimpleInteriorIRCoeff(domain.cell[i][j][k].surface.emissivity, + + getSimpleInteriorIRCoeff(domain.cell[i][j][k].surfacePtr->emissivity, TNew[i][j][k],Tair); double& A = domain.cell[i][j][k].area; @@ -2126,7 +2126,7 @@ std::vector Ground::calculateHeatFlux(const size_t &i, const size_t &j, { case Cell::BOUNDARY: { - switch (domain.cell[i][j][k].surface.orientation) + switch (domain.cell[i][j][k].surfacePtr->orientation) { case Surface::X_NEG: { @@ -2566,7 +2566,7 @@ void Ground::setSolarBoundaryConditions() std::size_t j = std::get<1>(foundation.surfaces[s].indices[index]); std::size_t k = std::get<2>(foundation.surfaces[s].indices[index]); - double alpha = domain.cell[i][j][k].surface.absorptivity; + double alpha = domain.cell[i][j][k].surfacePtr->absorptivity; if (qGH > 0.0) { diff --git a/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc index 47050f5e849..4f156fca2dc 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc @@ -347,8 +347,6 @@ namespace EnergyPlus { } - - TEST_F( EnergyPlusFixture, TestAFNPressureStat ) { // Unit test for a new feature of PressureStat and #5687 @@ -2298,6 +2296,20 @@ namespace EnergyPlus { EXPECT_NEAR( 0.0, AirflowNetworkLinkReport( 50 ).FLOW, 0.0001 ); AirflowNetworkExchangeData.deallocate( ); + + // Start a test for #6005 + ANZT = 26.0; + MultizoneSurfaceData( 2 ).HybridVentClose = true; + MultizoneSurfaceData( 5 ).HybridVentClose = true; + MultizoneSurfaceData( 14 ).HybridVentClose = true; + CalcAirflowNetworkAirBalance( ); + EXPECT_EQ( 0.0, MultizoneSurfaceData( 2 ).OpenFactor ); + EXPECT_EQ( 0.0, MultizoneSurfaceData( 5 ).OpenFactor ); + EXPECT_EQ( 0.0, MultizoneSurfaceData( 14 ).OpenFactor ); + EXPECT_EQ( 0.0, SurfaceWindow( 2 ).VentingOpenFactorMultRep ); + EXPECT_EQ( 0.0, SurfaceWindow( 5 ).VentingOpenFactorMultRep ); + EXPECT_EQ( 0.0, SurfaceWindow( 14 ).VentingOpenFactorMultRep ); + Node.deallocate( ); } diff --git a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc new file mode 100644 index 00000000000..8489c2446be --- /dev/null +++ b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc @@ -0,0 +1,108 @@ +// EnergyPlus, Copyright (c) 1996-2017, The Board of Trustees of the University of Illinois and +// 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). 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. + +// EnergyPlus::Boilers Unit Tests + +// Google Test Headers +#include + +// EnergyPlus Headers +#include +#include +#include + +#include "Fixtures/EnergyPlusFixture.hh" + +using namespace EnergyPlus; +using namespace EnergyPlus::Boilers; +using namespace EnergyPlus::DataSizing; + +TEST_F( EnergyPlusFixture, Boiler_HotWaterSizingTest ) +{ + // unit test for autosizing boiler nominal capacity in Boiler:HotWater + Boilers::Boiler.allocate( 1 ); + // Hardsized Hot Water Boiler + Boilers::Boiler( 1 ).LoopNum = 1; + Boilers::Boiler( 1 ).SizFac = 1.2; + Boilers::Boiler( 1 ).NomCap = 40000.0; + Boilers::Boiler( 1 ).NomCapWasAutoSized = false; + Boilers::Boiler( 1 ).VolFlowRate = 1.0; + Boilers::Boiler( 1 ).VolFlowRateWasAutoSized = false; + Boilers::Boiler( 1 ).TempDesBoilerOut = 82.0; + + DataPlant::PlantLoop.allocate( 1 ); + DataSizing::PlantSizData.allocate( 1 ); + // Hot Water Loop + DataPlant::PlantLoop( 1 ).PlantSizNum = 1; + DataPlant::PlantLoop( 1 ).FluidIndex = 1; + DataPlant::PlantLoop( 1 ).FluidName = "WATER"; + DataSizing::PlantSizData( 1 ).DesVolFlowRate = 1.0; + DataSizing::PlantSizData( 1 ).DeltaT = 10.0; + DataPlant::PlantFirstSizesOkayToFinalize = true; + //now call sizing routine + Boilers::SizeBoiler( 1 ); + // see if boiler volume flow rate returned is hard-sized value + EXPECT_DOUBLE_EQ( Boilers::Boiler( 1 ).VolFlowRate, 1.0 ); + // see if boiler nominal capacity returned is hard-sized value + EXPECT_DOUBLE_EQ( Boilers::Boiler( 1 ).NomCap, 40000.0 ); + + // Autosized Hot Water Boiler + Boilers::Boiler( 1 ).NomCapWasAutoSized = true; + Boilers::Boiler( 1 ).VolFlowRateWasAutoSized = true; + Boilers::Boiler( 1 ).NomCap = DataSizing::AutoSize; + Boilers::Boiler( 1 ).VolFlowRate = DataSizing::AutoSize; + //now call sizing routine + Boilers::SizeBoiler( 1 ); + // see if boiler volume flow rate returned is autosized value + EXPECT_NEAR( Boilers::Boiler( 1 ).VolFlowRate, 1.2, 0.000001 ); + // see if boiler nominal capacity returned is autosized value + EXPECT_NEAR( Boilers::Boiler( 1 ).NomCap, 50409257.0, 1.0 ); + // clear + Boilers::Boiler.deallocate(); + DataSizing::PlantSizData.deallocate(); + DataPlant::PlantLoop.deallocate(); + +} diff --git a/tst/EnergyPlus/unit/CMakeLists.txt b/tst/EnergyPlus/unit/CMakeLists.txt index 386e2a21c47..8f0cb7c42f2 100644 --- a/tst/EnergyPlus/unit/CMakeLists.txt +++ b/tst/EnergyPlus/unit/CMakeLists.txt @@ -16,6 +16,7 @@ set( test_src AirTerminalSingleDuct.unit.cc AirTerminalSingleDuctMixer.unit.cc AirTerminalSingleDuctPIUReheat.unit.cc + BoilerHotWater.unit.cc BranchInputManager.unit.cc BranchNodeConnections.unit.cc ChilledCeilingPanelSimple.unit.cc @@ -107,6 +108,7 @@ set( test_src PlantPipingSystemsManager.unit.cc PlantChillers.unit.cc PlantUtilities.unit.cc + PoweredInductionUnits.unit.cc Pumps.unit.cc PurchasedAirManager.unit.cc ReportSizingManager.unit.cc diff --git a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc index 81fbda31166..2f2ac1f5c56 100644 --- a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc @@ -106,18 +106,27 @@ TEST_F( EnergyPlusFixture, ElectricEIRChiller_HeatRecoveryAutosizeTest ) ChillerElectricEIR::ElectricEIRChiller( 1 ).HeatRecActive = true; ChillerElectricEIR::ElectricEIRChiller( 1 ).CondenserType = ChillerElectricEIR::WaterCooled; ChillerElectricEIR::ElectricEIRChiller( 1 ).CWLoopNum = 1; + ChillerElectricEIR::ElectricEIRChiller( 1 ).CDLoopNum = 2; ChillerElectricEIR::ElectricEIRChiller( 1 ).EvapVolFlowRate = 1.0; ChillerElectricEIR::ElectricEIRChiller( 1 ).CondVolFlowRate = 1.0; ChillerElectricEIR::ElectricEIRChiller( 1 ).RefCap = 10000; ChillerElectricEIR::ElectricEIRChiller( 1 ).RefCOP = 3.0; - DataPlant::PlantLoop.allocate( 1 ); - DataSizing::PlantSizData.allocate( 1 ); + DataPlant::PlantLoop.allocate( 2 ); + DataSizing::PlantSizData.allocate( 2 ); + // chilled water loop DataPlant::PlantLoop( 1 ).PlantSizNum = 1; DataPlant::PlantLoop( 1 ).FluidIndex = 1; DataPlant::PlantLoop( 1 ).FluidName = "WATER"; DataSizing::PlantSizData( 1 ).DesVolFlowRate = 1.0; DataSizing::PlantSizData( 1 ).DeltaT = 5.0; + // condenser water loop + DataPlant::PlantLoop( 2 ).PlantSizNum = 2; + DataPlant::PlantLoop( 2 ).FluidIndex = 1; + DataPlant::PlantLoop( 2 ).FluidName = "WATER"; + DataSizing::PlantSizData( 2 ).DesVolFlowRate = 1.0; + DataSizing::PlantSizData( 2 ).DeltaT = 5.0; + DataPlant::PlantFirstSizesOkayToFinalize = true; //now call sizing routine diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 6df2ad6dd64..c0be46ab2fa 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -83,13 +83,16 @@ namespace EnergyPlus { using CurveManager::Quadratic; using CurveManager::BiQuadratic; using CurveManager::NumCurves; + using Psychrometrics::PsyWFnTdbH; + using Psychrometrics::PsyTdbFnHW; + using Psychrometrics::PsyTsatFnHPb; + using Psychrometrics::PsyRhFnTdbWPb; // int NumDXCoils( 0 ); // Total number of DX coils // Array1D< DXCoilData > DXCoil; int DXCoilNum; int CurveNum; NumDXCoils = 2; - DXCoilNum = 2; DXCoil.allocate( NumDXCoils ); DXCoil( 1 ).DXCoilType_Num = CoilDX_MultiSpeedCooling; DXCoil( 1 ).DXCoilType = "Coil:Cooling:DX:MultiSpeed"; @@ -108,31 +111,39 @@ namespace EnergyPlus { DXCoil( 1 ).NumOfSpeeds = 2; DXCoil( 2 ).NumOfSpeeds = 2; - DXCoil( DXCoilNum ).MSRatedTotCap.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSRatedSHR.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSRatedCOP.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSRatedAirVolFlowRate.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSRatedAirMassFlowRate.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSCCapFTemp.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSCCapFFlow.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSEIRFTemp.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSEIRFFlow.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSWasteHeat.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSEvapCondEffect.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSEvapCondAirFlow.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSEvapCondPumpElecNomPower.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSRatedCBF.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSWasteHeatFrac.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSPLFFPLR.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSTwet_Rated.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSGamma_Rated.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSMaxONOFFCyclesperHour.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSLatentCapacityTimeConstant.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); - DXCoil( DXCoilNum ).MSFanPowerPerEvapAirFlowRate.allocate( DXCoil( DXCoilNum ).NumOfSpeeds ); + for (DXCoilNum = 1; DXCoilNum <= 2; ++DXCoilNum) { + DXCoil(DXCoilNum).MSRatedTotCap.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedSHR.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedCOP.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedAirVolFlowRate.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedAirMassFlowRate.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSCCapFTemp.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSCCapFFlow.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSEIRFTemp.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSEIRFFlow.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSWasteHeat.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSEvapCondEffect.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSEvapCondAirFlow.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSEvapCondPumpElecNomPower.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSRatedCBF.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSWasteHeatFrac.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSPLFFPLR.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSTwet_Rated.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSGamma_Rated.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSMaxONOFFCyclesperHour.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSLatentCapacityTimeConstant.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSFanPowerPerEvapAirFlowRate.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + } DXCoil( 1 ).MSRatedTotCap( 1 ) = 4455.507579219055; DXCoil( 1 ).MSRatedTotCap( 2 ) = 6188.507579219055; + DXCoil( 1 ).MSCCapFFlow = 1; + DXCoil( 1 ).MSCCapFTemp = 3; + DXCoil( 1 ).MSEIRFFlow = 1; + DXCoil( 1 ).MSEIRFTemp = 3; + DXCoil( 1 ).MSPLFFPLR = 2; + DXCoilNum = 2; DXCoil( DXCoilNum ).MSRatedTotCap( 1 ) = 4455.507579219055; DXCoil( DXCoilNum ).MSRatedTotCap( 2 ) = 6188.204971137576; DXCoil( DXCoilNum ).MSRatedCOP( 1 ) = 4.03; @@ -209,7 +220,54 @@ namespace EnergyPlus { // "! , Component Type, Component Name, High Temperature Heating (net) Rating Capacity {W}, Low Temperature Heating (net) Rating Capacity {W}, HSPF {Btu/W-h}, Region Number", // " DX Heating Coil Standard Rating Information, , DX Heating coil, 6414.3, 6414.3, 6.58, 4" } ) ) ); + // set up coil operating conditions (replicates first occurance of RH > 1 warning in HVACTemplate_UnitarySytsem annual run) + OutDryBulbTemp = 16.1; + OutHumRat = 0.0114507065; + OutBaroPress = 98200.0; + DataEnvironment::StdRhoAir = 1.2; + MSHPMassFlowRateLow = 0.2339 * DataEnvironment::StdRhoAir; + MSHPMassFlowRateHigh = 0.2924 * DataEnvironment::StdRhoAir; + + int CoilIndex = 1; + DataHeatBalance::HeatReclaimDXCoil.allocate( 2 ); + DXCoil( CoilIndex ).InletAirMassFlowRate = MSHPMassFlowRateLow; + DXCoil( CoilIndex ).MSRatedAirMassFlowRate( 1 ) = MSHPMassFlowRateLow; + DXCoil( CoilIndex ).MSRatedAirMassFlowRate( 2 ) = MSHPMassFlowRateHigh; + DXCoil( CoilIndex ).InletAirTemp = 16.1; // 97% RH - inlet is right up against the saturation curve + DXCoil( CoilIndex ).InletAirEnthalpy = 45158.16; + DXCoil( CoilIndex ).InletAirHumRat = 0.01145065; + DXCoil( CoilIndex ).MSRatedCBF( 1 ) = 0.0107723; + DXCoil( CoilIndex ).MSRatedCBF( 2 ) = 0.0107723; + DXCoil( CoilIndex ).SchedPtr = 1; + Schedule.allocate( 1 ); + Schedule( 1 ).CurrentValue = 1.0; + DXCoilOutletTemp.allocate( 1 ); + DXCoilOutletHumRat.allocate( 1 ); + DXCoilPartLoadRatio.allocate( 1 ); + DXCoilFanOpMode.allocate( 1 ); + + + Real64 SpeedRatio = 0.0; + Real64 CycRatio = 1.0; + int SpeedNum = 2; + int FanOpMode = 1; + int CompOp = 1; + int SingleMode = 0; + CalcMultiSpeedDXCoilCooling( CoilIndex, SpeedRatio, CycRatio, SpeedNum, FanOpMode, CompOp, SingleMode ); + + Real64 TdbAtOutlet = PsyTdbFnHW( DXCoil( CoilIndex ).OutletAirEnthalpy, DXCoil( CoilIndex ).OutletAirHumRat ); + Real64 tSatAtOutlet = PsyTsatFnHPb( DXCoil( CoilIndex ).OutletAirEnthalpy, OutBaroPress); + Real64 rhAtOutlet = PsyRhFnTdbWPb(DXCoil( CoilIndex ).OutletAirTemp, DXCoil( CoilIndex ).OutletAirHumRat, OutBaroPress); + + // air outlet condition is right next to the saturation curve + EXPECT_DOUBLE_EQ( TdbAtOutlet, tSatAtOutlet ); // Tdb higher than TSat by 1.8E-15 C + EXPECT_GT( TdbAtOutlet, tSatAtOutlet ); // Tdb higher than TSat by 1.8E-15 C + EXPECT_NEAR( 1.0, rhAtOutlet, 0.00001 ); // 99.9995% RH (i.e., it's not 100% as PsyRhFnTdbWPb would have reported previously) + EXPECT_LT( rhAtOutlet, 1.0 ); // just to the right of saturation curve + EXPECT_FALSE( has_cerr_output() ); // old warning no longer reported + } + TEST_F( EnergyPlusFixture, DXCoils_Test2 ) { using CurveManager::Quadratic; using CurveManager::BiQuadratic; @@ -880,8 +938,8 @@ namespace EnergyPlus { using DataEnvironment::StdPressureSeaLevel; const std::string CoilType( "Coil:WaterHeating:AirToWaterHeatPump:Wrapped" ); const std::string CoilName( "The Coil" ); - const Real64 InletDBTemp( 19.722222222222221 ); - const Real64 InletWBTemp( 13.078173565729553 ); + Real64 InletDBTemp( 19.722222222222221 ); + Real64 InletWBTemp( 13.078173565729553 ); Real64 InletAirHumRat; const Real64 TotalCap( 1303.5987246916557 ); const Real64 AirVolFlowRate( 0.085422486640000003 ); @@ -897,6 +955,18 @@ namespace EnergyPlus { CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); CBF_expected = 0.17268167698750708; EXPECT_DOUBLE_EQ( CBF_calculated, CBF_expected ); + + // push inlet condition towards saturation curve to test CBF calculation robustness + InletWBTemp = 19.7; // 19.72 DB / 19.7 WB + InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); + EXPECT_NEAR( CBF_calculated, 0.00021141, 0.0000001 ); + + InletDBTemp = 13.1; // colder and much less likely inlet air temperature + InletWBTemp = 13.08; // 13.1 DB / 13.08 WB - hard to find ADP (needed mod to CalcCBF function) + InletAirHumRat = Psychrometrics::PsyWFnTdbTwbPb( InletDBTemp, InletWBTemp, AirPressure ); + CBF_calculated = CalcCBF( CoilType, CoilName, InletDBTemp, InletAirHumRat, TotalCap, AirMassFlowRate, SHR, true, AirPressure ); + EXPECT_NEAR( CBF_calculated, 0.0001531, 0.0000001 ); } TEST_F( EnergyPlusFixture, DXCoilEvapCondPumpSizingTest ) { @@ -1413,7 +1483,7 @@ namespace EnergyPlus { EXPECT_NEAR( 0.747472, DXCoil( 1 ).RatedSHR( 1 ), 0.0000001 ); EXPECT_NEAR( 0.1012203, CBF_calculated, 0.0000001 ); - DXCoil( 1 ).RatedTotCap( 1 ) = 35000.0; // run right at the saturation curve + DXCoil( 1 ).RatedTotCap( 1 ) = 35000.0; // simulate outlet condition right at the saturation curve DXCoil( 1 ).RatedSHR( 1 ) = AutoSize; SizeDXCoil( 1 ); diff --git a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc index e2d55aac541..58ae3b826aa 100644 --- a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc +++ b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc @@ -268,4 +268,19 @@ TEST_F( EnergyPlusFixture, DisplacementVentMgr_HcUCSDDV_Door_Test ) } +TEST_F( EnergyPlusFixture, DVThirdOrderFloorTempCalculation ) +{ + Real64 const tempHistoryTerm = 0; // no history + Real64 const HAT_floor = 20; + Real64 const HA_floor = 1; + Real64 const MCpT_Total = 40; + Real64 const MCp_Total = 2; + Real64 const occupiedTemp = 25; + Real64 const nonAirSystemResponse = 0; + Real64 const zoneMultiplier = 1; + Real64 const airCap = 100; + + Real64 temp = calculateThirdOrderFloorTemperature( tempHistoryTerm, HAT_floor, HA_floor, MCpT_Total, MCp_Total, occupiedTemp, nonAirSystemResponse, zoneMultiplier, airCap ); + EXPECT_NEAR( 0.4799, temp, 0.0001 ); +} diff --git a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc index 6ebf02f058f..204900410e6 100644 --- a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc +++ b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc @@ -60,8 +60,10 @@ #include #include #include +#include #include #include +#include #include "Fixtures/EnergyPlusFixture.hh" @@ -691,4 +693,27 @@ TEST_F( EnergyPlusFixture, ManageElectricPowerTest_UpdateLoadCenterRecords_Case5 } +TEST_F( EnergyPlusFixture, ManageElectricPowerTest_CheckOutputReporting ) +{ + + std::string const idf_objects = delimited_string( { + + " LoadProfile:Plant,", + " Campus Load Profile, !- Name", + " Node 41, !- Inlet Node Name", + " Node 42, !- Outlet Node Name", + " Campus output Load, !- Load Schedule Name", + " 0.320003570569675, !- Peak Flow Rate{ m3 / s }", + " Campus output Flow Frac; !- Flow Rate Fraction Schedule Name", + } ); + ASSERT_FALSE( process_idf( idf_objects ) ); + + createFacilityElectricPowerServiceObject(); + bool SimElecCircuitsFlag = false; + // GetInput and other code will be executed and SimElectricCircuits will be true + facilityElectricServiceObj->manageElectricPowerService( true, SimElecCircuitsFlag, false ); + EXPECT_TRUE( SimElecCircuitsFlag ); + EXPECT_EQ( facilityElectricServiceObj->elecLoadCenterObjs[ 0 ]->numGenerators, 0 ); // dummy generator has been added and report variables are available + +} diff --git a/tst/EnergyPlus/unit/Furnaces.unit.cc b/tst/EnergyPlus/unit/Furnaces.unit.cc index 170851f8644..78ad80e951b 100644 --- a/tst/EnergyPlus/unit/Furnaces.unit.cc +++ b/tst/EnergyPlus/unit/Furnaces.unit.cc @@ -59,6 +59,8 @@ #include #include #include +#include +#include #include "Fixtures/EnergyPlusFixture.hh" @@ -71,6 +73,8 @@ using namespace DataZoneEnergyDemands; using namespace DataGlobals; using namespace ScheduleManager; using namespace EnergyPlus::DataAirLoop; +using namespace EnergyPlus::OutputProcessor; +using namespace EnergyPlus::SimulationManager; namespace EnergyPlus { @@ -279,5 +283,801 @@ namespace EnergyPlus { Furnace.deallocate(); } + + TEST_F( EnergyPlusFixture, UnitaryHeatPumpAirToAir_MaxSuppAirTempTest ) + { + + std::string const idf_objects = delimited_string({ + " Version,8.6;", + + " Timestep,6;", + + " SimulationControl,", + " Yes, !- Do Zone Sizing Calculation", + " Yes, !- Do System Sizing Calculation", + " No, !- Do Plant Sizing Calculation", + " Yes, !- Run Simulation for Sizing Periods", + " No; !- Run Simulation for Weather File Run Periods", + + " Site:Location,", + " CHICAGO_IL_USA TMY2-94846, !- Name", + " 41.78, !- Latitude {deg}", + " -87.75, !- Longitude {deg}", + " -6.00, !- Time Zone {hr}", + " 190.00; !- Elevation {m}", + + " SizingPeriod:DesignDay,", + " CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, !- Name", + " 1, !- Month", + " 21, !- Day of Month", + " WinterDesignDay, !- Day Type", + " -17.3, !- 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", + " -17.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}", + " 99063., !- Barometric Pressure {Pa}", + " 4.9, !- Wind Speed {m/s}", + " 270, !- 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.0; !- 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,", + " A1 - 1 IN STUCCO, !- Name", + " Smooth, !- Roughness", + " 2.5389841E-02, !- Thickness {m}", + " 0.6918309, !- Conductivity {W/m-K}", + " 1858.142, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.9200000, !- Solar Absorptance", + " 0.9200000; !- Visible Absorptance", + + " Material,", + " C4 - 4 IN COMMON BRICK, !- Name", + " Rough, !- Roughness", + " 0.1014984, !- Thickness {m}", + " 0.7264224, !- Conductivity {W/m-K}", + " 1922.216, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.7600000, !- Solar Absorptance", + " 0.7600000; !- Visible Absorptance", + + " Material,", + " E1 - 3 / 4 IN PLASTER OR GYP BOARD, !- Name", + " Smooth, !- Roughness", + " 1.9050000E-02, !- Thickness {m}", + " 0.7264224, !- Conductivity {W/m-K}", + " 1601.846, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.9200000, !- Solar Absorptance", + " 0.9200000; !- Visible Absorptance", + + " Material,", + " C6 - 8 IN CLAY TILE, !- Name", + " Smooth, !- Roughness", + " 0.2033016, !- Thickness {m}", + " 0.5707605, !- Conductivity {W/m-K}", + " 1121.292, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.8200000, !- Solar Absorptance", + " 0.8200000; !- Visible Absorptance", + + " Material,", + " C10 - 8 IN HW CONCRETE, !- Name", + " MediumRough, !- Roughness", + " 0.2033016, !- Thickness {m}", + " 1.729577, !- Conductivity {W/m-K}", + " 2242.585, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.6500000, !- Solar Absorptance", + " 0.6500000; !- Visible Absorptance", + + " Material,", + " E2 - 1 / 2 IN SLAG OR STONE, !- Name", + " Rough, !- Roughness", + " 1.2710161E-02, !- Thickness {m}", + " 1.435549, !- Conductivity {W/m-K}", + " 881.0155, !- Density {kg/m3}", + " 1673.600, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.5500000, !- Solar Absorptance", + " 0.5500000; !- Visible Absorptance", + + " Material,", + " E3 - 3 / 8 IN FELT AND MEMBRANE, !- Name", + " Rough, !- Roughness", + " 9.5402403E-03, !- Thickness {m}", + " 0.1902535, !- Conductivity {W/m-K}", + " 1121.292, !- Density {kg/m3}", + " 1673.600, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.7500000, !- Solar Absorptance", + " 0.7500000; !- Visible Absorptance", + + " Material,", + " B5 - 1 IN DENSE INSULATION, !- Name", + " VeryRough, !- Roughness", + " 2.5389841E-02, !- Thickness {m}", + " 4.3239430E-02, !- Conductivity {W/m-K}", + " 91.30524, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.5000000, !- Solar Absorptance", + " 0.5000000; !- Visible Absorptance", + + " Material,", + " C12 - 2 IN HW CONCRETE, !- Name", + " MediumRough, !- Roughness", + " 5.0901599E-02, !- Thickness {m}", + " 1.729577, !- Conductivity {W/m-K}", + " 2242.585, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.6500000, !- Solar Absorptance", + " 0.6500000; !- Visible Absorptance", + + " Construction,", + " EXTWALL80, !- Name", + " A1 - 1 IN STUCCO, !- Outside Layer", + " C4 - 4 IN COMMON BRICK, !- Layer 2", + " E1 - 3 / 4 IN PLASTER OR GYP BOARD; !- Layer 3", + + " Construction,", + " FLOOR SLAB 8 IN, !- Name", + " C10 - 8 IN HW CONCRETE; !- Outside Layer", + + " Construction,", + " ROOF34, !- Name", + " E2 - 1 / 2 IN SLAG OR STONE, !- Outside Layer", + " E3 - 3 / 8 IN FELT AND MEMBRANE, !- Layer 2", + " B5 - 1 IN DENSE INSULATION, !- Layer 3", + " C12 - 2 IN HW CONCRETE; !- Layer 4", + + " Zone,", + " EAST ZONE, !- Name", + " 0, !- Direction of Relative North {deg}", + " 0, !- X Origin {m}", + " 0, !- Y Origin {m}", + " 0, !- Z Origin {m}", + " 1, !- Type", + " 1, !- Multiplier", + " autocalculate, !- Ceiling Height {m}", + " autocalculate; !- Volume {m3}", + + " GlobalGeometryRules,", + " UpperLeftCorner, !- Starting Vertex Position", + " CounterClockWise, !- Vertex Entry Direction", + " World; !- Coordinate System", + + " BuildingSurface:Detailed,", + " Zn002:Wall001, !- Name", + " Wall, !- Surface Type", + " EXTWALL80, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.19200,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m}", + " 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 2 {m}", + " 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 3 {m}", + " 6.096000,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn002:Wall002, !- Name", + " Wall, !- Surface Type", + " EXTWALL80, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 1 {m}", + " 6.096000,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 12.19200,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 12.19200,0,3.048000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn002:Wall003, !- Name", + " Wall, !- Surface Type", + " EXTWALL80, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 12.19200,0,3.048000, !- X,Y,Z ==> Vertex 1 {m}", + " 12.19200,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 3 {m}", + " 12.19200,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn002:Wall004, !- Name", + " Wall, !- Surface Type", + " EXTWALL80, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m}", + " 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m}", + " 6.096000,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 6.096000,0,3.048000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn002:Flr001, !- Name", + " Floor, !- Surface Type", + " FLOOR SLAB 8 IN, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Surface, !- Outside Boundary Condition", + " Zn002:Flr001, !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 1.000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 6.096000,0,0, !- X,Y,Z ==> Vertex 1 {m}", + " 6.096000,6.096000,0, !- X,Y,Z ==> Vertex 2 {m}", + " 12.19200,6.096000,0, !- X,Y,Z ==> Vertex 3 {m}", + " 12.19200,0,0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn002:Roof001, !- Name", + " Roof, !- Surface Type", + " ROOF34, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 6.096000,6.096000,3.048000, !- X,Y,Z ==> Vertex 1 {m}", + " 6.096000,0,3.048000, !- X,Y,Z ==> Vertex 2 {m}", + " 12.19200,0,3.048000, !- X,Y,Z ==> Vertex 3 {m}", + " 12.19200,6.096000,3.048000; !- X,Y,Z ==> Vertex 4 {m}", + + " 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", + + " Schedule:Compact,", + " FANANDCOILAVAILSCHED, !- Name", + " FRACTION, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: Alldays, !- Field 2", + " Until: 24:00,1.00; !- Field 3", + + " Schedule:Compact,", + " OUTDOORAIRAVAILSCHED, !- Name", + " FRACTION, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1.00; !- Field 3", + + " Schedule:Compact,", + " OAFRACTIONSCHED, !- Name", + " FRACTION, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,0.30; !- Field 3", + + " Schedule:Compact,", + " HEATING SETPOINTS, !- Name", + " TEMPERATURE, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,23.00; !- Field 3", + + " Schedule:Compact,", + " COOLING SETPOINTS, !- Name", + " TEMPERATURE, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,24.00; !- Field 3", + + " Schedule:Compact,", + " ZONE CONTROL TYPE SCHED, !- Name", + " CONTROL TYPE, !- Schedule Type Limits Name", + " Through: 3/31, !- Field 1", + " For: Alldays, !- Field 2", + " Until: 24:00,1, !- Field 3", + " Through: 9/30, !- Field 5", + " For: Alldays, !- Field 6", + " Until: 24:00,2, !- Field 7", + " Through: 12/31, !- Field 9", + " For: Alldays, !- Field 10", + " Until: 24:00,1; !- Field 11", + + " Schedule:Compact,", + " CyclingFanSchedule, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,0.0; !- Field 3", + + " DesignSpecification:OutdoorAir,", + " SZ DSOA West Zone, !- Name", + " flow/person, !- Outdoor Air Method", + " 0.00944, !- Outdoor Air Flow per Person {m3/s-person}", + " 0.0, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}", + " 0.0; !- Outdoor Air Flow per Zone {m3/s}", + + " Sizing:Zone,", + " EAST ZONE, !- Zone or ZoneList Name", + " SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method", + " 14., !- Zone Cooling Design Supply Air Temperature {C}", + " , !- Zone Cooling Design Supply Air Temperature Difference {deltaC}", + " SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method", + " 45., !- 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.009, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " SZ DSOA EAST ZONE, !- 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 EAST ZONE, !- Name", + " flow/person, !- Outdoor Air Method", + " 0.00944, !- Outdoor Air Flow per Person {m3/s-person}", + " 0.0, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}", + " 0.0; !- Outdoor Air Flow per Zone {m3/s}", + + " Sizing:System,", + " Heat Pump Sys 1, !- AirLoop Name", + " sensible, !- Type of Load to Size On", + " autosize, !- Design Outdoor Air Flow Rate {m3/s}", + " 0.0, !- Central Heating Maximum System Air Flow Ratio", + " 7.0, !- Preheat Design Temperature {C}", + " 0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir}", + " 11.0, !- Precool Design Temperature {C}", + " 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}", + " 13., !- Central Cooling Design Supply Air Temperature {C}", + " 45., !- Central Heating Design Supply Air Temperature {C}", + " noncoincident, !- Type of Zone Sum to Use", + " no, !- 100% Outdoor Air in Cooling", + " no, !- 100% Outdoor Air in Heating", + " 0.008, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.008, !- 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}", + " , !- 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", + + " Curve:Biquadratic,", + " HPACCoolCapFT, !- Name", + " 0.766956, !- Coefficient1 Constant", + " 0.0107756, !- Coefficient2 x", + " -0.0000414703, !- Coefficient3 x**2", + " 0.00134961, !- Coefficient4 y", + " -0.000261144, !- Coefficient5 y**2", + " 0.000457488, !- Coefficient6 x*y", + " 12.77778, !- Minimum Value of x", + " 23.88889, !- Maximum Value of x", + " 18.0, !- 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", + + " Curve:Biquadratic,", + " HPACCOOLEIRFT, !- Name", + " 0.297145, !- Coefficient1 Constant", + " 0.0430933, !- Coefficient2 x", + " -0.000748766, !- Coefficient3 x**2", + " 0.00597727, !- Coefficient4 y", + " 0.000482112, !- Coefficient5 y**2", + " -0.000956448, !- Coefficient6 x*y", + " 12.77778, !- Minimum Value of x", + " 23.88889, !- Maximum Value of x", + " 18.0, !- 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", + + " Curve:Cubic,", + " HPACHeatCapFT, !- Name", + " 0.758746, !- Coefficient1 Constant", + " 0.027626, !- Coefficient2 x", + " 0.000148716, !- Coefficient3 x**2", + " 0.0000034992, !- Coefficient4 x**3", + " -20.0, !- Minimum Value of x", + " 20.0, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Cubic,", + " HPACHeatCapFFF, !- Name", + " 0.84, !- Coefficient1 Constant", + " 0.16, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 x**3", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " Curve:Cubic,", + " HPACHeatEIRFT, !- Name", + " 1.19248, !- Coefficient1 Constant", + " -0.0300438, !- Coefficient2 x", + " 0.00103745, !- Coefficient3 x**2", + " -0.000023328, !- Coefficient4 x**3", + " -20.0, !- Minimum Value of x", + " 20.0, !- Maximum Value of x", + " , !- Minimum Curve Output", + " , !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Dimensionless; !- Output Unit Type", + + " Curve:Quadratic,", + " HPACCoolCapFFF, !- 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", + + " Curve:Quadratic,", + " HPACCOOLEIRFFF, !- Name", + " 1.156, !- Coefficient1 Constant", + " -0.1816, !- Coefficient2 x", + " 0.0256, !- Coefficient3 x**2", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + " Curve:Quadratic,", + " HPACCOOLPLFFPLR, !- 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", + + " Curve:Quadratic,", + " HPACHeatEIRFFF, !- Name", + " 1.3824, !- Coefficient1 Constant", + " -0.4336, !- Coefficient2 x", + " 0.0512, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + " BranchList,", + " Air Loop Branches, !- Name", + " Air Loop Main Branch; !- Branch 1 Name", + + " Branch,", + " Air Loop Main Branch, !- Name", + " , !- Pressure Drop Curve Name", + " AirLoopHVAC:OutdoorAirSystem, !- Component 1 Object Type", + " OA Sys 1, !- Component 1 Name", + " Outdoor Air Mixer Inlet Node, !- Component 1 Inlet Node Name", + " Mixed Air Node, !- Component 1 Outlet Node Name", + " AirLoopHVAC:UnitaryHeatPump:AirToAir, !- Component 2 Object Type", + " DXAC Heat Pump 1, !- Component 2 Name", + " Mixed Air Node, !- Component 2 Inlet Node Name", + " Air Loop Outlet Node; !- Component 2 Outlet Node Name", + + " AirLoopHVAC,", + " Heat Pump Sys 1, !- Name", + " , !- Controller List Name", + " Heat Pump 1 Avail List, !- Availability Manager List Name", + " autosize, !- Design Supply Air Flow Rate {m3/s}", + " Air Loop Branches, !- Branch List Name", + " , !- Connector List Name", + " Outdoor Air Mixer Inlet Node, !- Supply Side Inlet Node Name", + " Return Air Mixer Outlet, !- Demand Side Outlet Node Name", + " Zone Equipment Inlet Node, !- Demand Side Inlet Node Names", + " Air Loop Outlet Node; !- Supply Side Outlet Node Names", + + " AirLoopHVAC:ControllerList,", + " OA Sys 1 Controllers, !- Name", + " Controller:OutdoorAir, !- Controller 1 Object Type", + " OA Controller 1; !- Controller 1 Name", + + " AirLoopHVAC:OutdoorAirSystem:EquipmentList,", + " OA Sys 1 Equipment, !- Name", + " OutdoorAir:Mixer, !- Component 1 Object Type", + " OA Mixing Box 1; !- Component 1 Name", + + " AirLoopHVAC:OutdoorAirSystem,", + " OA Sys 1, !- Name", + " OA Sys 1 Controllers, !- Controller List Name", + " OA Sys 1 Equipment, !- Outdoor Air Equipment List Name", + " Outdoor Air 1 Avail List;!- Availability Manager List Name", + + " OutdoorAir:NodeList,", + " Outside Air Inlet Node; !- Node or NodeList Name 1", + + " OutdoorAir:Mixer,", + " OA Mixing Box 1, !- Name", + " Mixed Air Node, !- Mixed Air Node Name", + " Outside Air Inlet Node, !- Outdoor Air Stream Node Name", + " Relief Air Outlet Node, !- Relief Air Stream Node Name", + " Outdoor Air Mixer Inlet Node; !- Return Air Stream Node Name", + + " AvailabilityManagerAssignmentList,", + " Heat Pump 1 Avail List, !- Name", + " AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type", + " Heat Pump 1 Avail; !- Availability Manager 1 Name", + + " AvailabilityManagerAssignmentList,", + " Outdoor Air 1 Avail List,!- Name", + " AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type", + " Outdoor Air 1 Avail; !- Availability Manager 1 Name", + + " AvailabilityManager:Scheduled,", + " Heat Pump 1 Avail, !- Name", + " FanAndCoilAvailSched; !- Schedule Name", + + " AvailabilityManager:Scheduled,", + " Outdoor Air 1 Avail, !- Name", + " OutdoorAirAvailSched; !- Schedule Name", + + " Controller:OutdoorAir,", + " OA Controller 1, !- Name", + " Relief Air Outlet Node, !- Relief Air Outlet Node Name", + " Outdoor Air Mixer Inlet Node, !- Return Air Node Name", + " Mixed Air Node, !- Mixed Air Node Name", + " Outside Air Inlet Node, !- 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", + " OAFractionSched; !- Minimum Outdoor Air Schedule Name", + + " ZoneHVAC:EquipmentConnections,", + " EAST ZONE, !- Zone Name", + " Zone2Equipment, !- Zone Conditioning Equipment List Name", + " Zone 2 Inlet Node, !- Zone Air Inlet Node or NodeList Name", + " , !- Zone Air Exhaust Node or NodeList Name", + " Zone 2 Node, !- Zone Air Node Name", + " Zone 2 Outlet Node; !- Zone Return Air Node Name", + + " ZoneHVAC:EquipmentList,", + " Zone2Equipment, !- Name", + " AirTerminal:SingleDuct:Uncontrolled, !- Zone Equipment 1 Object Type", + " Zone2DirectAir, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No-Load Sequence", + + " AirLoopHVAC:UnitaryHeatPump:AirToAir,", + " DXAC Heat Pump 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " Mixed Air Node, !- Air Inlet Node Name", + " Air Loop Outlet Node, !- Air Outlet Node Name", + " autosize, !- Cooling Supply Air Flow Rate {m3/s}", + " autosize, !- Heating Supply Air Flow Rate {m3/s}", + " autosize, !- No Load Supply Air Flow Rate {m3/s}", + " East Zone, !- Controlling Zone or Thermostat Location", + " Fan:OnOff, !- Supply Air Fan Object Type", + " Supply Fan 1, !- Supply Air Fan Name", + " Coil:Heating:DX:SingleSpeed, !- Heating Coil Object Type", + " Heat Pump DX Heating Coil 1, !- Heating Coil Name", + " Coil:Cooling:DX:SingleSpeed, !- Cooling Coil Object Type", + " Heat Pump ACDXCoil 1, !- Cooling Coil Name", + " Coil:Heating:Fuel, !- Supplemental Heating Coil Object Type", + " Heat Pump DX Supp Heating Coil 1, !- Supplemental Heating Coil Name", + " autosize, !- Maximum Supply Air Temperature from Supplemental Heater {C}", + " 21.0, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C}", + " BlowThrough, !- Fan Placement", + " CyclingFanSchedule; !- Supply Air Fan Operating Mode Schedule Name", + + " AirTerminal:SingleDuct:Uncontrolled,", + " Zone2DirectAir, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " Zone 2 Inlet Node, !- Zone Supply Air Node Name", + " autosize; !- Maximum Air Flow Rate {m3/s}", + + " ZoneControl:Thermostat,", + " Zone 2 Thermostat, !- Name", + " EAST ZONE, !- Zone or ZoneList Name", + " Zone Control Type Sched, !- Control Type Schedule Name", + " ThermostatSetpoint:SingleHeating, !- Control 1 Object Type", + " Heating Setpoint with SB,!- Control 1 Name", + " ThermostatSetpoint:SingleCooling, !- Control 2 Object Type", + " Cooling Setpoint with SB;!- Control 2 Name", + + " ThermostatSetpoint:SingleHeating,", + " Heating Setpoint with SB,!- Name", + " Heating Setpoints; !- Setpoint Temperature Schedule Name", + + " ThermostatSetpoint:SingleCooling,", + " Cooling Setpoint with SB,!- Name", + " Cooling Setpoints; !- Setpoint Temperature Schedule Name", + + " AirLoopHVAC:SupplyPath,", + " HeatPumpSupplyPath, !- Name", + " Zone Equipment Inlet Node, !- Supply Air Path Inlet Node Name", + " AirLoopHVAC:ZoneSplitter,!- Component 1 Object Type", + " Zone Supply Air Splitter;!- Component 1 Name", + + " AirLoopHVAC:ReturnPath,", + " HeatPumpReturnPath, !- Name", + " Return Air Mixer Outlet, !- Return Air Path Outlet Node Name", + " AirLoopHVAC:ZoneMixer, !- Component 1 Object Type", + " Zone Return Air Mixer; !- Component 1 Name", + + " AirLoopHVAC:ZoneSplitter,", + " Zone Supply Air Splitter,!- Name", + " Zone Equipment Inlet Node, !- Inlet Node Name", + " Zone 2 Inlet Node; !- Outlet 2 Node Name", + + " AirLoopHVAC:ZoneMixer,", + " Zone Return Air Mixer, !- Name", + " Return Air Mixer Outlet, !- Outlet Node Name", + " Zone 2 Outlet Node; !- Inlet 2 Node Name", + + " Coil:Heating:Fuel,", + " Heat Pump DX Supp Heating Coil 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " NaturalGas, !- Fuel Type", + " 0.8, !- Burner Efficiency", + " 100000.0, !- Nominal Capacity {W}", + " SuppHeating Coil Air Inlet Node, !- Air Inlet Node Name", + " Air Loop Outlet Node; !- Air Outlet Node Name", + + " Coil:Cooling:DX:SingleSpeed,", + " Heat Pump ACDXCoil 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " autosize, !- Gross Rated Total Cooling Capacity {W}", + " autosize, !- Gross Rated Sensible Heat Ratio", + " 3.0, !- Gross Rated Cooling COP {W/W}", + " autosize, !- Rated Air Flow Rate {m3/s}", + " , !- Rated Evaporator Fan Power Per Volume Flow Rate {W/(m3/s)}", + " DX Cooling Coil Air Inlet Node, !- Air Inlet Node Name", + " Heating Coil Air Inlet Node, !- Air Outlet Node Name", + " HPACCoolCapFT, !- Total Cooling Capacity Function of Temperature Curve Name", + " HPACCoolCapFFF, !- Total Cooling Capacity Function of Flow Fraction Curve Name", + " HPACCOOLEIRFT, !- Energy Input Ratio Function of Temperature Curve Name", + " HPACCOOLEIRFFF, !- Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR; !- Part Load Fraction Correlation Curve Name", + + " Coil:Heating:DX:SingleSpeed,", + " Heat Pump DX Heating Coil 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " autosize, !- Gross Rated Heating Capacity {W}", + " 2.75, !- Gross Rated Heating COP {W/W}", + " autosize, !- Rated Air Flow Rate {m3/s}", + " , !- Rated Supply Fan Power Per Volume Flow Rate {W/(m3/s)}", + " Heating Coil Air Inlet Node, !- Air Inlet Node Name", + " SuppHeating Coil Air Inlet Node, !- Air Outlet Node Name", + " HPACHeatCapFT, !- Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Part Load Fraction Correlation Curve Name", + " , !- Defrost Energy Input Ratio Function of Temperature Curve Name", + " -8.0, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}", + " , !- Outdoor Dry-Bulb Temperature to Turn On Compressor {C}", + " 5.0, !- Maximum Outdoor Dry-Bulb Temperature for Defrost Operation {C}", + " 200.0, !- Crankcase Heater Capacity {W}", + " 10.0, !- Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation {C}", + " Resistive, !- Defrost Strategy", + " TIMED, !- Defrost Control", + " 0.166667, !- Defrost Time Period Fraction", + " autosize; !- Resistive Defrost Heater Capacity {W}", + + " Fan:OnOff,", + " Supply Fan 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " 0.7, !- Fan Total Efficiency", + " 300.0, !- Pressure Rise {Pa}", + " autosize, !- Maximum Flow Rate {m3/s}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Airstream Fraction", + " Mixed Air Node, !- Air Inlet Node Name", + " DX Cooling Coil Air Inlet Node; !- Air Outlet Node Name", + }); + + ASSERT_FALSE( process_idf( idf_objects ) ); + + int CompIndex( 0 ); + int AirLoopNum( 1 ); + bool FirstHVACIteration( false ); + + OutputProcessor::TimeValue.allocate( 2 ); // + ManageSimulation(); + // check the design max air outlet temperature + EXPECT_DOUBLE_EQ( 45.0, Furnace( 1 ).DesignMaxOutletTemp ); + + ZoneSysEnergyDemand( 1 ).SequencedOutputRequiredToCoolingSP( 1 ) = 25000.0; + ZoneSysEnergyDemand( 1 ).SequencedOutputRequiredToHeatingSP( 1 ) = 25000.0; + SimFurnace( Furnace( 1 ).Name, FirstHVACIteration, AirLoopNum, CompIndex ); + // check the heating mode is On + EXPECT_TRUE( Furnaces::HeatingLoad ); + // check the cooling mode is Off + EXPECT_FALSE( Furnaces::CoolingLoad ); + // check if the air-to-air heat pump outlet temperature is capped at 45.0C + EXPECT_NEAR( 45.0, Node( Furnace( 1 ).FurnaceOutletNodeNum ).Temp, 0.000001 ); + + } + } diff --git a/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc b/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc index f68f8ede652..9b42193e058 100644 --- a/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc @@ -5954,3 +5954,539 @@ TEST_F( EnergyPlusFixture, UnitarySystem_ASHRAEModel_WaterCoils ) { EXPECT_LT( Node( OutletNode ).Temp, UnitarySystem( 1 ).DOASDXCoolingCoilMinTout ); // outlet temperature below minimum temperature limit } + +TEST_F( EnergyPlusFixture, UnitarySystem_MultispeedDXHeatingCoilOnly ) { + + std::string const idf_objects = delimited_string( { + "Version,8.3;", + + " Timestep,6;", + + " Site:Location,", + " USA IL-CHICAGO-OHARE, !- Name", + " 41.77, !- Latitude {deg}", + " -87.75, !- Longitude {deg}", + " -6.00, !- Time Zone {hr}", + " 190; !- Elevation {m}", + + "SimulationControl, YES, NO, NO, YES, NO;", + + " SizingPeriod:DesignDay,", + " CHICAGO Ann Clg .4% Condns WB=>MDB, !- Name", + " 1, !- Month", + " 21, !- Day of Month", + " WinterDesignDay, !- Day Type", + " 11.2, !- Maximum Dry-Bulb Temperature {C}", + " 10.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", + " 5.5, !- 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}", + " 99063., !- Barometric Pressure {Pa}", + " 5.3, !- Wind Speed {m/s}", + " 230, !- 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", + + "Zone,", + " EAST ZONE, !- Name", + " 0, !- Direction of Relative North{ deg }", + " 0, !- X Origin{ m }", + " 0, !- Y Origin{ m }", + " 0, !- Z Origin{ m }", + " 1, !- Type", + " 1, !- Multiplier", + " autocalculate, !- Ceiling Height{ m }", + " autocalculate; !- Volume{ m3 }", + + "ZoneHVAC:EquipmentConnections,", + "EAST ZONE, !- Zone Name", + " Zone2Equipment, !- Zone Conditioning Equipment List Name", + " Zone 2 Inlet Node, !- Zone Air Inlet Node or NodeList Name", + " Zone Exhaust Node, !- Zone Air Exhaust Node or NodeList Name", + " Zone 2 Node, !- Zone Air Node Name", + " Zone 2 Outlet Node; !- Zone Return Air Node Name", + + "ZoneHVAC:EquipmentList,", + " Zone2Equipment, !- Name", + " AirLoopHVAC:UnitarySystem, !- Zone Equipment 1 Object Type", + " Multispeed DXAC, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No - Load Sequence", + + "AirLoopHVAC:UnitarySystem,", + " Multispeed DXAC, !- Name", + " Load, !- Control Type", + " East Zone, !- Controlling Zone or Thermostat Location", + " None, !- Dehumidification Control Type", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " Zone Exhaust Node, !- Air Inlet Node Name", + " Zone 2 Inlet Node, !- Air Outlet Node Name", + " Fan:OnOff, !- Supply Fan Object Type", + " Supply Fan 1, !- Supply Fan Name", + " BlowThrough, !- Fan Placement", + " ContinuousFanSchedule, !- Supply Air Fan Operating Mode Schedule Name", + " Coil:Heating:DX:MultiSpeed, !- Heating Coil Object Type", + " MS Heating Coil 1, !- Heating Coil Name", + " , !- DX Heating Coil Sizing Ratio", + " , !- Cooling Coil Object Type", + " , !- Cooling Coil Name", + " , !- Use DOAS DX Cooling Coil", + " , !- DOAS DX Cooling Coil Leaving Minimum Air Temperature{ C }", + " , !- Latent Load Control", + " , !- Supplemental Heating Coil Object Type", + " , !- Supplemental Heating Coil Name", + " None, !- Supply Air Flow Rate Method During Cooling Operation", + " , !- Supply Air Flow Rate During Cooling Operation{ m3/s }", + " , !- Supply Air Flow Rate Per Floor Area During Cooling Operation{ m3/s-m2 }", + " , !- Fraction of Autosized Design Cooling Supply Air Flow Rate", + " 0.00005, !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", + " SupplyAirFlowRate, !- Supply air Flow Rate Method During Heating Operation", + " autosize, !- Supply Air Flow Rate During Heating Operation{ m3/s }", + " , !- Supply Air Flow Rate Per Floor Area during Heating Operation{ m3/s-m2 }", + " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", + " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", + " None, !- Supply Air Flow Rate Method When No Cooling or Heating is Required", + " , !- Supply Air Flow Rate When No Cooling or Heating is Required{ m3/s }", + " , !- Supply Air Flow Rate Per Floor Area When No Cooling or Heating is Required{ m3/s-m2 }", + " , !- Fraction of Autosized Design Cooling Supply Air Flow Rate", + " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", + " , !- Design Supply Air Flow Rate Per Unit of Capacity During Cooling Operation{ m3/s-W }", + " , !- Design Supply Air Flow Rate Per Unit of Capacity During Heating Operation{ m3/s-W }", + " 80, !- Maximum Supply Air Temperature{ C }", + " 21, !- Maximum Outdoor Dry-Bulb Temperature for Supplemental Heater Operation {C}", + " , !- Outdoor Dry-Bulb Temperature Sensor Node Name", + " , !- Maximum Cycling Rate {cycles/hr}", + " , !- Heat Pump Time Constant {s}", + " , !- Fraction of On-Cycle Power Use", + " , !- Heat Pump Fan Delay Time {s}", + " , !- Ancillary On-Cycle Electric Power {W}", + " , !- Ancillary Off-Cycle Electric Power {W}", + " , !- Design Heat Recovery Water Flow Rate {m3/s}", + " , !- Maximum Temperature for Heat Recovery {C}", + " , !- Heat Recovery Water Inlet Node Name", + " , !- Heat Recovery Water Outlet Node Name", + " UnitarySystemPerformance:Multispeed, !- Design Specification Multispeed Heat Pump Object Type", + " MultiSpeed Performance; !- Design Specification Multispeed Heat Pump Object Name", + + "UnitarySystemPerformance:Multispeed,", + " MultiSpeed Performance, !- Name", + " 4, !- Number of Speeds for Heating", + " 0, !- Number of Speeds for Cooling", + " No, !- Single Mode Operation", + " autosize, !- Heating Speed 1 Supply Air Flow Ratio", + " autosize, !- Cooling Speed 1 Supply Air Flow Ratio", + " autosize, !- Heating Speed 2 Supply Air Flow Ratio", + " autosize, !- Cooling Speed 2 Supply Air Flow Ratio", + " autosize, !- Heating Speed 3 Supply Air Flow Ratio", + " autosize, !- Cooling Speed 3 Supply Air Flow Ratio", + " autosize, !- Heating Speed 4 Supply Air Flow Ratio", + " autosize; !- Cooling Speed 4 Supply Air Flow Ratio", + + "Fan:OnOff,", + " Supply Fan 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " 0.7, !- Fan Total Efficiency", + " 600.0, !- Pressure Rise{ Pa }", + " autosize, !- Maximum Flow Rate{ m3 / s }", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Airstream Fraction", + " Zone Exhaust Node, !- Air Inlet Node Name", + " DX Heating Coil Air Inlet Node; !- Air Outlet Node Name", + + "Coil:Heating:DX:MultiSpeed,", + " MS Heating Coil 1, !- Name", + " FanAndCoilAvailSched, !- Availability Schedule Name", + " DX Heating Coil Air Inlet Node, !- Indoor Air Inlet Node Name", + " Zone 2 Inlet Node, !- Indoor Air Outlet Node Name", + " -8.0, !- Minimum Outdoor Dry - Bulb Temperature for Compressor Operation{ C }", + " -5.0, !- Outdoor Dry - Bulb Temperature to Turn On Compressor{ C }", + " 200.0, !- Crankcase Heater Capacity{ W }", + " 10.0, !- Maximum Outdoor Dry - Bulb Temperature for Crankcase Heater Operation{ C }", + " , !- Defrost Energy Input Ratio Function of Temperature Curve Name", + " 7.22, !- Maximum Outdoor Dry - Bulb Temperature for Defrost Operation{ C }", + " Resistive, !- Defrost Strategy", + " timed, !- Defrost Control", + " 0.058333, !- Defrost Time Period Fraction", + " autosize, !- Resistive Defrost Heater Capacity{ W }", + " No, !- Apply Part Load Fraction to Speeds Greater than 1", + " NaturalGas, !- Fuel Type", + " 4, !- Region number for Calculating HSPF", + " 4, !- Number of Speeds", + " autosize, !- Speed 1 Gross Rated Heating Capacity{ W }", + " 2.75, !- Speed 1 Gross Rated Heating COP{ W / W }", + " autosize, !- Speed 1 Rated Air Flow Rate{ m3 / s }", + " 345.0, !- Speed 1 Rated Supply Air Fan Power Per Volume Flow Rate{ W / ( m3 / s ) }", + " HPACHeatCapFT, !- Speed 1 Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Speed 1 Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Speed 1 Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Speed 1 Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Speed 1 Part Load Fraction Correlation Curve Name", + " , !- Speed 1 Rated Waste Heat Fraction of Power Input{ dimensionless }", + " , !- Speed 1 Waste Heat Function of Temperature Curve Name", + " autosize, !- Speed 2 Gross Rated Heating Capacity{ W }", + " 2.75, !- Speed 2 Gross Rated Heating COP{ W / W }", + " autosize, !- Speed 2 Rated Air Flow Rate{ m3 / s }", + " 425.0, !- Speed 2 Rated Supply Air Fan Power Per Volume Flow Rate{ W / ( m3 / s ) }", + " HPACHeatCapFT, !- Speed 2 Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Speed 2 Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Speed 2 Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Speed 2 Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Speed 2 Part Load Fraction Correlation Curve Name", + " , !- Speed 2 Rated Waste Heat Fraction of Power Input{ dimensionless }", + " , !- Speed 2 Waste Heat Function of Temperature Curve Name", + " autosize, !- Speed 3 Gross Rated Heating Capacity{ W }", + " 2.75, !- Speed 3 Gross Rated Heating COP{ W / W }", + " autosize, !- Speed 3 Rated Air Flow Rate{ m3 / s }", + " 525.0, !- Speed 3 Rated Supply Air Fan Power Per Volume Flow Rate{ W / ( m3 / s ) }", + " HPACHeatCapFT, !- Speed 3 Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Speed 3 Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Speed 3 Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Speed 3 Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Speed 3 Part Load Fraction Correlation Curve Name", + " , !- Speed 3 Rated Waste Heat Fraction of Power Input{ dimensionless }", + " , !- Speed 3 Waste Heat Function of Temperature Curve Name", + " autosize, !- Speed 4 Gross Rated Heating Capacity{ W }", + " 2.75, !- Speed 4 Gross Rated Heating COP{ W / W }", + " autosize, !- Speed 4 Rated Air Flow Rate{ m3 / s }", + " 673.0, !- Speed 4 Rated Supply Air Fan Power Per Volume Flow Rate{ W / ( m3 / s ) }", + " HPACHeatCapFT, !- Speed 4 Heating Capacity Function of Temperature Curve Name", + " HPACHeatCapFFF, !- Speed 4 Heating Capacity Function of Flow Fraction Curve Name", + " HPACHeatEIRFT, !- Speed 4 Energy Input Ratio Function of Temperature Curve Name", + " HPACHeatEIRFFF, !- Speed 4 Energy Input Ratio Function of Flow Fraction Curve Name", + " HPACCOOLPLFFPLR, !- Speed 4 Part Load Fraction Correlation Curve Name", + " , !- Speed 4 Rated Waste Heat Fraction of Power Input{ dimensionless }", + " ; !- Speed 4 Waste Heat Function of Temperature Curve Name", + + " Curve:Quadratic,", + " HPACHeatEIRFFF, !- Name", + " 1.3824, !- Coefficient1 Constant", + " -0.4336, !- Coefficient2 x", + " 0.0512, !- Coefficient3 x**2", + " 0.0, !- Minimum Value of x", + " 1.0; !- Maximum Value of x", + + + " Curve:Quadratic,", + " HPACCOOLPLFFPLR, !- 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", + + " Curve:Cubic,", + " HPACHeatCapFFF, !- Name", + " 0.84, !- Coefficient1 Constant", + " 0.16, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 x**3", + " 0.5, !- Minimum Value of x", + " 1.5; !- Maximum Value of x", + + + " Curve:Biquadratic,", + " HPACHeatCapFT, !- Name", + " 0.8529681407, !- Coefficient1 Constant", + " -0.0004847169, !- Coefficient2 x", + " -0.0000010693, !- Coefficient3 x**2", + " 0.0185542164, !- Coefficient4 y", + " 0.0000872425, !- Coefficient5 y**2", + " -0.0000166868, !- Coefficient6 x*y", + " 17.78, !- Minimum Value of x", + " 23.33, !- Maximum Value of x", + " -28.89, !- Minimum Value of y", + " 17.22, !- Maximum Value of y", + " 0.3799, !- Minimum Curve Output", + " 1.1896, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + " Curve:Biquadratic,", + " HPACHeatEIRFT, !- Name", + " 0.7077081462, !- Coefficient1 Constant", + " 0.0148163478, !- Coefficient2 x", + " 0.0002622589, !- Coefficient3 x**2", + " -0.0113239622, !- Coefficient4 y", + " 0.0002939277, !- Coefficient5 y**2", + " -0.0003605284, !- Coefficient6 x*y", + " 17.78, !- Minimum Value of x", + " 23.33, !- Maximum Value of x", + " -28.89, !- Minimum Value of y", + " 17.22, !- Maximum Value of y", + " 0.8266, !- Minimum Curve Output", + " 2.0277, !- Maximum Curve Output", + " Temperature, !- Input Unit Type for X", + " Temperature, !- Input Unit Type for Y", + " Dimensionless; !- Output Unit Type", + + "ScheduleTypeLimits,", + " Any Number; !- Name", + + "Schedule:Compact,", + " FanAndCoilAvailSched, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00, 1.0; !- Field 3", + + "Schedule:Compact,", + " ContinuousFanSchedule, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00, 1.0; !- Field 3", + + " Sizing:Zone,", + " EAST ZONE, !- Zone or ZoneList Name", + " SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method", + " 12.8000, !- 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.0000, !- Zone Heating Design Supply Air Temperature {C}", + " , !- Zone Heating Design Supply Air Temperature Difference {deltaC}", + " 0.0085, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.0080, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " SZ DSOA Zone One, !- Design Specification Outdoor Air Object Name", + " , !- Zone Heating Sizing Factor", + " , !- Zone Cooling Sizing Factor", + " DesignDay, !- Cooling Design Air Flow Method", + " , !- 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", + " , !- 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 Zone One, !- Name", + " Flow/Person, !- Outdoor Air Method", + " 0.0125; !- Outdoor Air Flow per Person {m3/s-person}", + + " BuildingSurface:Detailed,", + " Zn001:Wall001, !- Name", + " Wall, !- Surface Type", + " R13WALL, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,4.572000, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 15.24000,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 15.24000,0,4.572000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn001:Wall002, !- Name", + " Wall, !- Surface Type", + " R13WALL, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 15.24000,0,4.572000, !- X,Y,Z ==> Vertex 1 {m}", + " 15.24000,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 15.24000,15.24000,0, !- X,Y,Z ==> Vertex 3 {m}", + " 15.24000,15.24000,4.572000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn001:Wall003, !- Name", + " Wall, !- Surface Type", + " R13WALL, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 15.24000,15.24000,4.572000, !- X,Y,Z ==> Vertex 1 {m}", + " 15.24000,15.24000,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,15.24000,0, !- X,Y,Z ==> Vertex 3 {m}", + " 0,15.24000,4.572000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn001:Wall004, !- Name", + " Wall, !- Surface Type", + " R13WALL, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,15.24000,4.572000, !- X,Y,Z ==> Vertex 1 {m}", + " 0,15.24000,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 0,0,4.572000; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn001:Flr001, !- Name", + " Floor, !- Surface Type", + " FLOOR, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Adiabatic, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 1.000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 15.24000,0.000000,0.0, !- X,Y,Z ==> Vertex 1 {m}", + " 0.000000,0.000000,0.0, !- X,Y,Z ==> Vertex 2 {m}", + " 0.000000,15.24000,0.0, !- X,Y,Z ==> Vertex 3 {m}", + " 15.24000,15.24000,0.0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Zn001:Roof001, !- Name", + " Roof, !- Surface Type", + " ROOF31, !- Construction Name", + " EAST ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0.000000,15.24000,4.572, !- X,Y,Z ==> Vertex 1 {m}", + " 0.000000,0.000000,4.572, !- X,Y,Z ==> Vertex 2 {m}", + " 15.24000,0.000000,4.572, !- X,Y,Z ==> Vertex 3 {m}", + " 15.24000,15.24000,4.572; !- X,Y,Z ==> Vertex 4 {m}", + + " Construction,", + " R13WALL, !- Name", + " R13LAYER; !- Outside Layer", + + " Construction,", + " FLOOR, !- Name", + " C5 - 4 IN HW CONCRETE; !- Outside Layer", + + " Construction,", + " ROOF31, !- Name", + " R31LAYER; !- Outside Layer", + + " Material:NoMass,", + " R13LAYER, !- Name", + " Rough, !- Roughness", + " 2.290965, !- Thermal Resistance {m2-K/W}", + " 0.9000000, !- Thermal Absorptance", + " 0.7500000, !- Solar Absorptance", + " 0.7500000; !- Visible Absorptance", + + " Material:NoMass,", + " R31LAYER, !- Name", + " Rough, !- Roughness", + " 5.456, !- Thermal Resistance {m2-K/W}", + " 0.9000000, !- Thermal Absorptance", + " 0.7500000, !- Solar Absorptance", + " 0.7500000; !- Visible Absorptance", + + " Material,", + " C5 - 4 IN HW CONCRETE, !- Name", + " MediumRough, !- Roughness", + " 0.1014984, !- Thickness {m}", + " 1.729577, !- Conductivity {W/m-K}", + " 2242.585, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.6500000, !- Solar Absorptance", + " 0.6500000; !- Visible Absorptance", + + " ZoneControl:Thermostat,", + " EAST ZONE Thermostat, !- Name", + " EAST ZONE, !- Zone or ZoneList Name", + " Dual Zone Control Type Sched, !- Control Type Schedule Name", + " ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type", + " Zone One DualSPSched; !- Control 1 Name", + + " Schedule:Compact,", + " Dual Zone Control Type Sched, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", + + " ThermostatSetpoint:DualSetpoint,", + " Zone One DualSPSched, !- Name", + " HTGSETP_SCH, !- Heating Setpoint Temperature Schedule Name", + " CLGSETP_SCH; !- Cooling Setpoint Temperature Schedule Name", + + " Schedule:Compact,", + " CLGSETP_SCH, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 19", + " Until: 24:00,26.7; !- Field 20", + + " Schedule:Compact,", + " HTGSETP_SCH, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 22", + " Until: 24:00,15.6; !- Field 23", + } ); + + ASSERT_FALSE( process_idf( idf_objects ) ); // read idf objects + + SimulationManager::GetProjectData(); + createFacilityElectricPowerServiceObject(); + DataGlobals::BeginSimFlag = true; + DataGlobals::DoingSizing = true; + SizingManager::ManageSizing(); + DataGlobals::DoingSizing = false; + DataGlobals::SysSizingCalc = false; + DataSizing::CurZoneEqNum = 1; + DataSizing::ZoneEqSizing.allocate( 1 ); + + GetUnitarySystemInput(); // get UnitarySystem input from object above + HVACUnitarySystem::GetInputFlag = false; // don't call GetInput more than once + + OutputReportPredefined::SetPredefinedTables(); + + ZoneSizingRunDone = true; + ZoneEqSizing( CurZoneEqNum ).DesignSizeFromParent = false; + ZoneEqSizing( CurZoneEqNum ).SizingMethod.allocate( 25 ); + ZoneEqSizing( CurZoneEqNum ).SizingMethod( DataHVACGlobals::SystemAirflowSizing ) = DataSizing::SupplyAirFlowRate; + + SizeUnitarySystem( NumUnitarySystem, true, 0 ); + SizeDXCoil( 1 ); + + ASSERT_EQ( 1, NumUnitarySystem ); // only 1 unitary system above so expect 1 as number of unitary system objects + + ASSERT_NEAR( UnitarySystem( 1 ).DesignHeatingCapacity, 1301.766, 0.001 ); + ASSERT_EQ( UnitarySystem( 1 ).DesignCoolingCapacity, 0.0 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedTotCap( 1 ), 325.441, 0.001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedTotCap( 2 ), 650.883, 0.001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedTotCap( 3 ), 976.324, 0.001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedTotCap( 4 ), 1301.766, 0.001 ); + ASSERT_NEAR( UnitarySystem( 1 ).HeatVolumeFlowRate( 1 ), 0.0131, 0.0001 ); + ASSERT_NEAR( UnitarySystem( 1 ).HeatVolumeFlowRate( 2 ), 0.0262, 0.0001 ); + ASSERT_NEAR( UnitarySystem( 1 ).HeatVolumeFlowRate( 3 ), 0.0393, 0.0001 ); + ASSERT_NEAR( UnitarySystem( 1 ).HeatVolumeFlowRate( 4 ), 0.0524, 0.0001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedAirVolFlowRate( 1 ), 0.0131, 0.0001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedAirVolFlowRate( 2 ), 0.0262, 0.0001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedAirVolFlowRate( 3 ), 0.0393, 0.0001 ); + ASSERT_NEAR( DXCoil( 1 ).MSRatedAirVolFlowRate( 4 ), 0.0524, 0.0001 ); + +} diff --git a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc index 1b7b776ab6d..75d1607f041 100644 --- a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc @@ -573,4 +573,46 @@ namespace EnergyPlus { EXPECT_EQ( 2, OutputProcessor::RVariableTypes( 2 ).ReportID ); } + + TEST_F( EnergyPlusFixture, HeatBalanceManager_GetMaterialRoofVegetation ) + { + std::string const idf_objects = delimited_string( { + " Version,8.6;", + + " Material:RoofVegetation,", + " ThickSoil, !- Name", + " 0.5, !- Height of Plants {m}", + " 5, !- Leaf Area Index {dimensionless}", + " 0.2, !- Leaf Reflectivity {dimensionless}", + " 0.95, !- Leaf Emissivity", + " 180, !- Minimum Stomatal Resistance {s/m}", + " EcoRoofSoil, !- Soil Layer Name", + " MediumSmooth, !- Roughness", + " 0.36, !- Thickness {m}", + " 0.4, !- Conductivity of Dry Soil {W/m-K}", + " 641, !- Density of Dry Soil {kg/m3}", + " 1100, !- Specific Heat of Dry Soil {J/kg-K}", + " 0.95, !- Thermal Absorptance", + " 0.8, !- Solar Absorptance", + " 0.7, !- Visible Absorptance", + " 0.4, !- Saturation Volumetric Moisture Content of the Soil Layer", + " 0.01, !- Residual Volumetric Moisture Content of the Soil Layer", + " 0.45, !- Initial Volumetric Moisture Content of the Soil Layer", + " Advanced; !- Moisture Diffusion Calculation Method", + } ); + + ASSERT_FALSE( process_idf( idf_objects ) ); + + bool ErrorsFound( false ); + GetMaterialData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + + // check the "Material:RoofVegetation" names + EXPECT_EQ( Material( 1 ).Name, "THICKSOIL" ); + // check maximum (saturated) moisture content + EXPECT_EQ( 0.4, Material( 1 ).Porosity ); + // check initial moisture Content was reset + EXPECT_EQ( 0.4, Material( 1 ).InitMoisture ); // reset from 0.45 to 0.4 during get input + + } } diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index c31505a392d..da96c99f88e 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -59,6 +59,14 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include using namespace EnergyPlus::HeatBalanceSurfaceManager; @@ -313,5 +321,500 @@ namespace EnergyPlus { EXPECT_EQ( 12.5, DataHeatBalSurface::TuserHist( 1, 3 ) ); // Now check to see that it is shifting the temperature history properly } + + TEST_F( EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfTempCalcHeatBalanceInsideSurfAirRefT ) + { + + std::string const idf_objects = delimited_string( { + " Version,8.7;", + + " Building,", + " House with AirflowNetwork simulation, !- Name", + " 0, !- North Axis {deg}", + " Suburbs, !- Terrain", + " 0.001, !- Loads Convergence Tolerance Value", + " 0.0050000, !- Temperature Convergence Tolerance Value {deltaC}", + " FullInteriorAndExterior, !- Solar Distribution", + " 25, !- Maximum Number of Warmup Days", + " 6; !- Minimum Number of Warmup Days", + + " Timestep,6;", + + " SurfaceConvectionAlgorithm:Inside,TARP;", + + " SurfaceConvectionAlgorithm:Outside,DOE-2;", + + " HeatBalanceAlgorithm,ConductionTransferFunction;", + + " Output:DebuggingData,0,0;", + + " SimulationControl,", + " No, !- Do Zone Sizing Calculation", + " No, !- Do System Sizing Calculation", + " No, !- Do Plant Sizing Calculation", + " Yes, !- Run Simulation for Sizing Periods", + " No; !- Run Simulation for Weather File Run Periods", + + " RunPeriod,", + " , !- Name", + " 1, !- Begin Month", + " 14, !- Begin Day of Month", + " 1, !- End Month", + " 14, !- End Day of Month", + " 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,", + " , !- Name", + " 7, !- Begin Month", + " 7, !- Begin Day of Month", + " 7, !- End Month", + " 7, !- End Day of Month", + " 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", + " No; !- Use Weather File Snow Indicators", + + " Site:Location,", + " CHICAGO_IL_USA TMY2-94846, !- Name", + " 41.78, !- Latitude {deg}", + " -87.75, !- Longitude {deg}", + " -6.00, !- Time Zone {hr}", + " 190.00; !- Elevation {m}", + + + " SizingPeriod:DesignDay,", + " CHICAGO_IL_USA Annual Heating 99% Design Conditions DB, !- Name", + " 1, !- Month", + " 21, !- Day of Month", + " WinterDesignDay, !- Day Type", + " -17.3, !- 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", + " -17.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}", + " 99063., !- Barometric Pressure {Pa}", + " 4.9, !- Wind Speed {m/s}", + " 270, !- 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.0; !- Sky Clearness", + + + " SizingPeriod:DesignDay,", + " CHICAGO_IL_USA Annual Cooling 1% Design Conditions DB/MCWB, !- Name", + " 7, !- Month", + " 21, !- Day of Month", + " SummerDesignDay, !- Day Type", + " 31.5, !- Maximum Dry-Bulb Temperature {C}", + " 10.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", + " 23.0, !- 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}", + " 99063., !- Barometric Pressure {Pa}", + " 5.3, !- Wind Speed {m/s}", + " 230, !- 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.0; !- 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,", + " A1 - 1 IN STUCCO, !- Name", + " Smooth, !- Roughness", + " 2.5389841E-02, !- Thickness {m}", + " 0.6918309, !- Conductivity {W/m-K}", + " 1858.142, !- Density {kg/m3}", + " 836.8000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.9200000, !- Solar Absorptance", + " 0.9200000; !- Visible Absorptance", + + + " Material,", + " CB11, !- Name", + " MediumRough, !- Roughness", + " 0.2032000, !- Thickness {m}", + " 1.048000, !- Conductivity {W/m-K}", + " 1105.000, !- Density {kg/m3}", + " 837.0000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.2000000, !- Solar Absorptance", + " 0.2000000; !- 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,", + " 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,", + " IN05, !- Name", + " Rough, !- Roughness", + " 0.2458000, !- 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,", + " 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,", + " 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,", + " HF-A3, !- Name", + " Smooth, !- Roughness", + " 1.5000000E-03, !- Thickness {m}", + " 44.96960, !- Conductivity {W/m-K}", + " 7689.000, !- Density {kg/m3}", + " 418.0000, !- Specific Heat {J/kg-K}", + " 0.9000000, !- Thermal Absorptance", + " 0.2000000, !- Solar Absorptance", + " 0.2000000; !- Visible Absorptance", + + + " Material:NoMass,", + " AR02, !- Name", + " VeryRough, !- Roughness", + " 7.8000002E-02, !- Thermal Resistance {m2-K/W}", + " 0.9000000, !- Thermal Absorptance", + " 0.7000000, !- Solar Absorptance", + " 0.7000000; !- Visible Absorptance", + + + " Material:NoMass,", + " CP02, !- Name", + " Rough, !- Roughness", + " 0.2170000, !- Thermal Resistance {m2-K/W}", + " 0.9000000, !- Thermal Absorptance", + " 0.7500000, !- Solar Absorptance", + " 0.7500000; !- Visible Absorptance", + + " Construction,", + " EXTWALL:LIVING, !- Name", + " A1 - 1 IN STUCCO, !- Outside Layer", + " GP01; !- Layer 3", + + " Construction,", + " FLOOR:LIVING, !- Name", + " CC03, !- Outside Layer", + " CP02; !- Layer 2", + + " Construction,", + " ROOF, !- Name", + " AR02, !- Outside Layer", + " PW03; !- Layer 2", + + " Zone,", + " LIVING ZONE, !- Name", + " 0, !- Direction of Relative North {deg}", + " 0, !- X Origin {m}", + " 0, !- Y Origin {m}", + " 0, !- Z Origin {m}", + " 1, !- Type", + " 1, !- Multiplier", + " autocalculate, !- Ceiling Height {m}", + " autocalculate; !- Volume {m3}", + + " GlobalGeometryRules,", + " UpperLeftCorner, !- Starting Vertex Position", + " CounterClockWise, !- Vertex Entry Direction", + " World; !- Coordinate System", + + " BuildingSurface:Detailed,", + " Living:North, !- Name", + " Wall, !- Surface Type", + " EXTWALL:LIVING, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 1,1,1, !- X,Y,Z ==> Vertex 1 {m}", + " 1,1,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,1,0, !- X,Y,Z ==> Vertex 3 {m}", + " 0,1,1; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Living:East, !- Name", + " Wall, !- Surface Type", + " EXTWALL:LIVING, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 1,0,1, !- X,Y,Z ==> Vertex 1 {m}", + " 1,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 1,1,0, !- X,Y,Z ==> Vertex 3 {m}", + " 1,1,1; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Living:South, !- Name", + " Wall, !- Surface Type", + " EXTWALL:LIVING, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,1, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 2 {m}", + " 1,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 1,0,1; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Living:West, !- Name", + " Wall, !- Surface Type", + " EXTWALL:LIVING, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0.5000000, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,1,1, !- X,Y,Z ==> Vertex 1 {m}", + " 0,1,0, !- X,Y,Z ==> Vertex 2 {m}", + " 0,0,0, !- X,Y,Z ==> Vertex 3 {m}", + " 0,0,1; !- X,Y,Z ==> Vertex 4 {m}", + " BuildingSurface:Detailed,", + " Living:Floor, !- Name", + " FLOOR, !- Surface Type", + " FLOOR:LIVING, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Surface, !- Outside Boundary Condition", + " Living:Floor, !- Outside Boundary Condition Object", + " NoSun, !- Sun Exposure", + " NoWind, !- Wind Exposure", + " 0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,0,0, !- X,Y,Z ==> Vertex 1 {m}", + " 0,1,0, !- X,Y,Z ==> Vertex 2 {m}", + " 1,1,0, !- X,Y,Z ==> Vertex 3 {m}", + " 1,0,0; !- X,Y,Z ==> Vertex 4 {m}", + + " BuildingSurface:Detailed,", + " Living:Ceiling, !- Name", + " ROOF, !- Surface Type", + " ROOF, !- Construction Name", + " LIVING ZONE, !- Zone Name", + " Outdoors, !- Outside Boundary Condition", + " , !- Outside Boundary Condition Object", + " SunExposed, !- Sun Exposure", + " WindExposed, !- Wind Exposure", + " 0, !- View Factor to Ground", + " 4, !- Number of Vertices", + " 0,1,1, !- X,Y,Z ==> Vertex 1 {m}", + " 0,0,1, !- X,Y,Z ==> Vertex 2 {m}", + " 1,0,1, !- X,Y,Z ==> Vertex 3 {m}", + " 1,1,1; !- X,Y,Z ==> Vertex 4 {m}", + } ); + + ASSERT_FALSE( process_idf( idf_objects ) ); + bool ErrorsFound = false; + + HeatBalanceManager::GetProjectControlData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + HeatBalanceManager::GetZoneData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + HeatBalanceManager::GetMaterialData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + HeatBalanceManager::GetConstructData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + SurfaceGeometry::GetGeometryParameters( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + + SurfaceGeometry::CosBldgRotAppGonly = 1.0; + SurfaceGeometry::SinBldgRotAppGonly = 0.0; + SurfaceGeometry::GetSurfaceData( ErrorsFound ); + EXPECT_FALSE( ErrorsFound ); + + DataZoneEquipment::ZoneEquipConfig.allocate( 1 ); + DataZoneEquipment::ZoneEquipConfig( 1 ).ZoneName = "LIVING ZONE"; + DataZoneEquipment::ZoneEquipConfig( 1 ).ActualZoneNum = 1; + std::vector< int > controlledZoneEquipConfigNums; + controlledZoneEquipConfigNums.push_back( 1 ); + DataHeatBalance::Zone( 1 ).IsControlled = true; + + DataZoneEquipment::ZoneEquipConfig( 1 ).NumInletNodes = 2; + DataZoneEquipment::ZoneEquipConfig( 1 ).InletNode.allocate( 2 ); + DataZoneEquipment::ZoneEquipConfig( 1 ).InletNode( 1 ) = 1; + DataZoneEquipment::ZoneEquipConfig( 1 ).InletNode( 2 ) = 2; + DataZoneEquipment::ZoneEquipConfig( 1 ).NumExhaustNodes = 1; + DataZoneEquipment::ZoneEquipConfig( 1 ).ExhaustNode.allocate( 1 ); + DataZoneEquipment::ZoneEquipConfig( 1 ).ExhaustNode( 1 ) = 3; + DataZoneEquipment::ZoneEquipConfig( 1 ).ReturnAirNode = 4; + + DataSizing::ZoneEqSizing.allocate( 1 ); + DataHeatBalance::Zone( 1 ).SystemZoneNodeNumber = 5; + DataEnvironment::OutBaroPress = 101325.0; + DataHeatBalFanSys::MAT.allocate( 1 ); // Zone temperature C + DataHeatBalFanSys::MAT( 1 ) = 24.0; + DataHeatBalFanSys::ZoneAirHumRat.allocate( 1 ); + DataHeatBalFanSys::ZoneAirHumRat( 1 ) = 0.001; + + DataLoopNode::Node.allocate( 4 ); + DataSurfaces::Surface( 1 ).TAirRef = DataSurfaces::ZoneMeanAirTemp; + DataSurfaces::Surface( 2 ).TAirRef = DataSurfaces::AdjacentAirTemp; + DataSurfaces::Surface( 3 ).TAirRef = DataSurfaces::ZoneSupplyAirTemp; + + DataHeatBalSurface::TempSurfInTmp.allocate( 6 ); + DataHeatBalSurface::TempSurfInTmp( 1 ) = 15.0; + DataHeatBalSurface::TempSurfInTmp( 2 ) = 20.0; + DataHeatBalSurface::TempSurfInTmp( 3 ) = 25.0; + DataHeatBalSurface::TempSurfInTmp( 4 ) = 25.0; + DataHeatBalSurface::TempSurfInTmp( 5 ) = 25.0; + DataHeatBalSurface::TempSurfInTmp( 6 ) = 25.0; + DataHeatBalance::TempEffBulkAir.allocate( 6 ); + + DataLoopNode::Node( 1 ).Temp = 20.0; + DataLoopNode::Node( 2 ).Temp = 20.0; + DataLoopNode::Node( 3 ).Temp = 20.0; + DataLoopNode::Node( 4 ).Temp = 20.0; + DataLoopNode::Node( 1 ).MassFlowRate = 0.1; + DataLoopNode::Node( 2 ).MassFlowRate = 0.1; + DataLoopNode::Node( 3 ).MassFlowRate = 0.1; + DataLoopNode::Node( 4 ).MassFlowRate = 0.1; + DataHeatBalSurface::TH.allocate( 2, 2, 6 ); + DataHeatBalSurface::TH( 1, 1, 1 ) = 20; + DataHeatBalSurface::TH( 1, 1, 2 ) = 20; + DataHeatBalSurface::TH( 1, 1, 3 ) = 20; + DataHeatBalSurface::TH( 1, 1, 4 ) = 20; + DataHeatBalSurface::TH( 1, 1, 5 ) = 20; + DataHeatBalSurface::TH( 1, 1, 6 ) = 20; + DataHeatBalance::HConvIn.allocate( 6 ); + DataHeatBalance::HConvIn( 1 ) = 0.5; + DataHeatBalance::HConvIn( 2 ) = 0.5; + DataHeatBalance::HConvIn( 3 ) = 0.5; + DataHeatBalance::HConvIn( 4 ) = 0.5; + DataHeatBalance::HConvIn( 5 ) = 0.5; + DataHeatBalance::HConvIn( 6 ) = 0.5; + DataMoistureBalance::HConvInFD.allocate( 6 ); + DataMoistureBalance::RhoVaporAirIn.allocate( 6 ); + DataMoistureBalance::HMassConvInFD.allocate( 6 ); + + DataGlobals::KickOffSimulation = true; + DataHeatBalFanSys::ZoneLatentGain.allocate( 1 ); + DataGlobals::TimeStepZoneSec = 900; + DataHeatBalance::ZoneWinHeatGain.allocate( 1 ); + DataHeatBalance::ZoneWinHeatGainRep.allocate( 1 ); + DataHeatBalance::ZoneWinHeatGainRepEnergy.allocate( 1 ); + + AllocateSurfaceHeatBalArrays( ); + createFacilityElectricPowerServiceObject( ); + // with supply air + CalcHeatBalanceInsideSurf( ); + EXPECT_EQ( 24.0, DataHeatBalance::TempEffBulkAir( 1 ) ); + EXPECT_EQ( 23.0, DataHeatBalance::TempEffBulkAir( 2 ) ); + EXPECT_EQ( 20.0, DataHeatBalance::TempEffBulkAir( 3 ) ); + + // Supply air flow rate = 0 + DataLoopNode::Node( 1 ).MassFlowRate = 0.0; + DataLoopNode::Node( 2 ).MassFlowRate = 0.0; + DataLoopNode::Node( 3 ).MassFlowRate = 0.0; + DataLoopNode::Node( 4 ).MassFlowRate = 0.0; + CalcHeatBalanceInsideSurf( ); + EXPECT_EQ( 24.0, DataHeatBalance::TempEffBulkAir( 1 ) ); + EXPECT_EQ( 23.0, DataHeatBalance::TempEffBulkAir( 2 ) ); + EXPECT_EQ( 24.0, DataHeatBalance::TempEffBulkAir( 3 ) ); + + DataZoneEquipment::ZoneEquipConfig.deallocate( ); + DataSizing::ZoneEqSizing.deallocate( ); + DataHeatBalFanSys::MAT.deallocate( ); // Zone temperature C + DataHeatBalFanSys::ZoneAirHumRat.deallocate( ); + DataLoopNode::Node.deallocate( ); + DataGlobals::KickOffSimulation = false; + DataHeatBalSurface::TempSurfInTmp.deallocate( ); + DataHeatBalance::TempEffBulkAir.deallocate( ); + DataHeatBalSurface::TH.deallocate( ); + DataHeatBalance::HConvIn.deallocate( ); + DataMoistureBalance::HConvInFD.deallocate( ); + DataMoistureBalance::RhoVaporAirIn.deallocate( ); + DataMoistureBalance::HMassConvInFD.deallocate( ); + DataHeatBalFanSys::ZoneLatentGain.deallocate( ); + DataHeatBalance::ZoneWinHeatGain.deallocate( ); + DataHeatBalance::ZoneWinHeatGainRep.deallocate( ); + DataHeatBalance::ZoneWinHeatGainRepEnergy.deallocate( ); + + + } } diff --git a/tst/EnergyPlus/unit/InputProcessor.unit.cc b/tst/EnergyPlus/unit/InputProcessor.unit.cc index 6c3c20b6762..9b6a286e218 100644 --- a/tst/EnergyPlus/unit/InputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/InputProcessor.unit.cc @@ -1020,488 +1020,463 @@ namespace EnergyPlus { AddRecordToOutputVariableStructure( "*", "ZONE TOTAL INTERNAL LATENT GAIN ENERGY" ); AddRecordToOutputVariableStructure( "*", "ZONE TOTAL INTERNAL LATENT GAIN RATE" ); - EXPECT_EQ( "*", OutputVariablesForSimulation( 1 ).Key ); - EXPECT_EQ( "ZONE AIR SYSTEM SENSIBLE COOLING RATE", OutputVariablesForSimulation( 1 ).VarName ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 1 ).Previous ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 1 ).Next ); - - EXPECT_EQ( "*", OutputVariablesForSimulation( 2 ).Key ); - EXPECT_EQ( "SITE OUTDOOR AIR DRYBULB TEMPERATURE", OutputVariablesForSimulation( 2 ).VarName ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 2 ).Previous ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 2 ).Next ); - - EXPECT_EQ( "*", OutputVariablesForSimulation( 3 ).Key ); - EXPECT_EQ( "SITE OUTDOOR AIR WETBULB TEMPERATURE", OutputVariablesForSimulation( 3 ).VarName ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 3 ).Previous ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 3 ).Next ); - - EXPECT_EQ( "*", OutputVariablesForSimulation( 4 ).Key ); - EXPECT_EQ( "ZONE TOTAL INTERNAL LATENT GAIN ENERGY", OutputVariablesForSimulation( 4 ).VarName ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 4 ).Previous ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 4 ).Next ); - - EXPECT_EQ( "*", OutputVariablesForSimulation( 5 ).Key ); - EXPECT_EQ( "ZONE TOTAL INTERNAL LATENT GAIN RATE", OutputVariablesForSimulation( 5 ).VarName ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 5 ).Previous ); - EXPECT_EQ( 0, OutputVariablesForSimulation( 5 ).Next ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "ZONE AIR SYSTEM SENSIBLE COOLING RATE" ) ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ) ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ) ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "ZONE TOTAL INTERNAL LATENT GAIN ENERGY" ) ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "ZONE TOTAL INTERNAL LATENT GAIN RATE" ) ); } TEST_F( InputProcessorFixture, addVariablesForMonthlyReport ) { - auto const results_map = std::map< std::string, std::vector< std::tuple< std::string, std::string, int, int > > >({ + auto const results_map = std::map< std::string, std::vector< std::tuple< std::string, std::string > > >({ { "ZONECOOLINGSUMMARYMONTHLY", { - std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE COOLING RATE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "ZONE TOTAL INTERNAL LATENT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE TOTAL INTERNAL LATENT GAIN RATE", 0, 0 ), + std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE COOLING RATE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "ZONE TOTAL INTERNAL LATENT GAIN ENERGY" ), + std::make_tuple( "*", "ZONE TOTAL INTERNAL LATENT GAIN RATE" ), } }, { "ZONEHEATINGSUMMARYMONTHLY", { - std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE HEATING RATE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), + std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE HEATING ENERGY" ), + std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE HEATING RATE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), } }, { "ZONEELECTRICSUMMARYMONTHLY", { - std::make_tuple( "*", "ZONE LIGHTS ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT ELECTRIC ENERGY", 0, 0 ), + std::make_tuple( "*", "ZONE LIGHTS ELECTRIC ENERGY" ), + std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT ELECTRIC ENERGY" ), } }, { "SPACEGAINSMONTHLY", { - std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY", 0, 0 ), + std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY" ), } }, { "PEAKSPACEGAINSMONTHLY", { - std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY", 0, 0 ), + std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY" ), } }, { "SPACEGAINCOMPONENTSATCOOLINGPEAKMONTHLY", { - std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE COOLING RATE", 0, 0 ), - std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY", 0, 0 ), + std::make_tuple( "*", "ZONE AIR SYSTEM SENSIBLE COOLING RATE" ), + std::make_tuple( "*", "ZONE PEOPLE TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE LIGHTS TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE ELECTRIC EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE GAS EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE HOT WATER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE STEAM EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE OTHER EQUIPMENT TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT GAIN ENERGY" ), + std::make_tuple( "*", "ZONE INFILTRATION SENSIBLE HEAT LOSS ENERGY" ), } }, { "SETPOINTSNOTMETWITHTEMPERATURESMONTHLY", { - std::make_tuple( "*", "ZONE HEATING SETPOINT NOT MET TIME", 0, 0 ), - std::make_tuple( "*", "ZONE MEAN AIR TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "ZONE HEATING SETPOINT NOT MET WHILE OCCUPIED TIME", 0, 0 ), - std::make_tuple( "*", "ZONE COOLING SETPOINT NOT MET TIME", 0, 0 ), - std::make_tuple( "*", "ZONE COOLING SETPOINT NOT MET WHILE OCCUPIED TIME", 0, 0 ), + std::make_tuple( "*", "ZONE HEATING SETPOINT NOT MET TIME" ), + std::make_tuple( "*", "ZONE MEAN AIR TEMPERATURE" ), + std::make_tuple( "*", "ZONE HEATING SETPOINT NOT MET WHILE OCCUPIED TIME" ), + std::make_tuple( "*", "ZONE COOLING SETPOINT NOT MET TIME" ), + std::make_tuple( "*", "ZONE COOLING SETPOINT NOT MET WHILE OCCUPIED TIME" ), } }, { "COMFORTREPORTSIMPLE55MONTHLY", { - std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL SUMMER CLOTHES NOT COMFORTABLE TIME", 0, 0 ), - std::make_tuple( "*", "ZONE MEAN AIR TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL WINTER CLOTHES NOT COMFORTABLE TIME", 0, 0 ), - std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL SUMMER OR WINTER CLOTHES NOT COMFORTABLE TIME", 0, 0 ), + std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL SUMMER CLOTHES NOT COMFORTABLE TIME" ), + std::make_tuple( "*", "ZONE MEAN AIR TEMPERATURE" ), + std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL WINTER CLOTHES NOT COMFORTABLE TIME" ), + std::make_tuple( "*", "ZONE THERMAL COMFORT ASHRAE 55 SIMPLE MODEL SUMMER OR WINTER CLOTHES NOT COMFORTABLE TIME" ), } }, { "UNGLAZEDTRANSPIREDSOLARCOLLECTORSUMMARYMONTHLY", { - std::make_tuple( "*", "SOLAR COLLECTOR SYSTEM EFFICIENCY", 0, 0 ), - std::make_tuple( "*", "SOLAR COLLECTOR OUTSIDE FACE SUCTION VELOCITY", 0, 0 ), - std::make_tuple( "*", "SOLAR COLLECTOR SENSIBLE HEATING RATE", 0, 0 ), + std::make_tuple( "*", "SOLAR COLLECTOR SYSTEM EFFICIENCY" ), + std::make_tuple( "*", "SOLAR COLLECTOR OUTSIDE FACE SUCTION VELOCITY" ), + std::make_tuple( "*", "SOLAR COLLECTOR SENSIBLE HEATING RATE" ), } }, { "OCCUPANTCOMFORTDATASUMMARYMONTHLY", { - std::make_tuple( "*", "PEOPLE OCCUPANT COUNT", 0, 0 ), - std::make_tuple( "*", "PEOPLE AIR TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "PEOPLE AIR RELATIVE HUMIDITY", 0, 0 ), - std::make_tuple( "*", "ZONE THERMAL COMFORT FANGER MODEL PMV", 0, 0 ), - std::make_tuple( "*", "ZONE THERMAL COMFORT FANGER MODEL PPD", 0, 0 ), + std::make_tuple( "*", "PEOPLE OCCUPANT COUNT" ), + std::make_tuple( "*", "PEOPLE AIR TEMPERATURE" ), + std::make_tuple( "*", "PEOPLE AIR RELATIVE HUMIDITY" ), + std::make_tuple( "*", "ZONE THERMAL COMFORT FANGER MODEL PMV" ), + std::make_tuple( "*", "ZONE THERMAL COMFORT FANGER MODEL PPD" ), } }, { "CHILLERREPORTMONTHLY", { - std::make_tuple( "*", "CHILLER ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "CHILLER ELECTRIC POWER", 0, 0 ), - std::make_tuple( "*", "CHILLER EVAPORATOR COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "CHILLER CONDENSER HEAT TRANSFER ENERGY", 0, 0 ), - std::make_tuple( "*", "CHILLER COP", 0, 0 ), + std::make_tuple( "*", "CHILLER ELECTRIC ENERGY" ), + std::make_tuple( "*", "CHILLER ELECTRIC POWER" ), + std::make_tuple( "*", "CHILLER EVAPORATOR COOLING ENERGY" ), + std::make_tuple( "*", "CHILLER CONDENSER HEAT TRANSFER ENERGY" ), + std::make_tuple( "*", "CHILLER COP" ), } }, { "TOWERREPORTMONTHLY", { - std::make_tuple( "*", "COOLING TOWER FAN ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING TOWER FAN ELECTRIC POWER", 0, 0 ), - std::make_tuple( "*", "COOLING TOWER HEAT TRANSFER RATE", 0, 0 ), - std::make_tuple( "*", "COOLING TOWER INLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "COOLING TOWER OUTLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "COOLING TOWER MASS FLOW RATE", 0, 0 ), + std::make_tuple( "*", "COOLING TOWER FAN ELECTRIC ENERGY" ), + std::make_tuple( "*", "COOLING TOWER FAN ELECTRIC POWER" ), + std::make_tuple( "*", "COOLING TOWER HEAT TRANSFER RATE" ), + std::make_tuple( "*", "COOLING TOWER INLET TEMPERATURE" ), + std::make_tuple( "*", "COOLING TOWER OUTLET TEMPERATURE" ), + std::make_tuple( "*", "COOLING TOWER MASS FLOW RATE" ), } }, { "BOILERREPORTMONTHLY", { - std::make_tuple( "*", "BOILER HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "BOILER GAS CONSUMPTION", 0, 0 ), - std::make_tuple( "*", "BOILER HEATING RATE", 0, 0 ), - std::make_tuple( "*", "BOILER GAS CONSUMPTION RATE", 0, 0 ), - std::make_tuple( "*", "BOILER INLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "BOILER OUTLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "BOILER MASS FLOW RATE", 0, 0 ), - std::make_tuple( "*", "BOILER ANCILLARY ELECTRIC POWER", 0, 0 ), + std::make_tuple( "*", "BOILER HEATING ENERGY" ), + std::make_tuple( "*", "BOILER GAS CONSUMPTION" ), + std::make_tuple( "*", "BOILER HEATING RATE" ), + std::make_tuple( "*", "BOILER GAS CONSUMPTION RATE" ), + std::make_tuple( "*", "BOILER INLET TEMPERATURE" ), + std::make_tuple( "*", "BOILER OUTLET TEMPERATURE" ), + std::make_tuple( "*", "BOILER MASS FLOW RATE" ), + std::make_tuple( "*", "BOILER ANCILLARY ELECTRIC POWER" ), } }, { "DXREPORTMONTHLY", { - std::make_tuple( "*", "COOLING COIL TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL LATENT COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL CRANKCASE HEATER ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL RUNTIME FRACTION", 0, 0 ), - std::make_tuple( "*", "COOLING COIL TOTAL COOLING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL LATENT COOLING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL ELECTRIC POWER", 0, 0 ), - std::make_tuple( "*", "COOLING COIL CRANKCASE HEATER ELECTRIC POWER", 0, 0 ), + std::make_tuple( "*", "COOLING COIL TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "COOLING COIL ELECTRIC ENERGY" ), + std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING ENERGY" ), + std::make_tuple( "*", "COOLING COIL LATENT COOLING ENERGY" ), + std::make_tuple( "*", "COOLING COIL CRANKCASE HEATER ELECTRIC ENERGY" ), + std::make_tuple( "*", "COOLING COIL RUNTIME FRACTION" ), + std::make_tuple( "*", "COOLING COIL TOTAL COOLING RATE" ), + std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING RATE" ), + std::make_tuple( "*", "COOLING COIL LATENT COOLING RATE" ), + std::make_tuple( "*", "COOLING COIL ELECTRIC POWER" ), + std::make_tuple( "*", "COOLING COIL CRANKCASE HEATER ELECTRIC POWER" ), } }, { "WINDOWREPORTMONTHLY", { - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED BEAM SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED DIFFUSE SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW HEAT GAIN RATE", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW HEAT LOSS RATE", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW INSIDE FACE GLAZING CONDENSATION STATUS", 0, 0 ), - std::make_tuple( "*", "SURFACE SHADING DEVICE IS ON TIME FRACTION", 0, 0 ), - std::make_tuple( "*", "SURFACE STORM WINDOW ON OFF STATUS", 0, 0 ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED SOLAR RADIATION RATE" ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED BEAM SOLAR RADIATION RATE" ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED DIFFUSE SOLAR RADIATION RATE" ), + std::make_tuple( "*", "SURFACE WINDOW HEAT GAIN RATE" ), + std::make_tuple( "*", "SURFACE WINDOW HEAT LOSS RATE" ), + std::make_tuple( "*", "SURFACE WINDOW INSIDE FACE GLAZING CONDENSATION STATUS" ), + std::make_tuple( "*", "SURFACE SHADING DEVICE IS ON TIME FRACTION" ), + std::make_tuple( "*", "SURFACE STORM WINDOW ON OFF STATUS" ), } }, { "WINDOWENERGYREPORTMONTHLY", { - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED BEAM SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "SURFACE WINDOW HEAT LOSS ENERGY", 0, 0 ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED BEAM SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "SURFACE WINDOW TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "SURFACE WINDOW HEAT GAIN ENERGY" ), + std::make_tuple( "*", "SURFACE WINDOW HEAT LOSS ENERGY" ), } }, { "WINDOWZONESUMMARYMONTHLY", { - std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT GAIN RATE", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT LOSS RATE", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOWS TOTAL TRANSMITTED SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION RATE", 0, 0 ), - std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION RATE", 0, 0 ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT GAIN RATE" ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT LOSS RATE" ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL TRANSMITTED SOLAR RADIATION RATE" ), + std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION RATE" ), + std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION RATE" ), + std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION RATE" ), + std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION RATE" ), } }, { "WINDOWENERGYZONESUMMARYMONTHLY", { - std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT LOSS ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOWS TOTAL TRANSMITTED SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION ENERGY", 0, 0 ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT GAIN ENERGY" ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL HEAT LOSS ENERGY" ), + std::make_tuple( "*", "ZONE WINDOWS TOTAL TRANSMITTED SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "ZONE EXTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED DIFFUSE SOLAR RADIATION ENERGY" ), + std::make_tuple( "*", "ZONE INTERIOR WINDOWS TOTAL TRANSMITTED BEAM SOLAR RADIATION ENERGY" ), } }, { "AVERAGEOUTDOORCONDITIONSMONTHLY", { - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE WIND SPEED", 0, 0 ), - std::make_tuple( "*", "SITE SKY TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE RAIN STATUS", 0, 0 ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE" ), + std::make_tuple( "*", "SITE WIND SPEED" ), + std::make_tuple( "*", "SITE SKY TEMPERATURE" ), + std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE RAIN STATUS" ), } }, { "OUTDOORCONDITIONSMAXIMUMDRYBULBMONTHLY", { - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE WIND SPEED", 0, 0 ), - std::make_tuple( "*", "SITE SKY TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA", 0, 0 ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE" ), + std::make_tuple( "*", "SITE WIND SPEED" ), + std::make_tuple( "*", "SITE SKY TEMPERATURE" ), + std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA" ), } }, { "OUTDOORCONDITIONSMINIMUMDRYBULBMONTHLY", { - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE WIND SPEED", 0, 0 ), - std::make_tuple( "*", "SITE SKY TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA", 0, 0 ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE" ), + std::make_tuple( "*", "SITE WIND SPEED" ), + std::make_tuple( "*", "SITE SKY TEMPERATURE" ), + std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA" ), } }, { "OUTDOORCONDITIONSMAXIMUMWETBULBMONTHLY", { - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE WIND SPEED", 0, 0 ), - std::make_tuple( "*", "SITE SKY TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA", 0, 0 ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE" ), + std::make_tuple( "*", "SITE WIND SPEED" ), + std::make_tuple( "*", "SITE SKY TEMPERATURE" ), + std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA" ), } }, { "OUTDOORCONDITIONSMAXIMUMDEWPOINTMONTHLY", { - std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE WIND SPEED", 0, 0 ), - std::make_tuple( "*", "SITE SKY TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA", 0, 0 ), + std::make_tuple( "*", "SITE OUTDOOR AIR DEWPOINT TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE OUTDOOR AIR WETBULB TEMPERATURE" ), + std::make_tuple( "*", "SITE WIND SPEED" ), + std::make_tuple( "*", "SITE SKY TEMPERATURE" ), + std::make_tuple( "*", "SITE DIFFUSE SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE DIRECT SOLAR RADIATION RATE PER AREA" ), } }, { "OUTDOORGROUNDCONDITIONSMONTHLY", { - std::make_tuple( "*", "SITE GROUND TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE SURFACE GROUND TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE DEEP GROUND TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE MAINS WATER TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "SITE GROUND REFLECTED SOLAR RADIATION RATE PER AREA", 0, 0 ), - std::make_tuple( "*", "SITE SNOW ON GROUND STATUS", 0, 0 ), + std::make_tuple( "*", "SITE GROUND TEMPERATURE" ), + std::make_tuple( "*", "SITE SURFACE GROUND TEMPERATURE" ), + std::make_tuple( "*", "SITE DEEP GROUND TEMPERATURE" ), + std::make_tuple( "*", "SITE MAINS WATER TEMPERATURE" ), + std::make_tuple( "*", "SITE GROUND REFLECTED SOLAR RADIATION RATE PER AREA" ), + std::make_tuple( "*", "SITE SNOW ON GROUND STATUS" ), } }, { "WINDOWACREPORTMONTHLY", { - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER SENSIBLE COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER LATENT COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER TOTAL COOLING RATE", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER SENSIBLE COOLING RATE", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER LATENT COOLING RATE", 0, 0 ), - std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER ELECTRIC POWER", 0, 0 ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER ELECTRIC ENERGY" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER SENSIBLE COOLING ENERGY" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER LATENT COOLING ENERGY" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER TOTAL COOLING RATE" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER SENSIBLE COOLING RATE" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER LATENT COOLING RATE" ), + std::make_tuple( "*", "ZONE WINDOW AIR CONDITIONER ELECTRIC POWER" ), } }, { "WATERHEATERREPORTMONTHLY", { - std::make_tuple( "*", "WATER HEATER TOTAL DEMAND HEAT TRANSFER ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER USE SIDE HEAT TRANSFER ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER BURNER HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER GAS CONSUMPTION", 0, 0 ), - std::make_tuple( "*", "WATER HEATER LOSS DEMAND ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER HEAT LOSS ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER TANK TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "WATER HEATER HEAT RECOVERY SUPPLY ENERGY", 0, 0 ), - std::make_tuple( "*", "WATER HEATER SOURCE ENERGY", 0, 0 ), + std::make_tuple( "*", "WATER HEATER TOTAL DEMAND HEAT TRANSFER ENERGY" ), + std::make_tuple( "*", "WATER HEATER USE SIDE HEAT TRANSFER ENERGY" ), + std::make_tuple( "*", "WATER HEATER BURNER HEATING ENERGY" ), + std::make_tuple( "*", "WATER HEATER GAS CONSUMPTION" ), + std::make_tuple( "*", "WATER HEATER LOSS DEMAND ENERGY" ), + std::make_tuple( "*", "WATER HEATER HEAT LOSS ENERGY" ), + std::make_tuple( "*", "WATER HEATER TANK TEMPERATURE" ), + std::make_tuple( "*", "WATER HEATER HEAT RECOVERY SUPPLY ENERGY" ), + std::make_tuple( "*", "WATER HEATER SOURCE ENERGY" ), } }, { "GENERATORREPORTMONTHLY", { - std::make_tuple( "*", "GENERATOR PRODUCED ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "GENERATOR DIESEL CONSUMPTION", 0, 0 ), - std::make_tuple( "*", "GENERATOR GAS CONSUMPTION", 0, 0 ), - std::make_tuple( "*", "GENERATOR TOTAL HEAT RECOVERY", 0, 0 ), - std::make_tuple( "*", "GENERATOR JACKET HEAT RECOVERY ENERGY", 0, 0 ), - std::make_tuple( "*", "GENERATOR LUBE HEAT RECOVERY", 0, 0 ), - std::make_tuple( "*", "GENERATOR EXHAUST HEAT RECOVERY ENERGY", 0, 0 ), - std::make_tuple( "*", "GENERATOR EXHAUST AIR TEMPERATURE", 0, 0 ), + std::make_tuple( "*", "GENERATOR PRODUCED ELECTRIC ENERGY" ), + std::make_tuple( "*", "GENERATOR DIESEL CONSUMPTION" ), + std::make_tuple( "*", "GENERATOR GAS CONSUMPTION" ), + std::make_tuple( "*", "GENERATOR TOTAL HEAT RECOVERY" ), + std::make_tuple( "*", "GENERATOR JACKET HEAT RECOVERY ENERGY" ), + std::make_tuple( "*", "GENERATOR LUBE HEAT RECOVERY" ), + std::make_tuple( "*", "GENERATOR EXHAUST HEAT RECOVERY ENERGY" ), + std::make_tuple( "*", "GENERATOR EXHAUST AIR TEMPERATURE" ), } }, { "DAYLIGHTINGREPORTMONTHLY", { - std::make_tuple( "*", "SITE EXTERIOR BEAM NORMAL ILLUMINANCE", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING LIGHTING POWER MULTIPLIER", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 ILLUMINANCE", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 GLARE INDEX", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 GLARE INDEX SETPOINT EXCEEDED TIME", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 DAYLIGHT ILLUMINANCE SETPOINT EXCEEDED TIME", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 ILLUMINANCE", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 GLARE INDEX", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 GLARE INDEX SETPOINT EXCEEDED TIME", 0, 0 ), - std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 DAYLIGHT ILLUMINANCE SETPOINT EXCEEDED TIME", 0, 0 ), + std::make_tuple( "*", "SITE EXTERIOR BEAM NORMAL ILLUMINANCE" ), + std::make_tuple( "*", "DAYLIGHTING LIGHTING POWER MULTIPLIER" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 ILLUMINANCE" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 GLARE INDEX" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 GLARE INDEX SETPOINT EXCEEDED TIME" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 1 DAYLIGHT ILLUMINANCE SETPOINT EXCEEDED TIME" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 ILLUMINANCE" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 GLARE INDEX" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 GLARE INDEX SETPOINT EXCEEDED TIME" ), + std::make_tuple( "*", "DAYLIGHTING REFERENCE POINT 2 DAYLIGHT ILLUMINANCE SETPOINT EXCEEDED TIME" ), } }, { "COILREPORTMONTHLY", { - std::make_tuple( "*", "HEATING COIL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "HEATING COIL HEATING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "COOLING COIL TOTAL COOLING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING RATE", 0, 0 ), - std::make_tuple( "*", "COOLING COIL WETTED AREA FRACTION", 0, 0 ), + std::make_tuple( "*", "HEATING COIL HEATING ENERGY" ), + std::make_tuple( "*", "HEATING COIL HEATING RATE" ), + std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING ENERGY" ), + std::make_tuple( "*", "COOLING COIL TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "COOLING COIL TOTAL COOLING RATE" ), + std::make_tuple( "*", "COOLING COIL SENSIBLE COOLING RATE" ), + std::make_tuple( "*", "COOLING COIL WETTED AREA FRACTION" ), } }, { "PLANTLOOPDEMANDREPORTMONTHLY", { - std::make_tuple( "*", "PLANT SUPPLY SIDE COOLING DEMAND RATE", 0, 0 ), - std::make_tuple( "*", "PLANT SUPPLY SIDE HEATING DEMAND RATE", 0, 0 ), + std::make_tuple( "*", "PLANT SUPPLY SIDE COOLING DEMAND RATE" ), + std::make_tuple( "*", "PLANT SUPPLY SIDE HEATING DEMAND RATE" ), } }, { "FANREPORTMONTHLY", { - std::make_tuple( "*", "FAN ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "FAN RISE IN AIR TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "FAN ELECTRIC POWER", 0, 0 ), + std::make_tuple( "*", "FAN ELECTRIC ENERGY" ), + std::make_tuple( "*", "FAN RISE IN AIR TEMPERATURE" ), + std::make_tuple( "*", "FAN ELECTRIC POWER" ), } }, { "PUMPREPORTMONTHLY", { - std::make_tuple( "*", "PUMP ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "PUMP FLUID HEAT GAIN ENERGY", 0, 0 ), - std::make_tuple( "*", "PUMP ELECTRIC POWER", 0, 0 ), - std::make_tuple( "*", "PUMP SHAFT POWER", 0, 0 ), - std::make_tuple( "*", "PUMP FLUID HEAT GAIN RATE", 0, 0 ), - std::make_tuple( "*", "PUMP OUTLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "PUMP MASS FLOW RATE", 0, 0 ), + std::make_tuple( "*", "PUMP ELECTRIC ENERGY" ), + std::make_tuple( "*", "PUMP FLUID HEAT GAIN ENERGY" ), + std::make_tuple( "*", "PUMP ELECTRIC POWER" ), + std::make_tuple( "*", "PUMP SHAFT POWER" ), + std::make_tuple( "*", "PUMP FLUID HEAT GAIN RATE" ), + std::make_tuple( "*", "PUMP OUTLET TEMPERATURE" ), + std::make_tuple( "*", "PUMP MASS FLOW RATE" ), } }, { "CONDLOOPDEMANDREPORTMONTHLY", { - std::make_tuple( "*", "PLANT SUPPLY SIDE COOLING DEMAND RATE", 0, 0 ), - std::make_tuple( "*", "PLANT SUPPLY SIDE HEATING DEMAND RATE", 0, 0 ), - std::make_tuple( "*", "PLANT SUPPLY SIDE INLET TEMPERATURE", 0, 0 ), - std::make_tuple( "*", "PLANT SUPPLY SIDE OUTLET TEMPERATURE", 0, 0 ), + std::make_tuple( "*", "PLANT SUPPLY SIDE COOLING DEMAND RATE" ), + std::make_tuple( "*", "PLANT SUPPLY SIDE HEATING DEMAND RATE" ), + std::make_tuple( "*", "PLANT SUPPLY SIDE INLET TEMPERATURE" ), + std::make_tuple( "*", "PLANT SUPPLY SIDE OUTLET TEMPERATURE" ), } }, { "ZONETEMPERATUREOSCILLATIONREPORTMONTHLY", { - std::make_tuple( "*", "ZONE OSCILLATING TEMPERATURES TIME", 0, 0 ), - std::make_tuple( "*", "ZONE PEOPLE OCCUPANT COUNT", 0, 0 ), + std::make_tuple( "*", "ZONE OSCILLATING TEMPERATURES TIME" ), + std::make_tuple( "*", "ZONE PEOPLE OCCUPANT COUNT" ), } }, { "AIRLOOPSYSTEMENERGYANDWATERUSEMONTHLY", { - std::make_tuple( "*", "AIR SYSTEM HOT WATER ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM STEAM ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM CHILLED WATER ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM GAS ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM WATER VOLUME", 0, 0 ), + std::make_tuple( "*", "AIR SYSTEM HOT WATER ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM STEAM ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM CHILLED WATER ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM GAS ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM WATER VOLUME" ), } }, { "AIRLOOPSYSTEMCOMPONENTLOADSMONTHLY", { - std::make_tuple( "*", "AIR SYSTEM FAN AIR HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM COOLING COIL TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEATING COIL TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEAT EXCHANGER TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEAT EXCHANGER TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HUMIDIFIER TOTAL HEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM EVAPORATIVE COOLER TOTAL COOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM DESICCANT DEHUMIDIFIER TOTAL COOLING ENERGY", 0, 0 ), + std::make_tuple( "*", "AIR SYSTEM FAN AIR HEATING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM COOLING COIL TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEATING COIL TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEAT EXCHANGER TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEAT EXCHANGER TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HUMIDIFIER TOTAL HEATING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM EVAPORATIVE COOLER TOTAL COOLING ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM DESICCANT DEHUMIDIFIER TOTAL COOLING ENERGY" ), } }, { "AIRLOOPSYSTEMCOMPONENTENERGYUSEMONTHLY", { - std::make_tuple( "*", "AIR SYSTEM FAN ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEATING COIL HOT WATER ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM COOLING COIL CHILLED WATER ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM DX HEATING COIL ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM DX COOLING COIL ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEATING COIL ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEATING COIL GAS ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HEATING COIL STEAM ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM HUMIDIFIER ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM EVAPORATIVE COOLER ELECTRIC ENERGY", 0, 0 ), - std::make_tuple( "*", "AIR SYSTEM DESICCANT DEHUMIDIFIER ELECTRIC ENERGY", 0, 0 ), + std::make_tuple( "*", "AIR SYSTEM FAN ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEATING COIL HOT WATER ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM COOLING COIL CHILLED WATER ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM DX HEATING COIL ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM DX COOLING COIL ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEATING COIL ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEATING COIL GAS ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HEATING COIL STEAM ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM HUMIDIFIER ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM EVAPORATIVE COOLER ELECTRIC ENERGY" ), + std::make_tuple( "*", "AIR SYSTEM DESICCANT DEHUMIDIFIER ELECTRIC ENERGY" ), } }, { "MECHANICALVENTILATIONLOADSMONTHLY", { - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION NO LOAD HEAT REMOVAL ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD INCREASE ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD INCREASE DUE TO OVERHEATING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD DECREASE ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION NO LOAD HEAT ADDITION ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD INCREASE ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD INCREASE DUE TO OVERCOOLING ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD DECREASE ENERGY", 0, 0 ), - std::make_tuple( "*", "ZONE MECHANICAL VENTILATION AIR CHANGES PER HOUR", 0, 0 ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION NO LOAD HEAT REMOVAL ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD INCREASE ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD INCREASE DUE TO OVERHEATING ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION COOLING LOAD DECREASE ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION NO LOAD HEAT ADDITION ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD INCREASE ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD INCREASE DUE TO OVERCOOLING ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION HEATING LOAD DECREASE ENERGY" ), + std::make_tuple( "*", "ZONE MECHANICAL VENTILATION AIR CHANGES PER HOUR" ), } } }); for ( auto const result : results_map ) { - int index = 1; - DataOutputs::OutputVariablesForSimulation.allocate( 10000 ); AddVariablesForMonthlyReport( result.first ); for ( auto const result_tuple : result.second ) { - EXPECT_EQ( std::get<0>( result_tuple ), DataOutputs::OutputVariablesForSimulation( index ).Key ); - EXPECT_EQ( std::get<1>( result_tuple ), DataOutputs::OutputVariablesForSimulation( index ).VarName ); - EXPECT_EQ( std::get<2>( result_tuple ), DataOutputs::OutputVariablesForSimulation( index ).Previous ); - EXPECT_EQ( std::get<3>( result_tuple ), DataOutputs::OutputVariablesForSimulation( index ).Next ); - ++index; + EXPECT_TRUE( DataOutputs::FindItemInVariableList( std::get<0>( result_tuple ), std::get<1>( result_tuple ) ) ); } - DataOutputs::OutputVariablesForSimulation.deallocate(); + DataOutputs::OutputVariablesForSimulation.clear(); DataOutputs::NumConsideredOutputVariables = 0; } @@ -1524,10 +1499,7 @@ namespace EnergyPlus { EXPECT_FALSE( has_cout_output() ); EXPECT_FALSE( has_cerr_output() ); - EXPECT_EQ( "*", DataOutputs::OutputVariablesForSimulation( 1 ).Key ); - EXPECT_EQ( "SITE OUTDOOR AIR DRYBULB TEMPERATURE", DataOutputs::OutputVariablesForSimulation( 1 ).VarName ); - EXPECT_EQ( 0, DataOutputs::OutputVariablesForSimulation( 1 ).Previous ); - EXPECT_EQ( 0, DataOutputs::OutputVariablesForSimulation( 1 ).Next ); + EXPECT_TRUE( DataOutputs::FindItemInVariableList( "*", "SITE OUTDOOR AIR DRYBULB TEMPERATURE" ) ); } diff --git a/tst/EnergyPlus/unit/OutputReportData.unit.cc b/tst/EnergyPlus/unit/OutputReportData.unit.cc index fbaf1253930..eddf6a3bbd9 100644 --- a/tst/EnergyPlus/unit/OutputReportData.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportData.unit.cc @@ -123,8 +123,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 5u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 10u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 10 ); EXPECT_TRUE( FindItemInVariableList( "Outside Air Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "OUTSIDE AIR INLET NODE", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Mixed Air Node", "System Node Temperature" )); @@ -155,8 +154,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Plus ) " Output:Variable,", ".+,", "System Node Temperature,", "timestep;", }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 6u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 6u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 6 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "SalesFloor INLET Node", "System Node Mass Flow Rate" )); EXPECT_FALSE( FindItemInVariableList( "Inlet", "System Node Mass Flow Rate" )); @@ -182,8 +180,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Star ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 7u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 7u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 7 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "SalesFloor INLET Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Inlet", "System Node Mass Flow Rate" )); @@ -217,8 +214,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Pipe ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 3u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 4u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 4 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "SalesFloor INLET Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Outlet Node", "System Node Mass Flow Rate" )); @@ -245,8 +241,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Brackets ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 5u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 5u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 6 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Node", "System Node Mass Flow Rate" )); EXPECT_FALSE( FindItemInVariableList( "", "System Node Mass Flow Rate" )); @@ -274,8 +269,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_SpecChars ) ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 1u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 1u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 1 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); @@ -291,8 +285,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Carrot ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 2u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 2u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 2 ); EXPECT_FALSE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Inlet System Node", "System Node Mass Flow Rate" )); @@ -308,8 +301,7 @@ TEST_F( EnergyPlusFixture, OutputReportData_Regex_Dollar ) }); ASSERT_FALSE( process_idf( idf_objects ) ); - EXPECT_EQ( OutputVariablesNames.size(), 1u ); - EXPECT_EQ( OutputVariablesForSimulation.size(), 1u ); + EXPECT_EQ( DataOutputs::NumConsideredOutputVariables, 1 ); EXPECT_TRUE( FindItemInVariableList( "SalesFloor Inlet Node", "System Node Mass Flow Rate" )); EXPECT_TRUE( FindItemInVariableList( "Outlet Node", "System Node Mass Flow Rate" )); EXPECT_FALSE( FindItemInVariableList( "Inlet Node1 ", "System Node Mass Flow Rate" )); diff --git a/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc new file mode 100644 index 00000000000..08e549ab4bc --- /dev/null +++ b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc @@ -0,0 +1,300 @@ +// EnergyPlus, Copyright (c) 1996-2017, The Board of Trustees of the University of Illinois and +// 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). 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. + +// EnergyPlus::Standalone ERV Unit Tests + +#include + +// Google Test Headers +#include + +// EnergyPlus Headers +#include "Fixtures/EnergyPlusFixture.hh" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace EnergyPlus; +using namespace SimulationManager; +using namespace DataSizing; +using DataHeatBalance::Zone; + +TEST_F( EnergyPlusFixture, ParallelPIUTest1 ) { + std::string const idf_objects = delimited_string({ + "Version,8.4;", + " Zone,", + " SPACE2-1; !- Name", + "ZoneHVAC:EquipmentConnections,", + " SPACE2-1, !- Zone Name", + " SPACE2-1 Equipment, !- Zone Conditioning Equipment List Name", + " SPACE2-1 In Node, !- Zone Air Inlet Node or NodeList Name", + " SPACE2-1 ATU Sec Node, !- Zone Air Exhaust Node or NodeList Name", + " SPACE2-1 Air Node, !- Zone Air Node Name", + " SPACE2-1 Return Node; !- Zone Return Air Node Name", + "ZoneHVAC:EquipmentList,", + " SPACE2-1 Equipment, !- Name", + " ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type", + " SPACE2-1 ADU, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No-Load Sequence", + "ZoneHVAC:AirDistributionUnit,", + " SPACE2-1 ADU, !- Name", + " SPACE2-1 In Node, !- Air Distribution Unit Outlet Node Name", + " AirTerminal:SingleDuct:ParallelPIU:Reheat, !- Air Terminal Object Type", + " SPACE2-1 Parallel PIU Reheat; !- Air Terminal Name", + " AirTerminal:SingleDuct:ParallelPIU:Reheat,", + " SPACE2-1 Parallel PIU Reheat, !- Name", + " AlwaysOn, !- Availability Schedule Name", + " 0.1, !- Maximum Primary Air Flow Rate {m3/s}", + " 0.05, !- Maximum Secondary Air Flow Rate {m3/s}", + " 0.2, !- Minimum Primary Air Flow Fraction", + " 0.0, !- Fan On Flow Fraction", + " SPACE2-1 ATU In Node, !- Supply Air Inlet Node Name", + " SPACE2-1 ATU Sec Node, !- Secondary Air Inlet Node Name", + " SPACE2-1 In Node, !- Outlet Node Name", + " SPACE2-1 Zone Coil Air In Node, !- Reheat Coil Air Inlet Node Name", + " SPACE2-1 PIU Mixer, !- Zone Mixer Name", + " SPACE2-1 PIU Fan, !- Fan Name", + " Coil:Heating:Electric, !- Reheat Coil Object Type", + " SPACE2-1 Zone Coil, !- Reheat Coil Name", + " 0.0, !- Maximum Hot Water or Steam Flow Rate {m3/s}", + " 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s}", + " 0.0001; !- Convergence Tolerance", + "", + " Fan:ConstantVolume,", + " SPACE2-1 PIU Fan, !- Name", + " AlwaysOff, !- Availability Schedule Name", + " 0.5, !- Fan Total Efficiency", + " 50.0, !- Pressure Rise {Pa}", + " 0.05, !- Maximum Flow Rate {m3/s}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Airstream Fraction", + " SPACE2-1 ATU Sec Node, !- Air Inlet Node Name", + " SPACE2-1 ATU Fan Outlet Node; !- Air Outlet Node Name", + "", + " AirLoopHVAC:ZoneMixer,", + " SPACE2-1 PIU Mixer, !- Name", + " SPACE2-1 Zone Coil Air In Node, !- Outlet Node Name", + " SPACE2-1 ATU In Node, !- Inlet 1 Node Name", + " SPACE2-1 ATU Fan Outlet Node; !- Inlet 2 Node Name", + "", + " Coil:Heating:Electric,", + " SPACE2-1 Zone Coil, !- Name", + " AlwaysOn, !- Availability Schedule Name", + " 1.0, !- Efficiency", + " 1000, !- Nominal Capacity", + " SPACE2-1 Zone Coil Air In Node, !- Air Inlet Node Name", + " SPACE2-1 In Node; !- Air Outlet Node Name", + "", + "Schedule:Constant,", + " AlwaysOff, !- Name", + " , !- Schedule Type Limits Name", + " 0; !- Hourly Value", + "Schedule:Constant,", + " AlwaysOn, !- Name", + " , !- Schedule Type Limits Name", + " 1; !- Hourly Value", + + } ) ; + + ASSERT_FALSE( process_idf( idf_objects ) ); + + DataGlobals::NumOfTimeStepInHour = 1; // must initialize this to get schedules initialized + DataGlobals::MinutesPerTimeStep = 60; // must initialize this to get schedules initialized + ScheduleManager::ProcessScheduleInput(); // read schedules + ScheduleManager::ScheduleInputProcessed = true; + DataEnvironment::Month = 1; + DataEnvironment::DayOfMonth = 21; + DataGlobals::HourOfDay = 1; + DataGlobals::TimeStep = 1; + DataEnvironment::DSTIndicator = 0; + DataEnvironment::DayOfWeek = 2; + DataEnvironment::HolidayIndex = 0; + DataEnvironment::DayOfYear_Schedule = General::JulianDay(DataEnvironment::Month, DataEnvironment::DayOfMonth, 1); + DataEnvironment::StdRhoAir = Psychrometrics::PsyRhoAirFnPbTdbW( 101325.0, 20.0, 0.0 ); + ScheduleManager::UpdateScheduleValues(); + + bool ErrorsFound = false; + HeatBalanceManager::GetZoneData(ErrorsFound); + ASSERT_FALSE(ErrorsFound); + DataZoneEquipment::GetZoneEquipmentData1(); + ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(); + Fans::GetFanInput(); + Fans::GetFanInputFlag = false; + PoweredInductionUnits::GetPIUs(); + EXPECT_TRUE( compare_err_stream( "" ) ); + DataHeatBalFanSys::TempControlType.allocate( 1 ); + DataHeatBalFanSys::TempControlType( 1 ) = DataHVACGlobals::DualSetPointWithDeadBand; + + // node number table + // 1 SPACE2-1 Air Node + // 2 SPACE2-1 Return Node + // 3 SPACE2-1 In Node + // 4 SPACE2-1 ATU Sec Node + // 5 SPACE2-1 ATU Fan Outlet Node + // 6 SPACE2-1 ATU In Node + // 7 SPACE2-1 Zone Coil Air In Node + + DataZoneEnergyDemands::ZoneSysEnergyDemand.allocate( 1 ); + DataZoneEnergyDemands::CurDeadBandOrSetback.allocate( 1 ); + + // Setup for Zone 1 VAV No Reheat + int ZoneNum = 1; + int SysNum = 1; + int ZoneNodeNum = 1; + int SecNodeNum = PoweredInductionUnits::PIU( SysNum ).SecAirInNode; + int PriNodeNum = PoweredInductionUnits::PIU( SysNum ).PriAirInNode; + bool FirstHVACIteration = true; + Real64 SecMaxMassFlow = 0.05 * DataEnvironment::StdRhoAir; // From inputs + + DataGlobals::BeginEnvrnFlag = true; // Must be true for initial pass thru InitPIU for this terminal unit + FirstHVACIteration = true; + PoweredInductionUnits::InitPIU( SysNum, FirstHVACIteration ); // Run thru init once with FirstHVACIteration set to true + Fans::InitFan( 1, FirstHVACIteration ); + DataGlobals::BeginEnvrnFlag = false; + FirstHVACIteration = false; + + // Note that the fan schedule is always off, so the PIU fan should only run if the night cycle turn on flag is true + + // First test - Heating load, TurnZoneFansOn is false, no primary flow - expecting no secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = 0.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = false; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( 0.0, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Second test - Heating load, TurnZoneFansOn is true, no primary flow - expecting secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = 0.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = false; + DataHVACGlobals::TurnZoneFansOnlyOn = true; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( SecMaxMassFlow, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Third test - Cooling load TurnZoneFansOn is true, no primary flow - expecting no secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = 0.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = -2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = false; + DataHVACGlobals::TurnZoneFansOnlyOn = true; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( 0.0, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Fourth test - Cooling load TurnFansOn is true, no primary flow - expecting no secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = 0.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = -2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = true; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( 0.0, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Fifth test - Heating load TurnFansOn is true, no primary flow - expecting secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = 0.0; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = true; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( SecMaxMassFlow, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Sixth test - Heating load TurnFansOn is true, yes primary flow, deadebandorsetback is true - expecting no secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataLoopNode::Node( PriNodeNum ).MassFlowRateMaxAvail = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = true; + DataHVACGlobals::TurnFansOn = true; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( 0.0, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Seventh test - Heating load TurnFansOn is true, yes primary flow - expecting secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataLoopNode::Node( PriNodeNum ).MassFlowRateMaxAvail = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = 2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = true; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( SecMaxMassFlow, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Eighth test - Cooling load TurnFansOn is true, yes primary flow - expecting no secondary flow + DataLoopNode::Node( PriNodeNum ).MassFlowRate = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataLoopNode::Node( PriNodeNum ).MassFlowRateMaxAvail = PoweredInductionUnits::PIU( SysNum ).MaxPriAirMassFlow; + DataZoneEnergyDemands::ZoneSysEnergyDemand(1).RemainingOutputRequired = -2000.0; // Heating load - expect min flow rate + DataZoneEnergyDemands::CurDeadBandOrSetback(1) = false; + DataHVACGlobals::TurnFansOn = true; + DataHVACGlobals::TurnZoneFansOnlyOn = false; + PoweredInductionUnits::CalcParallelPIU( SysNum, ZoneNum, ZoneNodeNum, FirstHVACIteration ); + EXPECT_EQ( 0.0, DataLoopNode::Node( SecNodeNum ).MassFlowRate ); + + // Cleanup + DataHeatBalFanSys::TempControlType.deallocate(); + DataZoneEnergyDemands::ZoneSysEnergyDemand.deallocate(); + DataZoneEnergyDemands::CurDeadBandOrSetback.deallocate(); + +} + diff --git a/tst/EnergyPlus/unit/SQLite.unit.cc b/tst/EnergyPlus/unit/SQLite.unit.cc index a85d0927de1..d035a0b4119 100644 --- a/tst/EnergyPlus/unit/SQLite.unit.cc +++ b/tst/EnergyPlus/unit/SQLite.unit.cc @@ -183,6 +183,39 @@ namespace EnergyPlus { EXPECT_EQ(3ul, result.size()); } + + TEST_F( SQLiteFixture, SQLiteProcedures_sqliteWithinTransaction ) { + EXPECT_FALSE( sqlite_test->sqliteWithinTransaction() ); + sqlite_test->sqliteBegin(); + EXPECT_TRUE( sqlite_test->sqliteWithinTransaction() ); + sqlite_test->sqliteCommit(); + EXPECT_FALSE( sqlite_test->sqliteWithinTransaction() ); + } + + TEST_F( SQLiteFixture, SQLiteProcedures_informationalErrorRecords ) { + sqlite_test->sqliteBegin(); + // There needs to be a simulation record otherwise the foreign key constraint will fail + sqlite_test->createSQLiteSimulationsRecord( 1, "EnergyPlus Version", "Current Time" ); + + EnergyPlus::sqlite = std::move( sqlite_test ); + ShowMessage( "This is an informational message" ); + sqlite_test = std::move( EnergyPlus::sqlite ); + + auto result = queryResult("SELECT * FROM Errors;", "Errors"); + sqlite_test->sqliteCommit(); + + ASSERT_EQ(1ul, result.size()); + std::vector testResult0 {"1", "1", "-1", "This is an informational message", "0"}; + EXPECT_EQ(testResult0, result[0]); + + std::string const errMsg = delimited_string ({ + " ************* This is an informational message" + }); + + compare_err_stream(errMsg); + + } + TEST_F( SQLiteFixture, SQLiteProcedures_createSQLiteReportDictionaryRecord ) { sqlite_test->sqliteBegin(); diff --git a/tst/EnergyPlus/unit/SetPointManager.unit.cc b/tst/EnergyPlus/unit/SetPointManager.unit.cc index e20b63395c8..1c8f6e23bd2 100644 --- a/tst/EnergyPlus/unit/SetPointManager.unit.cc +++ b/tst/EnergyPlus/unit/SetPointManager.unit.cc @@ -72,6 +72,18 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace EnergyPlus; @@ -787,3 +799,360 @@ TEST_F( EnergyPlusFixture, MixedAirSetPointManager_SameRefAndSPNodeName ) EXPECT_TRUE( compare_err_stream( error_string, true ) ); } + +TEST_F( EnergyPlusFixture, ColdestSetPointMgrInSingleDuct ) { + std::string const idf_objects = delimited_string( { + + "Version,8.6;", + + " 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}", + + " NodeList,", + " OutsideAirInletNodes, !- Name", + " Outside Air Inlet Node 1;!- Node 1 Name", + + " NodeList,", + " SPACE1-1 In Nodes, !- Name", + " SPACE1-1 In Node; !- Node 1 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", + " , !- Zone Air Exhaust Node or NodeList Name", + " SPACE1-1 Node, !- Zone Air Node Name", + " SPACE1-1 Out Node; !- Zone Return Air Node Name", + + " ZoneControl:Thermostat,", + " SPACE1-1 Control, !- Name", + " SPACE1-1, !- Zone or ZoneList Name", + " Zone Control Type Sched, !- Control Type Schedule Name", + " ThermostatSetpoint:SingleCooling, !- Control 1 Object Type", + " CoolingSetPoint, !- Control 1 Name", + " ThermostatSetpoint:SingleHeating, !- Control 2 Object Type", + " HeatingSetpoint, !- Control 2 Name", + " ThermostatSetpoint:DualSetpoint, !- Control 3 Object Type", + " DualSetPoint; !- Control 3 Name", + + " ThermostatSetpoint:SingleHeating,", + " HeatingSetpoint, !- Name", + " Htg-SetP-Sch; !- Setpoint Temperature Schedule Name", + + " ThermostatSetpoint:SingleCooling,", + " CoolingSetpoint, !- Name", + " Clg-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", + + " ZoneHVAC:EquipmentList,", + " SPACE1-1 Eq, !- Name", + " ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type", + " SPACE1-1 ATU, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No-Load Sequence", + + " ZoneHVAC:AirDistributionUnit,", + " SPACE1-1 ATU, !- Name", + " SPACE1-1 In Node, !- Air Distribution Unit Outlet Node Name", + " AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type", + " SPACE1-1 VAV Reheat, !- Air Terminal Name", + " 0.05, !- Nominal Upstream Leakage Fraction", + " 0.07; !- Constant Downstream Leakage Fraction", + + " AirTerminal:SingleDuct:VAV:Reheat,", + " SPACE1-1 VAV Reheat, !- Name", + " CoilAvailSched, !- Availability Schedule Name", + " SPACE1-1 Zone Coil Air In Node, !- Damper Air Outlet Node Name", + " SPACE1-1 ATU In Node, !- Air Inlet Node Name", + " autosize, !- Maximum Air Flow Rate {m3/s}", + " , !- Zone Minimum Air Flow Input Method", + " , !- Constant Minimum Air Flow Fraction", + " , !- Fixed Minimum Air Flow Rate {m3/s}", + " , !- Minimum Air Flow Fraction Schedule Name", + " Coil:Heating:Electric, !- Reheat Coil Object Type", + " SPACE1-1 Zone Coil, !- Reheat Coil Name", + " autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s}", + " 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s}", + " SPACE1-1 In Node, !- Air Outlet Node Name", + " 0.001, !- Convergence Tolerance", + " , !- Damper Heating Action", + " , !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2}", + " ; !- Maximum Flow Fraction During Reheat", + + " Coil:Heating:Electric,", + " SPACE1-1 Zone Coil, !- Name", + " CoilAvailSched, !- Availability Schedule Name", + " 1.0, !- Efficiency", + " autosize, !- Nominal Capacity {W}", + " SPACE1-1 Zone Coil Air In Node, !- Air Inlet Node Name", + " SPACE1-1 In Node; !- Air Outlet Node Name", + + " AirLoopHVAC:ReturnPath,", + " ReturnAirPath1, !- Name", + " PLENUM-1 Out Node, !- Return Air Path Outlet Node Name", + " AirLoopHVAC:ZoneMixer, !- Component 1 Object Type", + " Zone Return Air Mixer; !- Component 1 Name", + + " AirLoopHVAC:ZoneMixer,", + " Zone Return Air Mixer, !- Name", + " PLENUM-1 Out Node, !- Outlet Node Name", + " SPACE1-1 Out Node; !- Inlet 1 Node Name", + + " AirLoopHVAC:SupplyPath,", + " Zone Supply Air Path 1, !- Name", + " Zone Eq In Node, !- Supply Air Path Inlet Node Name", + " AirLoopHVAC:ZoneSplitter,!- Component 1 Object Type", + " Zone Supply Air Splitter 1; !- Component 1 Name", + + " AirLoopHVAC:ZoneSplitter,", + " Zone Supply Air Splitter 1, !- Name", + " Zone Eq In Node, !- Inlet Node Name", + " SPACE1-1 ATU In Node; !- Outlet 1 Node Name", + + " AirLoopHVAC,", + " VAV Sys 1, !- Name", + " VAV Sys 1 Controllers, !- Controller List Name", + " , !- Availability Manager List Name", + " autosize, !- Design Supply Air Flow Rate {m3/s}", + " VAV Sys 1 Branches, !- Branch List Name", + " , !- Connector List Name", + " VAV Sys 1 Inlet Node, !- Supply Side Inlet Node Name", + " PLENUM-1 Out Node, !- Demand Side Outlet Node Name", + " Zone Eq In Node, !- Demand Side Inlet Node Names", + " VAV Sys 1 Outlet Node; !- Supply Side Outlet Node Names", + + " AirLoopHVAC:ControllerList,", + " VAV Sys 1 Controllers, !- Name", + " Controller:WaterCoil, !- Controller 1 Object Type", + " Central Cooling Coil Contoller 1; !- Controller 1 Name", + + " BranchList,", + " VAV Sys 1 Branches, !- Name", + " VAV Sys 1 Main Branch; !- Branch 1 Name", + + " Branch,", + " VAV Sys 1 Main Branch, !- Name", + " , !- Pressure Drop Curve Name", + " AirLoopHVAC:OutdoorAirSystem, !- Component 1 Object Type", + " OA Sys 1, !- Component 1 Name", + " VAV Sys 1 Inlet Node, !- Component 1 Inlet Node Name", + " Mixed Air Node 1, !- Component 1 Outlet Node Name", + " Coil:Cooling:Water, !- Component 2 Object Type", + " Main Cooling Coil 1, !- Component 2 Name", + " Mixed Air Node 1, !- Component 2 Inlet Node Name", + " CCoil Outlet Node, !- Component 2 Outlet Node Name", + " Coil:Heating:Electric, !- Component 3 Object Type", + " Main Heating Coil 1, !- Component 3 Name", + " CCoil Outlet Node, !- Component 3 Inlet Node Name", + " HCoil Outlet Node, !- Component 3 Outlet Node Name", + " Fan:VariableVolume, !- Component 4 Object Type", + " Supply Fan 1, !- Component 4 Name", + " HCoil Outlet Node, !- Component 4 Inlet Node Name", + " VAV Sys 1 Outlet Node; !- Component 4 Outlet Node Name", + + " AirLoopHVAC:OutdoorAirSystem,", + " OA Sys 1, !- Name", + " OA Sys 1 Controllers, !- Controller List Name", + " OA Sys 1 Equipment; !- Outdoor Air Equipment List Name", + + " AirLoopHVAC:ControllerList,", + " OA Sys 1 Controllers, !- Name", + " Controller:OutdoorAir, !- Controller 1 Object Type", + " OA Controller 1; !- Controller 1 Name", + + " AirLoopHVAC:OutdoorAirSystem:EquipmentList,", + " OA Sys 1 Equipment, !- Name", + " OutdoorAir:Mixer, !- Component 1 Object Type", + " OA Mixing Box 1; !- Component 1 Name", + + " OutdoorAir:Mixer,", + " OA Mixing Box 1, !- Name", + " Mixed Air Node 1, !- Mixed Air Node Name", + " Outside Air Inlet Node 1,!- Outdoor Air Stream Node Name", + " Relief Air Outlet Node 1,!- Relief Air Stream Node Name", + " VAV Sys 1 Inlet Node; !- Return Air Stream Node Name", + + " Coil:Cooling:Water,", + " Main Cooling Coil 1, !- Name", + " CoilAvailSched, !- Availability Schedule Name", + " autosize, !- Design Water Flow Rate {m3/s}", + " autosize, !- Design Air Flow Rate {m3/s}", + " autosize, !- Design Inlet Water Temperature {C}", + " autosize, !- Design Inlet Air Temperature {C}", + " autosize, !- Design Outlet Air Temperature {C}", + " autosize, !- Design Inlet Air Humidity Ratio {kgWater/kgDryAir}", + " autosize, !- Design Outlet Air Humidity Ratio {kgWater/kgDryAir}", + " CCoil Water Inlet Node, !- Water Inlet Node Name", + " CCoil Water Outlet Node, !- Water Outlet Node Name", + " Mixed Air Node 1, !- Air Inlet Node Name", + " CCoil Outlet Node, !- Air Outlet Node Name", + " SimpleAnalysis, !- Type of Analysis", + " CrossFlow; !- Heat Exchanger Configuration", + + " Coil:Heating:Electric,", + " Main Heating Coil 1, !- Name", + " CoilAvailSched, !- Availability Schedule Name", + " 1.0, !- Efficiency", + " autosize, !- Nominal Capacity {W}", + " CCoil Outlet Node, !- Air Inlet Node Name", + " HCoil Outlet Node; !- Air Outlet Node Name", + + " Fan:VariableVolume,", + " Supply Fan 1, !- Name", + " CoilAvailSched, !- Availability Schedule Name", + " 0.7, !- Fan Total Efficiency", + " 600.0, !- Pressure Rise {Pa}", + " autosize, !- Maximum Flow Rate {m3/s}", + " Fraction, !- Fan Power Minimum Flow Rate Input Method", + " 0.25, !- Fan Power Minimum Flow Fraction", + " , !- Fan Power Minimum Air Flow Rate {m3/s}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Airstream Fraction", + " 0.35071223, !- Fan Power Coefficient 1", + " 0.30850535, !- Fan Power Coefficient 2", + " -0.54137364, !- Fan Power Coefficient 3", + " 0.87198823, !- Fan Power Coefficient 4", + " 0.000, !- Fan Power Coefficient 5", + " HCoil Outlet Node, !- Air Inlet Node Name", + " VAV Sys 1 Outlet Node; !- Air Outlet Node Name", + + " Controller:WaterCoil,", + " Central Cooling Coil Contoller 1, !- Name", + " Temperature, !- Control Variable", + " Reverse, !- Action", + " FLOW, !- Actuator Variable", + " CCoil Outlet Node, !- Sensor Node Name", + " CCoil Water Inlet Node, !- Actuator Node Name", + " 0.002, !- Controller Convergence Tolerance {deltaC}", + " autosize, !- Maximum Actuated Flow {m3/s}", + " 0.0; !- Minimum Actuated Flow {m3/s}", + + " Controller:OutdoorAir,", + " OA Controller 1, !- Name", + " Relief Air Outlet Node 1,!- Relief Air Outlet Node Name", + " VAV Sys 1 Inlet Node, !- Return Air Node Name", + " Mixed Air Node 1, !- Mixed Air Node Name", + " Outside Air Inlet Node 1,!- Actuator Node Name", + " autosize, !- Minimum Outdoor Air Flow Rate {m3/s}", + " autosize, !- Maximum Outdoor Air Flow Rate {m3/s}", + " FixedDryBulb, !- Economizer Control Type", + " ModulateFlow, !- Economizer Control Action Type", + " 19., !- Economizer Maximum Limit Dry-Bulb Temperature {C}", + " , !- Economizer Maximum Limit Enthalpy {J/kg}", + " , !- Economizer Maximum Limit Dewpoint Temperature {C}", + " , !- Electronic Enthalpy Limit Curve Name", + " 4., !- Economizer Minimum Limit Dry-Bulb Temperature {C}", + " NoLockout, !- Lockout Type", + " ProportionalMinimum; !- Minimum Limit Type", + + " SetpointManager:Warmest,", + " Supply Air Temp Manager 1,!- Name", + " Temperature, !- Control Variable", + " VAV Sys 1, !- HVAC Air Loop Name", + " 11.2, !- Minimum Setpoint Temperature {C}", + " 16., !- Maximum Setpoint Temperature {C}", + " MaximumTemperature, !- Strategy", + " VAV Sys 1 Outlet Node; !- Setpoint Node or NodeList Name", + + " SetpointManager:MixedAir,", + " Mixed Air Temperature Manager 1,!- Name", + " Temperature, !- Control Variable", + " VAV Sys 1 Outlet Node, !- Reference Setpoint Node Name", + " HCoil Outlet Node, !- Fan Inlet Node Name", + " VAV Sys 1 Outlet Node, !- Fan Outlet Node Name", + " Cooling SetPoint Node List; !- Setpoint Node or NodeList Name", + + " NodeList,", + " Cooling SetPoint Node List, !- Name", + " Mixed Air Node 1, !- Node 1 Name", + " CCoil Outlet Node; !- Node 2 Name", + + " SetpointManager:Coldest,", + " Supply Air Temperature Manager 2,!- Name", + " Temperature, !- Control Variable", + " VAV Sys 1, !- HVAC Air Loop Name", + " 20.0, !- Minimum Setpoint Temperature {C}", + " 40.0, !- Maximum Setpoint Temperature {C}", + " MinimumTemperature, !- Strategy", + " HCoil Outlet Node; !- Setpoint Node or NodeList Name", + + " Schedule:Compact,", + " CoilAvailSched, !- Name", + " Fraction, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: Alldays, !- Field 2", + " Until: 24:00, 1.0; !- Field 3", + + } ) ; + + ASSERT_FALSE( process_idf( idf_objects ) ); + bool ErrorsFound = false; + + DataGlobals::NumOfTimeStepInHour = 1; + DataGlobals::MinutesPerTimeStep = 60; + ScheduleManager::ProcessScheduleInput(); + + HeatBalanceManager::GetZoneData( ErrorsFound ); // read zone data + EXPECT_FALSE( ErrorsFound ); // zones are specified in the idf snippet + DataZoneEquipment::GetZoneEquipmentData(); + ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(); + SingleDuct::GetSysInput(); + + MixedAir::GetOutsideAirSysInputs(); + SplitterComponent::GetSplitterInput(); + BranchInputManager::GetMixerInput(); + BranchInputManager::ManageBranchInput( ); + + DataGlobals::SysSizingCalc = true; + SimAirServingZones::GetAirPathData(); + SimAirServingZones::InitAirLoops( true ); + // check the number of zones served by single duct or dual duct system + EXPECT_EQ( 1, DataAirLoop::AirToZoneNodeInfo( 1 ).NumZonesCooled ); // cooled and heated zone (served by single-duct) + EXPECT_EQ( 0, DataAirLoop::AirToZoneNodeInfo( 1 ).NumZonesHeated ); // no heated only zone (served by dual-duct) + + SetPointManager::GetSetPointManagerInputs(); + SetPointManager::WarmestSetPtMgr( 1 ).AirLoopNum = 1; + SetPointManager::ColdestSetPtMgr( 1 ).AirLoopNum = 1; + + SetPointManager::InitSetPointManagers(); + DataZoneEnergyDemands::ZoneSysEnergyDemand.allocate( 1 ); + DataZoneEnergyDemands::ZoneSysEnergyDemand( 1 ).TotalOutputRequired = 10000.0; + + EXPECT_EQ( DataLoopNode::NodeID( 2 ), "SPACE1-1 IN NODE" ); + EXPECT_EQ( DataLoopNode::NodeID( 5 ), "SPACE1-1 NODE" ); + + DataLoopNode::Node( 2 ).MassFlowRateMax = 1.0; // zone inlet node air flow rate, kg/s + DataLoopNode::Node( 2 ).HumRat = 0.075; // zone inlet node air hum ratio, kg/kg + DataLoopNode::Node( 2 ).Temp = 40.0; // zone inlet node air temperature, deg C + DataLoopNode::Node( 5 ).Temp = 21.0; // zone air node temperature set to 21.0 deg C + + SetPointManager::SimSetPointManagers(); + SetPointManager::UpdateSetPointManagers(); + + EXPECT_EQ( DataLoopNode::NodeID( 13 ), "VAV SYS 1 OUTLET NODE" ); + EXPECT_DOUBLE_EQ( 16.0, SetPointManager::WarmestSetPtMgr( 1 ).SetPt ); // no cooling load, sets to maximum limit value + + Real64 CpAir( 0.0 ); + Real64 ZoneSetPointTemp( 0.0 ); + + CpAir = Psychrometrics::PsyCpAirFnWTdb( DataLoopNode::Node( 2 ).HumRat, DataLoopNode::Node( 2 ).Temp ); + ZoneSetPointTemp = DataLoopNode::Node( 5 ).Temp + DataZoneEnergyDemands::ZoneSysEnergyDemand( 1 ).TotalOutputRequired / ( CpAir * DataLoopNode::Node( 2 ).MassFlowRateMax ); + // check the value of ZoneSetPointTemp matches to the value calculated by ColdestSetPtMgr + EXPECT_EQ( DataLoopNode::NodeID( 12 ), "HCOIL OUTLET NODE" ); + EXPECT_DOUBLE_EQ( ZoneSetPointTemp, SetPointManager::ColdestSetPtMgr( 1 ).SetPt ); // 29.74 deg C + EXPECT_DOUBLE_EQ( ZoneSetPointTemp, DataLoopNode::Node( 12 ).TempSetPoint ); // 29.74 deg C + +} + diff --git a/tst/EnergyPlus/unit/SingleDuct.unit.cc b/tst/EnergyPlus/unit/SingleDuct.unit.cc index b051e13e26b..af1531cb5db 100644 --- a/tst/EnergyPlus/unit/SingleDuct.unit.cc +++ b/tst/EnergyPlus/unit/SingleDuct.unit.cc @@ -562,7 +562,7 @@ TEST_F( EnergyPlusFixture, SingleDuct_ZeroFloorAreaTest ) " flow/zone, !- Outdoor Air Method", " 0.0, !- Outdoor Air Flow per Person{ m3 / s - person }", " 0.05, !- Outdoor Air Flow per Zone Floor Area{ m3 / s - m2 }", - " 0.0; !- Outdoor Air Flow per Zone{ m3 / s }", + " 0.05; !- Outdoor Air Flow per Zone{ m3 / s }", " Sizing:System,", " VAV Sys 1, !- AirLoop Name", @@ -1336,3 +1336,1141 @@ TEST_F( EnergyPlusFixture, TestOAMassFlowRateUsingStdRhoAir ) { DataHeatBalance::ZoneIntGain.deallocate( ); } + +TEST_F( EnergyPlusFixture, SingleDuct_VAVWaterCoilSizing ) +{ + // AUTHOR: R. Raustad, FSEC + // DATE WRITTEN: Mar 2017 + + std::string const idf_objects = delimited_string( { + + " Output:Diagnostics, DisplayExtraWarnings;", + " Timestep, 4;", + + "BUILDING, SingleDuct_VAVWaterCoilSizing, 0.0, Suburbs, .04, .4, FullExterior, 25, 6;", + + "SimulationControl, YES, YES, YES, YES, NO;", + + " Site:Location,", + " Miami Intl Ap FL USA TMY3 WMO=722020E, !- Name", + " 25.82, !- Latitude {deg}", + " -80.30, !- Longitude {deg}", + " -5.00, !- Time Zone {hr}", + " 11; !- Elevation {m}", + + "SizingPeriod:DesignDay,", + " Miami Intl Ap Ann Clg 1% Condns DB/MCWB, !- Name", + " 7, !- Month", + " 21, !- Day of Month", + " SummerDesignDay, !- Day Type", + " 31.7, !- Maximum Dry - Bulb Temperature{ C }", + " 10.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", + " 22.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 }", + " 1.00; !- Sky Clearness", + + "SizingPeriod:DesignDay,", + " Miami Intl Ap Ann Htg 99.6% Condns DB, !- Name", + " 1, !- Month", + " 21, !- Day of Month", + " WinterDesignDay, !- Day Type", + " 35.0, !- Maximum Dry - Bulb Temperature{ C }", // make sure zone heating load does not exist during sizing + " 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", + " 18.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 }", + " 2.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 }", + " 1.00; !- Sky Clearness", + + "Zone,", + " Space, !- Name", + " 0.0000, !- Direction of Relative North {deg}", + " 0.0000, !- X Origin {m}", + " 0.0000, !- Y Origin {m}", + " 0.0000, !- Z Origin {m}", + " 1, !- Type", + " 1, !- Multiplier", + " 2.4, !- Ceiling Height {m}", + " , !- Volume {m3}", + " autocalculate, !- Floor Area {m2}", + " , !- Zone Inside Convection Algorithm", + " , !- Zone Outside Convection Algorithm", + " Yes; !- Part of Total Floor Area", + + "Zone,", + " Space2, !- Name", + " 0.0000, !- Direction of Relative North {deg}", + " 0.0000, !- X Origin {m}", + " 0.0000, !- Y Origin {m}", + " 0.0000, !- Z Origin {m}", + " 1, !- Type", + " 1, !- Multiplier", + " 2.4, !- Ceiling Height {m}", + " , !- Volume {m3}", + " autocalculate, !- Floor Area {m2}", + " , !- Zone Inside Convection Algorithm", + " , !- Zone Outside Convection Algorithm", + " Yes; !- Part of Total Floor Area", + + "Sizing:Zone,", + " Space, !- Zone or ZoneList Name", + " SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method", + " 12., !- 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.008, !- Zone Cooling Design Supply Air Humidity Ratio{ kgWater / kgDryAir }", + " 0.008, !- Zone Heating Design Supply Air Humidity Ratio{ kgWater / kgDryAir }", + " SZ DSOA, !- 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", + + "Sizing:Zone,", + " Space2, !- Zone or ZoneList Name", + " SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method", + " 12., !- 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.008, !- Zone Cooling Design Supply Air Humidity Ratio{ kgWater / kgDryAir }", + " 0.008, !- Zone Heating Design Supply Air Humidity Ratio{ kgWater / kgDryAir }", + " SZ DSOA, !- 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, !- Name", + " flow/zone, !- Outdoor Air Method", + " 0.0, !- Outdoor Air Flow per Person{ m3 / s - person }", + " 0.05, !- Outdoor Air Flow per Zone Floor Area{ m3 / s - m2 }", + " 0.05; !- Outdoor Air Flow per Zone{ m3 / s }", + + " Sizing:System,", + " VAV Sys 1, !- AirLoop Name", + " sensible, !- Type of Load to Size On", + " autosize, !- Design Outdoor Air Flow Rate {m3/s}", + " 0.3, !- Central Heating Maximum System Air Flow Ratio", + " 4.5, !- Preheat Design Temperature {C}", + " 0.008, !- Preheat Design Humidity Ratio {kgWater/kgDryAir}", + " 11.0, !- Precool Design Temperature {C}", + " 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}", + " 12.8, !- Central Cooling Design Supply Air Temperature {C}", + " 16.0, !- Central Heating Design Supply Air Temperature {C}", + " noncoincident, !- Type of Zone Sum to Use", + " no, !- 100% Outdoor Air in Cooling", + " no, !- 100% Outdoor Air in Heating", + " 0.008, !- Central Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " 0.008, !- Central Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}", + " DesignDay, !- Cooling Design Air Flow Method", + " 0, !- Cooling Design Air Flow Rate {m3/s}", + " , !- Supply Air Flow Rate Per Floor Area During Cooling Operation {m3/s-m2}", + " , !- Fraction of Autosized Design Cooling Supply Air Flow Rate", + " , !- Design Supply Air Flow Rate Per Unit Cooling Capacity {m3/s-W}", + " DesignDay, !- Heating Design Air Flow Method", + " 0, !- Heating Design Air Flow Rate {m3/s}", + " , !- Supply Air Flow Rate Per Floor Area During Heating Operation {m3/s-m2}", + " , !- Fraction of Autosized Design Heating Supply Air Flow Rate", + " , !- Fraction of Autosized Design Cooling Supply Air Flow Rate", + " , !- Design Supply Air Flow Rate Per Unit Heating Capacity {m3/s-W}", + " , !- 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", + + " ZoneHVAC:EquipmentConnections,", + " Space, !- Zone Name", + " Space Eq, !- Zone Conditioning Equipment List Name", + " Space In Node, !- Zone Air Inlet Node or NodeList Name", + " Space Out Node, !- Zone Air Exhaust Node or NodeList Name", + " Space Node, !- Zone Air Node Name", + " Space Ret Node; !- Zone Return Air Node Name", + + " ZoneHVAC:EquipmentConnections,", + " Space2, !- Zone Name", + " Space2 Eq, !- Zone Conditioning Equipment List Name", + " Space2 In Node, !- Zone Air Inlet Node or NodeList Name", + " Space2 Out Node, !- Zone Air Exhaust Node or NodeList Name", + " Space2 Node, !- Zone Air Node Name", + " Space2 Ret Node; !- Zone Return Air Node Name", + + " ZoneHVAC:EquipmentList,", + " Space Eq, !- Name", + " ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type", + " SPACE1-1 ATU, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No - Load Sequence", + + " ZoneHVAC:AirDistributionUnit,", + " SPACE1-1 ATU, !- Name", + " Space In Node, !- Air Distribution Unit Outlet Node Name", + " AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type", + " SPACE1-1 VAV Reheat; !- Air Terminal Name", + + " ZoneHVAC:EquipmentList,", + " Space2 Eq, !- Name", + " ZoneHVAC:AirDistributionUnit, !- Zone Equipment 1 Object Type", + " SPACE2-1 ATU, !- Zone Equipment 1 Name", + " 1, !- Zone Equipment 1 Cooling Sequence", + " 1; !- Zone Equipment 1 Heating or No - Load Sequence", + + " ZoneHVAC:AirDistributionUnit,", + " SPACE2-1 ATU, !- Name", + " Space2 In Node, !- Air Distribution Unit Outlet Node Name", + " AirTerminal:SingleDuct:VAV:Reheat, !- Air Terminal Object Type", + " SPACE2-1 VAV Reheat; !- Air Terminal Name", + + " AirTerminal:SingleDuct:VAV:Reheat,", + " SPACE1-1 VAV Reheat, !- Name", + " AvailSched, !- Availability Schedule Name", + " SPACE1-1 Zone Coil Air In Node, !- Damper Air Outlet Node Name", + " SPACE1-1 ATU In Node, !- Air Inlet Node Name", + " autosize, !- Maximum Air Flow Rate {m3/s}", + " Constant, !- Zone Minimum Air Flow Input Method", + " 0.3, !- Constant Minimum Air Flow Fraction", + " , !- Fixed Minimum Air Flow Rate {m3/s}", + " , !- Minimum Air Flow Fraction Schedule Name", + " Coil:Heating:Water, !- Reheat Coil Object Type", + " SPACE1-1 Zone Coil, !- Reheat Coil Name", + " autosize, !- Maximum Hot Water or Steam Flow Rate {m3/s}", + " 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s}", + " SPACE In Node, !- Air Outlet Node Name", + " 0.001, !- Convergence Tolerance", + " ReverseWithLimits, !- Damper Heating Action", + " AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2}", + " AUTOCALCULATE; !- Maximum Flow Fraction During Reheat", + + " AirTerminal:SingleDuct:VAV:Reheat,", + " SPACE2-1 VAV Reheat, !- Name", + " AvailSched, !- Availability Schedule Name", + " SPACE2-1 Zone Coil Air In Node, !- Damper Air Outlet Node Name", + " SPACE2-1 ATU In Node, !- Air Inlet Node Name", + " autosize, !- Maximum Air Flow Rate {m3/s}", + " Constant, !- Zone Minimum Air Flow Input Method", + " 0.3, !- Constant Minimum Air Flow Fraction", + " , !- Fixed Minimum Air Flow Rate {m3/s}", + " , !- Minimum Air Flow Fraction Schedule Name", + " Coil:Heating:Fuel, !- Reheat Coil Object Type", + " SPACE2-1 Zone Coil, !- Reheat Coil Name", + " 0.0, !- Maximum Hot Water or Steam Flow Rate {m3/s}", + " 0.0, !- Minimum Hot Water or Steam Flow Rate {m3/s}", + " SPACE2 In Node, !- Air Outlet Node Name", + " 0.001, !- Convergence Tolerance", + " ReverseWithLimits, !- Damper Heating Action", + " AUTOCALCULATE, !- Maximum Flow per Zone Floor Area During Reheat {m3/s-m2}", + " AUTOCALCULATE; !- Maximum Flow Fraction During Reheat", + + " BranchList,", + " VAV Sys 1 Branches, !- Name", + " VAV Sys 1 Main Branch; !- Branch 1 Name", + + " Branch,", + " VAV Sys 1 Main Branch, !- Name", + " , !- Pressure Drop Curve Name", + " AirLoopHVAC:OutdoorAirSystem, !- Component 1 Object Type", + " OA Sys 1, !- Component 1 Name", + " VAV Sys 1 Inlet Node, !- Component 1 Inlet Node Name", + " Mixed Air Node 1, !- Component 1 Outlet Node Name", + " CoilSystem:Cooling:DX, !- Component 2 Object Type", + " DX Cooling Coil System 1,!- Component 2 Name", + " Mixed Air Node 1, !- Component 2 Inlet Node Name", + " Main Cooling Coil 1 Outlet Node, !- Component 2 Outlet Node Name", + " Coil:Heating:Fuel, !- Component 3 Object Type", + " Main Heating Coil 1, !- Component 3 Name", + " Main Cooling Coil 1 Outlet Node, !- Component 3 Inlet Node Name", + " Main Heating Coil 1 Outlet Node, !- Component 3 Outlet Node Name", + " Fan:VariableVolume, !- Component 4 Object Type", + " Supply Fan 1, !- Component 4 Name", + " Main Heating Coil 1 Outlet Node, !- Component 4 Inlet Node Name", + " VAV Sys 1 Outlet Node; !- Component 4 Outlet Node Name", + + " AirLoopHVAC,", + " VAV Sys 1, !- Name", + " , !- Controller List Name", + " VAV Sys 1 Avail List, !- Availability Manager List Name", + " autosize, !- Design Supply Air Flow Rate {m3/s}", + " VAV Sys 1 Branches, !- Branch List Name", + " , !- Connector List Name", + " VAV Sys 1 Inlet Node, !- Supply Side Inlet Node Name", + " Demand Out Node, !- Demand Side Outlet Node Name", + " Zone Eq In Node, !- Demand Side Inlet Node Names", + " VAV Sys 1 Outlet Node; !- Supply Side Outlet Node Names", + + " AirLoopHVAC:SupplyPath,", + " Zone Supply Air Path 1, !- Name", + " Zone Eq In Node, !- Supply Air Path Inlet Node Name", + " AirLoopHVAC:ZoneSplitter,!- Component 1 Object Type", + " Zone Supply Air Splitter; !- Component 1 Name", + + " AirLoopHVAC:ZoneSplitter,", + " Zone Supply Air Splitter, !- Name", + " Zone Eq In Node, !- Inlet Node Name", + " SPACE1-1 ATU In Node, !- Outlet 1 Node Name", + " SPACE2-1 ATU In Node; !- Outlet 2 Node Name", + + " AirLoopHVAC:ReturnPath,", + " ReturnAirPath1, !- Name", + " Demand Out Node, !- Return Air Path Outlet Node Name", + " AirLoopHVAC:ZoneMixer, !- Component 1 Object Type", + " Zone Return Air Mixer; !- Component 1 Name", + + " AirLoopHVAC:ZoneMixer,", + " Zone Return Air Mixer, !- Name", + " Demand Out Node, !- Outlet Node Name", + " Space Ret Node, !- Inlet 1 Node Name", + " Space2 Ret Node; !- Inlet 2 Node Name", + + " AirLoopHVAC:ControllerList,", + " OA Sys 1 Controllers, !- Name", + " Controller:OutdoorAir, !- Controller 1 Object Type", + " OA Controller 1; !- Controller 1 Name", + + " AirLoopHVAC:OutdoorAirSystem:EquipmentList,", + " OA Sys 1 Equipment, !- Name", + " OutdoorAir:Mixer, !- Component 3 Object Type", + " OA Mixing Box 1; !- Component 3 Name", + + " AirLoopHVAC:OutdoorAirSystem,", + " OA Sys 1, !- Name", + " OA Sys 1 Controllers, !- Controller List Name", + " OA Sys 1 Equipment, !- Outdoor Air Equipment List Name", + " VAV Sys 1 Avail List; !- Availability Manager List Name", + + " OutdoorAir:Node,", + " Main Cooling Coil 1 Condenser Node, !- Name", + " -1.0; !- Height Above Ground {m}", + + " OutdoorAir:NodeList,", + " OA Sys Inlet Node; !- Node or NodeList Name 1", + + " OutdoorAir:Mixer,", + " OA Mixing Box 1, !- Name", + " Mixed Air Node 1, !- Mixed Air Node Name", + " OA Sys Inlet Node, !- Outdoor Air Stream Node Name", + " Relief Air Outlet Node, !- Relief Air Stream Node Name", + " VAV Sys 1 Inlet Node; !- Return Air Stream Node Name", + + " AvailabilityManagerAssignmentList,", + " VAV Sys 1 Avail List, !- Name", + " AvailabilityManager:Scheduled, !- Availability Manager 1 Object Type", + " VAV Sys 1 Avail; !- Availability Manager 1 Name", + + " AvailabilityManager:Scheduled,", + " VAV Sys 1 Avail, !- Name", + " AvailSched; !- Schedule Name", + + " SetpointManager:Scheduled,", + " Supply Air Temp Manager 1, !- Name", + " Temperature, !- Control Variable", + " HTGSETP_SCH, !- Schedule Name", + " VAV Sys 1 Outlet Node; !- Setpoint Node or NodeList Name", + + " SetpointManager:MixedAir,", + " Mixed Air and Coil Exit Temp Manager 1, !- Name", + " Temperature, !- Control Variable", + " VAV Sys 1 Outlet Node, !- Reference Setpoint Node Name", + " Main Heating Coil 1 Outlet Node, !- Fan Inlet Node Name", + " VAV Sys 1 Outlet Node, !- Fan Outlet Node Name", + " Mixed Air Node List; !- Setpoint Node or NodeList Name", + + " NodeList,", + " Mixed Air Node List,", + " Main Heating Coil 1 Outlet Node,", + " Main Cooling Coil 1 Outlet Node,", + " Mixed Air Node 1;", + + " Controller:OutdoorAir,", + " OA Controller 1, !- Name", + " Relief Air Outlet Node, !- Relief Air Outlet Node Name", + " VAV Sys 1 Inlet Node, !- Return Air Node Name", + " Mixed Air Node 1, !- Mixed Air Node Name", + " OA Sys Inlet Node, !- Actuator Node Name", + " autosize, !- Minimum Outdoor Air Flow Rate {m3/s}", + " autosize, !- Maximum Outdoor Air Flow Rate {m3/s}", + " FixedDryBulb, !- Economizer Control Type", + " ModulateFlow, !- Economizer Control Action Type", + " 19., !- Economizer Maximum Limit Dry-Bulb Temperature {C}", + " , !- Economizer Maximum Limit Enthalpy {J/kg}", + " , !- Economizer Maximum Limit Dewpoint Temperature {C}", + " , !- Electronic Enthalpy Limit Curve Name", + " 4., !- Economizer Minimum Limit Dry-Bulb Temperature {C}", + " NoLockout, !- Lockout Type", + " FixedMinimum, !- Minimum Limit Type", + " AvailSched; !- Minimum Outdoor Air Schedule Name", + + " Coil:Heating:Water,", + " SPACE1-1 Zone Coil, !- Name", + " AvailSched, !- Availability Schedule Name", + " autosize, !- U-Factor Times Area Value", + " autosize, !- Maximum Water Flow Rate", + " Zone Coil Water In Node, !- Water Inlet Node Name", + " Zone Coil Water Out Node, !- Water Outlet Node Name", + " SPACE1-1 Zone Coil Air In Node, !- Air Inlet Node Name", + " Space In Node, !- Air Outlet Node Name", + " UFactorTimesAreaAndDesignWaterFlowRate, !- Performance Input Method", + " autosize, !- Rated Capacity {W}", + " 82.2, !- Rated Inlet Water Temperature{ C }", + " 16.6, !- Rated Inlet Air Temperature{ C }", + " 71.1, !- Rated Outlet Water Temperature{ C }", + " 32.2, !- Rated Outlet Air Temperature{ C }", + " 0.5, !- Rated Ratio for Air and Water Convection", + " ; !- Design Water Temperature Difference", + + " Sizing:Plant,", + " HeatSys1, !- Plant or Condenser Loop Name", + " Heating, !- Loop Type", + " 82.2000, !- Design Loop Exit Temperature{ C }", + " 11.1000; !- Loop Design Temperature Difference{ deltaC }", + + " PlantLoop,", + " HeatSys1, !- Name", + " Water, !- Fluid Type", + " , !- User Defined Fluid Type", + " HeatSys1 Loop Operation Scheme List, !- Plant Equipment Operation Scheme Name", + " HeatSys1 Supply Outlet Node, !- Loop Temperature Setpoint Node Name", + " 100.0, !- Maximum Loop Temperature{ C }", + " 10.0, !- Minimum Loop Temperature{ C }", + " AUTOSIZE, !- Maximum Loop Flow Rate{ m3 / s }", + " 0.0, !- Minimum Loop Flow Rate{ m3 / s }", + " AUTOSIZE, !- Plant Loop Volume{ m3 }", + " HeatSys1 Supply Inlet Node, !- Plant Side Inlet Node Name", + " HeatSys1 Supply Outlet Node, !- Plant Side Outlet Node Name", + " HeatSys1 Supply Branches, !- Plant Side Branch List Name", + " HeatSys1 Supply Connectors, !- Plant Side Connector List Name", + " HeatSys1 Demand Inlet Node, !- Demand Side Inlet Node Name", + " HeatSys1 Demand Outlet Node, !- Demand Side Outlet Node Name", + " HeatSys1 Demand Branches, !- Demand Side Branch List Name", + " HeatSys1 Demand Connectors, !- Demand Side Connector List Name", + " Optimal; !- Load Distribution Scheme", + + " PlantEquipmentOperationSchemes,", + " HeatSys1 Loop Operation Scheme List, !- Name", + " PlantEquipmentOperation:HeatingLoad, !- Control Scheme 1 Object Type", + " HeatSys1 Operation Scheme, !- Control Scheme 1 Name", + " AvailSched; !- Control Scheme 1 Schedule Name", + + " PlantEquipmentOperation:HeatingLoad,", + " HeatSys1 Operation Scheme, !- Name", + " 0.0, !- Load Range 1 Lower Limit{ W }", + " 1000000000000000, !- Load Range 1 Upper Limit{ W }", + " HeatSys1 Equipment List; !- Range 1 Equipment List Name", + + " PlantEquipmentList,", + " HeatSys1 Equipment List, !- Name", + " Boiler:HotWater, !- Equipment 1 Object Type", + " HeatSys1 Boiler; !- Equipment 1 Name", + + " BranchList,", + " HeatSys1 Supply Branches, !- Name", + " HeatSys1 Supply Inlet Branch, !- Branch 1 Name", + " HeatSys1 Supply Equipment Branch, !- Branch 2 Name", + " HeatSys1 Supply Equipment Bypass Branch, !- Branch 3 Name", + " HeatSys1 Supply Outlet Branch; !- Branch 4 Name", + + " Branch,", + " HeatSys1 Supply Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pump:VariableSpeed, !- Component 1 Object Type", + " HeatSys1 Pump, !- Component 1 Name", + " HeatSys1 Supply Inlet Node, !- Component 1 Inlet Node Name", + " HeatSys1 Pump - HeatSys1 BoilerNodeviaConnector; !- Component 1 Outlet Node Name", + + " Branch,", + " HeatSys1 Supply Equipment Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Boiler:HotWater, !- Component 1 Object Type", + " HeatSys1 Boiler, !- Component 1 Name", + " HeatSys1 Pump - HeatSys1 BoilerNode, !- Component 1 Inlet Node Name", + " HeatSys1 Supply Equipment Outlet Node; !- Component 1 Outlet Node Name", + + " Branch,", + " HeatSys1 Supply Equipment Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " HeatSys1 Supply Equipment Bypass Pipe, !- Component 1 Name", + " HeatSys1 Supply Equip Bypass Inlet Node, !- Component 1 Inlet Node Name", + " HeatSys1 Supply Equip Bypass Outlet Node; !- Component 1 Outlet Node Name", + + " Pipe:Adiabatic,", + " HeatSys1 Supply Equipment Bypass Pipe, !- Name", + " HeatSys1 Supply Equip Bypass Inlet Node, !- Inlet Node Name", + " HeatSys1 Supply Equip Bypass Outlet Node; !- Outlet Node Name", + + " Branch,", + " HeatSys1 Supply Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " HeatSys1 Supply Outlet Pipe, !- Component 1 Name", + " HeatSys1 Supply Mixer - HeatSys1 Supply Outlet Pipe, !- Component 1 Inlet Node Name", + " HeatSys1 Supply Outlet Node; !- Component 1 Outlet Node Name", + + " Pipe:Adiabatic,", + " HeatSys1 Supply Outlet Pipe, !- Name", + " HeatSys1 Supply Mixer - HeatSys1 Supply Outlet Pipe, !- Inlet Node Name", + " HeatSys1 Supply Outlet Node; !- Outlet Node Name", + + " ConnectorList,", + " HeatSys1 Supply Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " HeatSys1 Supply Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " HeatSys1 Supply Mixer; !- Connector 2 Name", + + " Connector:Splitter,", + " HeatSys1 Supply Splitter, !- Name", + " HeatSys1 Supply Inlet Branch, !- Inlet Branch Name", + " HeatSys1 Supply Equipment Branch, !- Outlet Branch 1 Name", + " HeatSys1 Supply Equipment Bypass Branch; !- Outlet Branch 2 Name", + + " Connector:Mixer,", + " HeatSys1 Supply Mixer, !- Name", + " HeatSys1 Supply Outlet Branch, !- Outlet Branch Name", + " HeatSys1 Supply Equipment Branch, !- Inlet Branch 1 Name", + " HeatSys1 Supply Equipment Bypass Branch; !- Inlet Branch 2 Name", + + " BranchList,", + " HeatSys1 Demand Branches, !- Name", + " HeatSys1 Demand Inlet Branch, !- Branch 1 Name", + " HeatSys1 Demand Load Branch 1, !- Branch 2 Name", + " HeatSys1 Demand Bypass Branch, !- Branch 60 Name", + " HeatSys1 Demand Outlet Branch; !- Branch 61 Name", + + " Branch,", + " HeatSys1 Demand Outlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " HeatSys1 Demand Outlet Pipe, !- Component 1 Name", + " HeatSys1 Demand Mixer - HeatSys1 Demand Outlet Pipe, !- Component 1 Inlet Node Name", + " HeatSys1 Demand Outlet Node; !- Component 1 Outlet Node Name", + + " Pipe:Adiabatic,", + " HeatSys1 Demand Outlet Pipe, !- Name", + " HeatSys1 Demand Mixer - HeatSys1 Demand Outlet Pipe, !- Inlet Node Name", + " HeatSys1 Demand Outlet Node; !- Outlet Node Name", + + " Branch,", + " HeatSys1 Demand Bypass Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " HeatSys1 Demand Bypass Pipe, !- Component 1 Name", + " HeatSys1 Demand Bypass Pipe Inlet Node, !- Component 1 Inlet Node Name", + " HeatSys1 Demand Bypass Pipe Outlet Node; !- Component 1 Outlet Node Name", + + " Pipe:Adiabatic,", + " HeatSys1 Demand Bypass Pipe, !- Name", + " HeatSys1 Demand Bypass Pipe Inlet Node, !- Inlet Node Name", + " HeatSys1 Demand Bypass Pipe Outlet Node; !- Outlet Node Name", + + " Branch,", + " HeatSys1 Demand Inlet Branch, !- Name", + " , !- Pressure Drop Curve Name", + " Pipe:Adiabatic, !- Component 1 Object Type", + " HeatSys1 Demand Inlet Pipe, !- Component 1 Name", + " HeatSys1 Demand Inlet Node, !- Component 1 Inlet Node Name", + " HeatSys1 Demand Inlet Pipe - HeatSys1 Demand Mixer; !- Component 1 Outlet Node Name", + + " Pipe:Adiabatic,", + " HeatSys1 Demand Inlet Pipe, !- Name", + " HeatSys1 Demand Inlet Node, !- Inlet Node Name", + " HeatSys1 Demand Inlet Pipe - HeatSys1 Demand Mixer; !- Outlet Node Name", + + " Branch,", + " HeatSys1 Demand Load Branch 1, !- Name", + " , !- Pressure Drop Curve Name", + " Coil:Heating:Water, !- Component 1 Object Type", + " SPACE1-1 Zone Coil, !- Component 1 Name", + " Zone Coil Water In Node, !- Component 1 Inlet Node Name", + " Zone Coil Water Out Node; !- Component 1 Outlet Node Name", + + " ConnectorList,", + " HeatSys1 Demand Connectors, !- Name", + " Connector:Splitter, !- Connector 1 Object Type", + " HeatSys1 Demand Splitter, !- Connector 1 Name", + " Connector:Mixer, !- Connector 2 Object Type", + " HeatSys1 Demand Mixer; !- Connector 2 Name", + + " Connector:Splitter,", + " HeatSys1 Demand Splitter, !- Name", + " HeatSys1 Demand Inlet Branch, !- Inlet Branch Name", + " HeatSys1 Demand Load Branch 1; !- Outlet Branch 1 Name", + + " Connector:Mixer,", + " HeatSys1 Demand Mixer, !- Name", + " HeatSys1 Demand Outlet Branch, !- Outlet Branch Name", + " HeatSys1 Demand Load Branch 1; !- Inlet Branch 1 Name", + + " Pump:VariableSpeed,", + " HeatSys1 Pump, !- Name", + " HeatSys1 Supply Inlet Node, !- Inlet Node Name", + " HeatSys1 Pump - HeatSys1 BoilerNodeviaConnector, !- Outlet Node Name", + " AUTOSIZE, !- Design Maximum Flow Rate{ m3 / s }", + " 179352, !- Design Pump Head{ Pa }", + " AUTOSIZE, !- Design Power Consumption{ W }", + " 0.9, !- Motor Efficiency", + " 0.0, !- Fraction of Motor Inefficiencies to Fluid Stream", + " 0, 3.2485, -4.7443, 2.5295, !- VariableSpeed Pump Curve Coefficients", + " 0.0, !- Design Minimum Flow Rate{ m3 / s }", + " Intermittent; !- Pump Control Type", + + " Boiler:HotWater,", + " HeatSys1 Boiler, !- Name", + " NATURALGAS, !- Fuel Type", + " 48945.2, !- Nominal Capacity{ W }", + " 0.8, !- Nominal Thermal Efficiency", + " LeavingBoiler, !- Efficiency Curve Temperature Evaluation Variable", + " HeatSys1 Boiler Non-Condensing Boiler Curve, !- Normalized Boiler Efficiency Curve Name", + " 82.2000, !- Design Water Outlet Temperature{ C }", + " AUTOSIZE, !- Design Water Flow Rate{ m3 / s }", + " 0.0, !- Minimum Part Load Ratio", + " 1.2, !- Maximum Part Load Ratio", + " 1.0, !- Optimum Part Load Ratio", + " HeatSys1 Pump - HeatSys1 BoilerNode, !- Boiler Water Inlet Node Name", + " HeatSys1 Supply Equipment Outlet Node, !- Boiler Water Outlet Node Name", + " 95.0, !- Water Outlet Upper Temperature Limit{ C }", + " LeavingSetpointModulated, !- Boiler Flow Mode", + " 0.0000, !- Parasitic Electric Load{ W }", + " 0.3000; !- Sizing Factor", + + " Curve:Cubic,", + " HeatSys1 Boiler Non-Condensing Boiler Curve, !- Name", + " 0.626428326, !- Coefficient1 Constant", + " 0.645643582, !- Coefficient2 x", + " -0.77720685, !- Coefficient3 x**2", + " 0.313806701, !- Coefficient4 x**3", + " 0.1, !- Minimum Value of x", + " 1; !- Maximum Value of x", + + " SetpointManager:Scheduled,", + " HeatSys1 Loop Setpoint Manager, !- Name", + " Temperature, !- Control Variable", + " HeatSys1 Loop Setpoint Sched, !- Schedule Name", + " HeatSys1 Supply Outlet Node; !- Setpoint Node or NodeList Name", + + " SetpointManager:Scheduled,", + " HeatSys1 Boiler Setpoint Manager, !- Name", + " Temperature, !- Control Variable", + " HeatSys1 Loop Setpoint Sched, !- Schedule Name", + " HeatSys1 Supply Equipment Outlet Node; !- Setpoint Node or NodeList Name", + + " Schedule:Compact,", + " HeatSys1 Loop Setpoint Sched, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00, 82.2000; !- Field 3", + + " Coil:Heating:Fuel,", + " SPACE2-1 Zone Coil, !- Name", + " AvailSched, !- Availability Schedule Name", + " Gas, !- Fuel Type", + " 0.8, !- Gas Burner Efficiency", + " autosize, !- Nominal Capacity {W}", + " SPACE2-1 Zone Coil Air In Node, !- Air Inlet Node Name", + " Space2 In Node; !- Air Outlet Node Name", + + " CoilSystem:Cooling:DX,", + " DX Cooling Coil System 1,!- Name", + " AvailSched, !- Availability Schedule Name", + " Mixed Air Node 1, !- DX Cooling Coil System Inlet Node Name", + " Main Cooling Coil 1 Outlet Node, !- DX Cooling Coil System Outlet Node Name", + " Main Cooling Coil 1 Outlet Node, !- DX Cooling Coil System Sensor Node Name", + " Coil:Cooling:DX:SingleSpeed,!- Cooling Coil Object Type", + " Main Cooling Coil 1; !- Cooling Coil Name", + + " Coil:Cooling:DX:SingleSpeed,", + " Main Cooling Coil 1, !- Name", + " AvailSched, !- Availability Schedule Name", + " autosize, !- Gross Rated Total Cooling Capacity { W }", + " autosize, !- Gross Rated Sensible Heat Ratio", + " 4.40, !- Gross Rated Cooling COP { W / W }", + " autosize, !- Rated Air Flow Rate { m3 / s }", + " , !- Rated Evaporator Fan Power Per Volume Flow Rate { W / ( m3 / s ) }", + " Mixed Air Node 1, !- Air Inlet Node Name", + " Main Cooling Coil 1 Outlet Node, !- Air Outlet Node Name", + " Biquadratic, !- Total Cooling Capacity Function of Temperature Curve Name", + " Cubic, !- Total Cooling Capacity Function of Flow Fraction Curve Name", + " Biquadratic, !- Energy Input Ratio Function of Temperature Curve Name", + " Cubic, !- Energy Input Ratio Function of Flow Fraction Curve Name", + " Cubic, !- Part Load Fraction Correlation Curve Name", + " 0.0, !- Nominal Time for Condensate Removal to Begin", + " 0.0, !- Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity", + " 0.0, !- Maximum Cycling Rate", + " 0.0, !- Latent Capacity Time Constant", + " Main Cooling Coil 1 Condenser Node, !- Condenser Air Inlet Node Name", + " AirCooled, !- Condenser Type", + " 0.0, !- Evaporative Condenser Effectiveness", + " , !- Evaporative Condenser Air Flow Rate", + " , !- Evaporative Condenser Pump Rated Power Consumption", + " 0.0, !- Crankcase Heater Capacity", + " 10.0; !- Maximum Outdoor DryBulb Temperature for Crankcase Heater Operation", + + " Coil:Heating:Fuel,", + " Main heating Coil 1, !- Name", + " AvailSched, !- Availability Schedule Name", + " Gas, !- Fuel Type", + " 0.8, !- Gas Burner Efficiency", + " autosize, !- Nominal Capacity {W}", + " Main Cooling Coil 1 Outlet Node, !- Air Inlet Node Name", + " Main Heating Coil 1 Outlet Node, !- Air Outlet Node Name", + " Main Heating Coil 1 Outlet Node; !- Temperature Setpoint Node Name", + + " Fan:VariableVolume,", + " Supply Fan 1, !- Name", + " AvailSched, !- Availability Schedule Name", + " 0.7, !- Fan Total Efficiency", + " 600.0, !- Pressure Rise {Pa}", + " autosize, !- Maximum Flow Rate {m3/s}", + " FixedFlowRate, !- Fan Power Minimum Flow Rate Input Method", + " , !- Fan Power Minimum Flow Fraction", + " 0.35326, !- Fan Power Minimum Air Flow Rate {m3/s}", + " 0.9, !- Motor Efficiency", + " 1.0, !- Motor In Airstream Fraction", + " 0.0015302446, !- Fan Power Coefficient 1", + " 0.0052080574, !- Fan Power Coefficient 2", + " 1.1086242, !- Fan Power Coefficient 3", + " -0.11635563, !- Fan Power Coefficient 4", + " 0.000, !- Fan Power Coefficient 5", + " Main Heating Coil 1 Outlet Node, !- Air Inlet Node Name", + " VAV Sys 1 Outlet Node; !- Air Outlet Node Name", + + "Construction,", + " INT-WALL-1, !- Name", + " GP02, !- Outside Layer", + " AL21, !- Layer 2", + " GP02; !- Layer 3", + + "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:AirGap,", + " AL21, !- Name", + " 0.1570000; !- Thermal Resistance{ m2 - K / W }", + + "Construction,", + "FLOOR-SLAB-1, !- Name", + "CC03, !- Outside Layer", + "CP01; !- Layer 2", + + "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", + + "Construction,", + " CLNG-1, !- Name", + " MAT-CLNG-1; !- Outside Layer", + + "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", + + "BuildingSurface:Detailed,", + " SPACE-W1, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space, !- 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}", + + "BuildingSurface:Detailed,", + " SPACE-C1, !- Name", + " CEILING, !- Surface Type", + " CLNG-1, !- Construction Name", + " Space, !- Zone Name", + " Outdoors, !- 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, 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,", + " SPACE-F1, !- Name", + " FLOOR, !- Surface Type", + " FLOOR-SLAB-1, !- Construction Name", + " Space, !- 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,", + " SPACE-W2, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space, !- Zone Name", + " Adiabatic, !- Outside Boundary Condition", + " , !- 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,", + " SPACE-W3, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space, !- Zone Name", + " Adiabatic, !- 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, 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,", + " SPACE-W4, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space, !- Zone Name", + " Adiabatic, !- 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, 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}", + + "ZoneControl:Thermostat,", + " Space Thermostat, !- Name", + " Space, !- Zone or ZoneList Name", + " Dual Zone Control Type Sched, !- Control Type Schedule Name", + " ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type", + " Space DualSPSched; !- Control 1 Name", + + "ZoneControl:Thermostat,", + " Space2 Thermostat, !- Name", + " Space2, !- Zone or ZoneList Name", + " Dual Zone Control Type Sched, !- Control Type Schedule Name", + " ThermostatSetpoint:DualSetpoint, !- Control 1 Object Type", + " Space DualSPSched; !- Control 1 Name", + + "Schedule:Compact,", + " Dual Zone Control Type Sched, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,4; !- Field 3", + + "ThermostatSetpoint:DualSetpoint,", + " Space DualSPSched, !- Name", + " HTGSETP_SCH, !- Heating Setpoint Temperature Schedule Name", + " CLGSETP_SCH; !- Cooling Setpoint Temperature Schedule Name", + + "Schedule:Compact,", + " CLGSETP_SCH, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 19", + " Until: 7:00,30.0, !- Field 20", + " Until: 17:00,24.0, !- Field 20", + " Until: 24:00,30.0; !- Field 20", + + "Schedule:Compact,", + " HTGSETP_SCH, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 22", + " Until: 7:00, 10.0, !- Field 23", + " Until: 17:00, 17.0, !- Field 23", + " Until: 24:00, 10.0; !- Field 23", + + "BuildingSurface:Detailed,", + " SPACE2-W1, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space2, !- 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}", + + "BuildingSurface:Detailed,", + " SPACE2-C1, !- Name", + " CEILING, !- Surface Type", + " CLNG-1, !- Construction Name", + " Space2, !- Zone Name", + " Outdoors, !- 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, 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,", + " SPACE2-F1, !- Name", + " FLOOR, !- Surface Type", + " FLOOR-SLAB-1, !- Construction Name", + " Space2, !- 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,", + " SPACE2-W2, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space2, !- Zone Name", + " Adiabatic, !- Outside Boundary Condition", + " , !- 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,", + " SPACE2-W3, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space2, !- Zone Name", + " Adiabatic, !- 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, 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,", + " SPACE2-W4, !- Name", + " WALL, !- Surface Type", + " INT-WALL-1, !- Construction Name", + " Space2, !- Zone Name", + " Adiabatic, !- 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, 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}", + + "OutdoorAir:NodeList,", + " OutsideAirInletNodes; !- Node or NodeList Name 1", + + "ScheduleTypeLimits,", + " Any Number; !- Name", + + "Schedule:Compact,", + " AvailSched, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 3", + " For: AllDays, !- Field 4", + " Until: 24:00,1.0; !- Field 5", + + "Schedule:Compact,", + " FanOpModeSchedule, !- Name", + " Any Number, !- Schedule Type Limits Name", + " Through: 12/31, !- Field 1", + " For: AllDays, !- Field 2", + " Until: 24:00,1.0; !- Field 7", + + "Curve:Biquadratic,", + " Biquadratic, !- Name", + " 1.0, !- Coefficient1 Constant", + " 0.0, !- Coefficient2 x", + " 0.0, !- Coefficient3 x**2", + " 0.0, !- Coefficient4 y", + " 0.0, !- Coefficient5 y**2", + " 0.0, !- Coefficient6 x*y", + " 5, !- Minimum Value of x", + " 40, !- Maximum Value of x", + " -5, !- Minimum Value of y", + " 30, !- 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,", + " Cubic, !- Name", + " 1.0, !- Coefficient1 Constant", + " 0.0, !- Coefficient2 x", + " 0.0, !- 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", + } ); + + ASSERT_FALSE( process_idf( idf_objects ) ); + + OutputProcessor::TimeValue.allocate( 2 ); + + ManageSimulation(); // run the design days + + // size the reheat coil with no design zone heating load + // DesZoneHeatLoad = 0 from simulating design days and forcing heating load = 0 + // this can still provide a negative coil load if CoilInTemp > ZoneDesTemp + // CoilInTemp = Sizing:System, 16.0000, !- Central Heating Design Supply Air Temperature{ C } + // ZoneDesTemp = max of thermostat heating set point temperature = 17.0 C + // "Schedule:Compact,", + // " HTGSETP_SCH, !- Name", + // " Any Number, !- Schedule Type Limits Name", + // " Through: 12/31, !- Field 1", + // " For: AllDays, !- Field 22", + // " Until: 7:00, 10.0, !- Field 23", + // " Until: 17:00, 17.0, !- Field 23", + // " Until: 24:00, 10.0; !- Field 23", + + DataEnvironment::StdRhoAir = 1.2027389349552706; + Real64 CoilInTemp = TermUnitFinalZoneSizing( 1 ).DesHeatCoilInTempTU; + Real64 DesMassFlow = DataEnvironment::StdRhoAir * TermUnitSizing( 1 ).AirVolFlow; + Real64 DesZoneHeatLoad = FinalZoneSizing( 1 ).DesHeatLoad * FinalZoneSizing( 1 ).HeatSizingFactor; + Real64 ZoneDesTemp = FinalZoneSizing( 1 ).ZoneTempAtHeatPeak; + Real64 ZoneDesHumRat = FinalZoneSizing( 1 ).ZoneHumRatAtHeatPeak; + + Real64 DesCoilLoad = DesZoneHeatLoad + Psychrometrics::PsyCpAirFnWTdb( ZoneDesHumRat, 0.5 * ( CoilInTemp + ZoneDesTemp ) ) * DesMassFlow * ( ZoneDesTemp - CoilInTemp ); + + EXPECT_EQ( CoilInTemp, 16.0 ); + EXPECT_EQ( DesZoneHeatLoad, 0.0 ); + EXPECT_EQ( ZoneDesTemp, 17.0 ); + EXPECT_EQ( ZoneDesHumRat, 0.008 ); + EXPECT_NEAR( DesCoilLoad, 120.5, 0.1 ); + +}