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 DataHeatBalSurface_hh_INCLUDED
49 : #define DataHeatBalSurface_hh_INCLUDED
50 :
51 : // ObjexxFCL Headers
52 : #include <ObjexxFCL/Array1D.hh>
53 : #include <ObjexxFCL/Array2D.hh>
54 : #include <ObjexxFCL/Array3D.hh>
55 :
56 : // EnergyPlus Headers
57 : #include <EnergyPlus/Data/BaseData.hh>
58 : #include <EnergyPlus/DataSurfaces.hh>
59 : #include <EnergyPlus/EnergyPlus.hh>
60 :
61 : namespace EnergyPlus {
62 :
63 : namespace DataHeatBalSurface {
64 :
65 : // Data
66 : // MODULE PARAMETER DEFINITIONS
67 : Real64 constexpr MinSurfaceTempLimit(-100.0); // Lowest inside surface temperature allowed in Celsius
68 : Real64 constexpr MinSurfaceTempLimitBeforeFatal(-250.0); // 2.5 times MinSurfaceTempLimit
69 : Real64 constexpr DefaultSurfaceTempLimit(200.0); // Highest inside surface temperature allowed in Celsius
70 : Real64 constexpr IterDampConst(5.0); // Damping constant for inside surface temperature iterations
71 : int constexpr ItersReevalConvCoeff(30); // Number of iterations between inside convection coefficient reevaluations
72 : int constexpr MaxIterations(500); // Maximum number of iterations allowed for inside surface temps
73 : Real64 constexpr PoolIsOperatingLimit(0.0001); // Limit to determine if swimming pool is operating or not
74 : int constexpr MinEMPDIterations(4); // Minimum number of iterations required for EMPD solution
75 : int constexpr IterationsForCondFDRelaxChange(5); // number of iterations for inside temps that triggers a change
76 :
77 : } // namespace DataHeatBalSurface
78 :
79 1542 : struct HeatBalSurfData : BaseGlobalStruct
80 : {
81 :
82 : std::vector<bool> Zone_has_mixed_HT_models; // True if any surfaces in zone use CondFD, HAMT, or Kiva
83 :
84 : // Integer Variables for the Heat Balance Simulation
85 : Array1D_int SurfCurrNumHist; // From Old Bldctf.inc
86 :
87 : // Surface heat balance limits and convergence parameters
88 : Real64 MaxSurfaceTempLimit = 200.0; // Highest inside surface temperature allowed in Celsius
89 : Real64 MaxSurfaceTempLimitBeforeFatal = 500.0; // 2.5 times MaxSurfaceTempLimit
90 : int MinIterations = 1; // Minimum number of iterations for surface heat balance
91 : bool InterZoneWindow = false; // True if there is an interzone window
92 : Real64 SumSurfaceHeatEmission = 0.0; // Heat emission from all surfaces
93 :
94 : // Variables Dimensioned to Max Number of Heat Transfer Surfaces (maxhts)
95 : Array1D<Real64> SurfCTFConstInPart; // Constant Inside Portion of the CTF calculation
96 : Array1D<Real64> SurfCTFConstOutPart; // Constant Outside Portion of the CTF calculation
97 : // This group of arrays (soon to be vectors) added to facilitate vectorizable loops in CalcHeatBalanceInsideSurf2CTFOnly
98 : Array1D<Real64> SurfCTFCross0; // Construct.CTFCross(0)
99 : Array1D<Real64> SurfCTFInside0; // Construct.CTFInside(0)
100 : Array1D<Real64> SurfCTFSourceIn0; // Construct.CTFSourceIn(0)
101 : Array1D<Real64> SurfTempOutHist; // TH(1,1,SurfNum)
102 : Array1D<Real64> SurfQSourceSinkHist; // SurfQsrcHist(SurfNum, 1)
103 :
104 : Array1D_int SurfIsAdiabatic; // 0 not adiabatic, 1 is adiabatic
105 : Array1D_int SurfIsSourceOrSink; // 0 no internal source/sink, 1 has internal source/sing
106 : Array1D_int SurfIsOperatingPool; // 0 not pool, 1 is pool
107 : Array1D<Real64> SurfTempTerm; // TempTerm for heatbalance equation
108 : Array1D<Real64> SurfTempDiv; // Divisor for heatbalance equation
109 : // end group added to support CalcHeatBalanceInsideSurf2CTFOnly
110 : Array1D<Real64> SurfTempIn; // Temperature of the Inside Surface for each heat transfer surface
111 : Array1D<Real64> SurfTempInsOld; // SurfTempIn from previous iteration for convergence check
112 : Array1D<Real64> SurfTempInTmp; // Inside Surface Temperature Of Each Heat Transfer Surface
113 : Array1D<Real64> SurfHcExt; // Outside Convection Coefficient
114 : Array1D<Real64> SurfWinCoeffAdjRatio; // Convective Coefficient Adjustment Ratio assuming highly conductive frames
115 : // Only applicable for exterior window surfaces
116 : Array1D<Real64> SurfHAirExt; // Outside Radiation Coefficient to Air
117 : Array1D<Real64> SurfHSkyExt; // Outside Radiation Coefficient to Sky
118 : Array1D<Real64> SurfHGrdExt; // Outside Radiation Coefficient to Ground
119 : Array1D<Real64> SurfHConvInt; // INSIDE CONVECTION COEFFICIENT
120 : Array1D<Real64> SurfTempSource; // Temperature at the source location for each heat transfer surface
121 : Array1D<Real64> SurfTempUserLoc; // Temperature at the user specified location for each heat transfer surface
122 : Array1D<Real64> SurfTempInMovInsRep; // Temperature of interior movable insulation on the side facing the zone
123 :
124 : Array1D<Real64> SurfQConvInReport; // Surface convection heat gain at inside face [J]
125 : Array1D<Real64> SurfQdotConvInRep; // Surface convection heat transfer rate at inside face surface [W] (report)
126 : Array1D<Real64> SurfQdotConvInPerArea; // Surface conv heat transfer rate per m2 at inside face surf (report){w/m2]
127 :
128 : // these next three all are for net IR thermal radiation exchange with other surfaces in the model.
129 : Array1D<Real64> SurfQRadNetSurfInReport; // Surface thermal radiation heat gain at Inside face [J]
130 : Array1D<Real64> SurfQdotRadNetSurfInRep; // Surface thermal radiation heat transfer inside face surface [W]
131 : // these next three all are for solar radiation gains on inside face
132 : Array1D<Real64> SurfQRadSolarInReport; // Surface thermal radiation heat gain at Inside face [J]
133 : Array1D<Real64> SurfQdotRadSolarInRep; // Surface thermal radiation heat transfer inside face surface [W]
134 : Array1D<Real64> SurfQdotRadSolarInRepPerArea; // [W/m2]Surface thermal radiation heat transfer rate per m2 at Inside face surf
135 : // these next two all are for Lights visible radiation gains on inside face
136 : Array1D<Real64> SurfQRadLightsInReport; // Surface thermal radiation heat gain at Inside face [J]
137 : Array1D<Real64> SurfQdotRadLightsInRep; // Surface thermal radiation heat transfer inside face surface [W]
138 : // these next two all are for Internal Gains sources of radiation gains on inside face
139 : Array1D<Real64> SurfQRadIntGainsInReport; // Surface thermal radiation heat gain at Inside face [J]
140 : Array1D<Real64> SurfQdotRadIntGainsInRep; // Surface thermal radiation heat transfer inside face surface [W]
141 : // these next four all are for Radiative HVAC sources of radiation gains on inside face
142 : Array1D<bool> AnyRadiantSystems; // True if there are any radiant systems
143 : Array1D<Real64> SurfQRadHVACInReport; // Surface thermal radiation heat gain at Inside face [J]
144 : Array1D<Real64> SurfQdotRadHVACInRep; // Surface thermal radiation heat transfer inside face surface [W]
145 : Array1D<Real64> SurfQdotRadHVACInPerArea; // [W/m2]Surface thermal radiation heat transfer rate per m2 at Inside face surf
146 :
147 : Array1D<Real64> SurfQConvOutReport; // Surface convection heat gain at Outside face [J]
148 : Array1D<Real64> SurfQdotConvOutRep; // Surface convection heat transfer rate at Outside face surface [W]
149 : Array1D<Real64> SurfQdotConvOutPerArea; // Surface conv heat transfer rate per m2 at Outside face surf (report){w/m2]
150 :
151 : Array1D<Real64> SurfQRadOutReport; // Surface thermal radiation heat gain at Outside face [J]
152 : Array1D<Real64> SurfQdotRadOutRep; // Surface thermal radiation heat transfer outside face surface [W]
153 : Array1D<Real64> SurfQdotRadOutRepPerArea; // [W/m2]Surface thermal radiation heat transfer rate per m2 at Outside face surf
154 : Array1D<Real64> SurfQAirExtReport; // Surface Outside Face Thermal Radiation to Air Heat Transfer Rate [W]
155 : Array1D<Real64> SurfQHeatEmiReport; // Surface Outside Face Heat Emission to Air Rate [W]
156 :
157 : Array1D<Real64> SurfOpaqInsFaceCondGainRep; // Opaq Surf Ins Face Cond when Opaq Surf Ins Face Cond >= 0
158 : Array1D<Real64> SurfOpaqInsFaceCondLossRep; // Opaq Surf Ins Face Cond when Opaq Surf Ins Face Cond < 0
159 : Array1D<Real64> SurfOpaqInsFaceCond; // Opaque surface inside face heat conduction flow (W) from inside of opaque surfaces,
160 : // for reporting (W)
161 : Array1D<Real64> SurfOpaqInsFaceCondFlux; // Opaque surface inside face heat conduction flux (W/m2) from inside of opaque surfaces,
162 : // for reporting (W/m2)
163 : Array1D<Real64> SurfOpaqInsFaceCondEnergy; // Opaque surface inside face heat conduction flow (J) from inside of opaque surfaces,
164 : // for reporting (J)
165 :
166 : Array1D<Real64> SurfOpaqExtFaceCondGainRep; // Opaq Surf Ext Face Cond when Opaq Surf Ext Face Cond >= 0
167 : Array1D<Real64> SurfOpaqExtFaceCondLossRep; // Opaq Surf Ext Face Cond when Opaq Surf Ext Face Cond < 0
168 : Array1D<Real64> SurfOpaqOutFaceCond; // Opaque surface outside face heat conduction flow (W) from inside of opaque surfaces, for reporting (W)
169 : Array1D<Real64> SurfOpaqOutFaceCondFlux; // Opaque surface outside face heat conduct flux (W/m2) from outside of opaque surfaces,
170 : // for reporting (W/m2)
171 : Array1D<Real64> SurfOpaqOutFaceCondEnergy; // Opaque surface outside face heat conduction flow (J) from inside of opaque surfaces,
172 : // for reporting (J)
173 :
174 : Array1D<Real64> SurfOpaqAvgFaceCondGainRep; // Opaq Surf average Face Cond when Opaq Surf average Face Cond >= 0
175 : Array1D<Real64> SurfOpaqAvgFaceCondLossRep; // Opaq Surf average Face Cond when Opaq Surf average Face Cond < 0
176 : Array1D<Real64> SurfOpaqAvgFaceCond; // Opaque surface average heat conduction flow (W) net conduction from outside environ toward inside zone
177 : // from inside of opaque surfaces, for reporting (W)
178 : Array1D<Real64> SurfOpaqAvgFaceCondFlux; // Opaque surface average face heat conduction flux (W/m2) net conduction from outside environ to inside
179 : // zone from inside of opaque surfaces, for reporting (W/m2)
180 : Array1D<Real64> SurfOpaqAvgFaceCondEnergy; // Opaque surface average heat conduction flow (J) net conduction from outside environ toward inside
181 : // zone from inside of opaque surfaces, for reporting (J)
182 :
183 : Array1D<Real64> SurfOpaqStorageCondGainRep; // Opaque surface stored heat conduction flow when Opaque surface stored heat conduction flow >= 0
184 : Array1D<Real64> SurfOpaqStorageCondLossRep; // Opaque surface stored heat conduction flow when Opaque surface stored heat conduction flow < 0
185 : Array1D<Real64> SurfOpaqStorageCond; // Opaque surface stored heat conduction flow (W) storage of heat inside surface,
186 : // positive is increasing in surf
187 : Array1D<Real64> SurfOpaqStorageCondFlux; // Opaque surface stored heat conduction flux (W/m2) storage of heat inside surface,
188 : // positive is increasing in surf
189 : Array1D<Real64> SurfOpaqStorageCondEnergy; // Opaque surface stored heat conduction flow (J) storage of heat inside surface,
190 : // positive is increasing in surf
191 :
192 : Array1D<Real64> SurfOpaqInsFaceBeamSolAbsorbed; // Opaque surface inside face absorbed beam solar, for reporting (W)
193 : Array1D<Real64> SurfTempOut; // Temperature of the Outside Surface for each heat transfer surface used for reporting purposes only. Ref: TH(x,1,1)
194 : Array1D<Real64> SurfQRadSWOutMvIns; // Short wave radiation absorbed on outside of movable insulation
195 :
196 : Array1D<Real64> SurfQdotRadNetLWInPerArea; // Net interior long wavelength radiation to a surface from other surfaces
197 : Array1D<Real64> SurfQdotRadLightsInPerArea; // Short wave from Lights radiation absorbed on inside of opaque surface
198 : // Variables that are used in both the Surface Heat Balance and the Moisture Balance
199 : Array1D<Real64> SurfOpaqQRadSWOutAbs; // Short wave radiation absorbed on outside of opaque surface
200 : Array1D<Real64> SurfOpaqQRadSWInAbs; // Short wave radiation absorbed on inside of opaque surface
201 : Array1D<Real64> SurfQRadLWOutSrdSurfs; // Long wave radiation absorbed on outside of exterior surface
202 :
203 : Array1D<Real64> SurfQAdditionalHeatSourceOutside; // Additional heat source term on boundary conditions at outside surface
204 : Array1D<Real64> SurfQAdditionalHeatSourceInside; // Additional heat source term on boundary conditions at inside surface
205 :
206 : Array1D<Real64> SurfOpaqInitialDifSolInAbs; // Initial diffuse solar absorbed on inside of opaque surface [W/m2]
207 : Array1D<Real64> SurfWinInitialDifSolInTrans; // Initial diffuse solar transmitted out through window surface [W/m2]
208 :
209 : // REAL(r64) variables from BLDCTF.inc and only used in the Heat Balance
210 : // Hist Term (1 = Current Time, 2-MaxCTFTerms = previous times)
211 : Array1D<Array1D<Real64>> SurfInsideTempHist; // Temperature history - inside (Hist Term, SurfNum)
212 : Array1D<Array1D<Real64>> SurfOutsideTempHist; // Temperature history - outside (Hist Term, SurfNum)
213 : Array1D<Array1D<Real64>>
214 : SurfInsideTempHistMaster; // Master temperature history (on the time step for the construct) - inside (Hist Term, SurfNum)
215 : Array1D<Array1D<Real64>>
216 : SurfOutsideTempHistMaster; // Master temperature history (on the time step for the construct) - outside (Hist Term, SurfNum)
217 : Array1D<Array1D<Real64>> SurfInsideFluxHist; // Flux history - inside (Hist Term, SurfNum)
218 : Array1D<Array1D<Real64>> SurfOutsideFluxHist; // Flux history - outside (Hist Term, SurfNum)
219 : Array1D<Array1D<Real64>> SurfInsideFluxHistMaster; // Master flux history (on the time step for the construct) - inside (Hist Term, SurfNum)
220 : Array1D<Array1D<Real64>> SurfOutsideFluxHistMaster; // Master flux history (on the time step for the construct) - outside (Hist Term, SurfNum)
221 :
222 : Array2D<Real64> SurfTsrcHist; // Temperature history at the source location (SurfNum,Term)
223 : Array2D<Real64> SurfTuserHist; // Temperature history at the user specified location (SurfNum,Term)
224 : Array2D<Real64> SurfQsrcHist; // Heat source/sink history for the surface (SurfNum,Term)
225 : Array2D<Real64> SurfTsrcHistM; // Master temperature history at the source location (SurfNum,Term)
226 : Array2D<Real64> SurfTuserHistM; // Master temperature history at the user specified location (SurfNum,Term)
227 : Array2D<Real64> SurfQsrcHistM; // Master heat source/sink history for the surface (SurfNum,Term)
228 :
229 : Array2D<Real64> ZoneFractDifShortZtoZ; // Fraction of diffuse short radiation in Zone 2 transmitted to Zone 1
230 : Array1D_bool EnclSolRecDifShortFromZ; // True if Zone gets short radiation from another
231 :
232 : // Surface Heat Balance
233 : Array1D<bool> SurfMovInsulExtPresent; // True when interior movable insulation is present
234 : Array1D<bool> SurfMovInsulIntPresent; // True when interior movable insulation is present
235 : Array1D<bool> SurfMovInsulIntPresentPrevTS; // True when interior movable insulation was present during the previous time step
236 :
237 : Array1D<Real64> SurfMovInsulHExt; // Resistance or "h" value of exterior movable insulation
238 : Array1D<Real64> SurfMovInsulHInt; // Resistance or "h" value of interior movable insulation
239 : Array1D<Real64> SurfAbsSolarExt; // Solar Absorptivity of surface inside face or interior movable insulation if present
240 : Array1D<Real64> SurfAbsThermalExt; // Thermal Absorptivity of surface inside face or interior movable insulation if present
241 : Array1D<Real64> SurfAbsSolarInt; // Solar absorptivity of surface outside face or exterior movable insulation if present
242 : Array1D<DataSurfaces::SurfaceRoughness> SurfRoughnessExt; // Roughness of surface inside face or interior movable insulation if present
243 : Array1D<Real64> SurfAbsThermalInt; // Thermal absorptivity of surface outside face or exterior movable insulation if present
244 : std::vector<int> SurfMovInsulIndexList;
245 : std::vector<int> SurfMovSlatsIndexList;
246 0 : void clear_state() override
247 : {
248 0 : *this = HeatBalSurfData();
249 0 : }
250 : };
251 :
252 : } // namespace EnergyPlus
253 :
254 : #endif
|