Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2025, 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 ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITPERFORMANCE
49 : #define ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITPERFORMANCE
50 :
51 : #include <string>
52 : #include <vector>
53 :
54 : #include <EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.hh>
55 : #include <EnergyPlus/DataGlobalConstants.hh>
56 : #include <EnergyPlus/DataLoopNode.hh>
57 : #include <EnergyPlus/EnergyPlus.hh>
58 : #include <EnergyPlus/ScheduleManager.hh>
59 : #include <EnergyPlus/StandardRatings.hh>
60 :
61 : namespace EnergyPlus {
62 :
63 : // Forward declarations
64 : struct EnergyPlusData;
65 :
66 : struct CoilCoolingDXCurveFitPerformanceInputSpecification
67 : {
68 : std::string name;
69 : Real64 crankcase_heater_capacity;
70 : Real64 minimum_outdoor_dry_bulb_temperature_for_compressor_operation;
71 : Real64 maximum_outdoor_dry_bulb_temperature_for_crankcase_heater_operation;
72 : Real64 unit_internal_static_air_pressure;
73 : Real64 basin_heater_capacity;
74 : Real64 basin_heater_setpoint_temperature;
75 : std::string basin_heater_operating_schedule_name;
76 : std::string compressor_fuel_type;
77 : std::string base_operating_mode_name;
78 : std::string alternate_operating_mode_name;
79 : std::string alternate_operating_mode2_name;
80 : std::string outdoor_temperature_dependent_crankcase_heater_capacity_curve_name;
81 : std::string capacity_control;
82 : };
83 :
84 : struct CoilCoolingDXCurveFitPerformance
85 : {
86 : std::string object_name = "Coil:Cooling:DX:CurveFit:Performance";
87 : std::string parentName;
88 :
89 : void instantiateFromInputSpec(EnergyPlusData &state, const CoilCoolingDXCurveFitPerformanceInputSpecification &input_data);
90 :
91 : void simulate(EnergyPlusData &state,
92 : const DataLoopNode::NodeData &inletNode,
93 : DataLoopNode::NodeData &outletNode,
94 : HVAC::CoilMode currentCoilMode,
95 : int speedNum,
96 : Real64 speedRatio,
97 : HVAC::FanOp const fanOp,
98 : DataLoopNode::NodeData &condInletNode,
99 : DataLoopNode::NodeData &condOutletNode,
100 : bool singleMode,
101 : Real64 LoadSHR = 0.0);
102 :
103 : void calculate(EnergyPlusData &state,
104 : CoilCoolingDXCurveFitOperatingMode ¤tMode,
105 : const DataLoopNode::NodeData &inletNode,
106 : DataLoopNode::NodeData &outletNode,
107 : int speedNum,
108 : Real64 speedRatio,
109 : HVAC::FanOp const fanOp,
110 : DataLoopNode::NodeData &condInletNode,
111 : DataLoopNode::NodeData &condOutletNode,
112 : bool singleMode);
113 :
114 : void calcStandardRatings210240(EnergyPlusData &state);
115 :
116 : CoilCoolingDXCurveFitPerformanceInputSpecification original_input_specs;
117 :
118 51 : CoilCoolingDXCurveFitPerformance() = default;
119 :
120 : explicit CoilCoolingDXCurveFitPerformance(EnergyPlusData &state, const std::string &name);
121 :
122 : void size(EnergyPlusData &state);
123 :
124 : void setOperMode(EnergyPlusData &state, CoilCoolingDXCurveFitOperatingMode ¤tMode, int const mode);
125 :
126 : std::string name;
127 : Real64 crankcaseHeaterCap = 0.0;
128 : Real64 crankcaseHeaterPower = 0.0;
129 : int crankcaseHeaterCapacityCurveIndex = 0;
130 : Real64 crankcaseHeaterElectricityConsumption = 0.0;
131 : Real64 minOutdoorDrybulb = 0.0;
132 : Real64 maxOutdoorDrybulbForBasin = 0.0;
133 : bool mySizeFlag = true;
134 : Constant::eFuel compressorFuelType = Constant::eFuel::Invalid;
135 : std::string compressorFuelTypeForOutput;
136 : Real64 compressorFuelRate = 0.0;
137 : Real64 compressorFuelConsumption = 0.0;
138 :
139 : enum CapControlMethod
140 : {
141 : CONTINUOUS,
142 : DISCRETE
143 : };
144 : CapControlMethod capControlMethod = CapControlMethod::DISCRETE;
145 :
146 : Real64 evapCondBasinHeatCap = 0.0;
147 : Real64 evapCondBasinHeatSetpoint = 0.0;
148 : Sched::Schedule *evapCondBasinHeatSched = nullptr;
149 : Real64 basinHeaterElectricityConsumption = 0.0;
150 : Real64 basinHeaterPower = 0.0;
151 : Real64 powerUse = 0.0;
152 : Real64 electricityConsumption = 0.0;
153 : Real64 RTF = 0.0;
154 : bool oneTimeEIOHeaderWrite = true;
155 : Real64 wasteHeatRate = 0.0;
156 : int OperatingMode = 0;
157 : Real64 ModeRatio = 0.0;
158 : Real64 recoveredEnergyRate = 0.0;
159 : Real64 NormalSHR = 0.0;
160 :
161 : // standard rating stuff -- for now just 210/240
162 : Real64 standardRatingCoolingCapacity = 0.0; // net cooling capacity of single speed DX cooling coil
163 : Real64 standardRatingSEER = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
164 : Real64 standardRatingSEER_Standard = 0.0; // seasonal energy efficiency ratio
165 : Real64 standardRatingEER = 0.0; // energy efficiency ratio of single speed DX cooling coil
166 : Real64 standardRatingIEER = 0.0; // Integrated energy efficiency ratio of single speed DX cooling coil
167 :
168 : // standard rating stuff -- for now just 210/240 2023
169 : Real64 standardRatingCoolingCapacity2023 = 0.0; // net cooling capacity of single speed DX cooling coil
170 : Real64 standardRatingSEER2_User = 0.0; // seasonal energy efficiency ratio of single speed DX cooling coil
171 : Real64 standardRatingSEER2_Standard = 0.0;
172 : Real64 standardRatingEER2 = 0.0; // energy efficiency ratio of single speed DX cooling coil
173 : Real64 standardRatingIEER2 = 0.0; // Integrated energy efficiency ratio of singgle speed DX cooling coil | AHRI Std.340/360-2022(IP)
174 :
175 : CoilCoolingDXCurveFitOperatingMode normalMode;
176 : HVAC::CoilMode maxAvailCoilMode = HVAC::CoilMode::Normal; // max available coil mode, 0 Normal, 1 Enhanced, 2 SubcoolReheat
177 : CoilCoolingDXCurveFitOperatingMode alternateMode; // enhanced dehumidifcation or Subcool mode
178 : CoilCoolingDXCurveFitOperatingMode alternateMode2; // Reheat mode
179 : };
180 :
181 : } // namespace EnergyPlus
182 :
183 : #endif // ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITPERFORMANCE
|