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 Material_hh_INCLUDED
49 : #define Material_hh_INCLUDED
50 :
51 : // EnergyPlus Headers
52 : #include <EnergyPlus/Data/BaseData.hh>
53 : #include <EnergyPlus/DataWindowEquivalentLayer.hh>
54 : #include <EnergyPlus/EnergyPlus.hh>
55 : #include <EnergyPlus/General.hh>
56 : #include <EnergyPlus/ScheduleManager.hh>
57 : #include <EnergyPlus/TARCOGGassesParams.hh>
58 : #include <EnergyPlus/TARCOGParams.hh>
59 : #include <EnergyPlus/WindowModel.hh>
60 :
61 : namespace EnergyPlus {
62 :
63 : // Forward declarations
64 : namespace Curve {
65 : struct Curve;
66 : }
67 :
68 : namespace Material {
69 :
70 : // Parameters to indicate material group type for use with the Material
71 : // derived type (see below):
72 :
73 : // Don't change these numbers because they are printed out by number in SQLite (shouldn't print out internal enums by number)
74 : enum class Group
75 : {
76 : Invalid = -1,
77 : Regular,
78 : AirGap,
79 : Shade,
80 : Glass,
81 : Gas,
82 : Blind,
83 : GasMixture,
84 : Screen,
85 : EcoRoof,
86 : IRTransparent,
87 : GlassSimple,
88 : ComplexShade,
89 : ComplexWindowGap,
90 : GlassEQL,
91 : ShadeEQL,
92 : DrapeEQL,
93 : BlindEQL,
94 : ScreenEQL,
95 : WindowGapEQL,
96 : GlassTCParent,
97 : Num
98 : };
99 :
100 : enum class GasType
101 : {
102 : Invalid = -1,
103 : Custom,
104 : Air,
105 : Argon,
106 : Krypton,
107 : Xenon,
108 : Num
109 : };
110 :
111 : enum class GapVentType
112 : {
113 : Invalid = -1,
114 : Sealed,
115 : VentedIndoor,
116 : VentedOutdoor,
117 : Num
118 : };
119 :
120 : constexpr std::array<std::string_view, (int)GapVentType::Num> gapVentTypeNamesUC = {"SEALED", "VENTEDINDOOR", "VENTEDOUTDOOR"};
121 :
122 : extern const std::array<std::string_view, (int)GasType::Num> gasTypeNames;
123 : extern const std::array<std::string_view, (int)GapVentType::Num> gapVentTypeNames;
124 :
125 : enum class SlatAngleType
126 : {
127 : Invalid = -1,
128 : FixedSlatAngle,
129 : MaximizeSolar,
130 : BlockBeamSolar,
131 : Num
132 : };
133 :
134 : constexpr std::array<std::string_view, (int)SlatAngleType::Num> slatAngleTypeNamesUC = {"FIXEDSLATANGLE", "MAXIMIZESOLAR", "BLOCKBEAMSOLAR"};
135 :
136 : // Parameter for window screens beam reflectance accounting
137 : enum class ScreenBeamReflectanceModel
138 : {
139 : Invalid = -1,
140 : DoNotModel,
141 : DirectBeam,
142 : Diffuse,
143 : Num
144 : };
145 :
146 : constexpr std::array<std::string_view, (int)ScreenBeamReflectanceModel::Num> screenBeamReflectanceModelNamesUC = {
147 : "DONOTMODEL", "MODELASDIRECTBEAM", "MODELASDIFFUSE"};
148 :
149 : enum class VariableAbsCtrlSignal
150 : {
151 : Invalid = -1,
152 : SurfaceTemperature,
153 : SurfaceReceivedSolarRadiation,
154 : SpaceHeatingCoolingMode,
155 : Scheduled,
156 : Num
157 : };
158 :
159 : constexpr std::array<std::string_view, (int)VariableAbsCtrlSignal::Num> variableAbsCtrlSignalNamesUC = {
160 : "SURFACETEMPERATURE", "SURFACERECEIVEDSOLARRADIATION", "SPACEHEATINGCOOLINGMODE", "SCHEDULED"};
161 :
162 : // Parameters to indicate surface roughness for use with the Material
163 : // derived type:
164 : enum class SurfaceRoughness
165 : {
166 : Invalid = -1,
167 : VeryRough,
168 : Rough,
169 : MediumRough,
170 : MediumSmooth,
171 : Smooth,
172 : VerySmooth,
173 : Num
174 : };
175 :
176 : constexpr std::array<std::string_view, (int)SurfaceRoughness::Num> surfaceRoughnessNamesUC{
177 : "VERYROUGH", "ROUGH", "MEDIUMROUGH", "MEDIUMSMOOTH", "SMOOTH", "VERYSMOOTH"};
178 :
179 : extern const std::array<std::string_view, (int)SurfaceRoughness::Num> surfaceRoughnessNames;
180 :
181 : // Class Hierarchy
182 : //
183 : // MaterialBase: Material, Material:AirGap, Material:NoMass, Material:InfraredTransparent
184 : // |
185 : // | MaterialGasMix: WindowMaterial:Gas, WindowMaterial:GasMixture
186 : // | | MaterialComplexGap: WindowMaterial:Gap (includes WindowGap:DeflectionState and WindowGap:SupportPillar)
187 : // |
188 : // | MaterialFen: abstract
189 : // | | MaterialGlass: WindowMaterial:Glazing, WindowMaterial:Glazing:RefractionExtinctionMethod
190 : // | | | MaterialGlassEQL: WindowMaterial:Glazing:EquivalentLayer
191 : // | | | MaterialGlassTCParent: WindowMaterial:GlazingGroup:Thermochromic
192 : // | |
193 : // | | MaterialShadingDevice: abstract
194 : // | | | MaterialShade: WindowMaterial:Shade
195 : // | | | MaterialBlind: WindowMaterial:Blind
196 : // | | | MaterialScreen: WindowMaterial:Screen
197 : // | | | MaterialComplexShade: WindowMaterial:ComplexShade
198 : // | | | | MaterialShadeEQL: WindowMaterial:Shade:EquivalentLayer
199 : // | | | | MaterialBlindEQL: WindowMaterial:Blind:EquivalentLayer
200 : // | | | | MaterialDrapeEQL: WindowMaterial:Drape:EquivalentLayer
201 : // | | | | MaterialScreenEQL: WindowMaterial:Screen:EquivalentLayer
202 : // |
203 : // | MaterialEcoRoof: Material:RoofVegeration
204 : // |
205 : // | MaterialEMPD: holder of EMPD MaterialProperties.
206 : // |
207 : // | MaterialHAMT: holder of HAMT MaterialProperties.
208 : // |
209 : // | MaterialPhaseChange: holder of PhaseChange MaterialProperties.
210 :
211 : // This class is used for Material:AirGap, Material,
212 : // Material:NoMass, and Material:InfraredTransparent. It is also
213 : // the base class for all other materials. Material:AirGap,
214 : // Material:NoMass, and Material:IRT could be a much smaller
215 : // parent class of this, but Material:Regular is by far the most
216 : // common material so it makes sense to have it as the base class
217 : // to avoid an excess of dynamic casting.
218 : struct MaterialBase
219 : {
220 : // Members
221 : std::string Name = ""; // Name of material layer
222 : int Num = 0; // Index in material array, comes in handy sometimes
223 : Group group = Group::Invalid; // Material group type (see Material Parameters above. Currently
224 :
225 : bool isUsed = false;
226 :
227 : // active: RegularMaterial, Shade, Air, WindowGlass,
228 : // WindowGas, WindowBlind, WindowGasMixture, Screen, EcoRoof,
229 : // IRTMaterial, WindowSimpleGlazing, ComplexWindowShade, ComplexWindowGap)
230 : SurfaceRoughness Roughness = SurfaceRoughness::Invalid; // Surface roughness index (See Surface Roughness parameters
231 : // above. Current: VerySmooth, Smooth, MediumSmooth,
232 : // MediumRough, Rough, VeryRough)
233 : // Thermo-physical material properties
234 : Real64 Conductivity = 0.0; // Thermal conductivity of layer (W/m2K)
235 : Real64 Density = 0.0; // Layer density (kg/m3)
236 : Real64 Resistance = 0.0; // Layer thermal resistance (alternative to Density,
237 : // Conductivity, Thickness, and Specific Heat; K/W)
238 : bool ROnly = false; // Material defined with "R" only
239 : Real64 NominalR = 0.0;
240 : Real64 SpecHeat = 0.0; // Layer specific heat (J/kgK)
241 : Real64 Thickness = 0.0; // Layer thickness (m)
242 :
243 : Real64 AbsorpThermal = 0.0; // Layer thermal absorptance
244 : Real64 AbsorpThermalInput = 0.0; // Layer thermal absorptance input by user
245 : Real64 AbsorpThermalBack = 0.0; // Infrared radiation back absorption
246 : Real64 AbsorpThermalFront = 0.0; // Infrared radiation front absorption
247 :
248 : Real64 AbsorpSolar = 0.0; // Layer solar absorptance
249 : Real64 AbsorpSolarInput = 0.0; // Layer solar absorptance input by user
250 :
251 : Real64 AbsorpVisible = 0.0; // Layer Visible Absorptance
252 : Real64 AbsorpVisibleInput = 0.0; // Layer Visible Absorptance input by user
253 :
254 : // Radiation parameters // Are these for windows or for opaque materials also?
255 : bool AbsorpSolarEMSOverrideOn = false; // if true, then EMS calling to override value for solar absorptance
256 : Real64 AbsorpSolarEMSOverride = false; // value to use when EMS calling to override value for solar absorptance
257 : bool AbsorpThermalEMSOverrideOn = false; // if true, then EMS calling to override value for thermal absorptance
258 : Real64 AbsorpThermalEMSOverride = 0.0; // value to use when EMS calling to override value for thermal absorptance
259 : bool AbsorpVisibleEMSOverrideOn = false; // if true, then EMS calling to override value for visible absorptance
260 : Real64 AbsorpVisibleEMSOverride = 0.0; // value to use when EMS calling to override value for visible absorptance
261 :
262 : // dynamic thermal and solar absorptance coating parameters
263 : VariableAbsCtrlSignal absorpVarCtrlSignal = VariableAbsCtrlSignal::Invalid;
264 : Sched::Schedule *absorpThermalVarSched = nullptr;
265 : Curve::Curve *absorpThermalVarCurve = nullptr;
266 : Sched::Schedule *absorpSolarVarSched = nullptr;
267 : Curve::Curve *absorpSolarVarCurve = nullptr;
268 :
269 : bool hasEMPD = false;
270 : bool hasHAMT = false;
271 : bool hasPCM = false;
272 :
273 : // Moved these into the base class for SQLite purposes
274 : Real64 Porosity = 0.0; // Layer porosity
275 : // Real64 IsoMoistCap = 0.0; // Isothermal moisture capacity on water vapor density (m3/kg)
276 : // Real64 ThermGradCoef = 0.0; // Thermal-gradient coefficient for moisture capacity based on the water vapor density (kg/kgK)
277 : Real64 VaporDiffus = 0.0; // Layer vapor diffusivity
278 :
279 : bool WarnedForHighDiffusivity = false; // used to limit error messaging to just the first instance
280 :
281 14087 : MaterialBase()
282 28174 : {
283 14087 : group = Group::AirGap;
284 14087 : }
285 40 : virtual ~MaterialBase() = default;
286 : };
287 :
288 : struct MaterialFen : public MaterialBase
289 : {
290 : // Are these just for windows?
291 : Real64 Trans = 0.0; // Transmittance of layer (glass, shade)
292 : Real64 TransVis = 0.0; // Visible transmittance (at normal incidence)
293 : Real64 TransThermal = 0.0; // Infrared radiation transmittance
294 :
295 : Real64 ReflectSolBeamBack = 0.0; // Solar back reflectance (beam to everything)
296 : Real64 ReflectSolBeamFront = 0.0; // Solar front reflectance (beam to everything)
297 :
298 1909 : MaterialFen() : MaterialBase()
299 : {
300 1909 : group = Group::Invalid;
301 1909 : }
302 0 : ~MaterialFen() = default;
303 : virtual bool can_instantiate() = 0;
304 : };
305 :
306 : // Abstract parent class for all WindowMaterial:X shading device materials (including Equivalent Layer).
307 : struct MaterialShadingDevice : public MaterialFen
308 : {
309 : // Some characteristics for blind thermal calculation
310 : Real64 toGlassDist = 0.0; // Distance between window shade and adjacent glass (m)
311 : Real64 topOpeningMult = 0.0; // Area of air-flow opening at top of blind, expressed as a fraction
312 : // of the blind-to-glass opening area at the top of the blind
313 : Real64 bottomOpeningMult = 0.0; // Area of air-flow opening at bottom of blind, expressed as a fraction
314 : // of the blind-to-glass opening area at the bottom of the blind
315 : Real64 leftOpeningMult = 0.0; // Area of air-flow opening at left side of blind, expressed as a fraction
316 : // of the blind-to-glass opening area at the left side of the blind
317 : Real64 rightOpeningMult = 0.0; // Area of air-flow opening at right side of blind, expressed as a fraction
318 : // of the blind-to-glass opening area at the right side of the blind
319 : // Calculated blind properties
320 :
321 : Real64 airFlowPermeability = 0.0; // The effective area of openings in the shade itself, expressed as a
322 : // fraction of the shade area
323 49 : MaterialShadingDevice() : MaterialFen()
324 : {
325 49 : group = Group::Invalid;
326 49 : }
327 0 : ~MaterialShadingDevice() = default;
328 : virtual bool can_instantiate() = 0; // Prevents this class from being instantiated
329 : };
330 :
331 : // Class for WindowMaterial:Shade
332 : struct MaterialShade : public MaterialShadingDevice
333 : {
334 : Real64 ReflectShade = 0.0; // Shade or screen reflectance (interior shade only)
335 : Real64 ReflectShadeVis = 0.0; // Shade reflectance for visible radiation
336 :
337 17 : MaterialShade() : MaterialShadingDevice()
338 : {
339 17 : group = Group::Shade;
340 17 : }
341 0 : ~MaterialShade() = default;
342 0 : bool can_instantiate() override
343 : {
344 0 : return true;
345 : } // Allows this class to be instantiated
346 : };
347 :
348 : // This may seem like an overly complicated way to handle a set of
349 : // multi-dimensional variables, but I think that it is actually
350 : // cleaner than either a multi-dimensional array (and certaily
351 : // faster) and also better than just a long list of variables.
352 :
353 : // Blind-properties essentially have four dimensions: property
354 : // type (transmittance, reflectance, absorptance), beam or
355 : // diffuse, front or back, solar or visible (maybe solar or
356 : // visible or thermal/IR). Rather than coming up with and
357 : // enforcing a consistent namming scheme for these variables,
358 : // arranging them into nested structres keeps the ordering (as
359 : // well as the naming) of the dimensions consistent, and also
360 : // inserts periods between the dimensions to help with
361 : // readability. In this case, I chose the struct nesting to be
362 : // SolVis.Front.Back.BmDf.Prop. So variables are always going to
363 : // be called Sol.Front.Df.Abs and Vis.Back.Df.Ref.
364 :
365 : // For the record, accessing variables in nested structs is as
366 : // fast as accessing plain scalar variables. The reason is that
367 : // the compiler knows the position of every variable at every
368 : // level of a nested struct at compile time and can load it with a
369 : // single offset like it loads every other variable in an object.
370 : // This is another downside of references in C++. Accessing
371 : // variables in structures (even nested structures) is fast.
372 : // Acessing variables through pointer indirection is slow.
373 : // W->X->Y->Z is slower than W.X.Y.Z. References are pointers,
374 : // but they use the . notation rather than -> for accessing
375 : // fields. So if W.X.Y.Z is implemented using nested structures
376 : // then it is fast, but if it is implemented using references to
377 : // structures then it is slow. But without context there is no
378 : // way to tell which is which.
379 :
380 : struct BlindBmTAR
381 : {
382 : Real64 BmTra = 0.0; // Beam-beam transmittance
383 : Real64 DfTra = 0.0; // Beam-diff transmittance
384 : Real64 BmRef = 0.0; // Beam-beam reflectance
385 : Real64 DfRef = 0.0; // Beam-diff reflectance
386 : Real64 Abs = 0.0; // Absorptance
387 :
388 11698376 : void interpSlatAng(BlindBmTAR const &t1, BlindBmTAR const &t2, Real64 interpFac)
389 : {
390 11698376 : BmTra = Interp(t1.BmTra, t2.BmTra, interpFac);
391 11698376 : DfTra = Interp(t1.DfTra, t2.DfTra, interpFac);
392 11698376 : BmRef = Interp(t1.BmRef, t2.BmRef, interpFac);
393 11698376 : DfRef = Interp(t1.DfRef, t2.DfRef, interpFac);
394 11698376 : Abs = Interp(t1.Abs, t2.Abs, interpFac);
395 11698376 : }
396 : };
397 :
398 : struct BlindDfTAR
399 : {
400 : Real64 Tra = 0.0;
401 : Real64 Abs = 0.0;
402 : Real64 Ref = 0.0;
403 :
404 : void interpSlatAng(BlindDfTAR const &t1, BlindDfTAR const &t2, Real64 interpFac)
405 : {
406 : Tra = Interp(t1.Tra, t2.Tra, interpFac);
407 : Ref = Interp(t1.Ref, t2.Ref, interpFac);
408 : Abs = Interp(t1.Abs, t2.Abs, interpFac);
409 : }
410 : };
411 :
412 : struct BlindDfTARGS
413 : {
414 : Real64 Tra = 0.0;
415 : Real64 TraGnd = 0.0;
416 : Real64 TraSky = 0.0;
417 : Real64 Ref = 0.0;
418 : Real64 RefGnd = 0.0;
419 : Real64 RefSky = 0.0;
420 : Real64 Abs = 0.0;
421 : Real64 AbsGnd = 0.0;
422 : Real64 AbsSky = 0.0;
423 :
424 307852 : void interpSlatAng(BlindDfTARGS const &t1, BlindDfTARGS const &t2, Real64 interpFac)
425 : {
426 307852 : Tra = Interp(t1.Tra, t2.Tra, interpFac);
427 307852 : TraGnd = Interp(t1.TraGnd, t2.TraGnd, interpFac);
428 307852 : TraSky = Interp(t1.TraSky, t2.TraSky, interpFac);
429 307852 : Ref = Interp(t1.Ref, t2.Ref, interpFac);
430 307852 : RefGnd = Interp(t1.RefGnd, t2.RefGnd, interpFac);
431 307852 : RefSky = Interp(t1.RefSky, t2.RefSky, interpFac);
432 307852 : Abs = Interp(t1.Abs, t2.Abs, interpFac);
433 307852 : AbsGnd = Interp(t1.AbsGnd, t2.AbsGnd, interpFac);
434 307852 : AbsSky = Interp(t1.AbsSky, t2.AbsSky, interpFac);
435 307852 : }
436 : };
437 :
438 : template <int ProfAngs> struct BlindBmDf
439 : {
440 : std::array<BlindBmTAR, ProfAngs> Bm;
441 : BlindDfTARGS Df;
442 :
443 307852 : void interpSlatAng(BlindBmDf const &t1, BlindBmDf const &t2, Real64 interpFac)
444 : {
445 12006228 : for (int i = 0; i < ProfAngs; ++i) {
446 11698376 : Bm[i].interpSlatAng(t1.Bm[i], t2.Bm[i], interpFac);
447 : }
448 307852 : Df.interpSlatAng(t1.Df, t2.Df, interpFac);
449 307852 : }
450 : };
451 :
452 : template <int ProfAngs> struct BlindFtBk
453 : {
454 : BlindBmDf<ProfAngs> Ft;
455 : BlindBmDf<ProfAngs> Bk;
456 :
457 153926 : void interpSlatAng(BlindFtBk const &t1, BlindFtBk const &t2, Real64 interpFac)
458 : {
459 153926 : Ft.interpSlatAng(t1.Ft, t2.Ft, interpFac);
460 153926 : Bk.interpSlatAng(t1.Bk, t2.Bk, interpFac);
461 153926 : }
462 : };
463 :
464 : struct BlindTraEmi
465 : {
466 : Real64 Tra = 0.0;
467 : Real64 Emi = 0.0;
468 :
469 153926 : void interpSlatAng(BlindTraEmi const &t1, BlindTraEmi const &t2, Real64 interpFac)
470 : {
471 153926 : Tra = Interp(t1.Tra, t2.Tra, interpFac);
472 153926 : Emi = Interp(t1.Emi, t2.Emi, interpFac);
473 153926 : }
474 : };
475 :
476 : struct BlindFtBkIR
477 : {
478 : BlindTraEmi Ft;
479 : BlindTraEmi Bk;
480 :
481 76963 : void interpSlatAng(BlindFtBkIR const &t1, BlindFtBkIR const &t2, Real64 interpFac)
482 : {
483 76963 : Ft.interpSlatAng(t1.Ft, t2.Ft, interpFac);
484 76963 : Bk.interpSlatAng(t1.Bk, t2.Bk, interpFac);
485 76963 : }
486 : };
487 :
488 : template <int ProfAngs> struct BlindTraAbsRef
489 : {
490 : BlindFtBk<ProfAngs> Sol;
491 : BlindFtBk<ProfAngs> Vis;
492 : BlindFtBkIR IR;
493 :
494 76963 : void interpSlatAng(BlindTraAbsRef const &t1, BlindTraAbsRef const &t2, Real64 interpFac)
495 : {
496 76963 : Sol.interpSlatAng(t1.Sol, t2.Sol, interpFac);
497 76963 : Vis.interpSlatAng(t1.Vis, t2.Vis, interpFac);
498 76963 : IR.interpSlatAng(t1.IR, t2.IR, interpFac);
499 76963 : }
500 : };
501 :
502 : // Blind
503 : constexpr int MaxSlatAngs = 181;
504 : constexpr int MaxProfAngs = 37;
505 :
506 : constexpr Real64 dProfAng = Constant::Pi / (MaxProfAngs - 1);
507 : constexpr Real64 dSlatAng = Constant::Pi / (MaxSlatAngs - 1);
508 :
509 : // WindowMaterial:Blind class
510 : struct MaterialBlind : public MaterialShadingDevice
511 : {
512 : // Input properties
513 : DataWindowEquivalentLayer::Orientation SlatOrientation = DataWindowEquivalentLayer::Orientation::Invalid; // HORIZONTAL or VERTICAL
514 : DataWindowEquivalentLayer::AngleType SlatAngleType = DataWindowEquivalentLayer::AngleType::Fixed; // FIXED or VARIABLE
515 : Real64 SlatWidth = 0.0; // Slat width (m)
516 : Real64 SlatSeparation = 0.0; // Slat separation (m)
517 : Real64 SlatThickness = 0.0; // Slat thickness (m)
518 : Real64 SlatCrown = 0.0; // the height of the slate (length from the chord to the curve)
519 : Real64 SlatAngle = 0.0; // Slat angle (deg)
520 : Real64 MinSlatAngle = 0.0; // Minimum slat angle for variable-angle slats (deg) (user input)
521 : Real64 MaxSlatAngle = 0.0; // Maximum slat angle for variable-angle slats (deg) (user input)
522 : Real64 SlatConductivity = 0.0; // Slat conductivity (W/m-K)
523 :
524 : BlindTraAbsRef<1> slatTAR; // Beam properties for slats are not profile-angle dependent
525 :
526 : // Beam properties for blinds are profile angle dependent, so template must be instantiated with MaxProfAngs+1
527 : std::array<BlindTraAbsRef<MaxProfAngs + 1>, MaxSlatAngs> TARs;
528 :
529 : // Default Constructor
530 18 : MaterialBlind() : MaterialShadingDevice()
531 : {
532 18 : group = Group::Blind;
533 18 : }
534 0 : ~MaterialBlind() = default;
535 0 : bool can_instantiate()
536 : {
537 0 : return true;
538 : } // This function allows this class to be instantiated
539 :
540 : Real64 BeamBeamTrans(Real64 profAng, Real64 slatAng) const;
541 : };
542 :
543 : // WindowMaterial:ComplexShade class
544 : struct MaterialComplexShade : public MaterialShadingDevice
545 : {
546 : // Layer type (OtherShadingType, Venetian, Woven, Perforated)
547 : TARCOGParams::TARCOGLayerType LayerType = TARCOGParams::TARCOGLayerType::Invalid;
548 : Real64 FrontEmissivity = 0.0; // Emissivity of front surface
549 : Real64 BackEmissivity = 0.0; // Emissivity of back surface
550 : Real64 SlatWidth = 0.0; // Slat width (m)
551 : Real64 SlatSpacing = 0.0; // Slat spacing (m)
552 : Real64 SlatThickness = 0.0; // Slat thickness (m)
553 : Real64 SlatAngle = 0.0; // Slat angle (deg)
554 : Real64 SlatConductivity = 0.0; // Slat conductivity (W/m2K)
555 : Real64 SlatCurve = 0.0; // Curvature radius of slat (if =0 then flat) (m)
556 :
557 : Real64 frontOpeningMult = 0.0;
558 :
559 9 : MaterialComplexShade() : MaterialShadingDevice()
560 : {
561 9 : group = Group::ComplexShade;
562 9 : }
563 0 : ~MaterialComplexShade() = default;
564 0 : bool can_instantiate()
565 : {
566 0 : return true;
567 : } // This function allows this class to be instantiated
568 : };
569 :
570 : int constexpr maxMixGases = 5;
571 :
572 : struct GasCoeffs
573 : {
574 : Real64 c0 = 0.0;
575 : Real64 c1 = 0.0;
576 : Real64 c2 = 0.0;
577 : };
578 :
579 : struct Gas
580 : {
581 : GasType type = GasType::Custom;
582 : GasCoeffs con = GasCoeffs();
583 : GasCoeffs vis = GasCoeffs();
584 : GasCoeffs cp = GasCoeffs();
585 : Real64 wght = 0.0;
586 : Real64 specHeatRatio = 0.0;
587 : };
588 :
589 : extern const std::array<Gas, 10> gases;
590 :
591 : // Class for WindowMaterial:Gas and WindowMaterial:GasMixture. Parent class for Material:ComplexWindowGap
592 : struct MaterialGasMix : public MaterialBase
593 : {
594 : // up to 5 gases in a mixture [Window gas only]. It is defined as parameter (GasCoefs)
595 : int numGases = 0; // Number of gases in a window gas mixture
596 :
597 : std::array<Real64, maxMixGases> gasFracts = {0.0};
598 : std::array<Gas, maxMixGases> gases = {Gas()};
599 :
600 : GapVentType gapVentType = GapVentType::Sealed; // Gap Ven type for equivalent Layer window model
601 :
602 861 : MaterialGasMix() : MaterialBase()
603 : {
604 861 : group = Group::Gas;
605 861 : }
606 0 : ~MaterialGasMix() = default;
607 : };
608 :
609 : // Class for Material:ComplexWindowGap
610 : struct MaterialComplexWindowGap : public MaterialGasMix
611 : {
612 : Real64 Pressure = 0.0;
613 : Real64 pillarSpacing = 0.0; // Spacing between centers of support pillars (m)
614 : Real64 pillarRadius = 0.0; // Support pillar radius (m)
615 : Real64 deflectedThickness = 0.0;
616 :
617 14 : MaterialComplexWindowGap() : MaterialGasMix()
618 : {
619 14 : group = Group::ComplexWindowGap;
620 14 : }
621 0 : ~MaterialComplexWindowGap() = default;
622 : };
623 :
624 : struct ScreenBmTraAbsRef
625 : {
626 : struct
627 : {
628 : Real64 Tra = 0.0;
629 : } Bm;
630 : struct
631 : {
632 : Real64 Tra = 0.0;
633 : } Df;
634 : Real64 Abs = 0.0;
635 : Real64 Ref = 0.0;
636 : };
637 :
638 : struct ScreenBmTAR
639 : {
640 : struct
641 : {
642 : ScreenBmTraAbsRef Ft, Bk;
643 : } Sol;
644 : struct
645 : {
646 : ScreenBmTraAbsRef Ft, Bk;
647 : } Vis;
648 : };
649 :
650 : // Screen Beam Transmittance, Absorptance, Reflectance (TAR) properties
651 : struct ScreenBmTransAbsRef
652 : {
653 : Real64 BmTrans = 0.0; // Beam solar transmittance (dependent on sun angle)
654 : // (this value can include scattering if the user so chooses)
655 : Real64 BmTransBack = 0.0; // Beam solar transmittance (dependent on sun angle) from back side of screen
656 : Real64 BmTransVis = 0.0; // Visible solar transmittance (dependent on sun angle)
657 : // (this value can include visible scattering if the user so chooses)
658 : Real64 DfTrans = 0.0; // Beam solar transmitted as diffuse radiation (dependent on sun angle)
659 : Real64 DfTransBack = 0.0; // Beam solar transmitted as diffuse radiation (dependent on sun angle) from back side
660 : Real64 DfTransVis = 0.0; // Visible solar transmitted as diffuse radiation (dependent on sun angle)
661 :
662 : // The following reflectance properties are dependent on sun angle:
663 : Real64 RefSolFront = 0.0; // Beam solar reflected as diffuse radiation when sun is in front of screen
664 : Real64 RefVisFront = 0.0; // Visible solar reflected as diffuse radiation when sun is in front of screen
665 : Real64 RefSolBack = 0.0; // Beam solar reflected as diffuse radiation when sun is in back of screen
666 : Real64 RefVisBack = 0.0; // Visible solar reflected as diffuse radiation when sun is in back of screen
667 : Real64 AbsSolFront = 0.0; // Front surface solar beam absorptance
668 : Real64 AbsSolBack = 0.0; // Back surface solar beam absorptance
669 : };
670 :
671 : #define PRECALC_INTERP_SCREEN
672 :
673 : constexpr int minDegResolution = 5;
674 :
675 : constexpr int maxIPhi = (Constant::Pi * Constant::RadToDeg / minDegResolution) + 1;
676 : constexpr int maxITheta = (Constant::Pi * Constant::RadToDeg / minDegResolution) + 1;
677 :
678 : // Class for Material:Screen
679 : struct MaterialScreen : public MaterialShadingDevice
680 : {
681 : Real64 diameterToSpacingRatio = 0.0; // ratio of screen material diameter to screen material spacing
682 :
683 : ScreenBeamReflectanceModel bmRefModel = ScreenBeamReflectanceModel::Invalid; // user specified method of accounting for scattered solar beam
684 :
685 : Real64 DfTrans = 0.0; // Back surface diffuse solar transmitted
686 : Real64 DfTransVis = 0.0; // Back surface diffuse visible solar transmitted
687 : Real64 DfRef = 0.0; // Back reflection of solar diffuse radiation
688 : Real64 DfRefVis = 0.0; // Back reflection of visible diffuse radiation
689 : Real64 DfAbs = 0.0; // Absorption of diffuse radiation
690 :
691 : Real64 ShadeRef = 0.0; // Screen assembly solar reflectance (user input adjusted for holes in screen)
692 : Real64 ShadeRefVis = 0.0; // Screen assembly visible reflectance (user input adjusted for holes in screen)
693 : Real64 CylinderRef = 0.0; // Screen material solar reflectance (user input, does not account for holes in screen)
694 : Real64 CylinderRefVis = 0.0; // Screen material visible reflectance (user input, does not account for holes in screen)
695 :
696 : int mapDegResolution = 0; // Resolution of azimuth and altitude angles to print in transmittance map
697 : Real64 dPhi = (Real64)minDegResolution * Constant::DegToRad; // phi increments (rad)
698 : Real64 dTheta = (Real64)minDegResolution * Constant::DegToRad; // theta increments (rad)
699 :
700 : std::array<std::array<ScreenBmTransAbsRef, maxITheta>, maxIPhi> btars;
701 :
702 2 : MaterialScreen() : MaterialShadingDevice()
703 : {
704 2 : group = Group::Screen;
705 2 : }
706 0 : ~MaterialScreen() = default;
707 0 : bool can_instantiate() override
708 : {
709 0 : return true;
710 : } // Allows this class to be instantiated
711 : };
712 :
713 : // Class for Material:Shade:EquivalentLayer and parent class for
714 : // Material:Blind:EquivalentLayer, Material:Drape:EquivalentLayer
715 : // and MaterialScreen:EquivalentLayer
716 : struct MaterialShadeEQL : public MaterialShadingDevice
717 : {
718 : // Shading properties are profile-angle independent in EQL model
719 : BlindTraAbsRef<1> TAR;
720 :
721 3 : MaterialShadeEQL() : MaterialShadingDevice()
722 : {
723 3 : group = Group::ShadeEQL;
724 3 : }
725 0 : virtual ~MaterialShadeEQL() = default;
726 0 : bool can_instantiate() override
727 : {
728 0 : return true;
729 : } // Allows this class to be instantiated
730 : };
731 :
732 : // Class for Material:Screen:EquivalentLayer
733 : struct MaterialScreenEQL : public MaterialShadeEQL
734 : {
735 : Real64 wireSpacing = 0.0; // insect screen wire spacing
736 : Real64 wireDiameter = 0.0; // insect screen wire diameter
737 :
738 1 : MaterialScreenEQL() : MaterialShadeEQL()
739 : {
740 1 : group = Group::ScreenEQL;
741 1 : }
742 0 : virtual ~MaterialScreenEQL() = default;
743 : };
744 :
745 : struct MaterialDrapeEQL : public MaterialShadeEQL
746 : {
747 : bool isPleated = false; // if pleated drape= true, if nonpleated drape = false
748 : Real64 pleatedWidth = 0.0; // width of the pleated drape fabric section
749 : Real64 pleatedLength = 0.0; // length of the pleated drape fabric section
750 :
751 0 : MaterialDrapeEQL() : MaterialShadeEQL()
752 : {
753 0 : group = Group::DrapeEQL;
754 0 : } // Can be any number of 'group' types, so don't set it here
755 0 : virtual ~MaterialDrapeEQL() = default;
756 : };
757 :
758 : struct MaterialBlindEQL : public MaterialShadeEQL
759 : {
760 : Real64 SlatWidth = 0.0; // slat width
761 : Real64 SlatSeparation = 0.0; // slat separation
762 : Real64 SlatCrown = 0.0; // slat crown
763 : Real64 SlatAngle = 0.0; // slat angle
764 : SlatAngleType slatAngleType = SlatAngleType::FixedSlatAngle; // slat angle control type, 0=fixed, 1=maximize solar, 2=block beam
765 : DataWindowEquivalentLayer::Orientation SlatOrientation = DataWindowEquivalentLayer::Orientation::Invalid; // horizontal or vertical
766 :
767 0 : MaterialBlindEQL() : MaterialShadeEQL()
768 : {
769 0 : group = Group::BlindEQL;
770 0 : } // Can be any number of 'group' types, so don't set it here
771 0 : virtual ~MaterialBlindEQL() = default;
772 : };
773 :
774 : // EcoRoof
775 : enum EcoRoofCalcMethod
776 : {
777 : Invalid = -1,
778 : Simple,
779 : SchaapGenuchten,
780 : Num
781 : };
782 :
783 : extern const std::array<std::string_view, (int)EcoRoofCalcMethod::Num> ecoRoofCalcMethodNamesUC;
784 :
785 : // Class for Material:RoofVegetation
786 : struct MaterialEcoRoof : public MaterialBase
787 : {
788 : // EcoRoof-Related properties, essentially for the plant layer,
789 : // the soil layer uses the same resource as a regular material
790 : EcoRoofCalcMethod calcMethod = EcoRoofCalcMethod::Invalid; // 1-Simple, 2-SchaapGenuchten
791 : Real64 HeightOfPlants = 0.0; // plants' height
792 : Real64 LAI = 0.0; // LeafAreaIndex (Dimensionless???)
793 : Real64 Lreflectivity = 0.0; // LeafReflectivity
794 : Real64 LEmissitivity = 0.0; // LeafEmissivity
795 : Real64 InitMoisture = 0.0; // Initial soil moisture DJS
796 : Real64 MinMoisture = 0.0; // Minimum moisture allowed DJS
797 : Real64 RStomata = 0.0; // Minimum stomatal resistance DJS
798 :
799 12 : MaterialEcoRoof() : MaterialBase()
800 : {
801 12 : group = Group::EcoRoof;
802 12 : }
803 0 : ~MaterialEcoRoof() = default;
804 : };
805 :
806 : struct WindowThermalModelParams
807 : {
808 : // Members
809 : std::string Name; // Window thermal model name
810 : TARCOGGassesParams::Stdrd CalculationStandard = TARCOGGassesParams::Stdrd::Invalid; // Tarcog calculation standard
811 : TARCOGParams::TARCOGThermalModel ThermalModel = TARCOGParams::TARCOGThermalModel::Invalid; // Tarcog thermal model
812 : Real64 SDScalar = 0.0; // SDScalar coefficient
813 : TARCOGParams::DeflectionCalculation DeflectionModel = TARCOGParams::DeflectionCalculation::Invalid; // Deflection model
814 : Real64 VacuumPressureLimit = 0.0; // Pressure limit at which it will be considered vacuum gas state
815 : Real64 InitialTemperature = 0.0; // Window(s) temperature in time of fabrication
816 : Real64 InitialPressure = 0.0; // Window(s) pressure in time of fabrication
817 : };
818 :
819 : struct SpectralDataProperties
820 : {
821 : // Members
822 : std::string Name; // Name of spectral data set
823 : int NumOfWavelengths = 0; // Number of wavelengths in the data set
824 : Array1D<Real64> WaveLength; // Wavelength (microns)
825 : Array1D<Real64> Trans; // Transmittance at normal incidence
826 : Array1D<Real64> ReflFront; // Front reflectance at normal incidence
827 : Array1D<Real64> ReflBack; // Back reflectance at normal incidence
828 : };
829 :
830 : struct MaterialGlass : public MaterialFen
831 : {
832 : // Window-related radiation parameters
833 : Real64 GlassTransDirtFactor = 1.0; // Multiplier on glass transmittance due to dirt
834 : bool SolarDiffusing = false; // True if glass diffuses beam solar radiation
835 : Real64 ReflectSolDiffBack = 0.0; // Solar back diffuse reflectance
836 : Real64 ReflectSolDiffFront = 0.0; // Solar front diffuse reflectance
837 : Real64 ReflectVisBeamBack = 0.0; // Visible back reflectance (beam to everything)
838 : Real64 ReflectVisBeamFront = 0.0; // Visible front reflectance (beam to everything)
839 : Real64 ReflectVisDiffBack = 0.0; // Visible back diffuse reflectance
840 : Real64 ReflectVisDiffFront = 0.0; // Visible front diffuse reflectance
841 : Real64 TransSolBeam = 0.0; // Solar transmittance (beam to everything)
842 : Real64 TransVisBeam = 0.0; // Visible transmittance (beam to everything)
843 : // Complex fenestration parameters
844 : Real64 YoungModulus = 0.0; // Young's modulus (Pa) - used in window deflection calculations
845 : Real64 PoissonsRatio = 0.0; // Poisson's ratio - used in window deflection calculations
846 :
847 : // Added 12/22/2008 for thermochromic window glazing material
848 : Real64 SpecTemp = 0.0; // Temperature corresponding to the specified material properties
849 : int TCParentMatNum = 0; // Reference to the parent object WindowMaterial:Glazing:Thermochromic
850 : int GlassSpectralDataPtr = 0; // Number of a spectral data set associated with a window glass material
851 : Curve::Curve *GlassSpecAngTransCurve = nullptr; // Transmittance as a function of spectral and angle associated with a glass material
852 : Curve::Curve *GlassSpecAngFReflCurve = nullptr; // Front reflectance as a function of spectral and angle associated with a glass material
853 : Curve::Curve *GlassSpecAngBReflCurve = nullptr; // Back reflectance as a function of spectral and angle associated with a glass material
854 :
855 : // TODO: these and others need to be moved to a child class
856 : // Simple Glazing System
857 : Real64 SimpleWindowUfactor = 0.0; // user input for simple window U-factor with film coeffs (W/m2-k)
858 : Real64 SimpleWindowSHGC = 0.0; // user input for simple window Solar Heat Gain Coefficient (non-dimensional)
859 : Real64 SimpleWindowVisTran = 0.0; // (optional) user input for simple window Visual Transmittance (non-dimensional)
860 : bool SimpleWindowVTinputByUser = false; // false means not input, true means user provide VT input
861 :
862 : Window::OpticalDataModel windowOpticalData = Window::OpticalDataModel::SpectralAverage;
863 :
864 1856 : MaterialGlass() : MaterialFen()
865 : {
866 1856 : group = Group::Glass;
867 1856 : }
868 0 : ~MaterialGlass() = default;
869 0 : bool can_instantiate()
870 : {
871 0 : return true;
872 : }
873 :
874 : void SetupSimpleWindowGlazingSystem(EnergyPlusData &state);
875 : };
876 :
877 : struct MaterialGlassEQL : public MaterialFen
878 : {
879 : BlindTraAbsRef<1> TAR;
880 : Window::OpticalDataModel windowOpticalData = Window::OpticalDataModel::SpectralAverage;
881 :
882 4 : MaterialGlassEQL() : MaterialFen()
883 : {
884 4 : group = Group::GlassEQL;
885 4 : }
886 0 : ~MaterialGlassEQL() = default;
887 0 : bool can_instantiate()
888 : {
889 0 : return true;
890 : }
891 : };
892 :
893 : struct MaterialRefSpecTemp
894 : {
895 : int matNum = 0;
896 : Real64 specTemp = 0.0;
897 : };
898 :
899 : struct MaterialGlassTC : public MaterialBase
900 : {
901 : // Members
902 : int numMatRefs = 0; // Number of TC glazing materials
903 : Array1D<MaterialRefSpecTemp> matRefs;
904 :
905 1 : MaterialGlassTC() : MaterialBase()
906 : {
907 1 : group = Group::GlassTCParent;
908 1 : }
909 0 : ~MaterialGlassTC() = default;
910 : };
911 :
912 : int GetMaterialNum(EnergyPlusData const &state, std::string const &matName);
913 : MaterialBase *GetMaterial(EnergyPlusData &state, std::string const &matName);
914 :
915 : void GetMaterialData(EnergyPlusData &state, bool &errorsFound); // set to true if errors found in input
916 : void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound);
917 : void GetWindowGlassSpectralData(EnergyPlusData &state, bool &errorsFound);
918 :
919 : // Angles must be in radians
920 : void GetRelativePhiTheta(Real64 phiWin, Real64 thetaWin, Vector3<Real64> const &solcos, Real64 &phi, Real64 &theta);
921 : void NormalizePhiTheta(Real64 &phi, Real64 &theta);
922 : void GetPhiThetaIndices(Real64 phi, Real64 theta, Real64 dPhi, Real64 dTheta, int &iPhi1, int &iPhi2, int &iTheta1, int &iTheta2);
923 :
924 : void CalcScreenTransmittance(EnergyPlusData &state,
925 : MaterialScreen const *screen,
926 : Real64 phi, // Sun altitude relative to surface outward normal (rad)
927 : Real64 theta, // Sun azimuth relative to surface outward normal (rad)
928 : ScreenBmTransAbsRef &tar);
929 :
930 : void NormalizeProfSlat(Real64 &profAng, Real64 &slatAng);
931 : void GetProfIndices(Real64 profAng, int &iProf1, int &iProf2);
932 : void GetSlatIndicesInterpFac(Real64 slatAng, int &iSlat1, int &iSlat2, Real64 &interpFac);
933 : } // namespace Material
934 :
935 : struct MaterialData : BaseGlobalStruct
936 : {
937 : Array1D<Material::MaterialBase *> materials;
938 : std::map<std::string, int> materialMap;
939 :
940 : int NumRegulars = 0;
941 : int NumNoMasses = 0;
942 : int NumIRTs = 0;
943 : int NumAirGaps = 0;
944 : int NumW5Glazings = 0; // Window5 Glass Materials, specified by transmittance and front and back reflectance
945 : int NumW5AltGlazings = 0; // Window5 Glass Materials, specified by index of refraction and extinction coeff
946 : int NumW5Gases = 0; // Window5 Single-Gas Materials
947 : int NumW5GasMixtures = 0; // Window5 Gas Mixtures
948 : int NumW7SupportPillars = 0; // Complex fenestration support pillars
949 : int NumW7DeflectionStates = 0; // Complex fenestration deflection states
950 : int NumW7Gaps = 0; // Complex fenestration material gaps
951 : int NumBlinds = 0; // Total number of blind materials
952 : int NumScreens = 0; // Total number of exterior window screen materials
953 : int NumTCGlazings = 0; // Number of TC glazing object - WindowMaterial:Glazing:Thermochromic found in the idf file
954 : int NumShades = 0; // Total number of shade materials
955 : int NumComplexGaps = 0; // Total number of window gaps for complex fenestrations
956 : int NumSimpleWindows = 0; // number of simple window systems.
957 : int NumEQLGlazings = 0; // Window5 Single-Gas Materials for Equivalent Layer window model
958 : int NumEQLShades = 0; // Total number of shade materials for Equivalent Layer window model
959 : int NumEQLDrapes = 0; // Total number of drape materials for Equivalent Layer window model
960 : int NumEQLBlinds = 0; // Total number of blind materials for Equivalent Layer window model
961 : int NumEQLScreens = 0; // Total number of exterior window screen materials for Equivalent Layer window model
962 : int NumEQLGaps = 0; // Window5 Equivalent Layer Single-Gas Materials
963 : int NumEcoRoofs = 0;
964 :
965 : bool AnyVariableAbsorptance = false;
966 : int NumSpectralData = 0;
967 :
968 : Array1D<Material::WindowThermalModelParams> WindowThermalModel;
969 : Array1D<Material::SpectralDataProperties> SpectralData;
970 :
971 801 : void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
972 : {
973 801 : }
974 :
975 801 : void init_state([[maybe_unused]] EnergyPlusData &state) override
976 : {
977 801 : }
978 :
979 0 : void clear_state() override
980 : {
981 0 : for (int i = 0; i < materials.isize(); ++i) {
982 0 : delete materials[i];
983 : }
984 0 : materials.clear();
985 0 : materialMap.clear();
986 0 : }
987 : };
988 :
989 : } // namespace EnergyPlus
990 :
991 : #endif
|