LCOV - code coverage report
Current view: top level - EnergyPlus - WindowComplexManager.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 97.4 % 78 76
Test Date: 2025-05-22 16:09:37 Functions: 80.0 % 5 4

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #ifndef WindowComplexManager_hh_INCLUDED
      49              : #define WindowComplexManager_hh_INCLUDED
      50              : 
      51              : // ObjexxFCL Headers
      52              : #include <ObjexxFCL/Array1S.hh>
      53              : #include <ObjexxFCL/Array2D.hh>
      54              : 
      55              : // EnergyPlus Headers
      56              : #include <EnergyPlus/Data/BaseData.hh>
      57              : #include <EnergyPlus/DataBSDFWindow.hh>
      58              : #include <EnergyPlus/DataVectorTypes.hh>
      59              : #include <EnergyPlus/EnergyPlus.hh>
      60              : #include <EnergyPlus/TARCOGGassesParams.hh>
      61              : #include <EnergyPlus/TARCOGParams.hh>
      62              : 
      63              : namespace EnergyPlus {
      64              : 
      65              : // forward declaration
      66              : struct EnergyPlusData;
      67              : 
      68              : namespace WindowComplexManager {
      69              : 
      70              :     enum class RayIdentificationType
      71              :     {
      72              :         Invalid = -1,
      73              :         Front_Incident,
      74              :         Front_Transmitted,
      75              :         Front_Reflected,
      76              :         Back_Incident,
      77              :         Back_Transmitted,
      78              :         Back_Reflected,
      79              :         Num
      80              :     };
      81              : 
      82              :     // Using/Aliasing
      83              :     using DataBSDFWindow::BasisElemDescr;
      84              :     using DataBSDFWindow::BasisStruct;
      85              :     using DataBSDFWindow::BSDFDaylghtPosition;
      86              :     using DataBSDFWindow::BSDFGeomDescr;
      87              :     using DataBSDFWindow::BSDFStateDescr;
      88              :     using DataBSDFWindow::BSDFWindowGeomDescr;
      89              :     using DataBSDFWindow::BSDFWindowInputStruct;
      90              :     using DataVectorTypes::Vector;
      91              : 
      92              :     struct WindowIndex
      93              :     {
      94              :         // Members
      95              :         int NumStates; // No States for this window
      96              :         int SurfNo;    // Surface number of window
      97              :         // Real64 Azimuth; // Window surface azimuth
      98              :         // Real64 Tilt; // Window surface tilt
      99              : 
     100              :         // Default Constructor
     101            0 :         WindowIndex() : NumStates(0)
     102              :         {
     103            0 :         }
     104              :     };
     105              : 
     106              :     struct WindowStateIndex
     107              :     {
     108              :         // Members
     109              :         int InitInc = 0;      // Flag indicating initialization needed on Incoming basis
     110              :         int IncBasisIndx = 0; // Index of basis list entry for Incoming basis
     111              :         int CopyIncState = 0; // Pointer to state from which geometry can be copied (Incident)
     112              :         int InitTrn = 0;      // Flag indicating initialization needed on Outgoing basis
     113              :         int TrnBasisIndx = 0; // Index of basis list entry for Outgoing basis
     114              :         int CopyTrnState = 0; // Pointer to state from which geometry can be copied (Outgoing)
     115              :         int Konst = 0;        // Index of state descript in Construct array
     116              :         // INTEGER  ::  ThermConst  !Index of state thermal description in Construct array
     117              :     };
     118              : 
     119              :     // Functions
     120              : 
     121              :     // void clear_state();
     122              : 
     123              :     void InitBSDFWindows(EnergyPlusData &state);
     124              : 
     125              :     void AllocateCFSStateHourlyData(EnergyPlusData &state,
     126              :                                     int const iSurf, // Surface number
     127              :                                     int const iState // Complex fenestration state number
     128              :     );
     129              : 
     130              :     void ExpandComplexState(EnergyPlusData &state,
     131              :                             int const iSurf, // Surface number
     132              :                             int const iConst // Construction number
     133              :     );
     134              : 
     135              :     void CheckCFSStates(EnergyPlusData &state, int const iSurf); // Surface number
     136              : 
     137              :     void InitComplexWindows(EnergyPlusData &state);
     138              : 
     139              :     void UpdateComplexWindows(EnergyPlusData &state);
     140              : 
     141              :     void CFSShadeAndBeamInitialization(EnergyPlusData &state,
     142              :                                        int const iSurf, // Window surface number
     143              :                                        int const iState // Window state number
     144              :     );
     145              : 
     146              :     void CalculateWindowBeamProperties(EnergyPlusData &state,
     147              :                                        int const ISurf,                   // Window surface number
     148              :                                        int const IState,                  // Window state number
     149              :                                        BSDFWindowGeomDescr const &Window, // Window Geometry
     150              :                                        BSDFGeomDescr const &Geom,         // State Geometry
     151              :                                        BSDFStateDescr &State,             // State Description
     152              :                                        int const Hour,                    // Hour number
     153              :                                        int const TS                       // Timestep number
     154              :     );
     155              : 
     156              :     void CalcStaticProperties(EnergyPlusData &state);
     157              : 
     158              :     void CalculateBasisLength(EnergyPlusData &state,
     159              :                               BSDFWindowInputStruct const &Input, // BSDF data input struct for this construction
     160              :                               int const IConst,                   // Construction number of input
     161              :                               int &NBasis                         // Calculated Basis length
     162              :     );
     163              : 
     164              :     void ConstructBasis(EnergyPlusData &state,
     165              :                         int const IConst, // Index for accessing Construct array
     166              :                         BasisStruct &Basis);
     167              : 
     168              :     void FillBasisElement(EnergyPlusData &state,
     169              :                           Real64 const Theta, // Central polar angle of element
     170              :                           Real64 const Phi,   // Central azimuthal angle of element
     171              :                           int const Elem,     // Index number of element in basis
     172              :                           BasisElemDescr &BasisElem,
     173              :                           Real64 const LowerTheta,              // Lower edge of element (polar angle)
     174              :                           Real64 const UpperTheta,              // Upper edge of element (polar angle)
     175              :                           Real64 const DPhi,                    // Width of element (azimuthal angle)
     176              :                           DataBSDFWindow::Basis const InputType // Basis type
     177              :     );
     178              : 
     179              :     void SetupComplexWindowStateGeometry(EnergyPlusData &state,
     180              :                                          int const ISurf,             // Surface number of the complex fenestration
     181              :                                          int const IState,            // State number of the complex fenestration state
     182              :                                          int const IConst,            // Pointer to construction for this state
     183              :                                          BSDFWindowGeomDescr &Window, // Window Geometry
     184              :                                          BSDFGeomDescr &Geom,         // State Geometry
     185              :                                          BSDFStateDescr &State        // State Description
     186              :     );
     187              : 
     188              :     void CalcWindowStaticProperties(EnergyPlusData &state,
     189              :                                     int const ISurf,             // Surface number of the complex fenestration
     190              :                                     int const IState,            // State number of the complex fenestration state
     191              :                                     BSDFWindowGeomDescr &Window, // Window Geometry
     192              :                                     BSDFGeomDescr &Geom,         // State Geometry
     193              :                                     BSDFStateDescr &State        // State Description
     194              :     );
     195              : 
     196              :     Real64 SkyWeight(Vector const &DirVec); // Direction of the element to be weighted
     197              : 
     198              :     Real64 SkyGndWeight(Vector const &PosVec); // x,y,z(=0) of ground intersection pt
     199              : 
     200              :     BSDFDaylghtPosition DaylghtAltAndAzimuth(Vector const &UnitVect); // vector which needs to be converted
     201              : 
     202              :     Vector WorldVectFromW6(EnergyPlusData &state,
     203              :                            Real64 const Theta,                  // Polar angle in W6 Coords
     204              :                            Real64 const Phi,                    // Azimuthal angle in W6 Coords
     205              :                            const RayIdentificationType RadType, // Type of radiation: Front_Incident, etc.
     206              :                            Real64 const Gamma,                  // Surface tilt angle, radians, world coordinate system
     207              :                            Real64 const Alpha                   // Surface azimuth, radians, world coordinate system
     208              :     );
     209              : 
     210              :     int FindInBasis(EnergyPlusData &state,
     211              :                     Vector const &RayToFind,             // Ray vector direction in world CS
     212              :                     const RayIdentificationType RadType, // Type of radiation: Front_Incident, etc.
     213              :                     int const ISurf,                     // Window Surface number
     214              :                     int const IState,                    // Complex Fenestration state number
     215              :                     BasisStruct const &Basis,            // Complex Fenestration basis root
     216              :                     Real64 &Theta,                       // Theta value for ray
     217              :                     Real64 &Phi                          // Phi value for ray
     218              :     );
     219              : 
     220              :     void W6CoordsFromWorldVect(EnergyPlusData &state,
     221              :                                Vector const &RayVect,               // Ray vector direction in world CS
     222              :                                const RayIdentificationType RadType, // Type of radiation: Front_Incident, etc.
     223              :                                Real64 const Gamma,                  // Surface tilt angle, world coordinate system
     224              :                                Real64 const Alpha,                  // Surface azimuth, world coordinate system
     225              :                                Real64 &Theta,                       // Polar angle in W6 Coords
     226              :                                Real64 &Phi                          // Azimuthal angle in W6 Coords
     227              :     );
     228              : 
     229              :     void CalcComplexWindowThermal(EnergyPlusData &state,
     230              :                                   int const SurfNum,          // Surface number
     231              :                                   int &ConstrNum,             // Construction number
     232              :                                   Real64 const HextConvCoeff, // Outside air film conductance coefficient
     233              :                                   Real64 &SurfInsideTemp,     // Inside window surface temperature
     234              :                                   Real64 &SurfOutsideTemp,    // Outside surface temperature (C)
     235              :                                   Real64 &SurfOutsideEmiss,
     236              :                                   DataBSDFWindow::Condition const CalcCondition // Calucation condition (summer, winter or no condition)
     237              :     );
     238              : 
     239              :     // This function check if gas with molecular weight has already been feed into coefficients and
     240              :     // feed arrays
     241              : 
     242              :     void CheckGasCoefs(Real64 const currentWeight, int &indexNumber, Array1D<Real64> &wght, bool &feedData);
     243              : 
     244              :     int SearchAscTable(Real64 const y,            // Value to be found in the table
     245              :                        int const n,               // Number of values in the table
     246              :                        Array1S<Real64> const ytab // Table of values, monotonic, ascending order
     247              :     );
     248              : 
     249              :     //=================================================================================================
     250              : 
     251              : } // namespace WindowComplexManager
     252              : 
     253              : struct WindowComplexManagerData : BaseGlobalStruct
     254              : {
     255              : 
     256              :     Real64 const sigma; // Stefan-Boltzmann constant
     257              :     Real64 const PressureDefault;
     258              : 
     259              :     int const Calculate_Geometry;
     260              :     int const Copy_Geometry;
     261              : 
     262              :     int const TmpLen; // Length increment of temporary arrays
     263              : 
     264              :     int NumComplexWind; // Total number of complex windows
     265              : 
     266              :     Array1D<DataBSDFWindow::BasisStruct> BasisList;
     267              :     EPVector<WindowComplexManager::WindowIndex> WindowList;
     268              :     Array2D<WindowComplexManager::WindowStateIndex> WindowStateList;
     269              : 
     270              :     bool InitComplexWindowsOnce = true; // Flag for insuring things happen once
     271              :     bool InitBSDFWindowsOnce = true;
     272              :     int NumBasis = 0; // Number of unique bases (No. in BasisList)
     273              :     int MatrixNo = 0; // Index of Basis matrix
     274              : 
     275         2129 :     Array1D<Real64> gap = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Vector of gap widths [m] {maxlay}
     276         2129 :     Array1D<Real64> thick = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector of glass thicknesses [m] {maxlay}
     277         2129 :     Array1D<Real64> scon = Array1D<Real64>(TARCOGParams::maxlay, 0.0);  // Vector of conductivities of each glazing layer  [W/m.K] {maxlay}
     278              :     Array1D<Real64> tir =
     279         2129 :         Array1D<Real64>(TARCOGParams::maxlay * 2, 0.0); // Vector of IR transmittances of each layer {2*maxlay - 2 surfaces per layer}
     280              :     Array1D<Real64> emis =
     281         2129 :         Array1D<Real64>(TARCOGParams::maxlay * 2, 0.0);            // Vector of IR emittances of each surface {2*maxlay - 2 surfaces per layer}
     282         2129 :     Array1D_int SupportPlr = Array1D_int(TARCOGParams::maxlay, 0); // Shows whether or not gap have support pillar
     283              :     // 0 - does not have support pillar
     284              :     // 1 - have support pillar
     285         2129 :     Array1D<Real64> PillarSpacing = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Pillar spacing for each gap (used in case there is support pillar)
     286         2129 :     Array1D<Real64> PillarRadius = Array1D<Real64>(TARCOGParams::maxlay, 0.0);  // Pillar radius for each gap (used in case there is support pillar)
     287         2129 :     Array1D<Real64> asol = Array1D<Real64>(TARCOGParams::maxlay, 0.0);          // Vector of Absorbed solar energy fractions for each layer {maxlay}
     288         2129 :     Array1D<Real64> presure = Array1D<Real64>(TARCOGParams::maxlay + 1, 0.0);   // Vector of gas pressures in gaps [N/m^2] {maxlay+1}
     289         2129 :     Array1D<Real64> GapDefMax = Array1D<Real64>(TARCOGParams::maxlay - 1, 0.0); // Vector of gap widths in deflected state.  It will be used as input
     290              :     // if CalcDeflection = 2. In case CalcDeflection = 1 it will return recalculated
     291              :     // gap widths. [m]
     292         2129 :     Array1D<Real64> YoungsMod = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Vector of Young's modulus. [m]
     293         2129 :     Array1D<Real64> PoissonsRat = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector of Poisson's Ratios. [m]
     294         2129 :     Array1D<Real64> LayerDef = Array1D<Real64>(TARCOGParams::maxlay, 0.0);    // Vector of layers deflection. [m]
     295              : 
     296         2129 :     Array2D_int iprop = Array2D_int(TARCOGGassesParams::maxgas, TARCOGParams::maxlay + 1, 1); // Matrix of gas codes - see above {maxgap x maxgas}
     297              :     Array2D<Real64> frct =
     298         2129 :         Array2D<Real64>(TARCOGGassesParams::maxgas, TARCOGParams::maxlay + 1, 0.0); // Matrix of mass percentages in gap mixtures  {maxgap x maxgas}
     299         2129 :     Array2D<Real64> gcon = Array2D<Real64>(3, TARCOGGassesParams::maxgas, 0.0);     // Matrix of constants for gas conductivity calc
     300              :     //     (A, B, C for max of 10 gasses) {maxgas x 3}
     301         2129 :     Array2D<Real64> gvis = Array2D<Real64>(3, TARCOGGassesParams::maxgas, 0.0); // Matrix of constants for gas dynamic viscosity calc
     302              :     //     (A, B, C for max of 10 gasses) {maxgas x 3}
     303         2129 :     Array2D<Real64> gcp = Array2D<Real64>(3, TARCOGGassesParams::maxgas, 0.0); // Matrix of constants for gas specific heat calc at constant pressure
     304              :     //     (A, B, C for max of 10 gasses) {maxgas x 3}
     305         2129 :     Array1D<Real64> wght = Array1D<Real64>(TARCOGGassesParams::maxgas, 0.0); // Vector of Molecular weights for gasses {maxgas}
     306         2129 :     Array1D<Real64> gama = Array1D<Real64>(TARCOGGassesParams::maxgas, 0.0); // Vector of spefic heat ration for low pressure calc {maxgas}
     307         2129 :     Array1D_int nmix = Array1D_int(TARCOGParams::maxlay + 1, 0);             // Vector of number of gasses in gas mixture of each gap {maxlay+1}
     308         2129 :     Array1D_int ibc = Array1D_int(2, 0);                                     // Vector of boundary condition flags (ibc(1) - outdoor, ibc(2) - indoor)
     309              :     //             0 - h to be calculated;
     310              :     //             1 - combined film coefficient (h) prescribed;
     311              :     //             2 - convective film coefficient (hc) prescribed.
     312              :     //           Also used in old algorithms for calculating h, accessible through
     313              :     //           negative values for flags:
     314              :     //             -1  - old SPC142 correlation
     315              :     //             -2  - Klems-Yazdanian correlation (applicable to outdoor only)
     316              :     //             -3  - Kimura correlation (applicable to outdoor only)
     317         2129 :     Array1D<Real64> Atop = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector with areas of top openings - between SD layers and top of
     318              :     //               glazing cavity, for each layer [m^2] {maxlay} *
     319         2129 :     Array1D<Real64> Abot = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector with areas of bottom openings - between SD layers
     320              :     //               and bottom of glazing cavity [m^2] {maxlay}
     321         2129 :     Array1D<Real64> Al = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector with areas of left-hand side openings - between SD layers
     322              :     //               and left end of glazing cavity [m^2] {maxlay}
     323         2129 :     Array1D<Real64> Ar = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Vector of areas of right-hand side openings - between SD layers
     324              :     //               and right end of glazing cavity [m^2] {maxlay}
     325         2129 :     Array1D<Real64> Ah = Array1D<Real64>(TARCOGParams::maxlay, 0.0);          // Vector of total areas of holes for each SD [m^2] {maxlay}
     326         2129 :     Array1D<Real64> SlatThick = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Thickness of the slat material [m] {maxlay} **
     327         2129 :     Array1D<Real64> SlatWidth = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Slat width [m] {maxlay}
     328         2129 :     Array1D<Real64> SlatAngle = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Slat tilt angle [deg] {maxlay}
     329         2129 :     Array1D<Real64> SlatCond = Array1D<Real64>(TARCOGParams::maxlay, 0.0);    // Conductivity of the slat material [W/m.K] {maxlay}
     330         2129 :     Array1D<Real64> SlatSpacing = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Distance between slats [m] {maxlay}
     331         2129 :     Array1D<Real64> SlatCurve = Array1D<Real64>(TARCOGParams::maxlay, 0.0);   // Curvature radius of the slat [m] {maxlay}
     332         2129 :     Array1D<Real64> vvent = Array1D<Real64>(TARCOGParams::maxlay + 1, 0.0);   // Vector of velocities for forced ventilation, for each gap, and for
     333              :     //               outdoor and indoor environment [m/s] {maxlay+1} ***
     334              :     Array1D<Real64> tvent =
     335         2129 :         Array1D<Real64>(TARCOGParams::maxlay + 1, 0.0); // Vector of temperatures of ventilation gas for forced ventilation, for each
     336              :     //  gap, and for outdoor and indoor environment [K] {maxlay+1}
     337              :     Array1D<TARCOGParams::TARCOGLayerType> LayerType =
     338         2129 :         Array1D<TARCOGParams::TARCOGLayerType>(TARCOGParams::maxlay, TARCOGParams::TARCOGLayerType::SPECULAR); // Glazing layer type flag {maxlay}:
     339              :     //                 0 - Specular layer,
     340              :     //                 1 - Venetian blind (SD)
     341              :     //                 2 - Woven shade (SD) (not implemented)
     342              :     //                 3 - Diffuse shade (not implemented)
     343         2129 :     Array1D_int nslice = Array1D_int(TARCOGParams::maxlay, 0); // Vector of numbers of slices in a laminated glazing layers
     344              :     //   (0 - monolithic layer) {maxlay}
     345         2129 :     Array1D<Real64> LaminateA = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Left-hand side array for creating slice equations {maxlay}
     346         2129 :     Array1D<Real64> LaminateB = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Right-hand side array for creating slice equations {maxlay}
     347         2129 :     Array1D<Real64> sumsol = Array1D<Real64>(TARCOGParams::maxlay, 0.0);    // Array of absorbed solar energy fractions for each laminated
     348              :     //               glazing layer [W/m^2] {maxlay}
     349         2129 :     Array1D<Real64> theta = Array1D<Real64>(TARCOGParams::maxlay * 2, 0.0); // Vector of average temperatures of glazing surfaces [K] {2*maxlay}
     350         2129 :     Array1D<Real64> q = Array1D<Real64>(TARCOGParams::maxlay * 2 + 1, 0.0); // Vector of various heat fluxes [W/m^2] {2*maxlay+1},
     351              :     //    depending on element index:
     352              :     //    1  = qout (heat flux from outer-most glazing surface to outdoor space)
     353              :     //   2*i = qpane(i) (heat flux through i-th glazing layer)
     354              :     // 2*i-1 = qgap(i) (heat flux from i-th glazing cavity to indoor-faced
     355              :     //          surface of the adjacent glazing layer)
     356              :     // 2*nlayer+1 = qin (heat flux from indoor space to inner-most glazing
     357              :     //              surface)
     358         2129 :     Array1D<Real64> qprim = Array1D<Real64>(TARCOGParams::maxlay1, 0.0); // Vector of heat fluxes from the outdoor-faced surfaces of glazing layers
     359              :     //    towards the adjacent glazing cavity [W/m2]
     360         2129 :     Array1D<Real64> qv = Array1D<Real64>(TARCOGParams::maxlay1, 0.0);    // Vector of heat fluxes to each gap by ventillation [W/m^2]
     361         2129 :     Array1D<Real64> hcgap = Array1D<Real64>(TARCOGParams::maxlay1, 0.0); // Convective part of gap effective conductivity {maxlay}
     362         2129 :     Array1D<Real64> hrgap = Array1D<Real64>(TARCOGParams::maxlay1, 0.0); // Radiative part of gap effective conductivity (including in and out)
     363         2129 :     Array1D<Real64> hg = Array1D<Real64>(TARCOGParams::maxlay, 0.0);     // Gas conductance of the glazing cavity
     364              :     //         [W/m^2.K] - EN673 and ISO 10292 procedure
     365         2129 :     Array1D<Real64> hr = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Radiation conductance of the glazing cavity
     366              :     //         [W/m^2.K] - EN673 and ISO 10292 procedure
     367         2129 :     Array1D<Real64> hs = Array1D<Real64>(TARCOGParams::maxlay, 0.0); // Thermal conductance of the glazing cavity
     368              :     //         [W/m^2.K] - EN673 and ISO 10292 procedure
     369         2129 :     Array1D<Real64> Ra = Array1D<Real64>(TARCOGParams::maxlay + 1, 0.0);               // Vector of Rayleigh numbers, for each gap {maxlay}
     370         2129 :     Array1D<Real64> Nu = Array1D<Real64>(TARCOGParams::maxlay + 1, 0.0);               // Vector of Nusselt numbers, for each gap {maxlay}
     371         2129 :     Array1D<Real64> Keff = Array1D<Real64>(TARCOGParams::maxlay, 0.0);                 // Vector of keff values for gaps [W/m.K] {maxlay}
     372         2129 :     Array1D<Real64> ShadeGapKeffConv = Array1D<Real64>(TARCOGParams::maxlay - 1, 0.0); // Vector of convective keff values for areas above/below
     373              :     // SD layers [W/m.K] {maxlay-1}
     374         2129 :     Array1D<Real64> deltaTemp = Array1D<Real64>(100, 0.0);
     375         2129 :     Array1D_int iMinDT = Array1D_int(1, 0);
     376         2129 :     Array1D_int IDConst = Array1D_int(100, 0);
     377              : 
     378         2126 :     void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
     379              :     {
     380         2126 :     }
     381              : 
     382         1152 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     383              :     {
     384         1152 :     }
     385              : 
     386         2100 :     void clear_state() override
     387              :     {
     388         2100 :         this->NumComplexWind = 0;
     389         2100 :         this->BasisList.deallocate();
     390         2100 :         this->WindowList.deallocate();
     391         2100 :         this->WindowStateList.deallocate();
     392         2100 :         this->InitComplexWindowsOnce = true;
     393         2100 :         this->InitBSDFWindowsOnce = true;
     394         2100 :         this->NumBasis = 0;
     395         2100 :         this->MatrixNo = 0;
     396         2100 :         this->LayerType = Array1D<TARCOGParams::TARCOGLayerType>(TARCOGParams::maxlay, TARCOGParams::TARCOGLayerType::SPECULAR);
     397         2100 :     }
     398              : 
     399              :     // Default Constructor
     400         2129 :     WindowComplexManagerData()
     401         6387 :         : sigma(5.6697e-8), PressureDefault(101325.0), Calculate_Geometry(1), Copy_Geometry(2), TmpLen(20), NumComplexWind(0), NumBasis(0),
     402         2129 :           MatrixNo(0)
     403              :     {
     404         2129 :     }
     405              : };
     406              : 
     407              : } // namespace EnergyPlus
     408              : 
     409              : #endif
        

Generated by: LCOV version 2.0-1