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 ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITSPEED
49 : #define ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITSPEED
50 :
51 : #include <string>
52 : #include <vector>
53 :
54 : #include <EnergyPlus/DataHVACGlobals.hh>
55 : #include <EnergyPlus/DataLoopNode.hh>
56 : #include <EnergyPlus/EnergyPlus.hh>
57 :
58 : namespace EnergyPlus {
59 :
60 : // Forward declarations
61 : struct EnergyPlusData;
62 :
63 961 : struct CoilCoolingDXCurveFitSpeedInputSpecification
64 : {
65 : std::string name;
66 : Real64 gross_rated_total_cooling_capacity_ratio_to_nominal;
67 : Real64 gross_rated_sensible_heat_ratio;
68 : Real64 gross_rated_cooling_COP;
69 : Real64 evaporator_air_flow_fraction;
70 : Real64 condenser_air_flow_fraction;
71 : Real64 active_fraction_of_coil_face_area;
72 : Real64 rated_evaporative_condenser_pump_power_fraction;
73 : Real64 rated_evaporator_fan_power_per_volume_flow_rate;
74 : Real64 rated_evaporator_fan_power_per_volume_flow_rate_2023;
75 : Real64 evaporative_condenser_effectiveness;
76 : std::string total_cooling_capacity_function_of_temperature_curve_name;
77 : std::string total_cooling_capacity_function_of_air_flow_fraction_curve_name;
78 : std::string energy_input_ratio_function_of_temperature_curve_name;
79 : std::string energy_input_ratio_function_of_air_flow_fraction_curve_name;
80 : std::string part_load_fraction_correlation_curve_name;
81 : Real64 rated_waste_heat_fraction_of_power_input;
82 : std::string waste_heat_function_of_temperature_curve_name;
83 : std::string sensible_heat_ratio_modifier_function_of_temperature_curve_name;
84 : std::string sensible_heat_ratio_modifier_function_of_flow_fraction_curve_name;
85 : };
86 :
87 485 : struct CoilCoolingDXCurveFitSpeed
88 : {
89 : std::string const object_name = "Coil:Cooling:DX:CurveFit:Speed";
90 : std::string parentName;
91 :
92 : CoilCoolingDXCurveFitSpeed() = default;
93 : explicit CoilCoolingDXCurveFitSpeed(EnergyPlusData &state, const std::string &name);
94 : void instantiateFromInputSpec(EnergyPlusData &state, const CoilCoolingDXCurveFitSpeedInputSpecification &input_data);
95 :
96 : CoilCoolingDXCurveFitSpeedInputSpecification original_input_specs;
97 :
98 : // curve IDs
99 : int indexCapFT = 0;
100 : int indexCapFFF = 0;
101 : int indexEIRFT = 0;
102 : int indexEIRFFF = 0;
103 : int indexPLRFPLF = 0;
104 : int indexWHFT = 0;
105 : int indexSHRFT = 0;
106 : int indexSHRFFF = 0;
107 :
108 : // fixed values
109 : std::string name;
110 : Real64 RatedAirMassFlowRate = 0.0; // rated air mass flow rate at speed {kg/s}
111 : Real64 RatedCondAirMassFlowRate = 0.0; // rated condenser air mass flow rate at speed {kg/s}
112 : Real64 grossRatedSHR = 0.0; // rated sensible heat ratio at speed
113 : bool ratedGrossTotalCapIsAutosized = false;
114 : bool ratedEvapAirFlowRateIsAutosized = false;
115 : Real64 RatedCBF = 0.0; // rated coil bypass factor at speed
116 : Real64 RatedEIR = 0.0; // rated energy input ratio at speed {W/W}
117 : Real64 ratedCOP = 0.0;
118 : Real64 rated_total_capacity = 0.0;
119 : Real64 rated_evap_fan_power_per_volume_flow_rate = 0.0;
120 : Real64 rated_evap_fan_power_per_volume_flow_rate_2023 = 0.0;
121 : Real64 ratedWasteHeatFractionOfPowerInput = 0.0; // rated waste heat fraction of power input
122 : Real64 evap_condenser_pump_power_fraction = 0.0;
123 : Real64 evap_condenser_effectiveness = 0.0;
124 :
125 : // stuff getting assigned by the parent mode
126 : Real64 parentModeRatedGrossTotalCap = 0.0; // [W]
127 : Real64 parentModeRatedEvapAirFlowRate = 0.0; // [m3/s]
128 : Real64 parentModeRatedCondAirFlowRate = 0.0; // [m3/s]
129 : int parentOperatingMode = 0;
130 : Real64 parentModeTimeForCondensateRemoval = 0.0;
131 : Real64 parentModeEvapRateRatio = 0.0;
132 : Real64 parentModeMaxCyclingRate = 0.0;
133 : Real64 parentModeLatentTimeConst = 0.0;
134 : bool doLatentDegradation = false; // True if latent degradation is enabled for this speed
135 :
136 : // speed class objects
137 : Real64 ambPressure = 0.0; // outdoor pressure {Pa]
138 : Real64 PLR = 0.0;
139 : Real64 AirFF = 0.0; // ratio of air mass flow rate to rated air mass flow rate
140 : Real64 fullLoadPower = 0.0; // full load power at speed {W}
141 : Real64 fullLoadWasteHeat = 0.0; // full load waste heat at speed {W}
142 : Real64 RTF = 0.0; // coil runtime fraction at speed
143 : Real64 AirMassFlow = 0.0; // coil inlet air mass flow rate {kg/s}
144 : Real64 evap_air_flow_rate = 0.0; // evaporator air volume flow rate [m3/s]
145 : Real64 condenser_air_flow_rate = 0.0; // condenser air volume flow rate [m3/s]
146 : Real64 active_fraction_of_face_coil_area = 0.0;
147 : bool adjustForFaceArea = false;
148 : Real64 ratedLatentCapacity = 0.0; // Latent capacity at rated conditions {W}
149 :
150 : // rating data
151 : Real64 RatedInletAirTemp = 26.6667; // 26.6667C or 80F
152 : Real64 RatedInletWetBulbTemp = 19.4444; // 19.44 or 67F
153 : Real64 RatedInletAirHumRat = 0.0111847; // Humidity ratio corresponding to 80F dry bulb/67F wet bulb
154 : Real64 RatedOutdoorAirTemp = 35.0; // 35 C or 95F
155 : Real64 DryCoilOutletHumRatioMin = 0.00001; // dry coil outlet minimum hum ratio kgH2O/kgdry air
156 :
157 : // flow per capacity values, they will be overridden with alternate values later if it is 100% OA coil
158 : Real64 minRatedVolFlowPerRatedTotCap = DataHVACGlobals::MinRatedVolFlowPerRatedTotCap1;
159 : Real64 maxRatedVolFlowPerRatedTotCap = DataHVACGlobals::MaxRatedVolFlowPerRatedTotCap1;
160 :
161 : void CalcSpeedOutput(EnergyPlusData &state,
162 : const DataLoopNode::NodeData &inletNode,
163 : DataLoopNode::NodeData &outletNode,
164 : Real64 &PLR,
165 : int const fanOpMode,
166 : Real64 condInletTemp);
167 : void size(EnergyPlusData &state);
168 :
169 : Real64 CalcBypassFactor(EnergyPlusData &state,
170 : Real64 const tdb, // Inlet dry-bulb temperature {C}
171 : Real64 const w, // Inlet humidity ratio {kg-H2O/kg-dryair}
172 : Real64 const q, // Total capacity {W}
173 : Real64 const shr, // SHR
174 : Real64 const h, // Inlet enthalpy {J/kg-dryair}
175 : Real64 const p); // Outlet node pressure {Pa}
176 :
177 : Real64 calcEffectiveSHR(const DataLoopNode::NodeData &inletNode,
178 : Real64 const inletWetBulb,
179 : Real64 const SHRss, // Steady-state sensible heat ratio
180 : Real64 const RTF, // Compressor run-time fraction
181 : Real64 const QLatRated, // Rated latent capacity
182 : Real64 const QLatActual, // Actual latent capacity
183 : Real64 const HeatingRTF // Used to recalculate Toff for cycling fan systems
184 : );
185 :
186 : private:
187 : bool processCurve(EnergyPlusData &state,
188 : const std::string &curveName,
189 : int &curveIndex,
190 : std::vector<int> validDims,
191 : std::string_view const routineName,
192 : const std::string &fieldName,
193 : Real64 Var1, // required 1st independent variable
194 : Optional<Real64 const> Var2 = _); // 2nd independent variable
195 : };
196 : } // namespace EnergyPlus
197 :
198 : #endif // ENERGYPLUS_COILS_COILCOOLINGDXCURVEFITSPEED
|