LCOV - code coverage report
Current view: top level - EnergyPlus - ConvectionCoefficients.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 16 19 84.2 %
Date: 2023-01-17 19:17:23 Functions: 17 25 68.0 %

          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 ConvectionCoefficients_hh_INCLUDED
      49             : #define ConvectionCoefficients_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.hh>
      53             : #include <ObjexxFCL/Array1S.hh>
      54             : #include <ObjexxFCL/Optional.hh>
      55             : 
      56             : // EnergyPlus Headers
      57             : #include <EnergyPlus/ConvectionConstants.hh>
      58             : #include <EnergyPlus/Data/BaseData.hh>
      59             : #include <EnergyPlus/DataGlobals.hh>
      60             : #include <EnergyPlus/DataSurfaces.hh>
      61             : #include <EnergyPlus/DataVectorTypes.hh>
      62             : #include <EnergyPlus/EnergyPlus.hh>
      63             : 
      64             : namespace EnergyPlus {
      65             : 
      66             : // Forward declarations
      67             : struct EnergyPlusData;
      68             : 
      69             : namespace ConvectionCoefficients {
      70             : 
      71             :     // Using/Aliasing
      72             :     using DataVectorTypes::Vector;
      73             : 
      74        1546 :     struct HcInsideFaceUserCurveStruct
      75             :     {
      76             :         // Members
      77             :         std::string Name; // user's name for object
      78             :         ConvectionConstants::RefTemp ReferenceTempType = ConvectionConstants::RefTemp::Invalid;
      79             :         int HcFnTempDiffCurveNum = 0;
      80             :         int HcFnTempDiffDivHeightCurveNum = 0;
      81             :         int HcFnACHCurveNum = 0;
      82             :         int HcFnACHDivPerimLengthCurveNum = 0;
      83             :     };
      84             : 
      85        1546 :     struct HcOutsideFaceUserCurveStruct
      86             :     {
      87             :         // Members
      88             :         std::string Name;
      89             :         int ReferenceTempType = 0;
      90             :         bool SuppressRainChange = false;
      91             :         ConvectionConstants::RefWind WindSpeedType = ConvectionConstants::RefWind::Invalid;
      92             :         int HfFnWindSpeedCurveNum = 0;
      93             :         int HnFnTempDiffCurveNum = 0;
      94             :         int HnFnTempDiffDivHeightCurveNum = 0;
      95             :     };
      96             : 
      97        1542 :     struct InsideFaceAdaptiveConvAlgoStruct
      98             :     {
      99             :         // Members
     100             :         std::string Name;
     101             :         int SimpleBuoyVertWallEqNum = ConvectionConstants::HcInt_FohannoPolidoriVerticalWall; // InConvClass_A3_VertWalls
     102             :         int SimpleBuoyVertWallUserCurveNum = 0;
     103             :         int SimpleBuoyStableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondStableHorizontal; // InConvClass_A3_StableHoriz
     104             :         int SimpleBuoyStableHorizUserCurveNum = 0;
     105             :         int SimpleBuoyUnstableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondUnstableHorizontal; // InConvClass_A3_UnstableHoriz
     106             :         int SimpleBuoyUnstableHorizUserCurveNum = 0;
     107             :         int SimpleBuoyStableTiltedEqNum = ConvectionConstants::HcInt_WaltonStableHorizontalOrTilt; // InConvClass_A3_StableTilted
     108             :         int SimpleBuoyStableTiltedUserCurveNum = 0;
     109             :         int SimpleBuoyUnstableTiltedEqNum = ConvectionConstants::HcInt_WaltonUnstableHorizontalOrTilt; // InConvClass_A3_UnstableTilted
     110             :         int SimpleBuoyUnstableTiltedUserCurveNum = 0;
     111             :         int SimpleBuoyWindowsEqNum = ConvectionConstants::HcInt_ISO15099Windows; // InConvClass_A3_Windows
     112             :         int SimpleBuoyWindowsUserCurveNum = 0;
     113             :         int FloorHeatCeilingCoolVertWallEqNum = ConvectionConstants::HcInt_KhalifaEq3WallAwayFromHeat; // InConvClass_A1_VertWalls
     114             :         int FloorHeatCeilingCoolVertWallUserCurveNum = 0;
     115             :         int FloorHeatCeilingCoolStableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondStableHorizontal; // InConvClass_A1_StableHoriz
     116             :         int FloorHeatCeilingCoolStableHorizUserCurveNum = 0;
     117             :         int FloorHeatCeilingCoolUnstableHorizEqNum = ConvectionConstants::HcInt_KhalifaEq4CeilingAwayFromHeat; // InConvClass_A1_UnstableHoriz
     118             :         int FloorHeatCeilingCoolUnstableHorizUserCurveNum = 0;
     119             :         int FloorHeatCeilingCoolHeatedFloorEqNum = ConvectionConstants::HcInt_AwbiHattonHeatedFloor; // InConvClass_A1_HeatedFloor
     120             :         int FloorHeatCeilingCoolHeatedFloorUserCurveNum = 0;
     121             :         int FloorHeatCeilingCoolChilledCeilingEqNum = ConvectionConstants::HcInt_KaradagChilledCeiling; // InConvClass_A1_ChilledCeil
     122             :         int FloorHeatCeilingCoolChilledCeilingUserCurveNum = 0;
     123             :         int FloorHeatCeilingCoolStableTiltedEqNum = ConvectionConstants::HcInt_WaltonStableHorizontalOrTilt; // InConvClass_A1_StableTilted
     124             :         int FloorHeatCeilingCoolStableTiltedUserCurveNum = 0;
     125             :         int FloorHeatCeilingCoolUnstableTiltedEqNum = ConvectionConstants::HcInt_WaltonUnstableHorizontalOrTilt; // InConvClass_A1_UnstableTilted
     126             :         int FloorHeatCeilingCoolUnstableTiltedUserCurveNum = 0;
     127             :         int FloorHeatCeilingCoolWindowsEqNum = ConvectionConstants::HcInt_ISO15099Windows; // InConvClass_A1_Windows
     128             :         int FloorHeatCeilingCoolWindowsUserCurveNum = 0;
     129             :         int WallPanelHeatVertWallEqNum = ConvectionConstants::HcInt_KhalifaEq6NonHeatedWalls; // InConvClass_A2_VertWallsNonHeated
     130             :         int WallPanelHeatVertWallUserCurveNum = 0;
     131             :         int WallPanelHeatHeatedWallEqNum = ConvectionConstants::HcInt_AwbiHattonHeatedWall; // InConvClass_A2_HeatedVerticalWall
     132             :         int WallPanelHeatHeatedWallUserCurveNum = 0;
     133             :         int WallPanelHeatStableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondStableHorizontal; // InConvClass_A2_StableHoriz
     134             :         int WallPanelHeatStableHorizUserCurveNum = 0;
     135             :         int WallPanelHeatUnstableHorizEqNum = ConvectionConstants::HcInt_KhalifaEq7Ceiling; // InConvClass_A2_UnstableHoriz
     136             :         int WallPanelHeatUnstableHorizUserCurveNum = 0;
     137             :         int WallPanelHeatStableTiltedEqNum = ConvectionConstants::HcInt_WaltonStableHorizontalOrTilt; // InConvClass_A2_StableTilted
     138             :         int WallPanelHeatStableTiltedUserCurveNum = 0;
     139             :         int WallPanelHeatUnstableTiltedEqNum = ConvectionConstants::HcInt_WaltonUnstableHorizontalOrTilt; // InConvClass_A2_UnstableTilted
     140             :         int WallPanelHeatUnstableTiltedUserCurveNum = 0;
     141             :         int WallPanelHeatWindowsEqNum = ConvectionConstants::HcInt_ISO15099Windows; // InConvClass_A2_Windows
     142             :         int WallPanelHeatWindowsUserCurveNum = 0;
     143             :         int ConvectiveHeatVertWallEqNum = ConvectionConstants::HcInt_FohannoPolidoriVerticalWall;
     144             :         int ConvectiveHeatVertWallUserCurveNum = 0;
     145             :         int ConvectiveHeatVertWallNearHeaterEqNum = ConvectionConstants::HcInt_KhalifaEq5WallNearHeat;
     146             :         int ConvectiveHeatVertWallNearHeaterUserCurveNum = 0;
     147             :         int ConvectiveHeatStableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondStableHorizontal;
     148             :         int ConvectiveHeatStableHorizUserCurveNum = 0;
     149             :         int ConvectiveHeatUnstableHorizEqNum = ConvectionConstants::HcInt_KhalifaEq7Ceiling;
     150             :         int ConvectiveHeatUnstableHorizUserCurveNum = 0;
     151             :         int ConvectiveHeatStableTiltedEqNum = ConvectionConstants::HcInt_WaltonStableHorizontalOrTilt;
     152             :         int ConvectiveHeatStableTiltedUserCurveNum = 0;
     153             :         int ConvectiveHeatUnstableTiltedEqNum = ConvectionConstants::HcInt_WaltonUnstableHorizontalOrTilt;
     154             :         int ConvectiveHeatUnstableTiltedUserCurveNum = 0;
     155             :         int ConvectiveHeatWindowsEqNum = ConvectionConstants::HcInt_ISO15099Windows;
     156             :         int ConvectiveHeatWindowsUserCurveNum = 0;
     157             :         int CentralAirWallEqNum = ConvectionConstants::HcInt_GoldsteinNovoselacCeilingDiffuserWalls;
     158             :         int CentralAirWallUserCurveNum = 0;
     159             :         int CentralAirCeilingEqNum = ConvectionConstants::HcInt_FisherPedersenCeilDiffuserCeiling;
     160             :         int CentralAirCeilingUserCurveNum = 0;
     161             :         int CentralAirFloorEqNum = ConvectionConstants::HcInt_GoldsteinNovoselacCeilingDiffuserFloor;
     162             :         int CentralAirFloorUserCurveNum = 0;
     163             :         int CentralAirWindowsEqNum = ConvectionConstants::HcInt_GoldsteinNovoselacCeilingDiffuserWindow;
     164             :         int CentralAirWindowsUserCurveNum = 0;
     165             :         int ZoneFanCircVertWallEqNum = ConvectionConstants::HcInt_KhalifaEq3WallAwayFromHeat;
     166             :         int ZoneFanCircVertWallUserCurveNum = 0;
     167             :         int ZoneFanCircStableHorizEqNum = ConvectionConstants::HcInt_AlamdariHammondStableHorizontal;
     168             :         int ZoneFanCircStableHorizUserCurveNum = 0;
     169             :         int ZoneFanCircUnstableHorizEqNum = ConvectionConstants::HcInt_KhalifaEq4CeilingAwayFromHeat;
     170             :         int ZoneFanCircUnstableHorizUserCurveNum = 0;
     171             :         int ZoneFanCircStableTiltedEqNum = ConvectionConstants::HcInt_WaltonStableHorizontalOrTilt;
     172             :         int ZoneFanCircStableTiltedUserCurveNum = 0;
     173             :         int ZoneFanCircUnstableTiltedEqNum = ConvectionConstants::HcInt_WaltonUnstableHorizontalOrTilt;
     174             :         int ZoneFanCircUnstableTiltedUserCurveNum = 0;
     175             :         int ZoneFanCircWindowsEqNum = ConvectionConstants::HcInt_ISO15099Windows;
     176             :         int ZoneFanCircWindowsUserCurveNum = 0;
     177             :         int MixedBuoyAssistingFlowWallEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedAssistingWall;
     178             :         int MixedBuoyAssistingFlowWallUserCurveNum = 0;
     179             :         int MixedBuoyOpposingFlowWallEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedOppossingWall;
     180             :         int MixedBuoyOpposingFlowWallUserCurveNum = 0;
     181             :         int MixedStableFloorEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedStableFloor;
     182             :         int MixedStableFloorUserCurveNum = 0;
     183             :         int MixedUnstableFloorEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedUnstableFloor;
     184             :         int MixedUnstableFloorUserCurveNum = 0;
     185             :         int MixedStableCeilingEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedStableCeiling;
     186             :         int MixedStableCeilingUserCurveNum = 0;
     187             :         int MixedUnstableCeilingEqNum = ConvectionConstants::HcInt_BeausoleilMorrisonMixedUnstableCeiling;
     188             :         int MixedUnstableCeilingUserCurveNum = 0;
     189             :         int MixedWindowsEqNum = ConvectionConstants::HcInt_GoldsteinNovoselacCeilingDiffuserWindow;
     190             :         int MixedWindowsUserCurveNum = 0;
     191             :     };
     192             : 
     193        1542 :     struct OutsideFaceAdaptiveConvAlgoStruct
     194             :     {
     195             :         // Members
     196             :         std::string Name;
     197             :         bool SuppressRainChange = false;
     198             :         int HWindWallWindwardEqNum = ConvectionConstants::HcExt_SparrowWindward;
     199             :         int HWindWallWindwardUserCurveNum = 0;
     200             :         int HWindWallLeewardEqNum = ConvectionConstants::HcExt_SparrowLeeward;
     201             :         int HWindWallLeewardUserCurveNum = 0;
     202             :         int HWindHorizRoofEqNum = ConvectionConstants::HcExt_ClearRoof;
     203             :         int HWindHorizRoofUserCurveNum = 0;
     204             :         int HNatVertWallEqNum = ConvectionConstants::HcExt_NaturalASHRAEVerticalWall;
     205             :         int HNatVertWallUserCurveNum = 0;
     206             :         int HNatStableHorizEqNum = ConvectionConstants::HcExt_NaturalWaltonStableHorizontalOrTilt;
     207             :         int HNatStableHorizUserCurveNum = 0;
     208             :         int HNatUnstableHorizEqNum = ConvectionConstants::HcExt_NaturalWaltonUnstableHorizontalOrTilt;
     209             :         int HNatUnstableHorizUserCurveNum = 0;
     210             :     };
     211             : 
     212             :     struct BoundingBoxVertStruct
     213             :     {
     214             :         // Members
     215             :         int SurfNum = 0;
     216             :         int VertNum = 0;
     217             :         Vector Vertex{0.0, 0.0, 0.0};
     218             :     };
     219             : 
     220         771 :     struct RoofGeoCharacteristicsStruct
     221             :     {
     222             :         // Members
     223             :         Real64 Area = 0.0;      // Sum of all roof surface areas
     224             :         Real64 Perimeter = 0.0; // Actual perimeter of all roof surfaces, after removing all edges that are used twice (and inserting vertices
     225             :                                 // to split surfaces as needed)
     226             :         Real64 Height = 0.0;    // Weighted average mean vertical height: for each surface, take max - Zmin value,
     227             :                                 // then do a weighted average by surface area
     228             :         Real64 Azimuth = 0.0;   // Weighted average azimuth
     229             :         Real64 Tilt = 0.0;      // Weighted average tilt
     230             :     };
     231             : 
     232             :     struct FacadeGeoCharacteristicsStruct
     233             :     {
     234             :         // Members
     235             :         Real64 AzimuthRangeLow;
     236             :         Real64 AzimuthRangeHi;
     237             :         Real64 Zmax;
     238             :         Real64 Zmin;
     239             :         Real64 Ymax;
     240             :         Real64 Ymin;
     241             :         Real64 Xmax;
     242             :         Real64 Xmin;
     243             :         Real64 Area;
     244             :         Real64 Perimeter;
     245             :         Real64 Height;
     246             : 
     247             :         // Default Constructor
     248             :         FacadeGeoCharacteristicsStruct() = default;
     249             : 
     250             :         // Member Constructor
     251        6168 :         FacadeGeoCharacteristicsStruct(Real64 const AzimuthRangeLow,
     252             :                                        Real64 const AzimuthRangeHi,
     253             :                                        Real64 const Zmax,
     254             :                                        Real64 const Zmin,
     255             :                                        Real64 const Ymax,
     256             :                                        Real64 const Ymin,
     257             :                                        Real64 const Xmax,
     258             :                                        Real64 const Xmin,
     259             :                                        Real64 const Area,
     260             :                                        Real64 const Perimeter,
     261             :                                        Real64 const Height)
     262        6168 :             : AzimuthRangeLow(AzimuthRangeLow), AzimuthRangeHi(AzimuthRangeHi), Zmax(Zmax), Zmin(Zmin), Ymax(Ymax), Ymin(Ymin), Xmax(Xmax),
     263        6168 :               Xmin(Xmin), Area(Area), Perimeter(Perimeter), Height(Height)
     264             :         {
     265        6168 :         }
     266             :     };
     267             : 
     268             :     // Functions
     269             : 
     270             :     void InitInteriorConvectionCoeffs(EnergyPlusData &state,
     271             :                                       const Array1D<Real64> &SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
     272             :                                       Optional_int_const ZoneToResimulate = _     // if passed in, then only calculate surfaces that have this zone
     273             :     );
     274             : 
     275             :     void InitExteriorConvectionCoeff(EnergyPlusData &state,
     276             :                                      int SurfNum,                              // Surface number (in Surface derived type)
     277             :                                      Real64 HMovInsul,                         // Equivalent convection coefficient of movable insulation
     278             :                                      DataSurfaces::SurfaceRoughness Roughness, // Roughness index (1-6), see DataHeatBalance parameters
     279             :                                      Real64 AbsExt,                            // Exterior thermal absorptance
     280             :                                      Real64 TempExt,                           // Exterior surface temperature (C)
     281             :                                      Real64 &HExt,                             // Convection coefficient to exterior air
     282             :                                      Real64 &HSky,                             // "Convection" coefficient to sky temperature
     283             :                                      Real64 &HGround,                          // "Convection" coefficient to ground temperature
     284             :                                      Real64 &HAir                              // Radiation to Air Component
     285             :     );
     286             : 
     287             :     Real64 CalcHfExteriorSparrow(Real64 SurfWindSpeed,                     // Local wind speed at height of the heat transfer surface (m/s)
     288             :                                  Real64 GrossArea,                         // Gross surface area {m2}
     289             :                                  Real64 Perimeter,                         // Surface perimeter length {m}
     290             :                                  Real64 CosTilt,                           // Cosine of the Surface Tilt Angle
     291             :                                  Real64 Azimuth,                           // Facing angle (degrees) of the surface outward normal
     292             :                                  DataSurfaces::SurfaceRoughness Roughness, // Surface roughness index
     293             :                                  Real64 WindDirection                      // Wind (compass) direction (degrees)
     294             :     );
     295             : 
     296             :     bool Windward(Real64 CosTilt,      // Cosine of the surface tilt angle
     297             :                   Real64 Azimuth,      // or Facing, Direction the surface outward normal faces (degrees)
     298             :                   Real64 WindDirection // Wind direction measured clockwise from geographhic North
     299             :     );
     300             : 
     301             :     void GetUserConvectionCoefficients(EnergyPlusData &state);
     302             : 
     303             :     void ApplyConvectionValue(EnergyPlusData &state, std::string const &SurfaceTypes, std::string const &ConvectionType, int Value);
     304             : 
     305             :     Real64 CalcASHRAESimpExtConvectCoeff(DataSurfaces::SurfaceRoughness Roughness, // Integer index for roughness, relates to parameter array indices
     306             :                                          Real64 SurfWindSpeed                      // Current wind speed, m/s
     307             :     );
     308             : 
     309             :     Real64 CalcASHRAESimpleIntConvCoeff(Real64 Tsurf, Real64 Tamb, Real64 cosTilt);
     310             : 
     311             :     void CalcASHRAESimpleIntConvCoeff(EnergyPlusData &state,
     312             :                                       int SurfNum,                  // surface number for which coefficients are being calculated
     313             :                                       Real64 SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     314             :                                       Real64 ZoneMeanAirTemperature // Mean Air Temperature of Zone
     315             :     );
     316             : 
     317             :     Real64 CalcASHRAETARPNatural(Real64 Tsurf, Real64 Tamb, Real64 cosTilt);
     318             : 
     319             :     void CalcASHRAEDetailedIntConvCoeff(EnergyPlusData &state,
     320             :                                         int SurfNum,                  // surface number for which coefficients are being calculated
     321             :                                         Real64 SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     322             :                                         Real64 ZoneMeanAirTemperature // Mean Air Temperature of Zone
     323             :     );
     324             : 
     325             :     void CalcDetailedHcInForDVModel(EnergyPlusData &state,
     326             :                                     int SurfNum,                                // surface number for which coefficients are being calculated
     327             :                                     const Array1D<Real64> &SurfaceTemperatures, // Temperature of surfaces for evaluation of HcIn
     328             :                                     Array1D<Real64> &HcIn,                      // Interior Convection Coeff Array
     329             :                                     Optional<Array1S<Real64> const> Vhc = _     // Velocity array for forced convection coeff calculation
     330             :     );
     331             : 
     332             :     Real64 CalcZoneSupplyAirTemp(EnergyPlusData &state, int ZoneNum);
     333             : 
     334             :     Real64 CalcZoneSystemVolFlowRate(EnergyPlusData &state, int ZoneNum);
     335             : 
     336             :     Real64 CalcZoneSystemACH(EnergyPlusData &state, int ZoneNum);
     337             : 
     338             :     Real64 CalcCeilingDiffuserACH(EnergyPlusData &state, int ZoneNum);
     339             : 
     340             :     Real64 CalcCeilingDiffuserIntConvCoeff(EnergyPlusData &state,
     341             :                                            Real64 ACH, // [1/hr] air system air change rate
     342             :                                            Real64 Tsurf,
     343             :                                            Real64 Tair,
     344             :                                            Real64 cosTilt,
     345             :                                            Real64 humRat,
     346             :                                            Real64 height,
     347             :                                            bool isWindow = false);
     348             : 
     349             :     void CalcCeilingDiffuserIntConvCoeff(EnergyPlusData &state,
     350             :                                          int ZoneNum,
     351             :                                          const Array1D<Real64> &SurfaceTemperatures); // zone number for which coefficients are being calculated
     352             : 
     353             :     // CalcCeilingDiffuserInletCorr should replace CalcCeilingDiffuser (above), if ZoneTempPredictorCorrector can
     354             :     // ever be made to work correctly with the inlet air temperature.
     355             : 
     356             :     void CalcCeilingDiffuserInletCorr(EnergyPlusData &state,
     357             :                                       int ZoneNum,                         // Zone number
     358             :                                       Array1D<Real64> &SurfaceTemperatures // For CalcASHRAEDetailed, if called
     359             :     );
     360             : 
     361             :     void CalcTrombeWallIntConvCoeff(EnergyPlusData &state,
     362             :                                     int ZoneNum,                               // Zone number for which coefficients are being calculated
     363             :                                     const Array1D<Real64> &SurfaceTemperatures // Temperature of surfaces for evaluation of HcIn
     364             :     );
     365             : 
     366             :     void CalcNusselt(EnergyPlusData &state,
     367             :                      int SurfNum, // Surface number
     368             :                      Real64 asp,  // Aspect ratio: window height to gap width
     369             :                      Real64 tso,  // Temperature of gap surface closest to outside (K)
     370             :                      Real64 tsi,  // Temperature of gap surface closest to zone (K)
     371             :                      Real64 gr,   // Gap gas Grashof number
     372             :                      Real64 pr,   // Gap gas Prandtl number
     373             :                      Real64 &gnu  // Gap gas Nusselt number
     374             :     );
     375             : 
     376             :     Real64 SetExtConvectionCoeff(EnergyPlusData &state, int SurfNum); // Surface Number
     377             : 
     378             :     Real64 SetIntConvectionCoeff(EnergyPlusData &state, int SurfNum); // Surface Number
     379             : 
     380             :     Real64 CalcISO15099WindowIntConvCoeff(EnergyPlusData &state,
     381             :                                           Real64 SurfaceTemperature, // Temperature of surface for evaluation of HcIn
     382             :                                           Real64 AirTemperature,     // Mean Air Temperature of Zone (or adjacent air temperature)
     383             :                                           Real64 AirHumRat,          // air humidity ratio
     384             :                                           Real64 Height,             // window cavity height [m]
     385             :                                           Real64 TiltDeg,            // glazing tilt in degrees
     386             :                                           Real64 sineTilt            // sine of glazing tilt
     387             :     );
     388             : 
     389             :     void CalcISO15099WindowIntConvCoeff(EnergyPlusData &state,
     390             :                                         int SurfNum,               // surface number for which coefficients are being calculated
     391             :                                         Real64 SurfaceTemperature, // Temperature of surface for evaluation of HcIn
     392             :                                         Real64 AirTemperature      // Mean Air Temperature of Zone (or adjacent air temperature)
     393             :     );
     394             : 
     395             :     RoofGeoCharacteristicsStruct getRoofGeometryInformation(EnergyPlusData &state);
     396             : 
     397             :     void SetupAdaptiveConvectionStaticMetaData(EnergyPlusData &state);
     398             : 
     399             :     void SetupAdaptiveConvectionRadiantSurfaceData(EnergyPlusData &state);
     400             : 
     401             :     void ManageInsideAdaptiveConvectionAlgo(EnergyPlusData &state, int SurfNum); // surface number for which coefficients are being calculated
     402             : 
     403             :     void ManageOutsideAdaptiveConvectionAlgo(EnergyPlusData &state,
     404             :                                              int SurfNum, // surface number for which coefficients are being calculated
     405             :                                              Real64 &Hc   // result for Hc Outside face, becomes HExt.
     406             :     );
     407             : 
     408             :     void EvaluateIntHcModels(EnergyPlusData &state,
     409             :                              int SurfNum,
     410             :                              int ConvModelEquationNum,
     411             :                              Real64 &Hc // calculated Hc value
     412             :     );
     413             : 
     414             :     void EvaluateExtHcModels(EnergyPlusData &state, int SurfNum, int NaturalConvModelEqNum, int ForcedConvModelEqNum, Real64 &Hc);
     415             : 
     416             :     void DynamicExtConvSurfaceClassification(EnergyPlusData &state, int SurfNum); // surface number
     417             : 
     418             :     void MapExtConvClassificationToHcModels(EnergyPlusData &state, int SurfNum); // surface number
     419             : 
     420             :     void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int SurfNum); // surface number
     421             : 
     422             :     void MapIntConvClassificationToHcModels(EnergyPlusData &state, int SurfNum); // surface pointer index
     423             : 
     424             :     void CalcUserDefinedInsideHcModel(EnergyPlusData &state, int SurfNum, int UserCurveNum, Real64 &Hc);
     425             : 
     426             :     void CalcUserDefinedOutsideHcModel(EnergyPlusData &state, int SurfNum, int UserCurveNum, Real64 &H);
     427             : 
     428             :     //** Begin catalog of Hc equation functions. **** !*************************************************
     429             : 
     430    11086954 :     inline Real64 CalcASHRAEVerticalWall(Real64 const DeltaTemp) // [C] temperature difference between surface and air
     431             :     {
     432             : 
     433             :         // FUNCTION INFORMATION:
     434             :         //       AUTHOR         Brent Griffith
     435             :         //       DATE WRITTEN   Aug 2010
     436             :         //       MODIFIED       na
     437             :         //       RE-ENGINEERED  na
     438             : 
     439             :         // PURPOSE OF THIS FUNCTION:
     440             :         // Calculate the model equation attributed to ASHRAE for vertical walls for natural convection
     441             : 
     442             :         // REFERENCES:
     443             :         // 2.  ASHRAE Handbook of Fundamentals 2001, p. 3.12, Table 5.
     444             : 
     445    11086954 :         return 1.31 * std::pow(std::abs(DeltaTemp), ConvectionConstants::OneThird);
     446             :     }
     447             : 
     448   114806328 :     inline Real64 CalcWaltonUnstableHorizontalOrTilt(Real64 const DeltaTemp, // [C] temperature difference between surface and air
     449             :                                                      Real64 const CosineTilt // Cosine of tilt angle
     450             :     )
     451             :     {
     452             : 
     453             :         // FUNCTION INFORMATION:
     454             :         //       AUTHOR         Brent Griffith
     455             :         //       DATE WRITTEN   Aug 2010
     456             :         //       MODIFIED       na
     457             :         //       RE-ENGINEERED  na
     458             : 
     459             :         // PURPOSE OF THIS FUNCTION:
     460             :         // Calculate the model equation attributed to Walton's TARP program for horizontal
     461             :         // and tilted surfaces with enhanced, thermally unstable natural convection
     462             : 
     463             :         // METHODOLOGY EMPLOYED:
     464             : 
     465             :         // REFERENCES:
     466             :         // 1.  Walton, G. N. 1983. Thermal Analysis Research Program (TARP) Reference Manual,
     467             :         //     NBSSIR 83-2655, National Bureau of Standards, "Surface Inside Heat Balances", pp 79-80.
     468             : 
     469   114806328 :         return 9.482 * std::pow(std::abs(DeltaTemp), ConvectionConstants::OneThird) / (7.238 - std::abs(CosineTilt));
     470             :     }
     471             : 
     472    92652210 :     inline Real64 CalcWaltonStableHorizontalOrTilt(Real64 const DeltaTemp, // [C] temperature difference between surface and air
     473             :                                                    Real64 const CosineTilt // Cosine of tilt angle
     474             :     )
     475             :     {
     476             : 
     477             :         // FUNCTION INFORMATION:
     478             :         //       AUTHOR         Brent Griffith
     479             :         //       DATE WRITTEN   Aug 2010
     480             :         //       MODIFIED       na
     481             :         //       RE-ENGINEERED  na
     482             : 
     483             :         // PURPOSE OF THIS FUNCTION:
     484             :         // Calculate the model equation attributed to Walton's TARP program for horizontal
     485             :         // and tilted surfaces with reduced, thermally stable natural convection
     486             : 
     487             :         // REFERENCES:
     488             :         // 1.  Walton, G. N. 1983. Thermal Analysis Research Program (TARP) Reference Manual,
     489             :         //     NBSSIR 83-2655, National Bureau of Standards, "Surface Inside Heat Balances", pp 79-80.
     490             : 
     491    92652210 :         return 1.810 * std::pow(std::abs(DeltaTemp), ConvectionConstants::OneThird) / (1.382 + std::abs(CosineTilt));
     492             :     }
     493             : 
     494             :     Real64 CalcFisherPedersenCeilDiffuserFloor(EnergyPlusData &state,
     495             :                                                Real64 ACH, // [1/hr] air system air change rate
     496             :                                                Real64 Tsurf,
     497             :                                                Real64 Tair,
     498             :                                                Real64 cosTilt,
     499             :                                                Real64 humRat,
     500             :                                                Real64 height,
     501             :                                                bool isWindow = false);
     502             : 
     503             :     Real64 CalcFisherPedersenCeilDiffuserCeiling(EnergyPlusData &state,
     504             :                                                  Real64 ACH, // [1/hr] air system air change rate
     505             :                                                  Real64 Tsurf,
     506             :                                                  Real64 Tair,
     507             :                                                  Real64 cosTilt,
     508             :                                                  Real64 humRat,
     509             :                                                  Real64 height,
     510             :                                                  bool isWindow = false);
     511             : 
     512             :     Real64 CalcFisherPedersenCeilDiffuserWalls(EnergyPlusData &state,
     513             :                                                Real64 ACH, // [1/hr] air system air change rate
     514             :                                                Real64 Tsurf,
     515             :                                                Real64 Tair,
     516             :                                                Real64 cosTilt,
     517             :                                                Real64 humRat,
     518             :                                                Real64 height,
     519             :                                                bool isWindow = false);
     520             : 
     521             :     Real64 CalcFisherPedersenCeilDiffuserNatConv(
     522             :         EnergyPlusData &state, Real64 Hforced, Real64 ACH, Real64 Tsurf, Real64 Tair, Real64 cosTilt, Real64 humRat, Real64 height, bool isWindow);
     523             : 
     524             :     Real64 CalcAlamdariHammondUnstableHorizontal(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     525             :                                                  Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     526             :     );
     527             : 
     528             :     Real64 CalcAlamdariHammondUnstableHorizontal(EnergyPlusData &state,
     529             :                                                  Real64 DeltaTemp,         // [C] temperature difference between surface and air
     530             :                                                  Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     531             :                                                  int SurfNum               // for messages
     532             :     );
     533             : 
     534             :     Real64 CalcAlamdariHammondStableHorizontal(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     535             :                                                Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     536             :     );
     537             : 
     538             :     Real64 CalcAlamdariHammondStableHorizontal(EnergyPlusData &state,
     539             :                                                Real64 DeltaTemp,         // [C] temperature difference between surface and air
     540             :                                                Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     541             :                                                int SurfNum               // for messages
     542             :     );
     543             : 
     544             :     Real64 CalcAlamdariHammondVerticalWall(Real64 DeltaTemp, // [C] temperature difference between surface and air
     545             :                                            Real64 Height     // [m] characteristic size, = zone height
     546             :     );
     547             : 
     548             :     Real64 CalcAlamdariHammondVerticalWall(EnergyPlusData &state,
     549             :                                            Real64 DeltaTemp, // [C] temperature difference between surface and air
     550             :                                            Real64 Height,    // [m] characteristic size, = zone height
     551             :                                            int SurfNum       // for messages
     552             :     );
     553             : 
     554             :     Real64 CalcKhalifaEq3WallAwayFromHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     555             : 
     556             :     Real64 CalcKhalifaEq4CeilingAwayFromHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     557             : 
     558             :     Real64 CalcKhalifaEq5WallsNearHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     559             : 
     560             :     Real64 CalcKhalifaEq6NonHeatedWalls(Real64 DeltaTemp); // [C] temperature difference between surface and air
     561             : 
     562             :     Real64 CalcKhalifaEq7Ceiling(Real64 DeltaTemp); // [C] temperature difference between surface and air
     563             : 
     564             :     Real64 CalcAwbiHattonHeatedFloor(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     565             :                                      Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     566             :     );
     567             : 
     568             :     Real64 CalcAwbiHattonHeatedWall(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     569             :                                     Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     570             :     );
     571             : 
     572             :     Real64 CalcBeausoleilMorrisonMixedAssistedWall(Real64 DeltaTemp,     // [C] temperature difference between surface and air
     573             :                                                    Real64 Height,        // [m] characteristic size
     574             :                                                    Real64 SurfTemp,      // [C] surface temperature
     575             :                                                    Real64 SupplyAirTemp, // [C] temperature of supply air into zone
     576             :                                                    Real64 AirChangeRate  // [ACH] [1/hour] supply air ACH for zone
     577             :     );
     578             : 
     579             :     Real64 CalcBeausoleilMorrisonMixedAssistedWall(EnergyPlusData &state,
     580             :                                                    Real64 DeltaTemp, // [C] temperature difference between surface and air
     581             :                                                    Real64 Height,    // [m] characteristic size
     582             :                                                    Real64 SurfTemp,  // [C] surface temperature
     583             :                                                    int ZoneNum       // index of zone for messaging
     584             :     );
     585             : 
     586             :     Real64 CalcBeausoleilMorrisonMixedOpposingWall(Real64 DeltaTemp,     // [C] temperature difference between surface and air
     587             :                                                    Real64 Height,        // [m] characteristic size
     588             :                                                    Real64 SurfTemp,      // [C] surface temperature
     589             :                                                    Real64 SupplyAirTemp, // [C] temperature of supply air into zone
     590             :                                                    Real64 AirChangeRate  // [ACH] [1/hour] supply air ACH for zone
     591             :     );
     592             : 
     593             :     Real64 CalcBeausoleilMorrisonMixedOpposingWall(EnergyPlusData &state,
     594             :                                                    Real64 DeltaTemp, // [C] temperature difference between surface and air
     595             :                                                    Real64 Height,    // [m] characteristic size
     596             :                                                    Real64 SurfTemp,  // [C] surface temperature
     597             :                                                    int ZoneNum       // index of zone for messaging
     598             :     );
     599             : 
     600             :     Real64 CalcBeausoleilMorrisonMixedStableFloor(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     601             :                                                   Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     602             :                                                   Real64 SurfTemp,          // [C] surface temperature
     603             :                                                   Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     604             :                                                   Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     605             :     );
     606             : 
     607             :     Real64 CalcBeausoleilMorrisonMixedStableFloor(EnergyPlusData &state,
     608             :                                                   Real64 DeltaTemp,         // [C] temperature difference between surface and air
     609             :                                                   Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     610             :                                                   Real64 SurfTemp,          // [C] surface temperature
     611             :                                                   int ZoneNum               // index of zone for messaging
     612             :     );
     613             : 
     614             :     Real64 CalcBeausoleilMorrisonMixedUnstableFloor(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     615             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     616             :                                                     Real64 SurfTemp,          // [C] surface temperature
     617             :                                                     Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     618             :                                                     Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     619             :     );
     620             : 
     621             :     Real64 CalcBeausoleilMorrisonMixedUnstableFloor(EnergyPlusData &state,
     622             :                                                     Real64 DeltaTemp,         // [C] temperature difference between surface and air
     623             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     624             :                                                     Real64 SurfTemp,          // [C] surface temperature
     625             :                                                     int ZoneNum               // index of zone for messaging
     626             :     );
     627             : 
     628             :     Real64 CalcBeausoleilMorrisonMixedStableCeiling(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     629             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     630             :                                                     Real64 SurfTemp,          // [C] surface temperature
     631             :                                                     Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     632             :                                                     Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     633             :     );
     634             : 
     635             :     Real64 CalcBeausoleilMorrisonMixedStableCeiling(EnergyPlusData &state,
     636             :                                                     Real64 DeltaTemp,         // [C] temperature difference between surface and air
     637             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     638             :                                                     Real64 SurfTemp,          // [C] surface temperature
     639             :                                                     int ZoneNum               // index of zone for messaging
     640             :     );
     641             : 
     642             :     Real64 CalcBeausoleilMorrisonMixedUnstableCeiling(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     643             :                                                       Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     644             :                                                       Real64 SurfTemp,          // [C] surface temperature
     645             :                                                       Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     646             :                                                       Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     647             :     );
     648             : 
     649             :     Real64 CalcBeausoleilMorrisonMixedUnstableCeiling(EnergyPlusData &state,
     650             :                                                       Real64 DeltaTemp,         // [C] temperature difference between surface and air
     651             :                                                       Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     652             :                                                       Real64 SurfTemp,          // [C] surface temperature
     653             :                                                       int ZoneNum               // index of zone for messaging
     654             :     );
     655             : 
     656             :     Real64 CalcFohannoPolidoriVerticalWall(Real64 DeltaTemp, // [C] temperature difference between surface and air
     657             :                                            Real64 Height,    // [m] characteristic size, height of zone
     658             :                                            Real64 SurfTemp,  // [C] surface temperature
     659             :                                            Real64 QdotConv   // [W/m2] heat flux rate for rayleigh #
     660             :     );
     661             : 
     662             :     Real64 CallCalcFohannoPolidoriVerticalWall(EnergyPlusData &state,
     663             :                                                Real64 DeltaTemp, // [C] temperature difference between surface and air
     664             :                                                Real64 Height,    // [m] characteristic size, height of zone
     665             :                                                Real64 SurfTemp,  // [C] surface temperature
     666             :                                                Real64 QdotConv,  // [W/m2] heat flux rate for rayleigh #
     667             :                                                int SurfNum       // for messages
     668             :     );
     669             : 
     670             :     Real64 CalcKaradagChilledCeiling(Real64 DeltaTemp); // [C] temperature difference between surface and air
     671             : 
     672             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWindow(Real64 AirSystemFlowRate,  // [m3/s] air system flow rate
     673             :                                                        Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     674             :                                                        Real64 WindWallRatio,      // [ ] fraction of window area to wall area for zone
     675             :                                                        ConvectionConstants::InConvWinLoc WindowLocationType // index for location types
     676             :     );
     677             : 
     678             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWindow(EnergyPlusData &state,
     679             :                                                        Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     680             :                                                        Real64 WindWallRatio,      // [ ] fraction of window area to wall area for zone
     681             :                                                        ConvectionConstants::InConvWinLoc WindowLocationType, // index for location types
     682             :                                                        int ZoneNum                                           // for messages
     683             :     );
     684             : 
     685             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWall(Real64 AirSystemFlowRate,  // [m3/s] air system flow rate
     686             :                                                      Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     687             :                                                      ConvectionConstants::InConvWinLoc WindowLocationType // index for location types
     688             :     );
     689             : 
     690             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWall(EnergyPlusData &state,
     691             :                                                      Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     692             :                                                      ConvectionConstants::InConvWinLoc WindowLocationType, // index for location types
     693             :                                                      int ZoneNum                                           // for messages
     694             :     );
     695             : 
     696             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserFloor(Real64 AirSystemFlowRate, // [m3/s] air system flow rate
     697             :                                                       Real64 ZoneExtPerimLength // [m] length of zone perimeter with exterior walls
     698             :     );
     699             : 
     700             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserFloor(EnergyPlusData &state,
     701             :                                                       Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     702             :                                                       int ZoneNum                // for messages
     703             :     );
     704             : 
     705             :     Real64 CalcSparrowWindward(DataSurfaces::SurfaceRoughness RoughnessIndex, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ);
     706             : 
     707             :     Real64 CalcSparrowWindward(
     708             :         EnergyPlusData &state, DataSurfaces::SurfaceRoughness RoughnessIndex, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ, int SurfNum);
     709             : 
     710             :     Real64 CalcSparrowLeeward(DataSurfaces::SurfaceRoughness RoughnessIndex, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ);
     711             : 
     712             :     Real64 CalcSparrowLeeward(
     713             :         EnergyPlusData &state, DataSurfaces::SurfaceRoughness RoughnessIndex, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ, int SurfNum);
     714             : 
     715             :     Real64 CalcMoWITTNatural(Real64 DeltaTemp);
     716             : 
     717             :     Real64 CalcMoWITTForcedWindward(Real64 WindAtZ);
     718             : 
     719             :     Real64 CalcMoWITTForcedLeeward(Real64 WindAtZ);
     720             : 
     721             :     Real64 CalcMoWITTWindward(Real64 DeltaTemp, Real64 WindAtZ);
     722             : 
     723             :     Real64 CalcMoWITTLeeward(Real64 DeltaTemp, Real64 WindAtZ);
     724             : 
     725             :     Real64 CalcDOE2Forced(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 HfSmooth, DataSurfaces::SurfaceRoughness RoughnessIndex);
     726             : 
     727             :     Real64 CalcDOE2Windward(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 WindAtZ, DataSurfaces::SurfaceRoughness RoughnessIndex);
     728             : 
     729             :     Real64 CalcDOE2Leeward(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 WindAtZ, DataSurfaces::SurfaceRoughness RoughnessIndex);
     730             : 
     731             :     Real64 CalcNusseltJurges(Real64 WindAtZ);
     732             : 
     733             :     Real64 CalcMcAdams(Real64 WindAtZ);
     734             : 
     735             :     Real64 CalcMitchell(Real64 WindAtZ, Real64 LengthScale);
     736             : 
     737             :     Real64 CalcMitchell(EnergyPlusData &state, Real64 WindAtZ, Real64 LengthScale, int SurfNum);
     738             : 
     739             :     Real64 CalcBlockenWindward(EnergyPlusData &state,
     740             :                                Real64 WindAt10m,
     741             :                                Real64 WindDir,     // Wind direction measured clockwise from geographic North
     742             :                                Real64 SurfAzimuth, // or Facing, Direction the surface outward normal faces (degrees)
     743             :                                int SurfNum);
     744             : 
     745             :     Real64 CalcWindSurfaceTheta(Real64 const WindDir, Real64 const SurfAzimuth);
     746             : 
     747             :     Real64 CalcEmmelVertical(Real64 WindAt10m,
     748             :                              Real64 WindDir,      // Wind direction measured clockwise from geographic North
     749             :                              Real64 SurfAzimuth); // or Facing, Direction the surface outward normal faces (degrees)
     750             : 
     751             :     Real64 CalcEmmelRoof(Real64 WindAt10m,
     752             :                          Real64 WindDir,                 // Wind direction measured clockwise from geographic North
     753             :                          Real64 LongAxisOutwardAzimuth); // or Facing, Direction the surface outward normal faces (degrees)
     754             : 
     755             :     Real64 CalcClearRoof(EnergyPlusData &state,
     756             :                          Real64 AirTemp,
     757             :                          Real64 WindAtZ,
     758             :                          Real64 WindDirect, // Wind direction measured clockwise from geographic North
     759             :                          Real64 RoofArea,
     760             :                          Real64 RoofPerimeter,
     761             :                          DataSurfaces::SurfaceRoughness RoughnessIndex);
     762             : 
     763             :     Real64 CalcClearRoof(EnergyPlusData &state,
     764             :                          int SurfNum,
     765             :                          Real64 SurfTemp,
     766             :                          Real64 AirTemp,
     767             :                          Real64 WindAtZ,
     768             :                          Real64 WindDirect, // Wind direction measured clockwise from geographic North
     769             :                          Real64 RoofArea,
     770             :                          Real64 RoofPerimeter);
     771             : 
     772             :     void CalcASTMC1340ConvCoeff(EnergyPlusData &state,
     773             :                                 int const SurfNum,                  // surface number for which coefficients are being calculated
     774             :                                 Real64 const SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     775             :                                 Real64 const ZoneMeanAirTemperature // Mean Air Temperature of Zone
     776             :     );
     777             : 
     778             :     Real64
     779             :     CalcASTMC1340ConvCoeff(EnergyPlusData &state, int const SurfNum, Real64 const Tsurf, Real64 const Tair, Real64 const Vair, Real64 const Tilt);
     780             : 
     781             :     ConvectionConstants::SurfConvOrientation GetSurfConvOrientation(Real64 const Tilt);
     782             : 
     783             : } // namespace ConvectionCoefficients
     784             : 
     785        1542 : struct ConvectionCoefficientsData : BaseGlobalStruct
     786             : {
     787             : 
     788             :     bool GetUserSuppliedConvectionCoeffs = true;  // Get user input first call for Init
     789             :     Real64 CubeRootOfOverallBuildingVolume = 0.0; // building meta data. cube root of the volume of all the zones
     790             :     Real64 RoofLongAxisOutwardAzimuth = 0.0;      // roof surfaces meta data. outward normal azimuth for longest roof edge
     791             : 
     792             :     int BMMixedAssistedWallErrorIDX1 = 0;
     793             :     int BMMixedAssistedWallErrorIDX2 = 0;
     794             :     int BMMixedOpposingWallErrorIDX1 = 0;
     795             :     int BMMixedOpposingWallErrorIDX2 = 0;
     796             :     int BMMixedStableFloorErrorIDX1 = 0;
     797             :     int BMMixedStableFloorErrorIDX2 = 0;
     798             :     int BMMixedUnstableFloorErrorIDX1 = 0;
     799             :     int BMMixedUnstableFloorErrorIDX2 = 0;
     800             :     int BMMixedStableCeilingErrorIDX1 = 0;
     801             :     int BMMixedStableCeilingErrorIDX2 = 0;
     802             :     int BMMixedUnstableCeilingErrorIDX1 = 0;
     803             :     int BMMixedUnstableCeilingErrorIDX2 = 0;
     804             :     int AHUnstableHorizontalErrorIDX = 0;
     805             :     int AHStableHorizontalErrorIDX = 0;
     806             :     int AHVerticalWallErrorIDX = 0;
     807             :     int CalcFohannoPolidoriVerticalWallErrorIDX = 0;
     808             :     int CalcGoldsteinNovoselacCeilingDiffuserWindowErrorIDX1 = 0;
     809             :     int CalcGoldsteinNovoselacCeilingDiffuserWindowErrorIDX2 = 0;
     810             :     int CalcGoldsteinNovoselacCeilingDiffuserWallErrorIDX1 = 0;
     811             :     int CalcGoldsteinNovoselacCeilingDiffuserWallErrorIDX2 = 0;
     812             :     int CalcGoldsteinNovoselacCeilingDiffuserFloorErrorIDX = 0;
     813             :     int CalcSparrowWindwardErrorIDX = 0;
     814             :     int CalcSparrowLeewardErrorIDX = 0;
     815             :     int CalcBlockenWindwardErrorIDX = 0;
     816             :     int CalcClearRoofErrorIDX = 0;
     817             :     int CalcMitchellErrorIDX = 0;
     818             : 
     819             :     // move random statics so they can be reset for unit tests
     820             :     bool NodeCheck = true;
     821             :     bool ActiveSurfaceCheck = true;
     822             :     bool MyEnvirnFlag = true;
     823             :     bool FirstRoofSurf = true;
     824             :     int ActiveWallCount = 0;
     825             :     Real64 ActiveWallArea = 0.0;
     826             :     int ActiveCeilingCount = 0;
     827             :     Real64 ActiveCeilingArea = 0.0;
     828             :     int ActiveFloorCount = 0;
     829             :     Real64 ActiveFloorArea = 0.0;
     830             : 
     831             :     // Object Data
     832             :     ConvectionCoefficients::InsideFaceAdaptiveConvAlgoStruct InsideFaceAdaptiveConvectionAlgo; // stores rules for Hc model equations
     833             :     ConvectionCoefficients::OutsideFaceAdaptiveConvAlgoStruct OutsideFaceAdaptiveConvectionAlgo;
     834             :     Array1D<ConvectionCoefficients::HcInsideFaceUserCurveStruct> HcInsideUserCurve;
     835             :     Array1D<ConvectionCoefficients::HcOutsideFaceUserCurveStruct> HcOutsideUserCurve;
     836             :     ConvectionCoefficients::RoofGeoCharacteristicsStruct RoofGeo;
     837             : 
     838             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct NorthFacade = {332.5, 22.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     839             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct NorthEastFacade = {22.5, 67.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     840             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct EastFacade = {67.5, 112.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     841             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct SouthEastFacade = {112.5, 157.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     842             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct SouthFacade = {157.5, 202.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     843             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct SouthWestFacade = {202.5, 247.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     844             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct WestFacade = {247.5, 287.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     845             :     ConvectionCoefficients::FacadeGeoCharacteristicsStruct NorthWestFacade = {287.5, 332.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
     846             : 
     847           0 :     void clear_state() override
     848             :     {
     849           0 :         *this = ConvectionCoefficientsData();
     850           0 :     }
     851             : };
     852             : 
     853             : } // namespace EnergyPlus
     854             : 
     855             : #endif

Generated by: LCOV version 1.13