LCOV - code coverage report
Current view: top level - EnergyPlus - DataSurfaces.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 142 483 29.4 %
Date: 2023-01-17 19:17:23 Functions: 85 106 80.2 %

          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 DataSurfaces_hh_INCLUDED
      49             : #define DataSurfaces_hh_INCLUDED
      50             : 
      51             : // C++ Headers
      52             : #include <cstddef>
      53             : #include <unordered_map>
      54             : #include <vector>
      55             : 
      56             : // ObjexxFCL Headers
      57             : #include <ObjexxFCL/Array1D.hh>
      58             : #include <ObjexxFCL/Array2D.hh>
      59             : #include <ObjexxFCL/Vector4.hh>
      60             : 
      61             : // EnergyPlus Headers
      62             : #include <EnergyPlus/BITF.hh>
      63             : #include <EnergyPlus/ConvectionConstants.hh>
      64             : #include <EnergyPlus/Data/BaseData.hh>
      65             : #include <EnergyPlus/DataBSDFWindow.hh>
      66             : #include <EnergyPlus/DataGlobals.hh>
      67             : #include <EnergyPlus/DataVectorTypes.hh>
      68             : #include <EnergyPlus/DataWindowEquivalentLayer.hh>
      69             : #include <EnergyPlus/EnergyPlus.hh>
      70             : #include <EnergyPlus/Shape.hh>
      71             : 
      72             : namespace EnergyPlus {
      73             : 
      74             : // Forward declarations
      75             : struct EnergyPlusData;
      76             : 
      77             : namespace DataSurfaces {
      78             : 
      79             :     // Using/Aliasing
      80             :     using DataBSDFWindow::BSDFWindowDescript;
      81             :     using DataVectorTypes::Vector;
      82             : 
      83             :     // MODULE PARAMETER DEFINITIONS:
      84             :     constexpr int MaxSlatAngs(19);
      85             :     constexpr int MaxProfAngs(37);
      86             :     constexpr int MaxPolyCoeff(6);
      87             : 
      88             :     // Parameters to indicate surface shape for use with the Surface
      89             :     // derived type (see below):
      90             : 
      91             :     enum class SurfaceShape : int
      92             :     {
      93             :         // TODO: enum check
      94             :         Invalid = -1,
      95             :         None,
      96             :         Triangle,
      97             :         Quadrilateral,
      98             :         Rectangle,
      99             :         RectangularDoorWindow,
     100             :         RectangularOverhang,
     101             :         RectangularLeftFin,
     102             :         RectangularRightFin,
     103             :         TriangularWindow,
     104             :         TriangularDoor,
     105             :         Polygonal,
     106             :         Num
     107             :     };
     108             : 
     109             :     enum class SurfaceClass : int
     110             :     {
     111             :         Invalid = -1, // If any addition classes get added to this list, add appropriate data
     112             :         None,         // to ComputeNominalUwithConvCoeffs in DataHeatBalance.cc and make sure
     113             :         Wall,         // that the data aligns with any revision to this enum.
     114             :         Floor,
     115             :         Roof,
     116             :         IntMass,
     117             :         Detached_B,
     118             :         Detached_F,
     119             :         Window,
     120             :         GlassDoor,
     121             :         Door,
     122             :         Shading,
     123             :         Overhang,
     124             :         Fin,
     125             :         TDD_Dome,
     126             :         TDD_Diffuser,
     127             :         Num // The counter representing the total number of surface class, always stays at the bottom
     128             :     };
     129             : 
     130             :     enum class WinShadingType
     131             :     {
     132             :         Invalid = -1,
     133             :         NoShade,
     134             :         ShadeOff,
     135             :         IntShade,
     136             :         SwitchableGlazing,
     137             :         ExtShade,
     138             :         ExtScreen,
     139             :         IntBlind,
     140             :         ExtBlind,
     141             :         BGShade,
     142             :         BGBlind,
     143             :         IntShadeConditionallyOff,
     144             :         GlassConditionallyLightened,
     145             :         ExtShadeConditionallyOff,
     146             :         IntBlindConditionallyOff,
     147             :         ExtBlindConditionallyOff,
     148             :         BGShadeConditionallyOff,
     149             :         BGBlindConditionallyOff,
     150             :         Num
     151             :     }; // Valid window shading types: IntShade <= Type <= BGBlind; the rest are shading status
     152             : 
     153             :     enum class WindowShadingControlType
     154             :     {
     155             :         Invalid = -1,
     156             :         AlwaysOn,                       // "ALWAYSON",
     157             :         AlwaysOff,                      // "ALWAYSOFF",
     158             :         OnIfScheduled,                  // "ONIFSCHEDULEALLOWS",
     159             :         HiSolar,                        // "ONIFHIGHSOLARONWINDOW",
     160             :         HiHorzSolar,                    // "ONIFHIGHHORIZONTALSOLAR",
     161             :         HiOutAirTemp,                   // "ONIFHIGHOUTDOORAIRTEMPERATURE",
     162             :         HiZoneAirTemp,                  // "ONIFHIGHZONEAIRTEMPERATURE",
     163             :         HiZoneCooling,                  // "ONIFHIGHZONECOOLING",
     164             :         HiGlare,                        // "ONIFHIGHGLARE",
     165             :         MeetDaylIlumSetp,               // "MEETDAYLIGHTILLUMINANCESETPOINT",
     166             :         OnNightLoOutTemp_OffDay,        // "ONNIGHTIFLOWOUTDOORTEMPANDOFFDAY",
     167             :         OnNightLoInTemp_OffDay,         // "ONNIGHTIFLOWINSIDETEMPANDOFFDAY",
     168             :         OnNightIfHeating_OffDay,        // "ONNIGHTIFHEATINGANDOFFDAY",
     169             :         OnNightLoOutTemp_OnDayCooling,  // "ONNIGHTIFLOWOUTDOORTEMPANDONDAYIFCOOLING",
     170             :         OnNightIfHeating_OnDayCooling,  // "ONNIGHTIFHEATINGANDONDAYIFCOOLING",
     171             :         OffNight_OnDay_HiSolarWindow,   // "OFFNIGHTANDONDAYIFCOOLINGANDHIGHSOLARONWINDOW",
     172             :         OnNight_OnDay_HiSolarWindow,    // "ONNIGHTANDONDAYIFCOOLINGANDHIGHSOLARONWINDOW",
     173             :         OnHiOutTemp_HiSolarWindow,      // "ONIFHIGHOUTDOORAIRTEMPANDHIGHSOLARONWINDOW",
     174             :         OnHiOutTemp_HiHorzSolar,        // "ONIFHIGHOUTDOORAIRTEMPANDHIGHHORIZONTALSOLAR",
     175             :         OnHiZoneTemp_HiSolarWindow,     // "ONIFHIGHZONEAIRTEMPANDHIGHSOLARONWINDOW",
     176             :         OnHiZoneTemp_HiHorzSolar,       // "ONIFHIGHZONEAIRTEMPANDHIGHHORIZONTALSOLAR",
     177             :         HiSolar_HiLumin_OffMidNight,    // "ONIFHIGHSOLARANDHIGHLUMINOFFMIDNIGHT",
     178             :         HiSolar_HiLumin_OffSunset,      // "ONIFHIGHSOLARANDHIGHLUMINOFFSUNSET",
     179             :         HiSolar_HiLumin_OffNextMorning, // "ONIFHIGHSOLARANDHIGHLUMINOFFNEXTMORNING"};
     180             :         Num
     181             :     };
     182             : 
     183             :     enum RefAirTemp // Parameters to indicate reference air temperatures for inside surface temperature calculations
     184             :     {
     185             :         Invalid = -1,
     186             :         ZoneMeanAirTemp,   // mean air temperature of the zone => MAT
     187             :         AdjacentAirTemp,   // air temperature adjacent to surface => TempEffBulkAir
     188             :         ZoneSupplyAirTemp, // supply air temperature of the zone
     189             :         Num
     190             :     };
     191             : 
     192             :     constexpr std::array<int, static_cast<int>(DataSurfaces::RefAirTemp::Num)> SurfTAirRefReportVals = {1, 2, 3};
     193             : 
     194             :     // Parameters to indicate exterior boundary conditions for use with
     195             :     // the Surface derived type (see below):
     196             :     // Note:  Positive values correspond to an interzone adjacent surface
     197             :     constexpr int ExternalEnvironment(0);
     198             :     constexpr int Ground(-1);
     199             :     constexpr int OtherSideCoefNoCalcExt(-2);
     200             :     constexpr int OtherSideCoefCalcExt(-3);
     201             :     constexpr int OtherSideCondModeledExt(-4);
     202             :     constexpr int GroundFCfactorMethod(-5);
     203             :     constexpr int KivaFoundation(-6);
     204             : 
     205             :     extern Array1D_string const cExtBoundCondition;
     206             : 
     207             :     // Parameters to indicate the first "corner" of a surface
     208             :     // Currently, these are used only during input of surfaces
     209             :     // They are here in order to facilitate later use in shading setup/calculations.
     210             :     constexpr int UpperLeftCorner(1);
     211             :     constexpr int LowerLeftCorner(2);
     212             :     constexpr int LowerRightCorner(3);
     213             :     constexpr int UpperRightCorner(4);
     214             : 
     215             :     constexpr int AltAngStepsForSolReflCalc(10); // Number of steps in altitude angle for solar reflection calc
     216             :     constexpr int AzimAngStepsForSolReflCalc(9); // Number of steps in azimuth angle of solar reflection calc
     217             : 
     218             :     // Parameters to indicate surface classes
     219             :     // Surface Class (FLOOR, WALL, ROOF (incl's CEILING), WINDOW, DOOR, GLASSDOOR,
     220             :     // SHADING (includes OVERHANG, WING), DETACHED, INTMASS),
     221             :     // TDD:DOME, TDD:DIFFUSER (for tubular daylighting device)
     222             :     // (Note: GLASSDOOR and TDD:DIFFUSER get overwritten as WINDOW
     223             :     // in SurfaceGeometry.cc, SurfaceWindow%OriginalClass holds the true value)
     224             :     // why aren't these sequential
     225             : 
     226             :     enum class HeatTransferModel
     227             :     {
     228             :         Invalid = -1,
     229             :         None, // shading surfaces
     230             :         CTF,
     231             :         EMPD,
     232             :         CondFD,
     233             :         HAMT,
     234             :         Window5,             // original detailed layer-by-layer based on window 4 and window 5
     235             :         ComplexFenestration, // BSDF
     236             :         TDD,                 // tubular daylighting device
     237             :         Kiva,                // Kiva ground calculations
     238             :         AirBoundaryNoHT,     // Construction:AirBoundary - not IRT or interior window
     239             :         Num                  // count, always the final element
     240             :     };
     241             : 
     242             :     constexpr std::array<std::string_view, static_cast<int>(DataSurfaces::HeatTransferModel::Num)> HeatTransAlgoStrs = {
     243             :         "None",
     244             :         "CTF - ConductionTransferFunction",
     245             :         "EMPD - MoisturePenetrationDepthConductionTransferFunction",
     246             :         "CondFD - ConductionFiniteDifference",
     247             :         "HAMT - CombinedHeatAndMoistureFiniteElement",
     248             :         "Window5 Detailed Fenestration",
     249             :         "Window7 Complex Fenestration",
     250             :         "Tubular Daylighting Device",
     251             :         "KivaFoundation - TwoDimensionalFiniteDifference",
     252             :         "Air Boundary - No Heat Transfer"};
     253             : 
     254             :     // Parameters to indicate surface roughness for use with the Material
     255             :     // derived type:
     256             :     enum class SurfaceRoughness
     257             :     {
     258             :         Invalid = -1,
     259             :         VeryRough,
     260             :         Rough,
     261             :         MediumRough,
     262             :         MediumSmooth,
     263             :         Smooth,
     264             :         VerySmooth,
     265             :         Num
     266             :     };
     267             : 
     268             :     // IS_SHADED is the flag to indicate window has no shading device or shading device is off, and no daylight glare control
     269             :     // original expression: SHADE_FLAG == ShadeOff || SHADE_FLAG == ShadeOff
     270   200191158 :     constexpr bool NOT_SHADED(WinShadingType const ShadingFlag)
     271             :     {
     272   200191158 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::NoShade) | BITF(WinShadingType::ShadeOff));
     273             :     }
     274             : 
     275             :     // IS_SHADED is the flag to indicate window has shade on or temporarily off but may be triggered on later to control daylight glare
     276             :     // original expression: SHADE_FLAG > ShadeOff
     277    36250375 :     constexpr bool IS_SHADED(WinShadingType const ShadingFlag)
     278             :     {
     279    36250375 :         return !NOT_SHADED(ShadingFlag);
     280             :     }
     281             : 
     282             :     // IS_SHADED_NO_GLARE is the flag to indicate window has shade and no daylight glare control
     283             :     // original expression: IntShade <= SHADE_FLAG <= BGBlind
     284    21961968 :     constexpr bool IS_SHADED_NO_GLARE_CTRL(WinShadingType const ShadingFlag)
     285             :     {
     286    21961968 :         return BITF_TEST_ANY(BITF(ShadingFlag),
     287             :                              BITF(WinShadingType::IntShade) | BITF(WinShadingType::SwitchableGlazing) | BITF(WinShadingType::ExtShade) |
     288             :                                  BITF(WinShadingType::ExtScreen) | BITF(WinShadingType::IntBlind) | BITF(WinShadingType::ExtBlind) |
     289             :                                  BITF(WinShadingType::BGShade) | BITF(WinShadingType::BGBlind));
     290             :     }
     291             : 
     292             :     // ANY_SHADE: if SHADE_FLAG is any of the shading types including interior, exterior or between glass shades
     293    27897191 :     constexpr bool ANY_SHADE(WinShadingType const ShadingFlag)
     294             :     {
     295    27897191 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::IntShade) | BITF(WinShadingType::ExtShade) | BITF(WinShadingType::BGShade));
     296             :     }
     297             : 
     298    97270033 :     constexpr bool ANY_SHADE_SCREEN(WinShadingType const ShadingFlag)
     299             :     {
     300    97270033 :         return BITF_TEST_ANY(BITF(ShadingFlag),
     301             :                              BITF(WinShadingType::IntShade) | BITF(WinShadingType::ExtShade) | BITF(WinShadingType::BGShade) |
     302             :                                  BITF(WinShadingType::ExtScreen));
     303             :     }
     304             : 
     305   162447524 :     constexpr bool ANY_BLIND(WinShadingType const ShadingFlag)
     306             :     {
     307   162447524 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::IntBlind) | BITF(WinShadingType::ExtBlind) | BITF(WinShadingType::BGBlind));
     308             :     }
     309             : 
     310   542449256 :     constexpr bool ANY_INTERIOR_SHADE_BLIND(WinShadingType const ShadingFlag)
     311             :     {
     312   542449256 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::IntShade) | BITF(WinShadingType::IntBlind));
     313             :     }
     314             : 
     315   175188248 :     constexpr bool ANY_EXTERIOR_SHADE_BLIND_SCREEN(WinShadingType const ShadingFlag)
     316             :     {
     317   175188248 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::ExtShade) | BITF(WinShadingType::ExtBlind) | BITF(WinShadingType::ExtScreen));
     318             :     }
     319             : 
     320   155323507 :     constexpr bool ANY_BETWEENGLASS_SHADE_BLIND(WinShadingType const ShadingFlag)
     321             :     {
     322   155323507 :         return BITF_TEST_ANY(BITF(ShadingFlag), BITF(WinShadingType::BGShade) | BITF(WinShadingType::BGBlind));
     323             :     }
     324             : 
     325             :     // WindowShadingControl Slat Angle Control for Blinds
     326             :     enum class SlatAngleControl
     327             :     {
     328             :         Invalid = -1,
     329             :         Fixed,
     330             :         Scheduled,
     331             :         BlockBeamSolar,
     332             :         Num
     333             :     };
     334             : 
     335             :     // Parameter for window screens beam reflectance accounting
     336             :     enum class ScreenBeamReflectanceModel
     337             :     {
     338             :         Invalid = -1,
     339             :         DoNotModel,
     340             :         DirectBeam,
     341             :         Diffuse,
     342             :         Num
     343             :     };
     344             : 
     345             :     // Parameters for air flow window source
     346             :     enum class WindowAirFlowSource
     347             :     {
     348             :         Invalid = -1,
     349             :         Indoor,
     350             :         Outdoor,
     351             :         Num
     352             :     };
     353             : 
     354             :     // Parameters for air flow window destination
     355             :     enum class WindowAirFlowDestination
     356             :     {
     357             :         Invalid = -1,
     358             :         Indoor,
     359             :         Outdoor,
     360             :         Return,
     361             :         Num
     362             :     };
     363             : 
     364             :     // Parameters for air flow window control
     365             :     enum class WindowAirFlowControlType
     366             :     {
     367             :         Invalid = -1,
     368             :         MaxFlow,
     369             :         AlwaysOff,
     370             :         Schedule,
     371             :         Num
     372             :     };
     373             : 
     374             :     // Parameters for window model selection
     375             :     enum class WindowModel
     376             :     {
     377             :         Invalid = -1,
     378             :         Detailed, // indicates original winkelmann window 5 implementation
     379             :         BSDF,     // indicates complex fenestration window 6 implementation
     380             :         EQL,      // indicates equivalent layer window model implementation
     381             :         Num
     382             :     };
     383             : 
     384             :     // Parameters for PierceSurface
     385             :     constexpr std::size_t nVerticesBig(20); // Number of convex surface vertices at which to switch to PierceSurface O( log N ) method
     386             : 
     387             :     // Y Slab for Surface2D for PierceSurface support of Nonconvex and Many-Vertex Surfaces
     388        2795 :     struct Surface2DSlab
     389             :     {
     390             : 
     391             :     public: // Types
     392             :         using Vertex = ObjexxFCL::Vector2<Real64>;
     393             :         using Vertices = ObjexxFCL::Array1D<Vertex>;
     394             :         using Edge = Vertices::size_type; // The Surface2D vertex and edge index
     395             :         using EdgeXY = Real64;            // The edge x/y inverse slope
     396             :         using Edges = std::vector<Edge>;
     397             :         using EdgesXY = std::vector<EdgeXY>;
     398             : 
     399             :     public: // Creation
     400             :             // Constructor
     401         579 :         Surface2DSlab(Real64 const yl, Real64 const yu) : xl(0.0), xu(0.0), yl(yl), yu(yu)
     402             :         {
     403         579 :         }
     404             : 
     405             :     public:              // Data
     406             :         Real64 xl, xu;   // Lower and upper x coordinates of slab bounding box
     407             :         Real64 yl, yu;   // Lower and upper y coordinates of slab
     408             :         Edges edges;     // Left-to-right ordered edges crossing the slab
     409             :         EdgesXY edgesXY; // Edge x/y inverse slopes
     410             : 
     411             :     }; // Surface2DSlab
     412             : 
     413             :     // Projected 2D Surface Representation for Fast Computational Geometry Operations
     414      321090 :     struct Surface2D
     415             :     {
     416             : 
     417             :     public: // Types
     418             :         using Vector2D = Vector2<Real64>;
     419             :         using Edge = Vector2D;
     420             :         using Vertices = Array1D<Vector2D>;
     421             :         using Vectors = Array1D<Vector2D>;
     422             :         using Edges = Vectors;
     423             :         using Slab = Surface2DSlab;
     424             :         using Slabs = std::vector<Surface2DSlab>;
     425             :         using SlabYs = std::vector<Real64>;
     426             :         using size_type = Vertices::size_type;
     427             : 
     428             :     public: // Creation
     429             :         // Default constructor
     430       45334 :         Surface2D()
     431       45334 :         {
     432       45334 :         }
     433             : 
     434             :         // Constructor
     435             :         Surface2D(ShapeCat const shapeCat, int const axis, Vertices const &v, Vector2D const &vl, Vector2D const &vu);
     436             : 
     437             :     public: // Predicates
     438             :             // Bounding box contains a point?
     439             :         bool bb_contains(Vector2D const &v) const
     440             :         {
     441             :             return (vl.x <= v.x) && (v.x <= vu.x) && (vl.y <= v.y) && (v.y <= vu.y);
     442             :         }
     443             : 
     444             :     public: // Comparison
     445             :             // Equality
     446             :         friend bool operator==(Surface2D const &a, Surface2D const &b)
     447             :         {
     448             :             auto const &v1 = a.vertices;
     449             :             auto const &v2 = b.vertices;
     450             :             return eq(v1, v2);
     451             :         }
     452             : 
     453             :         // Inequality
     454             :         friend bool operator!=(Surface2D const &a, Surface2D const &b)
     455             :         {
     456             :             return !(a == b);
     457             :         }
     458             : 
     459             :     public:                                              // Data
     460             :         int axis = 0;                                    // Axis of projection (0=x, 1=y, 2=z)
     461             :         Vertices vertices;                               // Vertices
     462             :         Vector2D vl = Vector2D(0.0), vu = Vector2D(0.0); // Bounding box lower and upper corner vertices
     463             :         Vectors edges;                                   // Edge vectors around the vertices
     464             :         Real64 s1 = 0.0, s3 = 0.0;                       // Rectangle side widths squared
     465             :         SlabYs slabYs;                                   // Y coordinates of slabs
     466             :         Slabs slabs;                                     // Y slice slabs for fast nonconvex and many vertex intersections
     467             : 
     468             :     }; // Surface2D
     469             : 
     470             :     struct SurfaceCalcHashKey
     471             :     {
     472             :         // Values that must be the same in order for surfaces to use a representative calculation
     473             : 
     474             :         int Construction;        // Pointer to the construction in the Construct derived type
     475             :         Real64 Azimuth;          // Direction the surface outward normal faces (degrees) or FACING
     476             :         Real64 Tilt;             // Angle (deg) between the ground outward normal and the surface outward normal
     477             :         Real64 Height;           // Height of the surface (m)
     478             :         int Zone;                // Interior environment or zone the surface is a part of
     479             :         int EnclIndex;           // Pointer to enclosure this surface belongs to
     480             :         int TAirRef;             // Flag for reference air temperature
     481             :         int ExtZone;             // For an "interzone" surface, this is the adjacent ZONE number (not adjacent SURFACE number).
     482             :         int ExtCond;             // Exterior condition type. Same as ExtBoundCond for non-interzone surfaces. Value = 1 for interzone surfaces.
     483             :         int ExtEnclIndex;        // For an "interzone" surface, this is the adjacent ENCLOSURE number
     484             :         bool ExtSolar;           // True if the "outside" of the surface is exposed to solar
     485             :         bool ExtWind;            // True if the "outside" of the surface is exposed to wind
     486             :         Real64 ViewFactorGround; // View factor to the ground from the exterior of the surface for diffuse solar radiation
     487             :         Real64 ViewFactorSky;    // View factor to the sky from the exterior of the surface for diffuse solar radiation
     488             : 
     489             :         // Special Properties
     490             :         HeatTransferModel HeatTransferAlgorithm; // used for surface-specific heat transfer algorithm.
     491             :         int IntConvCoeff;                        // Interior Convection Coefficient Algorithm pointer (different data structure)
     492             :         int ExtConvCoeff;                        // Exterior Convection Coefficient Algorithm pointer (different data structure)
     493             :         int OSCPtr;                              // Pointer to OSC data structure
     494             :         int OSCMPtr;                             // "Pointer" to OSCM data structure (other side conditions from a model)
     495             : 
     496             :         // Windows
     497             :         int FrameDivider;          // Pointer to frame and divider information (windows only)
     498             :         int SurfWinStormWinConstr; // Construction with storm window (windows only)
     499             :         //   Airflow control                      // Not supported
     500             :         //   Shading Control                      // Not supported
     501             : 
     502             :         // Other special boundary conditions
     503             :         //   SolarIncidentInside                  // Not supported
     504             :         int MaterialMovInsulExt;           // Pointer to the material used for exterior movable insulation
     505             :         int MaterialMovInsulInt;           // Pointer to the material used for interior movable insulation
     506             :         int SchedMovInsulExt;              // Schedule for exterior movable insulation
     507             :         int SchedMovInsulInt;              // Schedule for interior movable insulation
     508             :         int ExternalShadingSchInd;         // Schedule for a the external shading
     509             :         int SurroundingSurfacesNum;        // Index of a surrounding surfaces list (defined in SurfaceProperties::SurroundingSurfaces)
     510             :         int LinkedOutAirNode;              // Index of the an OutdoorAir:Node
     511             :         int OutsideHeatSourceTermSchedule; // Pointer to the schedule of additional source of heat flux rate applied to the outside surface
     512             :         int InsideHeatSourceTermSchedule;  // Pointer to the schedule of additional source of heat flux rate applied to the inside surface
     513             : 
     514             :         // based on boost::hash_combine
     515       17370 :         std::size_t hash_combine(std::size_t current_hash, std::size_t new_hash) const
     516             :         {
     517       17370 :             current_hash ^= new_hash + 0x9e3779b9 + (current_hash << 6) + (current_hash >> 2);
     518       17370 :             return current_hash;
     519             :         }
     520             : 
     521         579 :         std::vector<std::size_t> get_hash_list() const
     522             :         {
     523             :             using std::hash;
     524             : 
     525        1158 :             return {hash<int>()(Construction),
     526        1158 :                     hash<Real64>()(Azimuth),
     527        1158 :                     hash<Real64>()(Tilt),
     528        1158 :                     hash<Real64>()(Height),
     529        1158 :                     hash<int>()(Zone),
     530        1158 :                     hash<int>()(EnclIndex),
     531        1158 :                     hash<int>()(TAirRef),
     532        1158 :                     hash<int>()(ExtZone),
     533        1158 :                     hash<int>()(ExtCond),
     534        1158 :                     hash<int>()(ExtEnclIndex),
     535        1158 :                     hash<bool>()(ExtSolar),
     536        1158 :                     hash<bool>()(ExtWind),
     537        1158 :                     hash<Real64>()(ViewFactorGround),
     538        1158 :                     hash<Real64>()(ViewFactorSky),
     539             : 
     540        1158 :                     hash<HeatTransferModel>()(HeatTransferAlgorithm),
     541        1158 :                     hash<int>()(IntConvCoeff),
     542        1158 :                     hash<int>()(ExtConvCoeff),
     543        1158 :                     hash<int>()(OSCPtr),
     544        1158 :                     hash<int>()(OSCMPtr),
     545             : 
     546        1158 :                     hash<int>()(FrameDivider),
     547        1158 :                     hash<int>()(SurfWinStormWinConstr),
     548             : 
     549        1158 :                     hash<int>()(MaterialMovInsulExt),
     550        1158 :                     hash<int>()(MaterialMovInsulInt),
     551        1158 :                     hash<int>()(SchedMovInsulExt),
     552        1158 :                     hash<int>()(SchedMovInsulInt),
     553        1158 :                     hash<int>()(ExternalShadingSchInd),
     554        1158 :                     hash<int>()(SurroundingSurfacesNum),
     555        1158 :                     hash<int>()(LinkedOutAirNode),
     556        1158 :                     hash<int>()(OutsideHeatSourceTermSchedule),
     557       17370 :                     hash<int>()(InsideHeatSourceTermSchedule)};
     558             :         }
     559             : 
     560         579 :         std::size_t get_hash() const
     561             :         {
     562        1158 :             auto hash_list = get_hash_list();
     563         579 :             std::size_t combined_hash = 0u;
     564       17949 :             for (auto hash : hash_list) {
     565       17370 :                 combined_hash = hash_combine(combined_hash, hash);
     566             :             }
     567        1158 :             return combined_hash;
     568             :         }
     569             : 
     570         131 :         bool operator==(const SurfaceCalcHashKey &other) const
     571             :         {
     572         393 :             return (Construction == other.Construction && Azimuth == other.Azimuth && Tilt == other.Tilt && Height == other.Height &&
     573         393 :                     Zone == other.Zone && EnclIndex == other.EnclIndex && ExtZone == other.ExtZone && ExtCond == other.ExtCond &&
     574         393 :                     ExtEnclIndex == other.ExtEnclIndex && ExtSolar == other.ExtSolar && ExtWind == other.ExtWind &&
     575         393 :                     ViewFactorGround == other.ViewFactorGround && ViewFactorSky == other.ViewFactorSky &&
     576             : 
     577         393 :                     HeatTransferAlgorithm == other.HeatTransferAlgorithm && IntConvCoeff == other.IntConvCoeff &&
     578         393 :                     ExtConvCoeff == other.ExtConvCoeff && OSCPtr == other.OSCPtr && OSCMPtr == other.OSCMPtr &&
     579             : 
     580         393 :                     FrameDivider == other.FrameDivider && SurfWinStormWinConstr == other.SurfWinStormWinConstr &&
     581             : 
     582         393 :                     MaterialMovInsulExt == other.MaterialMovInsulExt && MaterialMovInsulInt == other.MaterialMovInsulInt &&
     583         393 :                     SchedMovInsulExt == other.SchedMovInsulExt && SchedMovInsulInt == other.SchedMovInsulInt &&
     584         393 :                     ExternalShadingSchInd == other.ExternalShadingSchInd && SurroundingSurfacesNum == other.SurroundingSurfacesNum &&
     585         524 :                     LinkedOutAirNode == other.LinkedOutAirNode && OutsideHeatSourceTermSchedule == other.OutsideHeatSourceTermSchedule &&
     586         262 :                     InsideHeatSourceTermSchedule == other.InsideHeatSourceTermSchedule);
     587             :         }
     588             :     };
     589             : 
     590             :     struct SurfaceCalcHasher
     591             :     {
     592         579 :         std::size_t operator()(const SurfaceCalcHashKey &key) const
     593             :         {
     594         579 :             return key.get_hash();
     595             :         }
     596             :     };
     597             : 
     598      238134 :     struct SurfaceData
     599             :     {
     600             : 
     601             :         // Types
     602             :         using Vertices = Array1D<Vector>;
     603             :         using Plane = Vector4<Real64>;
     604             : 
     605             :         // Members
     606             :         std::string Name; // User supplied name of the surface (must be unique)
     607             :         int Construction; // Pointer to the construction in the Construct derived type
     608             : 
     609             :         int RepresentativeCalcSurfNum; // Index of the surface that is used to calculate the heat balance for this surface. Equal to this surfaces
     610             :                                        // index when not using representative surface calculations.
     611             : 
     612             :         std::vector<int> ConstituentSurfaceNums; // A vector of surface numbers which reference this surface for representative calculations
     613             :         int ConstructionStoredInputValue;        // holds the original value for Construction per surface input
     614             :         SurfaceClass Class;
     615             : 
     616             :         // Geometry related parameters
     617             :         SurfaceShape Shape;       // Surface shape (Triangle=1,Quadrilateral=2,Rectangle=3,
     618             :                                   // Rectangular Window/Door=4,Rectangular Overhang=5,
     619             :                                   // Rectangular Left Fin=6,Rectangular Right Fin=7,
     620             :                                   // Triangular Window=8)
     621             :         int Sides;                // Number of side/vertices for this surface (based on Shape)
     622             :         Real64 Area;              // Surface area of the surface (less any subsurfaces) {m2}
     623             :         Real64 GrossArea;         // Surface area of the surface (including subsurfaces) {m2}
     624             :         Real64 NetAreaShadowCalc; // Area of a wall/floor/ceiling less subsurfaces assuming all windows, if present, have unity multiplier.
     625             :                                   // Wall/floor/ceiling/roof areas that include windows include frame (unity) areas.
     626             :                                   // Areas of Windows including divider (unity) area.
     627             :                                   // These areas are used in shadowing / sunlit area calculations.
     628             :         Real64 Perimeter;         // Perimeter length of the surface {m}
     629             :         Real64 Azimuth;           // Direction the surface outward normal faces (degrees) or FACING
     630             :         Real64 Height;            // Height of the surface (m)
     631             :         Real64 Reveal;            // Depth of the window reveal (m) if this surface is a window
     632             :         Real64 Tilt;              // Angle (deg) between the ground outward normal and the surface outward normal
     633             :         Real64 Width;             // Width of the surface (m)
     634             : 
     635             :         // Precomputed parameters for PierceSurface performance
     636             :         ShapeCat shapeCat;   // Shape category
     637             :         Plane plane;         // Plane
     638             :         Surface2D surface2d; // 2D projected surface for efficient intersection testing
     639             : 
     640             :         // Vertices
     641             :         Array1D<Vector> NewVertex;
     642             :         Vertices Vertex; // Surface Vertices are represented by Number of Sides and Vector (type)
     643             :         Vector Centroid; // computed centroid (also known as center of mass or surface balance point)
     644             :         Vector lcsx;
     645             :         Vector lcsy;
     646             :         Vector lcsz;
     647             :         Vector NewellAreaVector;
     648             :         Vector NewellSurfaceNormalVector; // same as OutNormVec in vector notation
     649             :         Array1D<Real64> OutNormVec;       // Direction cosines (outward normal vector) for surface
     650             :         Real64 SinAzim;                   // Sine of surface azimuth angle
     651             :         Real64 CosAzim;                   // Cosine of surface azimuth angle
     652             :         Real64 SinTilt;                   // Sine of surface tilt angle
     653             :         Real64 CosTilt;                   // Cosine of surface tilt angle
     654             :         bool IsConvex;                    // true if the surface is convex.
     655             :         bool IsDegenerate;                // true if the surface is degenerate.
     656             :         bool VerticesProcessed;           // true if vertices have been processed (only used for base surfaces)
     657             :         Real64 XShift;                    // relative coordinate shift data - used by child subsurfaces
     658             :         Real64 YShift;                    // relative coordinate shift data - used by child subsurfaces
     659             : 
     660             :         // Boundary conditions and interconnections
     661             :         bool HeatTransSurf;                      // True if surface is a heat transfer surface (light shelf can also be IsShadowing)
     662             :         int OutsideHeatSourceTermSchedule;       // Pointer to the schedule of additional source of heat flux rate applied to the outside surface
     663             :         int InsideHeatSourceTermSchedule;        // Pointer to the schedule of additional source of heat flux rate applied to the inside surface
     664             :                                                  // False if a (detached) shadowing (sub)surface
     665             :         HeatTransferModel HeatTransferAlgorithm; // used for surface-specific heat transfer algorithm.
     666             :         std::string BaseSurfName;                // Name of BaseSurf
     667             :         int BaseSurf;       // "Base surface" for this surface. Applies mainly to subsurfaces in which case it points back to the base surface number.
     668             :                             // Equals 0 for detached shading. BaseSurf equals surface number for all other surfaces.
     669             :         int NumSubSurfaces; // Number of subsurfaces this surface has (doors/windows)
     670             :         std::string ZoneName;         // User supplied name of the Zone
     671             :         int Zone;                     // Interior environment or zone the surface is a part of
     672             :                                       // Note that though attached shading surfaces are part of a zone, this
     673             :                                       // value is 0 there to facilitate using them as detached surfaces (more accurate shading.
     674             :         int spaceNum;                 // Space the surface is part of
     675             :         std::string ExtBoundCondName; // Name for the Outside Environment Object
     676             :         int ExtBoundCond;             // For an "interzone" surface, this is the adjacent surface number.
     677             :                                       // for an internal/adiabatic surface this is the current surface number.
     678             :                                       // Otherwise, 0=external environment, -1=ground,
     679             :                                       // -2=other side coefficients (OSC--won't always use CTFs)
     680             :                                       // -3=other side conditions model
     681             :                                       // During input, interim values of UnreconciledZoneSurface ("Surface") and
     682             :                                       // UnenteredAdjacentZoneSurface ("Zone") are used until reconciled.
     683             :         bool ExtSolar;                // True if the "outside" of the surface is exposed to solar
     684             :         bool ExtWind;                 // True if the "outside" of the surface is exposed to wind Heat transfer coefficients
     685             :         bool hasIncSolMultiplier;     // Whether the surface has a incident solar multiplier
     686             :         Real64 IncSolMultiplier;      // Incident solar multiplier, overwritten by user input in SurfaceProperty:IncidentSolarMultiplier
     687             :         Real64 ViewFactorGround;      // View factor to the ground from the exterior of the surface for diffuse solar radiation
     688             :         Real64 ViewFactorSky;         // View factor to the sky from the exterior of the surface for diffuse solar radiation
     689             :         Real64 ViewFactorGroundIR;    // View factor to the ground and shadowing surfaces from the exterior of the surface for IR radiation
     690             :         Real64 ViewFactorSkyIR; // View factor to the sky from the exterior of the surface for IR radiation Special/optional other side coefficients
     691             :                                 // (OSC)
     692             :         int OSCPtr;             // Pointer to OSC data structure
     693             :         int OSCMPtr;            // "Pointer" to OSCM data structure (other side conditions from a model)
     694             :         bool MirroredSurf;      // True if it is a mirrored surface
     695             :         bool IsShadowing;       // True if a surface is a shadowing surface (light shelf can also be HeatTransSurf)
     696             :         bool IsShadowPossibleObstruction; // True if a surface can be an exterior obstruction
     697             : 
     698             :         // Optional parameters specific to shadowing surfaces and subsurfaces (detached shading, overhangs, wings, etc.)
     699             :         int SchedShadowSurfIndex; // Schedule for a shadowing (sub)surface
     700             :         bool IsTransparent;       // True if the schedule values are always 1.0 (or the minimum is 1.0)
     701             :         Real64 SchedMinValue;     // Schedule minimum value.
     702             : 
     703             :         // Window Parameters (when surface is Window)
     704             :         int activeWindowShadingControl;            // Active window shading control (windows only)
     705             :         std::vector<int> windowShadingControlList; // List of possible window shading controls
     706             :         bool HasShadeControl;                      // True if the surface is listed in a WindowShadingControl object
     707             :         int activeShadedConstruction;              // The currently active shaded construction (windows only)
     708             :         int activeShadedConstructionPrev;          // The currently active shaded construction (windows only)
     709             :         std::vector<int> shadedConstructionList;   // List of shaded constructions that correspond with window shading controls (windows only - same
     710             :                                                    // indexes as windowShadingControlList)
     711             :         std::vector<int> shadedStormWinConstructionList; // List of shaded constructions with storm window that correspond with window shading
     712             :                                                          // controls (windows only - same indexes as windowShadingControlList)
     713             :         int FrameDivider;                                // Pointer to frame and divider information (windows only)
     714             :         Real64 Multiplier;                               // Multiplies glazed area, frame area and divider area (windows only)
     715             : 
     716             :         // Air boundaries and spaces
     717             :         int RadEnclIndex;       // Pointer to raidant enclosure this surface belongs to
     718             :         int SolarEnclIndex;     // Pointer to solar enclosure this surface belongs to
     719             :         int SolarEnclSurfIndex; //  Pointer to solar enclosure surface data, EnclSolInfo(n).SurfacePtr(SolarEnclSurfIndex) points to this surface
     720             :         bool IsAirBoundarySurf; // True if surface is an air boundary surface (Construction:AirBoundary)
     721             : 
     722             :         ConvectionConstants::SurfConvOrientation ConvOrientation; // Surface orientation for convection calculations
     723             : 
     724             :         SurfaceCalcHashKey calcHashKey;        // Hash key used for determining if this surface requires unique calculations.
     725             :         bool IsSurfPropertyGndSurfacesDefined; // true if ground surfaces properties are listed for an external surface
     726             :         int SurfPropertyGndSurfIndex;          // index to a ground surfaces list (defined in SurfaceProperties::GroundSurfaces)
     727             :         bool UseSurfPropertyGndSurfTemp;       // true if at least one ground surface temperature schedules is specified
     728             :         bool UseSurfPropertyGndSurfRefl;       // true if at least one ground surfaces reflectance schedule is specified
     729             :         Real64 GndReflSolarRad;                // ground surface reflected solar radiation on exterior surfaces
     730             :         bool SurfHasSurroundingSurfProperty;   // true if surrounding surfaces properties are listed for an external surface
     731             :         bool SurfSchedExternalShadingFrac;     // true if the external shading is scheduled or calculated externally to be imported
     732             :         int SurfSurroundingSurfacesNum;        // Index of a surrounding surfaces list (defined in SurfaceProperties::SurroundingSurfaces)
     733             :         int SurfExternalShadingSchInd;         // Schedule for a the external shading
     734             :         int SurfLinkedOutAirNode;              // Index of the an OutdoorAir:Node, zero if none
     735             :         Real64 AE = 0.0;                       // Product of area and emissivity for each surface
     736             :         Real64 enclAESum = 0.0;                // Sum of area times emissivity for all other surfaces in enclosure
     737             : 
     738             :         // Default Constructor
     739       45334 :         SurfaceData()
     740       45334 :             : Construction(0), RepresentativeCalcSurfNum(-1), ConstructionStoredInputValue(0), Class(SurfaceClass::None), Shape(SurfaceShape::None),
     741             :               Sides(0), Area(0.0), GrossArea(0.0), NetAreaShadowCalc(0.0), Perimeter(0.0), Azimuth(0.0), Height(0.0), Reveal(0.0), Tilt(0.0),
     742             :               Width(0.0), shapeCat(ShapeCat::Invalid), plane(0.0, 0.0, 0.0, 0.0), Centroid(0.0, 0.0, 0.0), lcsx(0.0, 0.0, 0.0), lcsy(0.0, 0.0, 0.0),
     743             :               lcsz(0.0, 0.0, 0.0), NewellAreaVector(0.0, 0.0, 0.0), NewellSurfaceNormalVector(0.0, 0.0, 0.0), OutNormVec(3, 0.0), SinAzim(0.0),
     744             :               CosAzim(0.0), SinTilt(0.0), CosTilt(0.0), IsConvex(true), IsDegenerate(false), VerticesProcessed(false), XShift(0.0), YShift(0.0),
     745             :               HeatTransSurf(false), OutsideHeatSourceTermSchedule(0), InsideHeatSourceTermSchedule(0),
     746             :               HeatTransferAlgorithm(HeatTransferModel::Invalid), BaseSurf(0), NumSubSurfaces(0), Zone(0), spaceNum(0), ExtBoundCond(0),
     747             :               ExtSolar(false), ExtWind(false), hasIncSolMultiplier(false), IncSolMultiplier(1.0), ViewFactorGround(0.0), ViewFactorSky(0.0),
     748             :               ViewFactorGroundIR(0.0), ViewFactorSkyIR(0.0), OSCPtr(0), OSCMPtr(0), MirroredSurf(false), IsShadowing(false),
     749             :               IsShadowPossibleObstruction(false), SchedShadowSurfIndex(0), IsTransparent(false), SchedMinValue(0.0), activeWindowShadingControl(0),
     750             :               HasShadeControl(false), activeShadedConstruction(0), activeShadedConstructionPrev(0), FrameDivider(0), Multiplier(1.0),
     751             :               SolarEnclIndex(0), SolarEnclSurfIndex(0), IsAirBoundarySurf(false), ConvOrientation(ConvectionConstants::SurfConvOrientation::Invalid),
     752             :               IsSurfPropertyGndSurfacesDefined(false), SurfPropertyGndSurfIndex(0), UseSurfPropertyGndSurfTemp(false),
     753             :               UseSurfPropertyGndSurfRefl(false), GndReflSolarRad(0.0), SurfHasSurroundingSurfProperty(false), SurfSchedExternalShadingFrac(false),
     754       45334 :               SurfSurroundingSurfacesNum(0), SurfExternalShadingSchInd(0), SurfLinkedOutAirNode(0)
     755             :         {
     756       45334 :         }
     757             : 
     758             :     public: // Methods
     759             :             // Set Precomputed Parameters
     760             :         void set_computed_geometry();
     761             : 
     762             :         Real64 getInsideAirTemperature(EnergyPlusData &state, const int t_SurfNum) const;
     763             : 
     764             :         Real64 getOutsideAirTemperature(EnergyPlusData &state, int t_SurfNum) const;
     765             : 
     766             :         Real64 getOutsideIR(EnergyPlusData &state, int t_SurfNum) const;
     767             : 
     768             :         static Real64 getSWIncident(EnergyPlusData &state, int t_SurfNum);
     769             : 
     770             :         int getTotLayers(EnergyPlusData &state) const;
     771             : 
     772             :         Real64 get_average_height(EnergyPlusData &state) const;
     773             : 
     774             :         void make_hash_key(EnergyPlusData &state, const int SurfNum);
     775             : 
     776             :         void set_representative_surface(EnergyPlusData &state, const int SurfNum);
     777             : 
     778             :     private: // Methods
     779             :              // Computed Shape Category
     780             :         ShapeCat computed_shapeCat() const;
     781             : 
     782             :         // Computed Plane
     783             :         Plane computed_plane() const;
     784             : 
     785             :         // Computed axis-projected 2D surface
     786             :         Surface2D computed_surface2d() const;
     787             :     };
     788             : 
     789       97367 :     struct SurfaceWindowCalc // Calculated window-related values
     790             :     {
     791             :         // Members
     792             :         Array1D<Real64> SolidAngAtRefPt;         // Solid angle subtended by window from daylit ref points 1 and 2
     793             :         Array1D<Real64> SolidAngAtRefPtWtd;      // Solid angle subtended by window from ref pts weighted by glare pos factor
     794             :         Array2D<Real64> IllumFromWinAtRefPt;     // Illuminance from window at ref pts for window with and w/o shade (lux)
     795             :         Array2D<Real64> BackLumFromWinAtRefPt;   // Window background luminance from window wrt ref pts (cd/m2) with and w/o shade (cd/m2)
     796             :         Array2D<Real64> SourceLumFromWinAtRefPt; // Window luminance at ref pts for window with and w/o shade (cd/m2)
     797             :         Array1D<Real64> WinCenter;               // X,Y,Z coordinates of window center point in building coord system
     798             :         Array1D<Real64> ThetaFace;               // Face temperatures of window layers (K)
     799             : 
     800             :         Array1D<Real64> OutProjSLFracMult; // Multiplier on sunlit fraction due to shadowing of glass by frame
     801             :         // and divider outside projections
     802             :         Array1D<Real64> InOutProjSLFracMult; // Multiplier on sunlit fraction due to shadowing of glass by frame
     803             :         // and divider inside and outside projections
     804             :         Array1D<Real64> EffShBlindEmiss; // Effective emissivity of interior blind or shade
     805             :         Array1D<Real64> EffGlassEmiss;   // Effective emissivity of glass adjacent to interior blind or shade
     806             : 
     807             :         Array1D<Real64> IllumFromWinAtRefPtRep; // Illuminance from window at reference point N [lux]
     808             :         Array1D<Real64> LumWinFromRefPtRep;     // Window luminance as viewed from reference point N [cd/m2]
     809             :         // for shadowing of ground by building and obstructions [W/m2]
     810             :         Array1D<Real64> EnclAreaMinusThisSurf; // Enclosure inside surface area minus this surface and its subsurfaces
     811             :         // for floor/wall/ceiling (m2)
     812             :         Array1D<Real64> EnclAreaReflProdMinusThisSurf; // Enclosure product of inside surface area times vis reflectance
     813             :         // minus this surface and its subsurfaces,
     814             :         // for floor/wall/ceiling (m2)
     815             : 
     816             :         BSDFWindowDescript ComplexFen; // Data for complex fenestration, see DataBSDFWindow.cc for declaration
     817             : 
     818             :         // Default Constructor
     819       44533 :         SurfaceWindowCalc()
     820       44533 :             : WinCenter(3, 0.0), ThetaFace(10, 296.15), OutProjSLFracMult(24, 1.0), InOutProjSLFracMult(24, 1.0), EffShBlindEmiss(MaxSlatAngs, 0.0),
     821       44533 :               EffGlassEmiss(MaxSlatAngs, 0.0), EnclAreaMinusThisSurf(3, 0.0), EnclAreaReflProdMinusThisSurf(3, 0.0)
     822             :         {
     823       44533 :         }
     824             :     };
     825             : 
     826             :     enum class NfrcProductOptions : int
     827             :     {
     828             :         Invalid = -1,
     829             :         CasementDouble,
     830             :         CasementSingle,
     831             :         DualAction,
     832             :         Fixed,
     833             :         Garage,
     834             :         Greenhouse,
     835             :         HingedEscape,
     836             :         HorizontalSlider,
     837             :         Jal,
     838             :         Pivoted,
     839             :         ProjectingSingle,
     840             :         ProjectingDual,
     841             :         DoorSidelite,
     842             :         Skylight,
     843             :         SlidingPatioDoor,
     844             :         CurtainWall,
     845             :         SpandrelPanel,
     846             :         SideHingedDoor,
     847             :         DoorTransom,
     848             :         TropicalAwning,
     849             :         TubularDaylightingDevice,
     850             :         VerticalSlider,
     851             :         Num
     852             :     };
     853             : 
     854             :     enum class NfrcVisionType : int
     855             :     {
     856             :         Invalid = -1,
     857             :         Single,
     858             :         DualVertical,
     859             :         DualHorizontal,
     860             :         Num
     861             :     };
     862             : 
     863             :     enum class FrameDividerType : int
     864             :     {
     865             :         Invalid = -1,
     866             :         DividedLite,
     867             :         Suspended,
     868             :         Num
     869             :     };
     870             : 
     871             :     // Type of control order when multiple surfaces are referenced
     872             :     enum class MultiSurfaceControl
     873             :     {
     874             :         Invalid = -1,
     875             :         Sequential,
     876             :         Group,
     877             :         Num
     878             :     };
     879             : 
     880         860 :     struct FrameDividerProperties
     881             :     {
     882             :         // Members
     883             :         std::string Name;          // Name of frame/divider
     884             :         Real64 FrameWidth;         // Average width of frame in plane of window {m}
     885             :         Real64 FrameProjectionOut; // Distance normal to window between outside face of outer pane
     886             :         //  and outside of frame {m}
     887             :         Real64 FrameProjectionIn; // Distance normal to window between inside face of inner pane
     888             :         //  and inside of frame {m}
     889             :         Real64 FrameConductance;          // Effective conductance of frame (no air films) {W/m2-K}
     890             :         Real64 FrameEdgeWidth;            // default 2.5 in ! Width of glass edge region near frame {m}
     891             :         Real64 FrEdgeToCenterGlCondRatio; // Ratio of frame edge of glass conductance (without air films) to
     892             :         // center of glass conductance (without air films)
     893             :         Real64 FrameSolAbsorp;        // Solar absorptance of frame corrected for self-shading
     894             :         Real64 FrameVisAbsorp;        // Visible absorptance of frame corrected for self-shading
     895             :         Real64 FrameEmis;             // Thermal emissivity of frame
     896             :         FrameDividerType DividerType; // Type of divider {DividedLite or Suspended (between-glass}
     897             :         Real64 DividerWidth;          // Average width of divider in plane of window {m}
     898             :         int HorDividers;              // Number of horizontal dividers
     899             :         int VertDividers;             // Number of vertical dividers
     900             :         Real64 DividerProjectionOut;  // Distance normal to window between outside face of outer pane
     901             :         //  and outside of divider {m}
     902             :         Real64 DividerProjectionIn; // Distance normal to window between inside face of inner pane
     903             :         //  and inside of divider {m}
     904             :         Real64 DividerEdgeWidth;           // default 2.5 in ! Width of glass edge region near divider
     905             :         Real64 DividerConductance;         // Effective conductance of divider (no air films) {W/m2-K}
     906             :         Real64 DivEdgeToCenterGlCondRatio; // Ratio of divider edge of glass conductance (without air films) to
     907             :         // center of glass conductance (without air films)
     908             :         Real64 DividerSolAbsorp;                                   // Solar absorptance of divider corrected for self-shading
     909             :         Real64 DividerVisAbsorp;                                   // Visible absorptance of divider corrected for self-shading
     910             :         Real64 DividerEmis;                                        // Thermal emissivity of divider
     911             :         DataWindowEquivalentLayer::Orientation MullionOrientation; // Horizontal or Vertical; used only for windows with two glazing systems
     912             :         //  divided by a mullion; obtained from Window5 data file.
     913             :         NfrcProductOptions NfrcProductType; // NFRC Product Type for Assembly Calculations
     914             :         Real64 OutsideRevealSolAbs;         // Solar absorptance of outside reveal
     915             :         Real64 InsideSillDepth;             // Inside sill depth (m)
     916             :         Real64 InsideReveal;                // Inside reveal (m)
     917             :         Real64 InsideSillSolAbs;            // Solar absorptance of inside sill
     918             :         Real64 InsideRevealSolAbs;          // Solar absorptance of inside reveal
     919             : 
     920             :         // Default Constructor
     921         776 :         FrameDividerProperties()
     922         776 :             : FrameWidth(0.0), FrameProjectionOut(0.0), FrameProjectionIn(0.0), FrameConductance(0.0), FrameEdgeWidth(0.06355),
     923             :               FrEdgeToCenterGlCondRatio(1.0), FrameSolAbsorp(0.0), FrameVisAbsorp(0.0), FrameEmis(0.9), DividerType(FrameDividerType::DividedLite),
     924             :               DividerWidth(0.0), HorDividers(0), VertDividers(0), DividerProjectionOut(0.0), DividerProjectionIn(0.0), DividerEdgeWidth(0.06355),
     925             :               DividerConductance(0.0), DivEdgeToCenterGlCondRatio(1.0), DividerSolAbsorp(0.0), DividerVisAbsorp(0.0), DividerEmis(0.9),
     926             :               MullionOrientation(DataWindowEquivalentLayer::Orientation::Invalid), NfrcProductType(NfrcProductOptions::CurtainWall),
     927         776 :               OutsideRevealSolAbs(0.0), InsideSillDepth(0.0), InsideReveal(0.0), InsideSillSolAbs(0.0), InsideRevealSolAbs(0.0)
     928             :         {
     929         776 :         }
     930             :     };
     931             : 
     932             :     struct StormWindowData
     933             :     {
     934             :         // Members
     935             :         int BaseWindowNum;       // Surface number of associated exterior window
     936             :         int StormWinMaterialNum; // Material number of storm window glass
     937             :         Real64 StormWinDistance; // Distance between storm window glass and adjacent glass (m)
     938             :         int DateOn;              // Date (julian) storm window is put on
     939             :         int MonthOn;             // Month storm window is put on
     940             :         int DayOfMonthOn;        // Day of month storm window is put on
     941             :         int DateOff;             // Date (julian) storm window is taken off
     942             :         int MonthOff;            // Month storm window is taken off
     943             :         int DayOfMonthOff;       // Day of month storm window is taken off
     944             : 
     945             :         // Default Constructor
     946           2 :         StormWindowData()
     947           2 :             : BaseWindowNum(0), StormWinMaterialNum(0), StormWinDistance(0.0), DateOn(0), MonthOn(0), DayOfMonthOn(0), DateOff(0), MonthOff(0),
     948           2 :               DayOfMonthOff(0)
     949             :         {
     950           2 :         }
     951             :     };
     952             : 
     953         258 :     struct WindowShadingControlData
     954             :     {
     955             :         // Members
     956             :         std::string Name;                                    // User supplied name of this set of shading control data
     957             :         int ZoneIndex{0};                                    // number of the zone referenced
     958             :         int SequenceNumber{0};                               // Shading control sequence number
     959             :         WinShadingType ShadingType{WinShadingType::NoShade}; // Shading type (InteriorShade, SwitchableGlazing,
     960             :         //  CHARACTER(len=32) :: ShadingType    = ' ' ! Shading type (InteriorShade, SwitchableGlazing,
     961             :         //  ExteriorShade,InteriorBlind,ExteriorBlind,BetweenGlassShade,
     962             :         //  BetweenGlassBlind, or ExteriorScreen)
     963             :         int getInputShadedConstruction{0}; // Pointer to the shaded construction (for ShadingType=ExteriorScreen,InteriorShade,
     964             :         //  ExteriorShade,BetweenGlassShade,InteriorBlind,ExteriorBlind,BetweenGlassBlind;
     965             :         //  this must be a window construction with a screen, shade or blind layer)
     966             :         // this is only used during GetInput and should not be used during timestep calculations
     967             :         int ShadingDevice{0}; // Pointer to the material for the shading device (for ShadingType=InteriorShade,
     968             :         //  ExteriorShade,BetweenGlassShade,InteriorBlind,ExteriorBlind,BetweenGlassBlind,
     969             :         //  ExteriorScreen;
     970             :         //  this must be a Material:WindowShade, Material:WindowScreen, or Material:WindowBlind
     971             :         WindowShadingControlType shadingControlType{
     972             :             WindowShadingControlType::Invalid}; // Takes one of the following values that specifies type of shading control
     973             :         //  CHARACTER(len=60) :: ShadingControlType =' ' ! Takes one of the following values that specifies type of shading control
     974             :         // (control is active only when schedule value = 1; if no schedule
     975             :         // specified, schedule value defaults to 1)
     976             :         //  AlwaysOn: always shaded; not affected by schedule
     977             :         //  AlwaysOff: never shaded; not affected by schedule
     978             :         //  OnIfScheduleAllows: unshaded if sch val = 0, shaded if = 1
     979             :         //  OnIfHighSolarOnWindow: shaded if incident direct + diffuse > setpoint (W/m2 of window)
     980             :         //  OnIfHighHorizontalSolar: shaded if direct + diffuse horizontal solar > setpoint
     981             :         //   (W/m2 of ground)
     982             :         //  OnIfHighOutsideAirTemp: shaded if outside drybulb > setpoint (C)
     983             :         //  OnIfHighZoneAirTemp: shaded if previous time step zone temperature > setpoint (C)
     984             :         //  OnIfHighZoneCooling: shaded if previous time step zone cooling rate > setpoint (W)
     985             :         //  OnIfHighGlare: shaded if total daylight glare index at first daylighting reference point
     986             :         //   from all exterior windows in zone > maximum glare specified in daylighting
     987             :         //   input for zone.
     988             :         //  MeetDaylightIlluminanceSetpoint: shading is adjusted to just meet illuminance setpoint
     989             :         //   at first reference point (only for ShadingType=SwitchableGlazing)
     990             :         //       The following three controls are used primarily to reduce zone heating load. They
     991             :         //       can be used with any shading type but are most appropriate for opaque interior
     992             :         //       or exterior shades with a high insulating value ("opaque movable insulation").
     993             :         //  OnNightIfLowOutsideTemp/OffDay: shaded at night if outside temp < setpoint (C)
     994             :         //  OnNightIfLowInsideTemp/OffDay: shaded at night if previous time step zone air temp < setpoint (C)
     995             :         //  OnNightIfHeating/OffDay: shaded  at night if previous time step zone heating rate > setpoint (W)
     996             :         //       The following two controls are used to reduce zone heating and cooling loads.
     997             :         //       They can be used with any shading type but are most appropriate for translucent
     998             :         //       interior or exterior shades with a high insulating value ("translucent movable insulation")
     999             :         //  OnNightIfLowOutsideTemp/OnDayIfCooling: shaded at night if outside temp < setpoint (C);
    1000             :         //                                         shaded daytime if prev. time step cooling rate > 0
    1001             :         //  OnNightIfHeating/OnDayIfCooling: shaded at night if prev. time step heating rate > setpoint (W);
    1002             :         //                                         shaded daytime if prev. time step cooling rate > 0
    1003             :         //       The following two controls are used to reduce zone cooling load. They can be used
    1004             :         //       with any shading type but are most appropriate for interior or exterior blinds, interior
    1005             :         //       or exterior shades with low insulating value, or switchable glazing.
    1006             :         //  OffNight/OnDayIfCoolingAndHighSolarOnWindow: shading off at night; shading on daytime if
    1007             :         //                                         solar on window > setpoint (W/m2 of window) and
    1008             :         //                                         prev. time step cooling rate > 0
    1009             :         //  OnNight/OnDayIfCoolingAndHighSolarOnWindow: shading on at night; shading on daytime if
    1010             :         //                                         solar on window > setpoint (W/m2 of window) and
    1011             :         //                                         prev. time step cooling rate > 0
    1012             :         int Schedule{0}; // Pointer to schedule of 0 and 1 values: 0 => window is not shaded;
    1013             :         //  1 => window is shaded if Type=Schedule or Type = ScheduleAnd...
    1014             :         // and setpoint is exceeded.
    1015             :         Real64 SetPoint{0.0}; // Control setpoint (dimension depends on Trigger:
    1016             :         //  W/m2 of window area for solar on window,
    1017             :         //  W/m2 of ground area for horizontal solar,
    1018             :         //  deg C for air temp, W for zone heating and
    1019             :         //  cooling rate). Not used for Shading Control Type =
    1020             :         //  MeetDaylightIlluminanceSetpoint or OnIfHighGlare.
    1021             :         Real64 SetPoint2{0.0}; // Second control setpoint for control types that take two setpoints.
    1022             :         //   Dimension is deg C or W/m2.
    1023             :         bool ShadingControlIsScheduled{false}; // True if shading control has a schedule
    1024             :         bool GlareControlIsActive{false};      // True if shading control to reduce daylight glare is active
    1025             :         int SlatAngleSchedule{0};              // Pointer to schedule of slat angle values between 0.0 and 180.0 degrees
    1026             :         SlatAngleControl slatAngleControl{
    1027             :             SlatAngleControl::Invalid}; // Takes one of the following values that specifies
    1028             :                                         //  CHARACTER(len=32) :: slatAngleControlForBlinds = ' ' ! Takes one of the following values that specifies
    1029             :                                         //  how slat angle is controled in a blind when ShadingType =
    1030             :                                         //  InteriorBlind, ExteriorBlind or BetweenGlassBlind.
    1031             :                                         //  FixedSlatAngle: the slat angle is fixed at the constant value given in the
    1032             :                                         //    associated Material:WindowBlind
    1033             :                                         //  ScheduledSlatAngle: the slat angle in degrees between 1 and 180 is given
    1034             :                                         //    by the schedule with index SlatAngleSchedule
    1035             :                                         //  BlockBeamSolar: if beam solar is incident on the window, and a blind is on the
    1036             :                                         //    window, the slat angle is adjusted to just block beam solar; otherwise the
    1037             :                                         //    slat angle is set to the value given in the associated Material:WindowBlind.
    1038             :         std::string DaylightingControlName; // string holding the Daylighting Control Object Name string
    1039             :         int DaylightControlIndex{0};        // Pointer to the array of Daylighting Controls
    1040             :         MultiSurfaceControl multiSurfaceControl{
    1041             :             MultiSurfaceControl::Invalid};     // True if Group, False if Sequential - type of control order when multiple surfaces are referenced
    1042             :         int FenestrationCount{0};              // count of fenestration references
    1043             :         Array1D<std::string> FenestrationName; // string holding list of fenestration surfaces
    1044             :         Array1D_int FenestrationIndex;         // Pointers to fenestration surfaces
    1045             :     };
    1046             : 
    1047         807 :     struct OSCData
    1048             :     {
    1049             :         // Members
    1050             :         std::string Name;                  // Name of OSC
    1051             :         Real64 ConstTemp;                  // User selected constant temperature (degrees C)
    1052             :         Real64 ConstTempCoef;              // Coefficient modifying the user selected constant temperature
    1053             :         Real64 ExtDryBulbCoef;             // Coefficient modifying the external dry bulb temperature
    1054             :         Real64 GroundTempCoef;             // Coefficient modifying the ground temperature
    1055             :         Real64 SurfFilmCoef;               // Combined convective/radiative film coefficient if >0, else use other coefficients
    1056             :         Real64 WindSpeedCoef;              // Coefficient modifying the wind speed term (s/m)
    1057             :         Real64 ZoneAirTempCoef;            // Coefficient modifying the zone air temperature part of the equation
    1058             :         std::string ConstTempScheduleName; // Schedule name for scheduled outside temp
    1059             :         int ConstTempScheduleIndex;        // Index for scheduled outside temp.
    1060             :         bool SinusoidalConstTempCoef;      // If true then ConstTempCoef varies by sine wave
    1061             :         Real64 SinusoidPeriod;             // period of sine wave variation  (hr)
    1062             :         Real64 TPreviousCoef;              // Coefficient modifying the OSC temp from the previous timestep (dimensionless)
    1063             :         Real64 TOutsideSurfPast;           // Ouside surface temperature from previous timestep {C}
    1064             :         Real64 MinTempLimit;               // Minimum limit on OSC temp {deg C}
    1065             :         Real64 MaxTempLimit;               // Maximum limit on OSC temp {deg C}
    1066             :         bool MinLimitPresent;              // If TRUE then apply minimum limit on calculated OSC temp
    1067             :         bool MaxLimitPresent;              // If TRUE then apply maximum limit on calculated OSC temp
    1068             :         Real64 OSCTempCalc;                // Result of calculated temperature using OSC (degrees C)
    1069             : 
    1070             :         // Default Constructor
    1071         789 :         OSCData()
    1072         789 :             : ConstTemp(0.0), ConstTempCoef(0.0), ExtDryBulbCoef(0.0), GroundTempCoef(0.0), SurfFilmCoef(0.0), WindSpeedCoef(0.0),
    1073             :               ZoneAirTempCoef(0.0), ConstTempScheduleIndex(0), SinusoidalConstTempCoef(false), SinusoidPeriod(0.0), TPreviousCoef(0.0),
    1074         789 :               TOutsideSurfPast(0.0), MinTempLimit(0.0), MaxTempLimit(0.0), MinLimitPresent(false), MaxLimitPresent(false), OSCTempCalc(0.0)
    1075             :         {
    1076         789 :         }
    1077             :     };
    1078             : 
    1079         811 :     struct OSCMData
    1080             :     {
    1081             :         // Members
    1082             :         std::string Name;             // Name of OSCM
    1083             :         std::string Class;            // type of Model for OSCM
    1084             :         Real64 TConv;                 // Temperature of bulk air at other side face (degrees C)
    1085             :         bool EMSOverrideOnTConv;      // if true then EMS calling for convection bulk air temp override
    1086             :         Real64 EMSOverrideTConvValue; // value for convection air temp when overridden
    1087             :         Real64 HConv;                 // Convection coefficient (W/m2-K)
    1088             :         bool EMSOverrideOnHConv;      // if true then EMS calling for convection coef override
    1089             :         Real64 EMSOverrideHConvValue; // value to use for convection coef when overridden
    1090             :         Real64 TRad;                  // Effective temperature of surfaces exposed to other side face (degrees C)
    1091             :         bool EMSOverrideOnTRad;       // if true then EMS calling for radiation temp override
    1092             :         Real64 EMSOverrideTRadValue;  // value to use for rad temp when overridden
    1093             :         Real64 HRad;                  // Linearized Radiation coefficient (W/m2-K)
    1094             :         bool EMSOverrideOnHrad;       // if true then EMS calling for radiation coef override
    1095             :         Real64 EMSOverrideHradValue;  // value to use for rad coef when overridden
    1096             : 
    1097             :         // Default Constructor
    1098         791 :         OSCMData()
    1099         791 :             : TConv(20.0), EMSOverrideOnTConv(false), EMSOverrideTConvValue(0.0), HConv(4.0), EMSOverrideOnHConv(false), EMSOverrideHConvValue(0.0),
    1100         791 :               TRad(20.0), EMSOverrideOnTRad(false), EMSOverrideTRadValue(0.0), HRad(4.0), EMSOverrideOnHrad(false), EMSOverrideHradValue(0.0)
    1101             :         {
    1102         791 :         }
    1103             :     };
    1104             : 
    1105        1692 :     struct ConvectionCoefficient
    1106             :     {
    1107             :         // Members
    1108             :         int WhichSurface;                                       // Which surface number this is applied to
    1109             :         std::string SurfaceName;                                // Which surface (name)
    1110             :         ConvectionConstants::ConvCoefOverrideType OverrideType; // Override type, 1=value, 2=schedule, 3=model, 4=user curve
    1111             :         Real64 OverrideValue;                                   // User specified value
    1112             :         std::string ScheduleName;                               // Which surface (name)
    1113             :         int ScheduleIndex;                                      // if type="schedule" is used
    1114             :         int UserCurveIndex;                                     // if type=UserCurve is used
    1115             :         int HcModelEq;                                          // if type is one of specific model equations
    1116             : 
    1117             :         // Default Constructor
    1118        1617 :         ConvectionCoefficient()
    1119        1617 :             : WhichSurface(0), OverrideType(ConvectionConstants::ConvCoefOverrideType::Invalid), OverrideValue(0.0), ScheduleIndex(0),
    1120        1617 :               UserCurveIndex(0), HcModelEq(0)
    1121             :         {
    1122        1617 :         }
    1123             :     };
    1124             : 
    1125       88295 :     struct ShadingVertexData
    1126             :     {
    1127             :         // Members
    1128             :         int NVert;
    1129             :         Array1D<Real64> XV;
    1130             :         Array1D<Real64> YV;
    1131             :         Array1D<Real64> ZV;
    1132             : 
    1133             :         // Default Constructor
    1134       44533 :         ShadingVertexData()
    1135       44533 :         {
    1136       44533 :         }
    1137             :     };
    1138             : 
    1139         781 :     struct ExtVentedCavityStruct
    1140             :     {
    1141             :         // Members
    1142             :         // from input data
    1143             :         std::string Name;
    1144             :         std::string OSCMName;             // OtherSideConditionsModel
    1145             :         int OSCMPtr;                      // OtherSideConditionsModel index
    1146             :         Real64 Porosity;                  // fraction of absorber plate [--]
    1147             :         Real64 LWEmitt;                   // Thermal Emissivity of Baffle Surface [dimensionless]
    1148             :         Real64 SolAbsorp;                 // Solar Absorbtivity of Baffle Surface [dimensionless]
    1149             :         SurfaceRoughness BaffleRoughness; // surface roughness for exterior convection calcs.
    1150             :         Real64 PlenGapThick;              // Depth of Plenum Behind Baffle [m]
    1151             :         int NumSurfs;                     // a single baffle can have multiple surfaces underneath it
    1152             :         Array1D_int SurfPtrs;             // = 0  ! array of pointers for participating underlying surfaces
    1153             :         Real64 HdeltaNPL;                 // Height scale for Cavity buoyancy  [m]
    1154             :         Real64 AreaRatio;                 // Ratio of actual surface are to projected surface area [dimensionless]
    1155             :         Real64 Cv;                        // volume-based effectiveness of openings for wind-driven vent when Passive
    1156             :         Real64 Cd;                        // discharge coefficient of openings for buoyancy-driven vent when Passive
    1157             :         // data from elsewhere and calculated
    1158             :         Real64 ActualArea;  // Overall Area of Collect with surface corrugations.
    1159             :         Real64 ProjArea;    // Overall Area of Collector projected, as if flat [m2]
    1160             :         Vector Centroid;    // computed centroid
    1161             :         Real64 TAirCav;     // modeled drybulb temperature for air between baffle and wall [C]
    1162             :         Real64 Tbaffle;     // modeled surface temperature for baffle[C]
    1163             :         Real64 TairLast;    // Old Value for modeled drybulb temp of air between baffle and wall [C]
    1164             :         Real64 TbaffleLast; // Old value for modeled surface temperature for baffle [C]
    1165             :         Real64 HrPlen;      // Modeled radiation coef for OSCM [W/m2-C]
    1166             :         Real64 HcPlen;      // Modeled Convection coef for OSCM [W/m2-C]
    1167             :         Real64 MdotVent;    // air mass flow exchanging with ambient when passive.
    1168             :         Real64 Tilt;        // Tilt from area weighted average of underlying surfaces
    1169             :         Real64 Azimuth;     // Azimuth from area weighted average of underlying surfaces
    1170             :         Real64 QdotSource;  // Source/sink term
    1171             :         // reporting data
    1172             :         Real64 Isc;              // total incident solar on baffle [W]
    1173             :         Real64 PassiveACH;       // air changes per hour when passive [1/hr]
    1174             :         Real64 PassiveMdotVent;  // Total Nat Vent air change rate  [kg/s]
    1175             :         Real64 PassiveMdotWind;  // Nat Vent air change rate from Wind-driven [kg/s]
    1176             :         Real64 PassiveMdotTherm; // Nat. Vent air change rate from buoyancy-driven flow [kg/s]
    1177             : 
    1178             :         // Default Constructor
    1179         776 :         ExtVentedCavityStruct()
    1180         776 :             : OSCMPtr(0), Porosity(0.0), LWEmitt(0.0), SolAbsorp(0.0), BaffleRoughness(SurfaceRoughness::VeryRough), PlenGapThick(0.0), NumSurfs(0),
    1181             :               HdeltaNPL(0.0), AreaRatio(0.0), Cv(0.0), Cd(0.0), ActualArea(0.0), ProjArea(0.0), Centroid(0.0, 0.0, 0.0), TAirCav(0.0), Tbaffle(0.0),
    1182             :               TairLast(20.0), TbaffleLast(20.0), HrPlen(0.0), HcPlen(0.0), MdotVent(0.0), Tilt(0.0), Azimuth(0.0), QdotSource(0.0), Isc(0.0),
    1183         776 :               PassiveACH(0.0), PassiveMdotVent(0.0), PassiveMdotWind(0.0), PassiveMdotTherm(0.0)
    1184             :         {
    1185         776 :         }
    1186             :     };
    1187             : 
    1188          13 :     struct SurfaceSolarIncident
    1189             :     {
    1190             :         // Members
    1191             :         std::string Name;
    1192             :         int SurfPtr;   // surface pointer
    1193             :         int ConstrPtr; // construction pointer
    1194             :         int SchedPtr;  // schedule pointer
    1195             : 
    1196             :         // Default Constructor
    1197           7 :         SurfaceSolarIncident() : SurfPtr(0), ConstrPtr(0), SchedPtr(0)
    1198             :         {
    1199           7 :         }
    1200             :     };
    1201             : 
    1202          31 :     struct SurfaceIncidentSolarMultiplier
    1203             :     {
    1204             :         // Members
    1205             :         std::string Name;
    1206             :         int SurfaceIdx = 0;  // surface index
    1207             :         Real64 Scaler = 1.0; // the constant multiplier constant from user input
    1208             :         int SchedPtr = 0;    // the index of the multiplier schedule
    1209             :     };
    1210             : 
    1211           3 :     struct FenestrationSolarAbsorbed
    1212             :     {
    1213             :         // Members
    1214             :         std::string Name;
    1215             :         int SurfPtr;           // surface pointer
    1216             :         int ConstrPtr;         // construction pointer
    1217             :         int NumOfSched;        // number of scheduled layers
    1218             :         Array1D_int SchedPtrs; // pointer to schedules for each layer in construction
    1219             : 
    1220             :         // Default Constructor
    1221           2 :         FenestrationSolarAbsorbed() : SurfPtr(0), ConstrPtr(0), NumOfSched(0)
    1222             :         {
    1223           2 :         }
    1224             :     };
    1225             : 
    1226          82 :     struct GroundSurfacesData
    1227             :     {
    1228             :         // Members
    1229             :         std::string Name;        // name of a ground surface
    1230             :         Real64 ViewFactor = 0.0; // view factor to a ground surface
    1231             :         int TempSchPtr = 0;      // pointer to a ground surface temperature schedule object
    1232             :         int ReflSchPtr = 0;      // pointer to a ground Surface reflectance schedule object
    1233             :     };
    1234             : 
    1235          34 :     struct GroundSurfacesProperty
    1236             :     {
    1237             :         // Members
    1238             :         std::string Name;                     // name of multiple ground surfaces object
    1239             :         int NumGndSurfs = 0;                  // number of groundSurfaces
    1240             :         Array1D<GroundSurfacesData> GndSurfs; // ground surfaces data
    1241             :         Real64 SurfsTempAvg = 0.0;            // ground Surfaces average temperature at each time step
    1242             :         Real64 SurfsReflAvg = 0.0;            // ground Surfaces average reflectance at each time step
    1243             :         Real64 SurfsViewFactorSum = 0.0;      // sum of view factors of ground surfaces seen by an exterior surface
    1244             :         bool IsGroundViewFactorSet = false;   // true if the ground view factor field is not blank
    1245             :     };
    1246             : 
    1247         370 :     struct SurfaceLocalEnvironment
    1248             :     {
    1249             :         // Members
    1250             :         std::string Name;
    1251             :         int SurfPtr = 0;             // surface pointer
    1252             :         int ExtShadingSchedPtr = 0;  // schedule pointer
    1253             :         int SurroundingSurfsPtr = 0; // schedule pointer
    1254             :         int OutdoorAirNodePtr = 0;   // outdoor air node pointer
    1255             :         int GroundSurfsPtr = 0;      // pointer to multiple ground surfaces object
    1256             :     };
    1257             : 
    1258          40 :     struct SurroundingSurfProperty
    1259             :     {
    1260             :         // Members
    1261             :         std::string Name;
    1262             :         Real64 ViewFactor = 0.0; // view factor to surrounding surface
    1263             :         int TempSchNum = 0;      // schedule pointer
    1264             :     };
    1265             : 
    1266          20 :     struct SurroundingSurfacesProperty
    1267             :     {
    1268             :         // Members
    1269             :         std::string Name;
    1270             :         Real64 SkyViewFactor = 0.0;         // sky view factor
    1271             :         Real64 GroundViewFactor = 0.0;      // ground view factor
    1272             :         int SkyTempSchNum = 0;              // schedule pointer
    1273             :         int GroundTempSchNum = 0;           // schedule pointer
    1274             :         int TotSurroundingSurface = 0;      // Total number of surrounding surfaces defined for an exterior surface
    1275             :         bool IsSkyViewFactorSet = false;    // false if the sky view factor field is blank
    1276             :         bool IsGroundViewFactorSet = false; // false if the ground view factor field is blank
    1277             :         Array1D<SurroundingSurfProperty> SurroundingSurfs;
    1278             :     };
    1279             : 
    1280        4728 :     struct IntMassObject
    1281             :     {
    1282             :         // Members
    1283             :         std::string Name;
    1284             :         std::string ZoneOrZoneListName;   // zone or zone list name
    1285             :         int ZoneOrZoneListPtr;            // pointer to a zone list
    1286             :         int NumOfZones;                   // number of zones in a zone list
    1287             :         int Construction;                 // pointer to contruction object
    1288             :         Real64 GrossArea;                 // internal surface area, [m2]
    1289             :         bool ZoneListActive;              // flag to a list
    1290             :         std::string spaceOrSpaceListName; // Space or Space list name
    1291             :         int spaceOrSpaceListPtr;          // pointer to a Space list
    1292             :         int numOfSpaces;                  // number of Spaces in a Space list
    1293             :         bool spaceListActive;             // flag to a list
    1294             : 
    1295             :         // Default Constructor
    1296        2446 :         IntMassObject()
    1297        2446 :             : ZoneOrZoneListPtr(0), NumOfZones(0), Construction(0), GrossArea(0.0), ZoneListActive(false), spaceOrSpaceListPtr(0), numOfSpaces(0),
    1298        2446 :               spaceListActive(false)
    1299             :         {
    1300        2446 :         }
    1301             :     };
    1302             : 
    1303             :     // Clears the global data in DataSurfaces.
    1304             :     // Needed for unit tests, should not be normally called.
    1305             :     void clear_state();
    1306             : 
    1307             :     void SetSurfaceOutBulbTempAt(EnergyPlusData &state);
    1308             : 
    1309             :     void CheckSurfaceOutBulbTempAt(EnergyPlusData &state);
    1310             : 
    1311             :     void SetSurfaceWindSpeedAt(EnergyPlusData &state);
    1312             : 
    1313             :     void SetSurfaceWindDirAt(EnergyPlusData &state);
    1314             : 
    1315             :     Real64 AbsFrontSide(EnergyPlusData &state, int SurfNum);
    1316             : 
    1317             :     Real64 AbsBackSide(EnergyPlusData &state, int SurfNum);
    1318             : 
    1319             :     std::string cSurfaceClass(SurfaceClass ClassNo);
    1320             : 
    1321             : } // namespace DataSurfaces
    1322             : 
    1323        1542 : struct SurfacesData : BaseGlobalStruct
    1324             : {
    1325             :     int TotSurfaces = 0;             // Total number of surfaces (walls, floors, roofs, windows, shading surfaces, etc.--everything)
    1326             :     int TotWindows = 0;              // Total number of windows
    1327             :     int TotStormWin = 0;             // Total number of storm window blocks
    1328             :     int TotWinShadingControl = 0;    // Total number of window shading control blocks
    1329             :     int TotIntConvCoeff = 0;         // Total number of interior convection coefficient (overrides) // TODO: Should just be a local variable I think
    1330             :     int TotExtConvCoeff = 0;         // Total number of exterior convection coefficient (overrides) // TODO: Should just be a local variable I think
    1331             :     int TotOSC = 0;                  // Total number of Other Side Coefficient Blocks
    1332             :     int TotOSCM = 0;                 // Total number of Other Side Conditions Model Blocks.
    1333             :     int TotExtVentCav = 0;           // Total number of ExteriorNaturalVentedCavity
    1334             :     int TotSurfIncSolSSG = 0;        // Total number of scheduled surface gains for incident solar radiation on surface
    1335             :     int TotSurfIncSolMultiplier = 0; // Total number of surfaces with incident solar multipliers
    1336             :     int TotFenLayAbsSSG = 0;         // Total number of scheduled surface gains for absorbed solar radiation in window layers
    1337             :     int TotSurfLocalEnv = 0;         // Total number of surface level outdoor air node.
    1338             :     int TotSurfPropGndSurfs = 0;     // Total number of surface property ground surfaces object
    1339             :     int Corner = 0;                  // Which corner is specified as the first vertex
    1340             :     int MaxVerticesPerSurface = 4;   // Maximum number of vertices allowed for a single surface (default -- can go higher)
    1341             :     int BuildingShadingCount = 0;    // Total number of Building External Shades
    1342             :     int FixedShadingCount = 0;       // Total number of Fixed External Shades
    1343             :     int AttachedShadingCount = 0;    // Total number of Shades attached to Zones
    1344             :     int ShadingSurfaceFirst = -1;    // Start index of shading surfaces (Building External Shades, Fixed External Shades and Shades attached to Zone)
    1345             :     int ShadingSurfaceLast = -1;     // End index of shading surfaces (Building External Shades, Fixed External Shades and Shades attached to Zone)
    1346             :     bool AspectTransform = false;    // Set to true when GeometryTransform object is used
    1347             :     bool CalcSolRefl = false;        // Set to true when Solar Reflection Calculations object is used
    1348             :     bool CCW = false;                // True if vertices will be entered in CounterClockWise Order
    1349             :     bool WorldCoordSystem = false;   // True if vertices will be "World Coordinates". False means relative coordinates
    1350             :     bool DaylRefWorldCoordSystem = false; // True if Daylight Reference Point vertices will be "World Coordinates". False means relative coordinates
    1351             :     int MaxRecPts = 0;                    // Max number of receiving points on a surface for solar reflection calc
    1352             :     int MaxReflRays = 0;                  // Max number of rays from a receiving surface for solar reflection calc
    1353             :     Real64 GroundLevelZ = 0.0;            // Z value of ground level for solar refl calc (m)
    1354             :     bool AirflowWindows = false;          // TRUE if one or more airflow windows
    1355             :     bool ShadingTransmittanceVaries = false;           // overall, shading transmittance varies for the building
    1356             :     bool UseRepresentativeSurfaceCalculations = false; // Use Representative Surfaces for Calculations
    1357             :     bool AnyHeatBalanceInsideSourceTerm = false;       // True if any SurfaceProperty:HeatBalanceSourceTerm inside face used
    1358             :     bool AnyHeatBalanceOutsideSourceTerm = false;      // True if any SurfaceProperty:HeatBalanceSourceTerm outside face used
    1359             :     bool AnyMovableInsulation = false;                 // True if any movable insulation presents
    1360             :     bool AnyMovableSlat = false;                       // True if there are any movable slats for window blinds presented
    1361             : 
    1362             :     Array1D_int SurfAdjacentZone; // Array of adjacent zones to each surface
    1363             :     Array1D<Real64> X0;           // X-component of translation vector
    1364             :     Array1D<Real64> Y0;           // Y-component of translation vector
    1365             :     Array1D<Real64> Z0;           // Z-component of translation vector
    1366             : 
    1367             :     std::unordered_map<DataSurfaces::SurfaceCalcHashKey, int, DataSurfaces::SurfaceCalcHasher>
    1368             :         RepresentativeSurfaceMap; // A map that categorizes similar surfaces with
    1369             :                                   // a single representative surface index
    1370             : 
    1371             :     std::vector<int> AllHTSurfaceList;                 // List of all heat transfer surfaces
    1372             :     std::vector<int> AllExtSolarSurfaceList;           // List of all exterior solar surfaces, all are heat transfer surfaces
    1373             :     std::vector<int> AllExtSolAndShadingSurfaceList;   // List of all exterior solar surfaces plus all shading surfaces
    1374             :     std::vector<int> AllShadowPossObstrSurfaceList;    // List of all IsShadoPossibleObstuction surfaces
    1375             :     std::vector<int> AllIZSurfaceList;                 // List of all interzone heat transfer surfaces
    1376             :     std::vector<int> AllHTNonWindowSurfaceList;        // List of all non-window heat transfer surfaces
    1377             :     std::vector<int> AllHTWindowSurfaceList;           // List of all window surfaces
    1378             :     std::vector<int> AllExtSolWindowSurfaceList;       // List of all exterior solar window surfaces
    1379             :     std::vector<int> AllExtSolWinWithFrameSurfaceList; // List of all exterior solar window surfaces with a frame and divider
    1380             :     std::vector<int> AllHTKivaSurfaceList;             // List of all Kiva foundation surfaces
    1381             :     std::vector<int> AllSurfaceListReportOrder;        // List of all surfaces - output reporting order
    1382             : 
    1383             :     // Surface HB arrays
    1384             :     Array1D<Real64> SurfOutDryBulbTemp; // Surface outside dry bulb air temperature, for surface heat balance (C)
    1385             :     Array1D<Real64> SurfOutWetBulbTemp; // Surface outside wet bulb air temperature, for surface heat balance (C)
    1386             :     Array1D<Real64> SurfOutWindSpeed;   // Surface outside wind speed, for surface heat balance (m/s)
    1387             :     Array1D<Real64> SurfOutWindDir;     // Surface outside wind direction, for surface heat balance and ventilation(degree)
    1388             :     Array1D<Real64> SurfGenericContam;  // [ppm] Surface generic contaminant as a storage term for
    1389             :     Array1D<int> SurfLowTempErrCount;
    1390             :     Array1D<int> SurfHighTempErrCount;
    1391             : 
    1392             :     // Surface solar arrays
    1393             :     Array1D<Real64> SurfAirSkyRadSplit;        // Fractional split between the air and the sky for radiation from the surface
    1394             :                                                // Fraction of sky IR coming from sky itself; 1-SurfAirSkyRadSplit comes from the atmosphere.
    1395             :     Array1D<Vector3<Real64>> SurfSunCosHourly; // Hourly values of SUNCOS (solar direction cosines)
    1396             :                                                // Autodesk: Init Zero-initialization added to avoid use uninitialized
    1397             :     Array1D<Real64> SurfSunlitArea;            // Sunlit area by surface number
    1398             :     Array1D<Real64> SurfSunlitFrac;            // Sunlit fraction by surface number
    1399             :     Array1D<Real64> SurfSkySolarInc;           // Incident diffuse solar from sky; if CalcSolRefl is true, includes reflection of sky diffuse
    1400             :                                                // and beam solar from exterior obstructions [W/m2]
    1401             :     Array1D<Real64> SurfGndSolarInc;           // Incident diffuse solar from ground; if CalcSolRefl is true,
    1402             :                                                // accounts for shadowing of ground by building and obstructions [W/m2]
    1403             :     Array1D<Real64> SurfBmToBmReflFacObs;      // Factor for incident solar from specular beam refl from obstructions (W/m2)/(W/m2)
    1404             :     Array1D<Real64> SurfBmToDiffReflFacObs;    // Factor for incident solar from diffuse beam refl from obstructions (W/m2)/(W/m2)
    1405             :     Array1D<Real64> SurfBmToDiffReflFacGnd;    // Factor for incident solar from diffuse beam refl from ground
    1406             :     Array1D<Real64> SurfSkyDiffReflFacGnd;     // sky diffuse reflection view factors from ground
    1407             :     Array1D<Real64> SurfOpaqAI;                // Time step value of factor for beam absorbed on inside of opaque surface
    1408             :     Array1D<Real64> SurfOpaqAO;                // Time step value of factor for beam absorbed on outside of opaque surface
    1409             :     Array1D<int> SurfPenumbraID;
    1410             : 
    1411             :     // Surface reflectance
    1412             :     Array2D<Real64> SurfReflFacBmToDiffSolObs;
    1413             :     Array2D<Real64> SurfReflFacBmToDiffSolGnd;
    1414             :     Array2D<Real64> SurfReflFacBmToBmSolObs;
    1415             :     Array1D<Real64> SurfReflFacSkySolObs;
    1416             :     Array1D<Real64> SurfReflFacSkySolGnd;
    1417             :     Array2D<Real64> SurfCosIncAveBmToBmSolObs;
    1418             : 
    1419             :     // Surface parameters specific to solar reflection from surfaces
    1420             :     Array1D<Real64> SurfShadowDiffuseSolRefl; // Diffuse solar reflectance of opaque portion
    1421             :     Array1D<Real64> SurfShadowDiffuseVisRefl; // Diffuse visible reflectance of opaque portion
    1422             :     Array1D<Real64> SurfShadowGlazingFrac;    // Glazing fraction
    1423             :     Array1D<int> SurfShadowGlazingConstruct;  // Glazing construction number
    1424             :     Array1D<int> SurfShadowRecSurfNum;        // Receiving surface number
    1425             :     Array1D<std::vector<int>>
    1426             :         SurfShadowDisabledZoneList; // Array of all disabled shadowing zone number to the current surface the surface diffusion model
    1427             : 
    1428             :     // Surface movable insulation properties
    1429             :     Array1D<int> SurfMaterialMovInsulExt; // Pointer to the material used for exterior movable insulation
    1430             :     Array1D<int> SurfMaterialMovInsulInt; // Pointer to the material used for interior movable insulation
    1431             :     Array1D<int> SurfSchedMovInsulExt;    // Schedule for exterior movable insulation
    1432             :     Array1D<int> SurfSchedMovInsulInt;    // Schedule for interior movable insulation
    1433             : 
    1434             :     // Surface EMS
    1435             :     Array1D<bool> SurfEMSConstructionOverrideON;          // if true, EMS is calling to override the construction value
    1436             :     Array1D<int> SurfEMSConstructionOverrideValue;        // pointer value to use for Construction when overridden
    1437             :     Array1D<bool> SurfEMSOverrideIntConvCoef;             // if true, EMS is calling to override the interior convection coefficient value
    1438             :     Array1D<Real64> SurfEMSValueForIntConvCoef;           // Value EMS is calling to use for interior convection coefficient [W/m2-K]
    1439             :     Array1D<bool> SurfEMSOverrideExtConvCoef;             // if true, EMS is calling to override the exterior convection coefficient value
    1440             :     Array1D<Real64> SurfEMSValueForExtConvCoef;           // Value EMS is calling to use for exterior convection coefficient [W/m2-K]
    1441             :     Array1D<bool> SurfOutDryBulbTempEMSOverrideOn;        // if true, EMS is calling to override the surface's outdoor air temp
    1442             :     Array1D<Real64> SurfOutDryBulbTempEMSOverrideValue;   // value to use for EMS override of outdoor air drybulb temp (C)
    1443             :     Array1D<bool> SurfOutWetBulbTempEMSOverrideOn;        // if true, EMS is calling to override the surface's outdoor wetbulb temp
    1444             :     Array1D<Real64> SurfOutWetBulbTempEMSOverrideValue;   // value to use for EMS override of outdoor air wetbulb temp (C)
    1445             :     Array1D<bool> SurfWindSpeedEMSOverrideOn;             //  if true, EMS is calling to override the surface's outdoor wind speed
    1446             :     Array1D<Real64> SurfWindSpeedEMSOverrideValue;        // value to use for EMS override of outdoor wind speed (m/s)
    1447             :     Array1D<bool> SurfViewFactorGroundEMSOverrideOn;      // if true, EMS is calling to override the surface's view factor to ground
    1448             :     Array1D<Real64> SurfViewFactorGroundEMSOverrideValue; // value to use for EMS override of surface's view factor to ground
    1449             :     Array1D<bool> SurfWindDirEMSOverrideOn;               // if true, EMS is calling to override the outside wind direction
    1450             :     Array1D<Real64> SurfWindDirEMSOverrideValue;          // value to use for EMS override of outside wind direction (deg)
    1451             : 
    1452             :     // Surface Properties
    1453             :     Array1D<int> SurfDaylightingShelfInd;        // Pointer to daylighting shelf
    1454             :     Array1D<bool> SurfExtEcoRoof;                // True if the top outside construction material is of type Eco Roof
    1455             :     Array1D<bool> SurfExtCavityPresent;          // true if there is an exterior vented cavity on surface
    1456             :     Array1D<int> SurfExtCavNum;                  // index for this surface in ExtVentedCavity structure (if any)
    1457             :     Array1D<bool> SurfIsPV;                      // true if this is a photovoltaic surface (dxf output)
    1458             :     Array1D<bool> SurfIsICS;                     // true if this is an ICS collector
    1459             :     Array1D<bool> SurfIsPool;                    // true if this is a pool
    1460             :     Array1D<int> SurfICSPtr;                     // Index to ICS collector
    1461             :     Array1D<bool> SurfIsRadSurfOrVentSlabOrPool; // surface cannot be part of both a radiant surface & ventilated slab group
    1462             : 
    1463             :     // Surface ConvCoeff Properties
    1464             :     Array1D<int> SurfTAirRef;           // Flag for reference air temperature
    1465             :     Array1D<int> SurfTAirRefRpt;        // Flag for reference air temperature for reporting
    1466             :     Array1D<int> SurfIntConvCoeffIndex; // Interior Convection Coefficient pointer (different data structure) when being overridden
    1467             :     Array1D<int> SurfExtConvCoeffIndex; // Exterior Convection Coefficient pointer (different data structure) when being overridden
    1468             :     Array1D<ConvectionConstants::InConvClass>
    1469             :         SurfIntConvClassification;             // current classification for inside face air flow regime and surface orientation
    1470             :     Array1D<int> SurfIntConvClassificationRpt; // current classification for inside face air flow regime and surface orientation for reporting
    1471             :     Array1D<int> SurfIntConvHcModelEq;         // current convection model for inside face
    1472             :     Array1D<int> SurfIntConvHcUserCurveIndex;  // current index to user convection model if used
    1473             :     Array1D<ConvectionConstants::OutConvClass>
    1474             :         SurfOutConvClassification;                // current classification for outside face wind regime and convection orientation
    1475             :     Array1D<int> SurfOutConvClassificationRpt;    // current classification for outside face wind regime and convection orientation for reporting
    1476             :     Array1D<int> SurfOutConvHfModelEq;            // current convection model for forced convection at outside face
    1477             :     Array1D<int> SurfOutConvHfUserCurveIndex;     // current index to user forced convection model if used
    1478             :     Array1D<int> SurfOutConvHnModelEq;            // current Convection model for natural convection at outside face
    1479             :     Array1D<int> SurfOutConvHnUserCurveIndex;     // current index to user natural convection model if used
    1480             :     Array1D<Real64> SurfOutConvFaceArea;          // area of larger building envelope facade that surface is a part of
    1481             :     Array1D<Real64> SurfOutConvFacePerimeter;     // perimeter of larger building envelope facade that surface is a part of
    1482             :     Array1D<Real64> SurfOutConvFaceHeight;        // height of larger building envelope facade that surface is a part of
    1483             :     Array1D<Real64> SurfIntConvZoneWallHeight;    // [m] height of larger inside building wall element that surface is a part of
    1484             :     Array1D<Real64> SurfIntConvZonePerimLength;   // [m] length of perimeter zone's exterior wall
    1485             :     Array1D<Real64> SurfIntConvZoneHorizHydrDiam; // [m] hydraulic diameter, usually 4 times the zone floor area div by perimeter
    1486             :     Array1D<Real64> SurfIntConvWindowWallRatio;   // [-] area of windows over area of exterior wall for zone
    1487             :     Array1D<ConvectionConstants::InConvWinLoc> SurfIntConvWindowLocation; // relative location of window in zone for interior Hc models
    1488             :     Array1D<bool> SurfIntConvSurfGetsRadiantHeat;
    1489             :     Array1D<bool> SurfIntConvSurfHasActiveInIt;
    1490             : 
    1491             :     // Surface Window Heat Balance
    1492             :     Array1D_int SurfWinInsideGlassCondensationFlag;   // 1 if innermost glass inside surface temp < zone air dew point;  0 otherwise
    1493             :     Array1D_int SurfWinInsideFrameCondensationFlag;   // 1 if frame inside surface temp < zone air dew point; 0 otherwise
    1494             :     Array1D_int SurfWinInsideDividerCondensationFlag; // 1 if divider inside surface temp < zone air dew point;  0 otherwise
    1495             : 
    1496             :     Array2D<Real64> SurfWinA;           // Time step value of factor for beam absorbed in window glass layers
    1497             :     Array2D<Real64> SurfWinADiffFront;  // Time step value of factor for diffuse absorbed in window layers
    1498             :     Array2D<Real64> SurfWinACFOverlap;  // Time step value of factor for beam absorbed in window glass layers which comes from other windows
    1499             :                                         // It happens sometimes that beam enters one window and hits back of second window.
    1500             :                                         // It is used in complex fenestration only
    1501             :     Array1D<Real64> SurfWinTransSolar;  // Exterior beam plus diffuse solar transmitted through window, or window plus shade/blind, into zone (W)
    1502             :     Array1D<Real64> SurfWinBmSolar;     // Exterior beam solar transmitted through window, or window plus blind, into zone (W)
    1503             :     Array1D<Real64> SurfWinBmBmSolar;   // Exterior beam-to-beam solar transmitted through window, or window plus blind, into zone (W)
    1504             :     Array1D<Real64> SurfWinBmDifSolar;  // Exterior beam-to-diffuse solar transmitted through window, or window plus blind, into zone (W)
    1505             :     Array1D<Real64> SurfWinDifSolar;    // Exterior diffuse solar transmitted through window, or window plus shade/blind, into zone (W)
    1506             :     Array1D<Real64> SurfWinHeatGain;    // Total heat gain from window = WinTransSolar + (IR and convection from glazing, or,
    1507             :                                         // if interior shade, IR and convection from zone-side of shade plus gap air convection to zone) +
    1508             :                                         // (IR convection from frame) + (IR and convection from divider if no interior shade) (W)
    1509             :     Array1D<Real64> SurfWinHeatGainRep; // Equals WinHeatGain when WinHeatGain >= 0.0
    1510             :     Array1D<Real64> SurfWinHeatLossRep; // Equals -WinHeatGain when WinHeatGain < 0.0
    1511             :     Array1D<Real64> SurfWinGainConvGlazToZoneRep;     // component of WinHeatGain convect to zone from glazing (W)
    1512             :     Array1D<Real64> SurfWinGainIRGlazToZoneRep;       // component of WinHeatGain net IR to zone from glazing (W)
    1513             :     Array1D<Real64> SurfWinLossSWZoneToOutWinRep;     // component of WinHeatGain shortwave transmit back out (W)
    1514             :     Array1D<Real64> SurfWinGainFrameDividerToZoneRep; // component of WinHeatGain to zone from frame/divider (W)
    1515             :     Array1D<Real64> SurfWinGainConvShadeToZoneRep;    // component of WinHeatGain convect to zone from front shade (W)
    1516             :     Array1D<Real64> SurfWinGainIRShadeToZoneRep;      // component of WinHeatGain net IR to zone from front shade (W)
    1517             :     Array1D<Real64> SurfWinGapConvHtFlowRep;          // Convective heat flow from gap in airflow window (W)
    1518             :     Array1D<Real64> SurfWinShadingAbsorbedSolar;      // Exterior beam plus diffuse solar absorbed by window shading device (W)
    1519             :     Array1D<Real64> SurfWinSysSolTransmittance;       // Effective solar transmittance of window + shading device, if present
    1520             :     Array1D<Real64> SurfWinSysSolReflectance;         // Effective solar reflectance of window + shading device, if present
    1521             :     Array1D<Real64> SurfWinSysSolAbsorptance;         // Effective solar absorptance of window + shading device, if present
    1522             : 
    1523             :     // Surface Window Energy
    1524             :     Array1D<Real64> SurfWinTransSolarEnergy;           // Energy of WinTransSolar [J]
    1525             :     Array1D<Real64> SurfWinBmSolarEnergy;              // Energy of WinBmSolar [J]
    1526             :     Array1D<Real64> SurfWinBmBmSolarEnergy;            // Beam-to-beam energy of WinBmSolar [J]
    1527             :     Array1D<Real64> SurfWinBmDifSolarEnergy;           // Beam-to-diffuse energy of WinBmSolar [J]
    1528             :     Array1D<Real64> SurfWinDifSolarEnergy;             // Energy of WinDifSolar [J]
    1529             :     Array1D<Real64> SurfWinHeatGainRepEnergy;          // Energy of WinHeatGainRep [J]
    1530             :     Array1D<Real64> SurfWinHeatLossRepEnergy;          // Energy of WinHeatLossRep [J]
    1531             :     Array1D<Real64> SurfWinShadingAbsorbedSolarEnergy; // Energy of WinShadingAbsorbedSolar [J]
    1532             :     Array1D<Real64> SurfWinGapConvHtFlowRepEnergy;     // Energy of WinGapConvHtFlowRep [J]
    1533             :     Array1D<Real64> SurfWinHeatTransferRepEnergy;      // Energy of WinHeatTransfer [J]
    1534             :     Array1D<Real64> SurfWinIRfromParentZone;
    1535             :     Array1D<Real64> SurfWinFrameQRadOutAbs;
    1536             :     Array1D<Real64> SurfWinFrameQRadInAbs;
    1537             :     Array1D<Real64> SurfWinDividerQRadOutAbs;
    1538             :     Array1D<Real64> SurfWinDividerQRadInAbs;
    1539             :     Array1D<Real64> SurfWinExtBeamAbsByShade;       // Exterior beam solar absorbed by window shade (W/m2)
    1540             :     Array1D<Real64> SurfWinExtDiffAbsByShade;       // Exterior diffuse solar absorbed by window shade (W/m2)
    1541             :     Array1D<Real64> SurfWinIntBeamAbsByShade;       // Interior beam solar absorbed by window shade (W/m2)
    1542             :     Array1D<Real64> SurfWinIntSWAbsByShade;         // Interior diffuse solar plus short-wave from lights absorbed by window shade (W/m2)
    1543             :     Array1D<Real64> SurfWinInitialDifSolAbsByShade; // Initial diffuse solar from ext and int windows absorbed by window shade (W/m2)
    1544             :     Array1D<Real64> SurfWinIntLWAbsByShade;         // Interior long-wave from zone lights and equipment absorbed by window shade (W/m2)
    1545             :     Array1D<Real64> SurfWinConvHeatFlowNatural;     // Convective heat flow from gap between glass and interior shade or blind (W)
    1546             :     Array1D<Real64> SurfWinConvHeatGainToZoneAir;   // Convective heat gain to zone air from window gap airflow (W)
    1547             :     Array1D<Real64> SurfWinRetHeatGainToZoneAir;    // Convective heat gain to return air sent to zone [W]
    1548             :     Array1D<Real64> SurfWinDividerHeatGain;
    1549             :     Array1D<Real64> SurfWinBlTsolBmBm;                 // Time-step value of blind beam-beam solar transmittance (-)
    1550             :     Array1D<Real64> SurfWinBlTsolBmDif;                // Time-step value of blind beam-diffuse solar transmittance (-)
    1551             :     Array1D<Real64> SurfWinBlTsolDifDif;               // Time-step value of blind diffuse-diffuse solar transmittance (-)
    1552             :     Array1D<Real64> SurfWinBlGlSysTsolBmBm;            // Time-step value of blind/glass system beam-beam solar transmittance (-)
    1553             :     Array1D<Real64> SurfWinBlGlSysTsolDifDif;          // Time-step value of blind/glass system diffuse-diffuse solar transmittance (-)
    1554             :     Array1D<Real64> SurfWinScTsolBmBm;                 // Time-step value of screen beam-beam solar transmittance (-)
    1555             :     Array1D<Real64> SurfWinScTsolBmDif;                // Time-step value of screen beam-diffuse solar transmittance (-)
    1556             :     Array1D<Real64> SurfWinScTsolDifDif;               // Time-step value of screen diffuse-diffuse solar transmittance (-)
    1557             :     Array1D<Real64> SurfWinScGlSysTsolBmBm;            // Time-step value of screen/glass system beam-beam solar transmittance (-)
    1558             :     Array1D<Real64> SurfWinScGlSysTsolDifDif;          // Time-step value of screen/glass system diffuse-diffuse solar transmittance (-)
    1559             :     Array1D<Real64> SurfWinGlTsolBmBm;                 // Time-step value of glass beam-beam solar transmittance (-)
    1560             :     Array1D<Real64> SurfWinGlTsolBmDif;                // Time-step value of glass beam-diffuse solar transmittance (-)
    1561             :     Array1D<Real64> SurfWinGlTsolDifDif;               // Time-step value of glass diffuse-diffuse solar transmittance (-)
    1562             :     Array1D<Real64> SurfWinBmSolTransThruIntWinRep;    // Beam solar transmitted through interior window [W]
    1563             :     Array1D<Real64> SurfWinBmSolAbsdOutsReveal;        // Multiplied by BeamSolarRad, gives beam solar absorbed by outside reveal surfaces (m2)
    1564             :     Array1D<Real64> SurfWinBmSolRefldOutsRevealReport; // Beam solar reflected by outside reveal surfaces, for reporting (m2)
    1565             :     Array1D<Real64> SurfWinBmSolAbsdInsReveal;         // Multiplied by BeamSolarRad, gives beam solar absorbed by inside reveal surfaces (m2)
    1566             :     Array1D<Real64> SurfWinBmSolRefldInsReveal;        // Multiplied by BeamSolarRad, gives beam solar reflected by inside reveal surfaces (m2)
    1567             :     Array1D<Real64> SurfWinBmSolRefldInsRevealReport;  // Beam solar reflected by inside reveal surfaces, for reporting (W)
    1568             :     Array1D<Real64> SurfWinOutsRevealDiffOntoGlazing;  // Multiplied by BeamSolarRad, gives diffuse from beam reflection from outside reveal that is
    1569             :                                                        // incident on the glazing per m2 of glazing (-)
    1570             :     Array1D<Real64> SurfWinInsRevealDiffOntoGlazing;   // Multiplied by BeamSolarRad, gives diffuse from beam reflection from inside reveal that is
    1571             :                                                        // incident on the glazing per m2 of glazing (-)
    1572             :     Array1D<Real64> SurfWinInsRevealDiffIntoZone; // Multiplied by BeamSolarRad, gives diffuse from beam reflection from inside reveal that goes into
    1573             :                                                   // zone directly or reflected from glazing (m2)
    1574             :     Array1D<Real64> SurfWinOutsRevealDiffOntoFrame; // Multiplied by BeamSolarRad, gives diffuse from beam reflection from outside reveal that is
    1575             :                                                     // incident on the outside of the frame per m2 of frame (-)
    1576             :     Array1D<Real64> SurfWinInsRevealDiffOntoFrame;  // Multiplied by BeamSolarRad, gives diffuse from beam reflection from inside reveal that is
    1577             :                                                     // incident on the outside of the frame per m2 of frame (-) for debugging CR 7596. TH 5/26/2009
    1578             :     Array1D<Real64> SurfWinInsRevealDiffOntoGlazingReport; // Diffuse solar from beam reflection from inside reveal that is incident
    1579             :                                                            // on the glazing (W)
    1580             :     Array1D<Real64> SurfWinInsRevealDiffIntoZoneReport;   // Diffuse from beam reflection from inside reveal that goes into zone directly or reflected
    1581             :                                                           // from glazing (W)
    1582             :     Array1D<Real64> SurfWinInsRevealDiffOntoFrameReport;  // Diffuse from beam reflection from inside reveal that is incident on the frame (W)
    1583             :     Array1D<Real64> SurfWinBmSolAbsdInsRevealReport;      // Beam solar absorbed by inside reveal (W)  energy
    1584             :     Array1D<Real64> SurfWinBmSolTransThruIntWinRepEnergy; // energy of BmSolTransThruIntWinRep [J]
    1585             :     Array1D<Real64> SurfWinBmSolRefldOutsRevealRepEnergy; // energy of BmSolRefldOutsRevealReport [J]
    1586             :     Array1D<Real64> SurfWinBmSolRefldInsRevealRepEnergy;  // energy of BmSolRefldInsRevealReport [J]
    1587             :     Array1D<Real64> SurfWinProfileAngHor;                 // Horizontal beam solar profile angle (degrees)
    1588             :     Array1D<Real64> SurfWinProfileAngVert;                // Vertical beam solar profile angle (degrees)
    1589             : 
    1590             :     EPVector<DataSurfaces::WinShadingType> SurfWinShadingFlag; // -1: window has no shading device
    1591             :     Array1D<bool> SurfWinShadingFlagEMSOn;                     // EMS control flag, true if EMS is controlling ShadingFlag with ShadingFlagEMSValue
    1592             :     Array1D<int> SurfWinShadingFlagEMSValue;                   // EMS control value for Shading Flag
    1593             :     Array1D<int> SurfWinStormWinFlag;                          // -1: Storm window not applicable;
    1594             :                                                                // 0: Window has storm window but it is off
    1595             :                                                                // 1: Window has storm window and it is on
    1596             :     Array1D<int> SurfWinStormWinFlagPrevDay;                   // Previous time step value of StormWinFlag
    1597             :     Array1D<Real64> SurfWinFracTimeShadingDeviceOn;            // For a single time step, = 0.0
    1598             :                                                                // if no shading device or shading device is off = 1.0 if shading device is on;
    1599             :     // For time intervals longer than a time step, = fraction of time that shading device is on.
    1600             :     EPVector<DataSurfaces::WinShadingType> SurfWinExtIntShadePrevTS; // 1 if exterior or interior blind or shade in place previous time step;
    1601             :                                                                      // 0 otherwise
    1602             :     Array1D<bool> SurfWinHasShadeOrBlindLayer;                       // mark as true if the window construction has a shade or a blind layer
    1603             :     Array1D<bool> SurfWinSurfDayLightInit;                           // surface has been initialized for following 5 arrays
    1604             :     Array1D<int> SurfWinDaylFacPoint;                                // Pointer to daylight factors for the window
    1605             :     Array1D<Real64> SurfWinVisTransSelected;                         // Window vis trans at normal incidence selected for use in dayltg calculation
    1606             :     Array1D<Real64> SurfWinSwitchingFactor;                          // Window switching factor (0.0 = unswitched; 1.0 = fully switched)
    1607             :     Array1D<Real64> SurfWinTheta;                                    // Azimuth of window normal (rad)
    1608             :     Array1D<Real64> SurfWinPhi;                                      // Altitude of window normal (rad)
    1609             :     Array1D<Real64> SurfWinRhoCeilingWall;   // Average interior reflectance seen by light moving up across horizontal plane thru center of window
    1610             :     Array1D<Real64> SurfWinRhoFloorWall;     // Same as above, but for light moving down
    1611             :     Array1D<Real64> SurfWinFractionUpgoing;  // Fraction light entering window that goes upward
    1612             :     Array1D<Real64> SurfWinVisTransRatio;    // For windows with switchable glazing,
    1613             :                                              // ratio of normal transmittance in switched state to that in unswitched state
    1614             :     Array1D<Real64> SurfWinFrameArea;        // Frame projected area (m2)
    1615             :     Array1D<Real64> SurfWinFrameConductance; // Frame conductance [no air films] (W/m2-K)
    1616             :     Array1D<Real64> SurfWinFrameSolAbsorp;   // Frame solar absorptance (assumed same inside and outside)
    1617             :     Array1D<Real64> SurfWinFrameVisAbsorp;   // Frame visible absorptance (assumed same inside and outside)
    1618             :     Array1D<Real64> SurfWinFrameEmis;        // Frame thermal emissivity (thermal absorptance) (assumed same inside and outside)
    1619             :     Array1D<Real64> SurfWinFrEdgeToCenterGlCondRatio; // Ratio of frame edge of glass conductance (without air films) to center of glass conductance
    1620             :                                                       // (without air films)
    1621             :     Array1D<Real64> SurfWinFrameEdgeArea;             // Area of glass near frame (m2)
    1622             :     Array1D<Real64> SurfWinFrameTempIn;               // Frame inside surface temperature (C)
    1623             :     Array1D<Real64> SurfWinFrameTempInOld;            // Previous value of frame inside surface temperature (C)
    1624             :     Array1D<Real64> SurfWinFrameTempSurfOut;          // Frame outside surface temperature (C)
    1625             :     Array1D<Real64> SurfWinProjCorrFrOut;             // Correction factor to absorbed radiation due to frame outside projection
    1626             :     Array1D<Real64> SurfWinProjCorrFrIn;              // Correction factor to absorbed radiation due to frame inside projection
    1627             :     Array1D<DataSurfaces::FrameDividerType> SurfWinDividerType; // Divider type (1=DividedLite, 2=Suspended (between-pane))
    1628             :     Array1D<Real64> SurfWinDividerArea;                         // Divider projected area (m2)
    1629             :     Array1D<Real64> SurfWinDividerConductance;                  // Divider conductance [no air films] (W/m2-K)
    1630             :     Array1D<Real64> SurfWinDividerSolAbsorp;                    // Divider solar absorptance (assumed same inside and outside)
    1631             :     Array1D<Real64> SurfWinDividerVisAbsorp;                    // Divider visible absorptance (assumed same inside and outside)
    1632             :     Array1D<Real64> SurfWinDividerEmis;                         // Divider thermal emissivity (thermal absorptance) (assumed same inside and outside)
    1633             :     Array1D<Real64> SurfWinDivEdgeToCenterGlCondRatio;          // Ratio of divider edge of glass conductance (without air films) to center of glass
    1634             :                                                                 // conductance (without air films)
    1635             :     Array1D<Real64> SurfWinDividerEdgeArea;                     // Area of glass near dividers (m2)
    1636             :     Array1D<Real64> SurfWinDividerTempIn;                       // Divider inside surface temperature (C)
    1637             :     Array1D<Real64> SurfWinDividerTempInOld;                    // Previous value of divider inside surface temperature (C)
    1638             :     Array1D<Real64> SurfWinDividerTempSurfOut;                  // Divider outside surface temperature (C)
    1639             :     Array1D<Real64> SurfWinProjCorrDivOut;                      // Correction factor to absorbed radiation due to divider outside projection
    1640             :     Array1D<Real64> SurfWinProjCorrDivIn;                       // Correction factor to absorbed radiation due to divider inside projection
    1641             :     Array1D<Real64> SurfWinGlazedFrac;                          // (Glazed area)/(Glazed area + divider area)
    1642             :     Array1D<Real64> SurfWinCenterGlArea;                        // Center of glass area (m2); area of glass where 1-D conduction dominates
    1643             :     Array1D<Real64> SurfWinEdgeGlCorrFac; // Correction factor to center-of-glass conductance to account for 2-D glass conduction thermal bridging
    1644             :                                           // effects near frame and divider
    1645             :     EPVector<DataSurfaces::SurfaceClass> SurfWinOriginalClass; // 0 or if entered originally as:
    1646             :     Array1D<Real64> SurfWinShadeAbsFacFace1; // Fraction of short-wave radiation incident that is absorbed by face 1 when total absorbed radiation is
    1647             :                                              // apportioned to the two faces
    1648             :     Array1D<Real64> SurfWinShadeAbsFacFace2; // Fraction of short-wave radiation incident that is absorbed by face 2 when total absorbed radiation is
    1649             :                                              // apportioned to the two faces
    1650             :     Array1D<Real64> SurfWinConvCoeffWithShade; // Convection coefficient from glass or shade to gap air when interior
    1651             :                                                // or exterior shade is present (W/m2-K)
    1652             :     Array1D<Real64> SurfWinOtherConvHeatGain;  // other convective = total conv - standard model prediction for EQL window model (W)
    1653             :     Array1D<int> SurfWinBlindNumber;           // Blind number for a window with a blind
    1654             :     Array1D<Real64> SurfWinEffInsSurfTemp; // Effective inside surface temperature for window with interior blind or shade; combination of shade/blind
    1655             :                                            // and glass temperatures (C)
    1656             :     Array1D<bool> SurfWinMovableSlats;     // True if window has a blind with movable slats
    1657             :     Array1D<Real64> SurfWinSlatAngThisTS;  // Slat angle this time step for window with blind on (radians)
    1658             :     Array1D<Real64> SurfWinSlatAngThisTSDeg;         // Slat angle this time step for window with blind on (deg)
    1659             :     Array1D<bool> SurfWinSlatAngThisTSDegEMSon;      // flag that indicate EMS system is actuating SlatAngThisTSDeg
    1660             :     Array1D<Real64> SurfWinSlatAngThisTSDegEMSValue; // value that EMS sets for slat angle in degrees
    1661             :     Array1D<bool> SurfWinSlatsBlockBeam;             // True if blind slats block incident beam solar
    1662             :     Array1D<int> SurfWinSlatsAngIndex;
    1663             :     Array1D<Real64> SurfWinSlatsAngInterpFac;
    1664             :     Array1D<Real64> SurfWinProfileAng;
    1665             :     Array1D<int> SurfWinProfAngIndex;
    1666             :     Array1D<Real64> SurfWinProfAngInterpFac;
    1667             :     Array1D<Real64> SurfWinBlindBmBmTrans;
    1668             :     Array1D<Real64> SurfWinBlindAirFlowPermeability; // Blind air-flow permeability for calculation of convective flow in gap between blind and glass
    1669             :     Array1D<Real64> SurfWinTotGlazingThickness;      // Total glazing thickness from outside of outer glass to inside of inner glass (m)
    1670             :     Array1D<Real64> SurfWinTanProfileAngHor;         // Tangent of horizontal profile angle
    1671             :     Array1D<Real64> SurfWinTanProfileAngVert;        // Tangent of vertical profile angle
    1672             :     Array1D<Real64> SurfWinInsideSillDepth;          // Depth of inside sill (m)
    1673             :     Array1D<Real64> SurfWinInsideReveal;             // Depth of inside reveal (m)
    1674             :     Array1D<Real64> SurfWinInsideSillSolAbs;         // Solar absorptance of inside sill
    1675             :     Array1D<Real64> SurfWinInsideRevealSolAbs;       // Solar absorptance of inside reveal
    1676             :     Array1D<Real64> SurfWinOutsideRevealSolAbs;      // Solar absorptance of outside reveal
    1677             :     Array1D<int> SurfWinScreenNumber;                // Screen number for a window with a screen (do not confuse with material number)
    1678             :     Array1D<DataSurfaces::WindowAirFlowSource> SurfWinAirflowSource;           // Source of gap airflow (INSIDEAIR, OUTSIDEAIR, etc.)
    1679             :     Array1D<DataSurfaces::WindowAirFlowDestination> SurfWinAirflowDestination; // Destination of gap airflow (INSIDEAIR, OUTSIDEAIR, etc.)
    1680             :     Array1D<int> SurfWinAirflowReturnNodePtr;                                  // Return node pointer for destination = ReturnAir
    1681             :     Array1D<Real64> SurfWinMaxAirflow;                                         // Maximum gap airflow (m3/s per m of glazing width)
    1682             :     Array1D<DataSurfaces::WindowAirFlowControlType> SurfWinAirflowControlType; // Gap airflow control type (ALWAYSONATMAXFLOW, etc.)
    1683             :     Array1D<bool> SurfWinAirflowHasSchedule;                                   // True if gap airflow is scheduled
    1684             :     Array1D<int> SurfWinAirflowSchedulePtr;                                    // Gap airflow schedule pointer
    1685             :     Array1D<Real64> SurfWinAirflowThisTS;                                      // Gap airflow this timestep (m3/s per m of glazing width)
    1686             :     Array1D<Real64> SurfWinTAirflowGapOutlet;                                  // Temperature of air leaving airflow gap between glass panes (C)
    1687             :     Array1D<int> SurfWinWindowCalcIterationsRep;                               // Number of iterations in window heat balance calculation
    1688             :     Array1D<Real64> SurfWinVentingOpenFactorMultRep; // Window/door opening modulation multiplier on venting open factor, for reporting
    1689             :     Array1D<Real64> SurfWinInsideTempForVentingRep;  // Inside air temp used to control window/door venting, for reporting (C)
    1690             :     Array1D<Real64> SurfWinVentingAvailabilityRep;   // Venting availability schedule value (0.0/1.0 = no venting allowed/not allowed)
    1691             :     Array1D<Real64> SurfWinSkyGndSolarInc; // Incident diffuse solar from ground-reflected sky radiation; used for Complex Fen; if CalcSolRefl is
    1692             :                                            // true, accounts for shadowing of ground by building and obstructions [W/m2]
    1693             :     Array1D<Real64> SurfWinBmGndSolarInc;  // Incident diffuse solar from ground-reflected beam radiation; used for Complex Fen; if CalcSolRefl is
    1694             :                                            // true, accounts for shadowing of ground by building and obstructions [W/m2]
    1695             :     Array1D<Real64> SurfWinLightWellEff;   // Light well efficiency (multiplier on exterior window vis trans due to light well losses)
    1696             :     Array1D<bool> SurfWinSolarDiffusing;   // True if exterior window with a construction that contains a diffusing glass layer
    1697             :     Array1D<Real64> SurfWinFrameHeatGain;
    1698             :     Array1D<Real64> SurfWinFrameHeatLoss;
    1699             :     Array1D<Real64> SurfWinDividerHeatLoss;
    1700             :     Array1D<Real64> SurfWinTCLayerTemp; // The temperature of the thermochromic layer of the window
    1701             :     Array1D<Real64> SurfWinSpecTemp;    // The specification temperature of the TC layer glass Added for W6 integration June 2010
    1702             :     Array1D<DataSurfaces::WindowModel> SurfWinWindowModelType; // if set to WindowBSDFModel, then uses BSDF methods
    1703             :     Array1D<Real64> SurfWinTDDPipeNum;                         // Tubular daylighting device pipe number for TDD domes and diffusers
    1704             :     Array1D<int> SurfWinStormWinConstr;                        // Construction with storm window (windows only)
    1705             :     Array1D<int> SurfActiveConstruction;                       // The currently active construction with or without storm window
    1706             :     Array1D<int> SurfWinActiveShadedConstruction;              // The currently active shaded construction with or without storm window (windows only)
    1707             : 
    1708             :     EPVector<DataSurfaces::SurfaceData> Surface;
    1709             :     EPVector<DataSurfaces::SurfaceWindowCalc> SurfaceWindow;
    1710             :     Array1D<DataSurfaces::FrameDividerProperties> FrameDivider;
    1711             :     EPVector<DataSurfaces::StormWindowData> StormWindow;
    1712             :     EPVector<DataSurfaces::WindowShadingControlData> WindowShadingControl;
    1713             :     EPVector<DataSurfaces::OSCData> OSC;
    1714             :     EPVector<DataSurfaces::OSCMData> OSCM;
    1715             :     EPVector<DataSurfaces::ConvectionCoefficient> UserIntConvectionCoeffs;
    1716             :     EPVector<DataSurfaces::ConvectionCoefficient> UserExtConvectionCoeffs;
    1717             :     EPVector<DataSurfaces::ShadingVertexData> ShadeV;
    1718             :     EPVector<DataSurfaces::ExtVentedCavityStruct> ExtVentedCavity;
    1719             :     EPVector<DataSurfaces::SurfaceSolarIncident> SurfIncSolSSG;
    1720             :     EPVector<DataSurfaces::SurfaceIncidentSolarMultiplier> SurfIncSolMultiplier;
    1721             :     EPVector<DataSurfaces::FenestrationSolarAbsorbed> FenLayAbsSSG;
    1722             :     EPVector<DataSurfaces::SurfaceLocalEnvironment> SurfLocalEnvironment;
    1723             :     EPVector<DataSurfaces::SurroundingSurfacesProperty> SurroundingSurfsProperty;
    1724             :     EPVector<DataSurfaces::IntMassObject> IntMassObjects;
    1725             :     EPVector<DataSurfaces::GroundSurfacesProperty> GroundSurfsProperty;
    1726             : 
    1727             :     int actualMaxSlatAngs = DataSurfaces::MaxSlatAngs; // If there are no blinds in the model, then this is changed to 1 (used for shades)
    1728             : 
    1729           0 :     void clear_state() override
    1730             :     {
    1731           0 :         this->TotSurfaces = 0;
    1732           0 :         this->TotWindows = 0;
    1733           0 :         this->TotStormWin = 0;
    1734           0 :         this->TotWinShadingControl = 0;
    1735           0 :         this->TotIntConvCoeff = 0;
    1736           0 :         this->TotExtConvCoeff = 0;
    1737           0 :         this->TotOSC = 0;
    1738           0 :         this->TotOSCM = 0;
    1739           0 :         this->TotExtVentCav = 0;
    1740           0 :         this->TotSurfIncSolSSG = 0;
    1741           0 :         this->TotSurfIncSolMultiplier = 0;
    1742           0 :         this->TotFenLayAbsSSG = 0;
    1743           0 :         this->TotSurfLocalEnv = 0;
    1744           0 :         this->TotSurfPropGndSurfs = 0;
    1745           0 :         this->Corner = 0;
    1746           0 :         this->MaxVerticesPerSurface = 4;
    1747           0 :         this->BuildingShadingCount = 0;
    1748           0 :         this->FixedShadingCount = 0;
    1749           0 :         this->AttachedShadingCount = 0;
    1750           0 :         this->ShadingSurfaceFirst = -1;
    1751           0 :         this->ShadingSurfaceLast = -1;
    1752           0 :         this->AspectTransform = false;
    1753           0 :         this->CalcSolRefl = false;
    1754           0 :         this->CCW = false;
    1755           0 :         this->WorldCoordSystem = false;
    1756           0 :         this->DaylRefWorldCoordSystem = false;
    1757           0 :         this->MaxRecPts = 0;
    1758           0 :         this->MaxReflRays = 0;
    1759           0 :         this->GroundLevelZ = 0.0;
    1760           0 :         this->AirflowWindows = false;
    1761           0 :         this->ShadingTransmittanceVaries = false;
    1762           0 :         this->UseRepresentativeSurfaceCalculations = false;
    1763           0 :         this->AnyMovableInsulation = false;
    1764           0 :         this->AnyMovableSlat = false;
    1765           0 :         this->SurfWinInsideGlassCondensationFlag.deallocate();
    1766           0 :         this->SurfWinInsideFrameCondensationFlag.deallocate();
    1767           0 :         this->SurfWinInsideDividerCondensationFlag.deallocate();
    1768           0 :         this->SurfAdjacentZone.deallocate();
    1769           0 :         this->X0.deallocate();
    1770           0 :         this->Y0.deallocate();
    1771           0 :         this->Z0.deallocate();
    1772           0 :         this->RepresentativeSurfaceMap.clear();
    1773           0 :         this->AllHTSurfaceList.clear();
    1774           0 :         this->AllExtSolarSurfaceList.clear();
    1775           0 :         this->AllExtSolAndShadingSurfaceList.clear();
    1776           0 :         this->AllShadowPossObstrSurfaceList.clear();
    1777           0 :         this->AllIZSurfaceList.clear();
    1778           0 :         this->AllHTNonWindowSurfaceList.clear();
    1779           0 :         this->AllHTWindowSurfaceList.clear();
    1780           0 :         this->AllExtSolWindowSurfaceList.clear();
    1781           0 :         this->AllExtSolWinWithFrameSurfaceList.clear();
    1782           0 :         this->AllHTKivaSurfaceList.clear();
    1783           0 :         this->AllSurfaceListReportOrder.clear();
    1784             : 
    1785           0 :         this->SurfOutDryBulbTemp.deallocate();
    1786           0 :         this->SurfOutWetBulbTemp.deallocate();
    1787           0 :         this->SurfOutWindSpeed.deallocate();
    1788           0 :         this->SurfOutWindDir.deallocate();
    1789           0 :         this->SurfGenericContam.deallocate();
    1790           0 :         this->SurfLowTempErrCount.deallocate();
    1791           0 :         this->SurfHighTempErrCount.deallocate();
    1792           0 :         this->SurfAirSkyRadSplit.deallocate();
    1793           0 :         this->SurfSunCosHourly.deallocate();
    1794           0 :         this->SurfSunlitArea.deallocate();
    1795           0 :         this->SurfSunlitFrac.deallocate();
    1796           0 :         this->SurfSkySolarInc.deallocate();
    1797           0 :         this->SurfGndSolarInc.deallocate();
    1798           0 :         this->SurfBmToBmReflFacObs.deallocate();
    1799           0 :         this->SurfBmToDiffReflFacObs.deallocate();
    1800           0 :         this->SurfBmToDiffReflFacGnd.deallocate();
    1801           0 :         this->SurfSkyDiffReflFacGnd.deallocate();
    1802           0 :         this->SurfOpaqAI.deallocate();
    1803           0 :         this->SurfOpaqAO.deallocate();
    1804           0 :         this->SurfPenumbraID.deallocate();
    1805           0 :         this->SurfReflFacBmToDiffSolObs.deallocate();
    1806           0 :         this->SurfReflFacBmToDiffSolGnd.deallocate();
    1807           0 :         this->SurfReflFacBmToBmSolObs.deallocate();
    1808           0 :         this->SurfReflFacSkySolObs.deallocate();
    1809           0 :         this->SurfReflFacSkySolGnd.deallocate();
    1810           0 :         this->SurfCosIncAveBmToBmSolObs.deallocate();
    1811           0 :         this->SurfShadowDiffuseSolRefl.deallocate();
    1812           0 :         this->SurfShadowDiffuseVisRefl.deallocate();
    1813           0 :         this->SurfShadowGlazingFrac.deallocate();
    1814           0 :         this->SurfShadowGlazingConstruct.deallocate();
    1815           0 :         this->SurfShadowRecSurfNum.deallocate();
    1816           0 :         this->SurfShadowDisabledZoneList.deallocate();
    1817           0 :         this->SurfMaterialMovInsulExt.deallocate();
    1818           0 :         this->SurfMaterialMovInsulInt.deallocate();
    1819           0 :         this->SurfSchedMovInsulExt.deallocate();
    1820           0 :         this->SurfSchedMovInsulInt.deallocate();
    1821           0 :         this->SurfEMSConstructionOverrideON.deallocate();
    1822           0 :         this->SurfEMSConstructionOverrideValue.deallocate();
    1823           0 :         this->SurfEMSOverrideIntConvCoef.deallocate();
    1824           0 :         this->SurfEMSValueForIntConvCoef.deallocate();
    1825           0 :         this->SurfEMSOverrideExtConvCoef.deallocate();
    1826           0 :         this->SurfEMSValueForExtConvCoef.deallocate();
    1827           0 :         this->SurfOutDryBulbTempEMSOverrideOn.deallocate();
    1828           0 :         this->SurfOutDryBulbTempEMSOverrideValue.deallocate();
    1829           0 :         this->SurfOutWetBulbTempEMSOverrideOn.deallocate();
    1830           0 :         this->SurfOutWetBulbTempEMSOverrideValue.clear();
    1831           0 :         this->SurfWindSpeedEMSOverrideOn.deallocate();
    1832           0 :         this->SurfWindSpeedEMSOverrideValue.deallocate();
    1833           0 :         this->SurfViewFactorGroundEMSOverrideOn.deallocate();
    1834           0 :         this->SurfViewFactorGroundEMSOverrideValue.deallocate();
    1835           0 :         this->SurfWindDirEMSOverrideOn.deallocate();
    1836           0 :         this->SurfWindDirEMSOverrideValue.deallocate();
    1837           0 :         this->SurfDaylightingShelfInd.deallocate();
    1838           0 :         this->SurfExtEcoRoof.deallocate();
    1839           0 :         this->SurfExtCavityPresent.deallocate();
    1840           0 :         this->SurfExtCavNum.deallocate();
    1841           0 :         this->SurfIsPV.deallocate();
    1842           0 :         this->SurfIsICS.deallocate();
    1843           0 :         this->SurfIsPool.deallocate();
    1844           0 :         this->SurfICSPtr.deallocate();
    1845           0 :         this->SurfIsRadSurfOrVentSlabOrPool.deallocate();
    1846           0 :         this->SurfTAirRef.deallocate();
    1847           0 :         this->SurfTAirRefRpt.deallocate();
    1848           0 :         this->SurfIntConvCoeffIndex.deallocate();
    1849           0 :         this->SurfExtConvCoeffIndex.deallocate();
    1850           0 :         this->SurfIntConvClassification.deallocate();
    1851           0 :         this->SurfIntConvHcModelEq.deallocate();
    1852           0 :         this->SurfIntConvHcUserCurveIndex.deallocate();
    1853           0 :         this->SurfOutConvClassification.deallocate();
    1854           0 :         this->SurfOutConvHfModelEq.deallocate();
    1855           0 :         this->SurfOutConvHfUserCurveIndex.deallocate();
    1856           0 :         this->SurfOutConvHnModelEq.deallocate();
    1857           0 :         this->SurfOutConvHnUserCurveIndex.deallocate();
    1858           0 :         this->SurfOutConvFaceArea.deallocate();
    1859           0 :         this->SurfOutConvFacePerimeter.deallocate();
    1860           0 :         this->SurfOutConvFaceHeight.deallocate();
    1861           0 :         this->SurfIntConvZoneWallHeight.deallocate();
    1862           0 :         this->SurfIntConvZonePerimLength.deallocate();
    1863           0 :         this->SurfIntConvZoneHorizHydrDiam.deallocate();
    1864           0 :         this->SurfIntConvWindowWallRatio.deallocate();
    1865           0 :         this->SurfIntConvWindowLocation.deallocate();
    1866           0 :         this->SurfIntConvSurfGetsRadiantHeat.deallocate();
    1867           0 :         this->SurfIntConvSurfHasActiveInIt.deallocate();
    1868             : 
    1869           0 :         this->SurfWinA.deallocate();
    1870           0 :         this->SurfWinADiffFront.deallocate();
    1871           0 :         this->SurfWinACFOverlap.deallocate();
    1872           0 :         this->SurfWinTransSolar.deallocate();
    1873           0 :         this->SurfWinBmSolar.deallocate();
    1874           0 :         this->SurfWinBmBmSolar.deallocate();
    1875           0 :         this->SurfWinBmDifSolar.deallocate();
    1876           0 :         this->SurfWinDifSolar.deallocate();
    1877           0 :         this->SurfWinHeatGain.deallocate();
    1878           0 :         this->SurfWinHeatGainRep.deallocate();
    1879           0 :         this->SurfWinHeatLossRep.deallocate();
    1880           0 :         this->SurfWinGainConvGlazToZoneRep.deallocate();
    1881           0 :         this->SurfWinGainIRGlazToZoneRep.deallocate();
    1882           0 :         this->SurfWinLossSWZoneToOutWinRep.deallocate();
    1883           0 :         this->SurfWinGainFrameDividerToZoneRep.deallocate();
    1884           0 :         this->SurfWinGainConvShadeToZoneRep.deallocate();
    1885           0 :         this->SurfWinGainIRShadeToZoneRep.deallocate();
    1886           0 :         this->SurfWinGapConvHtFlowRep.deallocate();
    1887           0 :         this->SurfWinShadingAbsorbedSolar.deallocate();
    1888           0 :         this->SurfWinSysSolTransmittance.deallocate();
    1889           0 :         this->SurfWinSysSolReflectance.deallocate();
    1890           0 :         this->SurfWinSysSolAbsorptance.deallocate();
    1891           0 :         this->SurfWinTransSolarEnergy.deallocate();
    1892           0 :         this->SurfWinBmSolarEnergy.deallocate();
    1893           0 :         this->SurfWinBmBmSolarEnergy.deallocate();
    1894           0 :         this->SurfWinBmDifSolarEnergy.deallocate();
    1895           0 :         this->SurfWinDifSolarEnergy.deallocate();
    1896           0 :         this->SurfWinHeatGainRepEnergy.deallocate();
    1897           0 :         this->SurfWinHeatLossRepEnergy.deallocate();
    1898           0 :         this->SurfWinShadingAbsorbedSolarEnergy.deallocate();
    1899           0 :         this->SurfWinGapConvHtFlowRepEnergy.deallocate();
    1900           0 :         this->SurfWinHeatTransferRepEnergy.deallocate();
    1901           0 :         this->SurfWinIRfromParentZone.deallocate();
    1902           0 :         this->SurfWinFrameQRadOutAbs.deallocate();
    1903           0 :         this->SurfWinFrameQRadInAbs.deallocate();
    1904           0 :         this->SurfWinDividerQRadOutAbs.deallocate();
    1905           0 :         this->SurfWinDividerQRadInAbs.deallocate();
    1906           0 :         this->SurfWinExtBeamAbsByShade.deallocate();
    1907           0 :         this->SurfWinExtDiffAbsByShade.deallocate();
    1908           0 :         this->SurfWinIntBeamAbsByShade.deallocate();
    1909           0 :         this->SurfWinIntSWAbsByShade.deallocate();
    1910           0 :         this->SurfWinInitialDifSolAbsByShade.deallocate();
    1911           0 :         this->SurfWinIntLWAbsByShade.deallocate();
    1912           0 :         this->SurfWinConvHeatFlowNatural.deallocate();
    1913           0 :         this->SurfWinConvHeatGainToZoneAir.deallocate();
    1914           0 :         this->SurfWinRetHeatGainToZoneAir.deallocate();
    1915           0 :         this->SurfWinDividerHeatGain.deallocate();
    1916           0 :         this->SurfWinBlTsolBmBm.deallocate();
    1917           0 :         this->SurfWinBlTsolBmDif.deallocate();
    1918           0 :         this->SurfWinBlTsolDifDif.deallocate();
    1919           0 :         this->SurfWinBlGlSysTsolBmBm.deallocate();
    1920           0 :         this->SurfWinBlGlSysTsolDifDif.deallocate();
    1921           0 :         this->SurfWinScTsolBmBm.deallocate();
    1922           0 :         this->SurfWinScTsolBmDif.deallocate();
    1923           0 :         this->SurfWinScTsolDifDif.deallocate();
    1924           0 :         this->SurfWinScGlSysTsolBmBm.deallocate();
    1925           0 :         this->SurfWinScGlSysTsolDifDif.deallocate();
    1926           0 :         this->SurfWinGlTsolBmBm.deallocate();
    1927           0 :         this->SurfWinGlTsolBmDif.deallocate();
    1928           0 :         this->SurfWinGlTsolDifDif.deallocate();
    1929           0 :         this->SurfWinBmSolTransThruIntWinRep.deallocate();
    1930           0 :         this->SurfWinBmSolAbsdOutsReveal.deallocate();
    1931           0 :         this->SurfWinBmSolRefldOutsRevealReport.deallocate();
    1932           0 :         this->SurfWinBmSolAbsdInsReveal.deallocate();
    1933           0 :         this->SurfWinBmSolRefldInsReveal.deallocate();
    1934           0 :         this->SurfWinBmSolRefldInsRevealReport.deallocate();
    1935           0 :         this->SurfWinOutsRevealDiffOntoGlazing.deallocate();
    1936           0 :         this->SurfWinInsRevealDiffOntoGlazing.deallocate();
    1937           0 :         this->SurfWinInsRevealDiffIntoZone.deallocate();
    1938           0 :         this->SurfWinOutsRevealDiffOntoFrame.deallocate();
    1939           0 :         this->SurfWinInsRevealDiffOntoFrame.deallocate();
    1940           0 :         this->SurfWinInsRevealDiffOntoGlazingReport.deallocate();
    1941           0 :         this->SurfWinInsRevealDiffIntoZoneReport.deallocate();
    1942           0 :         this->SurfWinInsRevealDiffOntoFrameReport.deallocate();
    1943           0 :         this->SurfWinBmSolAbsdInsRevealReport.deallocate();
    1944           0 :         this->SurfWinBmSolTransThruIntWinRepEnergy.deallocate();
    1945           0 :         this->SurfWinBmSolRefldOutsRevealRepEnergy.deallocate();
    1946           0 :         this->SurfWinBmSolRefldInsRevealRepEnergy.deallocate();
    1947           0 :         this->SurfWinProfileAngHor.deallocate();
    1948           0 :         this->SurfWinProfileAngVert.deallocate();
    1949           0 :         this->SurfWinShadingFlag.deallocate();
    1950           0 :         this->SurfWinShadingFlagEMSOn.deallocate();
    1951           0 :         this->SurfWinShadingFlagEMSValue.deallocate();
    1952           0 :         this->SurfWinStormWinFlag.deallocate();
    1953           0 :         this->SurfWinStormWinFlagPrevDay.deallocate();
    1954           0 :         this->SurfWinFracTimeShadingDeviceOn.deallocate();
    1955           0 :         this->SurfWinExtIntShadePrevTS.deallocate();
    1956           0 :         this->SurfWinHasShadeOrBlindLayer.deallocate();
    1957           0 :         this->SurfWinSurfDayLightInit.deallocate();
    1958           0 :         this->SurfWinDaylFacPoint.deallocate();
    1959           0 :         this->SurfWinVisTransSelected.deallocate();
    1960           0 :         this->SurfWinSwitchingFactor.deallocate();
    1961           0 :         this->SurfWinTheta.deallocate();
    1962           0 :         this->SurfWinPhi.deallocate();
    1963           0 :         this->SurfWinRhoCeilingWall.deallocate();
    1964           0 :         this->SurfWinRhoFloorWall.deallocate();
    1965           0 :         this->SurfWinFractionUpgoing.deallocate();
    1966           0 :         this->SurfWinVisTransRatio.deallocate();
    1967           0 :         this->SurfWinFrameArea.deallocate();
    1968           0 :         this->SurfWinFrameConductance.deallocate();
    1969           0 :         this->SurfWinFrameSolAbsorp.deallocate();
    1970           0 :         this->SurfWinFrameVisAbsorp.deallocate();
    1971           0 :         this->SurfWinFrameEmis.deallocate();
    1972           0 :         this->SurfWinFrEdgeToCenterGlCondRatio.deallocate();
    1973           0 :         this->SurfWinFrameEdgeArea.deallocate();
    1974           0 :         this->SurfWinFrameTempIn.deallocate();
    1975           0 :         this->SurfWinFrameTempInOld.deallocate();
    1976           0 :         this->SurfWinFrameTempSurfOut.deallocate();
    1977           0 :         this->SurfWinProjCorrFrOut.deallocate();
    1978           0 :         this->SurfWinProjCorrFrIn.deallocate();
    1979           0 :         this->SurfWinDividerType.deallocate();
    1980           0 :         this->SurfWinDividerArea.deallocate();
    1981           0 :         this->SurfWinDividerConductance.deallocate();
    1982           0 :         this->SurfWinDividerSolAbsorp.deallocate();
    1983           0 :         this->SurfWinDividerVisAbsorp.deallocate();
    1984           0 :         this->SurfWinDividerEmis.deallocate();
    1985           0 :         this->SurfWinDivEdgeToCenterGlCondRatio.deallocate();
    1986           0 :         this->SurfWinDividerEdgeArea.deallocate();
    1987           0 :         this->SurfWinDividerTempIn.deallocate();
    1988           0 :         this->SurfWinDividerTempInOld.deallocate();
    1989           0 :         this->SurfWinDividerTempSurfOut.deallocate();
    1990           0 :         this->SurfWinProjCorrDivOut.deallocate();
    1991           0 :         this->SurfWinProjCorrDivIn.deallocate();
    1992           0 :         this->SurfWinGlazedFrac.deallocate();
    1993           0 :         this->SurfWinCenterGlArea.deallocate();
    1994           0 :         this->SurfWinEdgeGlCorrFac.deallocate();
    1995           0 :         this->SurfWinOriginalClass.deallocate();
    1996           0 :         this->SurfWinShadeAbsFacFace1.deallocate();
    1997           0 :         this->SurfWinShadeAbsFacFace2.deallocate();
    1998           0 :         this->SurfWinConvCoeffWithShade.deallocate();
    1999           0 :         this->SurfWinOtherConvHeatGain.deallocate();
    2000           0 :         this->SurfWinBlindNumber.deallocate();
    2001           0 :         this->SurfWinEffInsSurfTemp.deallocate();
    2002           0 :         this->SurfWinMovableSlats.deallocate();
    2003           0 :         this->SurfWinSlatAngThisTS.deallocate();
    2004           0 :         this->SurfWinSlatAngThisTSDeg.deallocate();
    2005           0 :         this->SurfWinSlatAngThisTSDegEMSon.deallocate();
    2006           0 :         this->SurfWinSlatAngThisTSDegEMSValue.deallocate();
    2007           0 :         this->SurfWinSlatsBlockBeam.deallocate();
    2008           0 :         this->SurfWinSlatsAngIndex.deallocate();
    2009           0 :         this->SurfWinSlatsAngInterpFac.deallocate();
    2010           0 :         this->SurfWinProfileAng.deallocate();
    2011           0 :         this->SurfWinProfAngIndex.deallocate();
    2012           0 :         this->SurfWinProfAngInterpFac.deallocate();
    2013           0 :         this->SurfWinBlindBmBmTrans.deallocate();
    2014           0 :         this->SurfWinBlindAirFlowPermeability.deallocate();
    2015           0 :         this->SurfWinTotGlazingThickness.deallocate();
    2016           0 :         this->SurfWinTanProfileAngHor.deallocate();
    2017           0 :         this->SurfWinTanProfileAngVert.deallocate();
    2018           0 :         this->SurfWinInsideSillDepth.deallocate();
    2019           0 :         this->SurfWinInsideReveal.deallocate();
    2020           0 :         this->SurfWinInsideSillSolAbs.deallocate();
    2021           0 :         this->SurfWinInsideRevealSolAbs.deallocate();
    2022           0 :         this->SurfWinOutsideRevealSolAbs.deallocate();
    2023           0 :         this->SurfWinScreenNumber.deallocate();
    2024           0 :         this->SurfWinAirflowSource.deallocate();
    2025           0 :         this->SurfWinAirflowDestination.deallocate();
    2026           0 :         this->SurfWinAirflowReturnNodePtr.deallocate();
    2027           0 :         this->SurfWinMaxAirflow.deallocate();
    2028           0 :         this->SurfWinAirflowControlType.deallocate();
    2029           0 :         this->SurfWinAirflowHasSchedule.deallocate();
    2030           0 :         this->SurfWinAirflowSchedulePtr.deallocate();
    2031           0 :         this->SurfWinAirflowThisTS.deallocate();
    2032           0 :         this->SurfWinTAirflowGapOutlet.deallocate();
    2033           0 :         this->SurfWinWindowCalcIterationsRep.deallocate();
    2034           0 :         this->SurfWinVentingOpenFactorMultRep.deallocate();
    2035           0 :         this->SurfWinInsideTempForVentingRep.deallocate();
    2036           0 :         this->SurfWinVentingAvailabilityRep.deallocate();
    2037           0 :         this->SurfWinSkyGndSolarInc.deallocate();
    2038           0 :         this->SurfWinBmGndSolarInc.deallocate();
    2039           0 :         this->SurfWinLightWellEff.deallocate();
    2040           0 :         this->SurfWinSolarDiffusing.deallocate();
    2041           0 :         this->SurfWinFrameHeatGain.deallocate();
    2042           0 :         this->SurfWinFrameHeatLoss.deallocate();
    2043           0 :         this->SurfWinDividerHeatLoss.deallocate();
    2044           0 :         this->SurfWinTCLayerTemp.deallocate();
    2045           0 :         this->SurfWinSpecTemp.deallocate();
    2046           0 :         this->SurfWinWindowModelType.deallocate();
    2047           0 :         this->SurfWinTDDPipeNum.deallocate();
    2048           0 :         this->SurfWinStormWinConstr.deallocate();
    2049           0 :         this->SurfActiveConstruction.deallocate();
    2050           0 :         this->SurfWinActiveShadedConstruction.deallocate();
    2051           0 :         this->AnyHeatBalanceInsideSourceTerm = false;
    2052           0 :         this->AnyHeatBalanceOutsideSourceTerm = false;
    2053           0 :         this->Surface.deallocate();
    2054           0 :         this->SurfaceWindow.deallocate();
    2055           0 :         this->FrameDivider.deallocate();
    2056           0 :         this->StormWindow.deallocate();
    2057           0 :         this->WindowShadingControl.deallocate();
    2058           0 :         this->OSC.deallocate();
    2059           0 :         this->OSCM.deallocate();
    2060           0 :         this->UserIntConvectionCoeffs.deallocate();
    2061           0 :         this->UserExtConvectionCoeffs.deallocate();
    2062           0 :         this->ShadeV.deallocate();
    2063           0 :         this->ExtVentedCavity.deallocate();
    2064           0 :         this->SurfIncSolSSG.deallocate();
    2065           0 :         this->SurfIncSolMultiplier.deallocate();
    2066           0 :         this->FenLayAbsSSG.deallocate();
    2067           0 :         this->SurfLocalEnvironment.deallocate();
    2068           0 :         this->SurroundingSurfsProperty.deallocate();
    2069           0 :         this->IntMassObjects.deallocate();
    2070           0 :         this->actualMaxSlatAngs = DataSurfaces::MaxSlatAngs;
    2071           0 :         this->GroundSurfsProperty.deallocate();
    2072           0 :     }
    2073             : };
    2074             : 
    2075             : } // namespace EnergyPlus
    2076             : 
    2077             : #endif

Generated by: LCOV version 1.13