Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : #ifndef ZoneDehumidifier_hh_INCLUDED
49 : #define ZoneDehumidifier_hh_INCLUDED
50 :
51 : // ObjexxFCL Headers
52 : #include <ObjexxFCL/Array1D.hh>
53 :
54 : // EnergyPlus Headers
55 : #include <EnergyPlus/Data/BaseData.hh>
56 : #include <EnergyPlus/DataGlobals.hh>
57 : #include <EnergyPlus/EnergyPlus.hh>
58 :
59 : namespace EnergyPlus {
60 :
61 : // Forward declarations
62 : struct EnergyPlusData;
63 :
64 : namespace ZoneDehumidifier {
65 :
66 : enum class CondensateOutlet
67 : { // Water Systems
68 : Invalid = -1,
69 : Discarded, // Default mode where water is "lost"
70 : ToTank, // Collect coil condensate from air and store in water storage tank
71 : Num
72 : };
73 :
74 30 : struct ZoneDehumidifierParams
75 : {
76 : // input data and others required during calculations
77 : std::string Name; // Name of unit
78 : std::string UnitType; // Type of unit
79 : int SchedPtr = 0; // Index number to availability schedule
80 : Real64 RatedWaterRemoval = 0.0; // Rated water removal [liters/day]
81 : Real64 RatedEnergyFactor = 0.0; // Rated energy factor [liters/kWh]
82 : Real64 RatedAirVolFlow = 0.0; // Rated air flow rate through the dehumidifier [m3/s]
83 : Real64 RatedAirMassFlow = 0.0; // Rated air mass flow rate through the dehumidifier [kg/s]
84 : Real64 MinInletAirTemp = 0.0; // Minimum dry-bulb temperature for dehumidifier operation [C]
85 : Real64 MaxInletAirTemp = 0.0; // Maximum dry-bulb temperature for dehumidifier operation [C]
86 : Real64 InletAirMassFlow = 0.0; // Inlet air mass flow rate for the time step being simulated [kg/s]
87 : Real64 OutletAirEnthalpy = 0.0; // Dehumidifier outlet air enthalpy [J/kg]
88 : Real64 OutletAirHumRat = 0.0; // Dehumidifier outlet air humidity ratio [kg/kg]
89 : Real64 OffCycleParasiticLoad = 0.0; // Off Cycle Parasitic Load, user input [W]
90 : int AirInletNodeNum = 0; // Inlet air node number
91 : int AirOutletNodeNum = 0; // Outlet air node number
92 : int WaterRemovalCurveIndex = 0; // Index for water removal curve
93 : int WaterRemovalCurveErrorCount = 0; // Count number of times water removal curve returns a negative value
94 : int WaterRemovalCurveErrorIndex = 0; // Index for negative value water removal factor recurring messages
95 : int EnergyFactorCurveIndex = 0; // Index for energy factor curve
96 : int EnergyFactorCurveErrorCount = 0; // Count number of times energy factor curve returns negative value
97 : int EnergyFactorCurveErrorIndex = 0; // Index for negative value energy factor recurring messages
98 : int PartLoadCurveIndex = 0; // Index for part load curve
99 : int LowPLFErrorCount = 0; // Count number of times PLF < 0.7
100 : int LowPLFErrorIndex = 0; // Index for PLF < 0.7 recurring warning messages
101 : int HighPLFErrorCount = 0; // Count number of times PLF > 1.0
102 : int HighPLFErrorIndex = 0; // Index for PLF > 1.0 recurring warning messages
103 : int HighRTFErrorCount = 0; // Count number of times RTF > 1.0
104 : int HighRTFErrorIndex = 0; // Index for RTF > 1.0 recurring warning messages
105 : int PLFPLRErrorCount = 0; // Count number of times PLF < PLR
106 : int PLFPLRErrorIndex = 0; // Index for PLF < PLR recurring warning messages
107 : CondensateOutlet CondensateCollectMode = CondensateOutlet::Discarded; // Where does water come from
108 : std::string CondensateCollectName; // Name of water storage (collection) tank
109 : int CondensateTankID = 0; // Condensate collection tank ID number
110 : int CondensateTankSupplyARRID = 0; // Condensate collection tank supply ID number
111 : // Report data
112 : Real64 SensHeatingRate = 0.0; // Zone Dehumidifier Sensible Heating Rate [W]
113 : Real64 SensHeatingEnergy = 0.0; // Zone Dehumidifier Sensible Heating Energy [J]
114 : Real64 WaterRemovalRate = 0.0; // Zone Dehumidifier Water Removal Rate [kg/s]
115 : Real64 WaterRemoved = 0.0; // Zone Dehumidifier Water Removed [kg]
116 : Real64 ElecPower = 0.0; // Zone Dehumidifier Electric Power [W]
117 : Real64 ElecConsumption = 0.0; // Zone Dehumidifier Electric Consumption [J]
118 : Real64 DehumidPLR = 0.0; // Zone Dehumidifier Part-Load Ratio [-]
119 : Real64 DehumidRTF = 0.0; // Zone Dehumidifier Runtime Fraction [-]
120 : Real64 DehumidCondVolFlowRate = 0.0; // Zone Dehumidifier Condensate Volumetric Flow Rate [m3/s]
121 : Real64 DehumidCondVol = 0.0; // Zone Dehumidifier Condensate Volume [m3]
122 : Real64 OutletAirTemp = 0.0; // Zone Dehumidifier Outlet Air Temperature [C]
123 : Real64 OffCycleParasiticElecPower = 0.0; // Zone Dehumidifier Off-Cycle Parasitic Electric Power [W]
124 : Real64 OffCycleParasiticElecCons = 0.0; // Zone Dehumidifier Off-Cycle Parasitic Electric Consumption [J]
125 : bool MyEnvrnFlag = true;
126 : bool CheckEquipName = true;
127 : bool ZoneEquipmentListChecked = false;
128 : };
129 :
130 : void SimZoneDehumidifier(EnergyPlusData &state,
131 : std::string const &CompName, // Name of the zone dehumidifier
132 : int ZoneNum, // Number of zone being served
133 : bool FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
134 : Real64 &QSensOut, // Sensible capacity delivered to zone (W)
135 : Real64 &QLatOut, // Latent capacity delivered to zone (kg/s), dehumidify = negative
136 : int &CompIndex // Index to the zone dehumidifier
137 : );
138 :
139 : void GetZoneDehumidifierInput(EnergyPlusData &state);
140 :
141 : void InitZoneDehumidifier(EnergyPlusData &state, int ZoneDehumNum); // Number of the current zone dehumidifier being simulated
142 :
143 : void CalcZoneDehumidifier(EnergyPlusData &state,
144 : int ZoneDehumNum, // Index number of the current zone dehumidifier being simulated
145 : Real64 QZnDehumidReq, // Dehumidification load to be met (kg/s), negative value means dehumidification load
146 : Real64 &SensibleOutput, // Sensible (heating) output (W), sent to load predictor for next simulation time step
147 : Real64 &LatentOutput // Latent (dehumidification) output provided (kg/s)
148 : );
149 :
150 : void UpdateZoneDehumidifier(EnergyPlusData &state, int ZoneDehumNum); // Number of the current zone dehumidifier being simulated
151 :
152 : void ReportZoneDehumidifier(EnergyPlusData &state, int DehumidNum); // Index of the current zone dehumidifier being simulated
153 :
154 : bool GetZoneDehumidifierNodeNumber(EnergyPlusData &state, int NodeNumber); // Node being tested
155 :
156 : } // namespace ZoneDehumidifier
157 :
158 1542 : struct ZoneDehumidifierData : BaseGlobalStruct
159 : {
160 : bool GetInputFlag = true; // Set to FALSE after first time input is "gotten"
161 : EPVector<ZoneDehumidifier::ZoneDehumidifierParams> ZoneDehumid;
162 :
163 0 : void clear_state() override
164 : {
165 0 : *this = ZoneDehumidifierData();
166 0 : }
167 : };
168 :
169 : } // namespace EnergyPlus
170 :
171 : #endif
|