Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2024, 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 HighTempRadiantSystem_hh_INCLUDED
49 : #define HighTempRadiantSystem_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/DataSizing.hh>
58 : #include <EnergyPlus/EnergyPlus.hh>
59 :
60 : namespace EnergyPlus {
61 :
62 : // Forward declarations
63 : struct EnergyPlusData;
64 :
65 : namespace HighTempRadiantSystem {
66 :
67 : // Types
68 :
69 : enum class RadControlType : int
70 : {
71 : Invalid = -1,
72 : MATControl,
73 : MRTControl,
74 : OperativeControl,
75 : MATSPControl,
76 : MRTSPControl,
77 : OperativeSPControl,
78 : Num
79 : };
80 :
81 : struct HighTempRadiantSystemData
82 : {
83 : // Members
84 : // Input data
85 : std::string Name; // name of hydronic radiant system
86 : std::string SchedName; // availability schedule
87 : int SchedPtr; // index to schedule
88 : int ZonePtr; // Point to this zone in the Zone derived type
89 : Constant::eResource HeaterType; // Type of heater (NaturalGas or Electricity)
90 : Real64 MaxPowerCapac; // Maximum capacity of the radiant heater in Watts
91 : Real64 CombustionEffic; // Combustion efficiency (only valid for a gas heater)
92 : Real64 FracRadiant; // Fraction of heater power that is given off as radiant heat
93 : Real64 FracLatent; // Fraction of heater power that is given off as latent heat
94 : Real64 FracLost; // Fraction of heater power that is lost to the outside environment
95 : Real64 FracConvect; // Fraction of heater power that is given off as convective heat
96 : // (by definition this is 1 minus the sum of all other fractions)
97 : RadControlType ControlType; // Control type for the system (MAT, MRT, or op temp)
98 : Real64 ThrottlRange; // Throttling range for heating [C]
99 : std::string SetptSched; // Schedule name for the zone setpoint temperature
100 : int SetptSchedPtr; // Schedule index for the zone setpoint temperature
101 : Real64 FracDistribPerson; // Fraction of fraction radiant incident on a "person" in the space
102 : int TotSurfToDistrib; // Total number of surfaces the heater sends radiation to
103 : Array1D_string SurfaceName; // Surface name in the list of surfaces heater sends radiation to
104 : Array1D_int SurfacePtr; // Surface number in the list of surfaces heater sends radiation to
105 : Array1D<Real64> FracDistribToSurf; // Fraction of fraction radiant incident on the surface
106 : // Other parameters
107 : Real64 ZeroHTRSourceSumHATsurf; // used in baseboard energy balance
108 : Real64 QHTRRadSource; // Need to keep the last value in case we are still iterating
109 : Real64 QHTRRadSrcAvg; // Need to keep the last value in case we are still iterating
110 : Real64 LastSysTimeElapsed; // Need to keep the last value in case we are still iterating
111 : Real64 LastTimeStepSys; // Need to keep the last value in case we are still iterating
112 : Real64 LastQHTRRadSrc; // Need to keep the last value in case we are still iterating
113 :
114 : // Report data
115 : Real64 ElecPower; // system electric consumption in Watts
116 : Real64 ElecEnergy; // system electric consumption in Joules
117 : Real64 GasPower; // system gas consumption in Watts
118 : Real64 GasEnergy; // system gas consumption in Joules
119 : Real64 HeatPower; // actual heating sent to zone (convective and radiative) in Watts
120 : Real64 HeatEnergy; // actual heating sent to zone (convective and radiative) in Joules
121 : DataSizing::DesignSizingType HeatingCapMethod; // - Method for High Temperature Radiant heating capacity scalable sizing calculation
122 : // (HeatingDesignCapacity,
123 : // CapacityPerFloorArea, FracOfAutosizedHeatingCapacity)
124 : Real64
125 : ScaledHeatingCapacity; // - High Temperature Radiant scaled maximum heating capacity {W} or scalable variable for sizing in {-}, or {W/m2}
126 :
127 : // Default Constructor
128 4 : HighTempRadiantSystemData()
129 8 : : SchedPtr(0), ZonePtr(0), HeaterType(Constant::eResource::Invalid), MaxPowerCapac(0.0), CombustionEffic(0.0), FracRadiant(0.0),
130 8 : FracLatent(0.0), FracLost(0.0), FracConvect(0.0), ControlType(RadControlType::Invalid), ThrottlRange(0.0), SetptSchedPtr(0),
131 8 : FracDistribPerson(0.0), TotSurfToDistrib(0), ZeroHTRSourceSumHATsurf(0.0), QHTRRadSource(0.0), QHTRRadSrcAvg(0.0),
132 4 : LastSysTimeElapsed(0.0), LastTimeStepSys(0.0), LastQHTRRadSrc(0.0), ElecPower(0.0), ElecEnergy(0.0), GasPower(0.0), GasEnergy(0.0),
133 4 : HeatPower(0.0), HeatEnergy(0.0), HeatingCapMethod(DataSizing::DesignSizingType::Invalid), ScaledHeatingCapacity(0.0)
134 : {
135 4 : }
136 : };
137 :
138 : struct HighTempRadSysNumericFieldData
139 : {
140 : // Members
141 : Array1D_string FieldNames;
142 :
143 : // Default Constructor
144 4 : HighTempRadSysNumericFieldData()
145 4 : {
146 4 : }
147 : };
148 :
149 : // Functions
150 :
151 : void SimHighTempRadiantSystem(EnergyPlusData &state,
152 : std::string_view CompName, // name of the low temperature radiant system
153 : bool const FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
154 : Real64 &LoadMet, // load met by the radiant system, in Watts
155 : int &CompIndex);
156 :
157 : void GetHighTempRadiantSystem(EnergyPlusData &state, bool &ErrorsFound); // Error flag if problems encountered on reading user input
158 :
159 : void InitHighTempRadiantSystem(EnergyPlusData &state,
160 : bool const FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
161 : int const RadSysNum // Index for the low temperature radiant system under consideration within the derived types
162 : );
163 :
164 : void SizeHighTempRadiantSystem(EnergyPlusData &state, int const RadSysNum);
165 :
166 : void CalcHighTempRadiantSystem(EnergyPlusData &state, int const RadSysNum); // name of the low temperature radiant system
167 :
168 : void CalcHighTempRadiantSystemSP(EnergyPlusData &state,
169 : bool const FirstHVACIteration, // true if this is the first HVAC iteration at this system time step !unused1208
170 : int const RadSysNum // name of the low temperature radiant system
171 : );
172 :
173 : void UpdateHighTempRadiantSystem(EnergyPlusData &state,
174 : int const RadSysNum, // Index for the low temperature radiant system under consideration within the derived types
175 : Real64 &LoadMet // load met by the radiant system, in Watts
176 : );
177 :
178 : void UpdateHTRadSourceValAvg(EnergyPlusData &state, bool &HighTempRadSysOn); // .TRUE. if the radiant system has run this zone time step
179 :
180 : void DistributeHTRadGains(EnergyPlusData &state);
181 :
182 : void ReportHighTempRadiantSystem(EnergyPlusData &state,
183 : int RadSysNum); // Index for the low temperature radiant system under consideration within the derived types
184 :
185 : } // namespace HighTempRadiantSystem
186 :
187 : struct HighTempRadiantSystemData : BaseGlobalStruct
188 : {
189 :
190 : // Standard, run-of-the-mill variables...
191 : int NumOfHighTempRadSys = 0; // Number of hydronic low tempererature radiant systems
192 : Array1D_bool MySizeFlag;
193 : Array1D_bool CheckEquipName;
194 :
195 : // Object Data
196 : Array1D<HighTempRadiantSystem::HighTempRadiantSystemData> HighTempRadSys;
197 : Array1D<HighTempRadiantSystem::HighTempRadSysNumericFieldData> HighTempRadSysNumericFields;
198 :
199 : bool GetInputFlag = true;
200 : bool firstTime = true; // For one-time initializations
201 : bool MyEnvrnFlag = true;
202 : bool ZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items
203 :
204 796 : void init_state([[maybe_unused]] EnergyPlusData &state) override
205 : {
206 796 : }
207 :
208 0 : void clear_state() override
209 : {
210 0 : NumOfHighTempRadSys = 0;
211 0 : MySizeFlag.clear();
212 0 : CheckEquipName.clear();
213 :
214 0 : HighTempRadSys.clear();
215 0 : HighTempRadSysNumericFields.clear();
216 :
217 0 : GetInputFlag = true;
218 0 : firstTime = true;
219 0 : MyEnvrnFlag = true;
220 0 : ZoneEquipmentListChecked = false;
221 0 : }
222 : };
223 :
224 : } // namespace EnergyPlus
225 :
226 : #endif
|