LCOV - code coverage report
Current view: top level - EnergyPlus - ConvectionCoefficients.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 8 11 72.7 %
Date: 2024-08-24 18:31:18 Functions: 4 5 80.0 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2024, 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/EnergyPlus.hh>
      62             : #include <EnergyPlus/UtilityRoutines.hh>
      63             : 
      64             : namespace EnergyPlus {
      65             : 
      66             : // Forward declarations
      67             : struct EnergyPlusData;
      68             : 
      69             : namespace Convect {
      70             : 
      71             :     struct HcIntUserCurve
      72             :     {
      73             :         // Members
      74             :         std::string Name; // user's name for object
      75             :         RefTemp refTempType = RefTemp::Invalid;
      76             :         int hcFnTempDiffCurveNum = 0;
      77             :         int hcFnTempDiffDivHeightCurveNum = 0;
      78             :         int hcFnACHCurveNum = 0;
      79             :         int hcFnACHDivPerimLengthCurveNum = 0;
      80             :     };
      81             : 
      82             :     struct HcExtUserCurve
      83             :     {
      84             :         // Members
      85             :         std::string Name;
      86             :         RefTemp refTempType = RefTemp::Invalid;
      87             :         bool suppressRainChange = false;
      88             :         RefWind windSpeedType = RefWind::Invalid;
      89             :         int hfFnWindSpeedCurveNum = 0;
      90             :         int hnFnTempDiffCurveNum = 0;
      91             :         int hnFnTempDiffDivHeightCurveNum = 0;
      92             :     };
      93             : 
      94             :     struct IntAdaptiveConvAlgo
      95             :     {
      96             :         // Members
      97             :         std::string Name;
      98             : 
      99             :         std::array<HcInt, static_cast<int>(IntConvClass::Num)> intConvClassEqNums = {
     100             :             HcInt::FohannoPolidoriVerticalWall,             // A3_SimpleBuoy_VertWalls
     101             :             HcInt::AlamdariHammondStableHorizontal,         // A3_SimpleBuoy_StableHoriz
     102             :             HcInt::AlamdariHammondUnstableHorizontal,       // A3_SimpleBuoy_UnstableHoriz
     103             :             HcInt::WaltonStableHorizontalOrTilt,            // A3_SimpleBuoy_StableTilted
     104             :             HcInt::WaltonUnstableHorizontalOrTilt,          // A3_SimpleBuoy_UnstableTilted
     105             :             HcInt::ISO15099Windows,                         // A3_SimpleBuoy_Windows
     106             :             HcInt::KhalifaEq3WallAwayFromHeat,              // A1_FloorHeatCeilingCool_VertWalls
     107             :             HcInt::AlamdariHammondStableHorizontal,         // A1_FloorHeatCeilingCool_StableHoriz
     108             :             HcInt::KhalifaEq4CeilingAwayFromHeat,           // A1_FloorHeatCeilingCool_UnstableHoriz
     109             :             HcInt::AwbiHattonHeatedFloor,                   // A1_FloorHeatCeilingCool_HeatedFloor
     110             :             HcInt::KaradagChilledCeiling,                   // A1_FloorHeatCeilingCool_ChilledCeil
     111             :             HcInt::WaltonStableHorizontalOrTilt,            // A1_FloorHeatCeilingCool_StableTilted
     112             :             HcInt::WaltonUnstableHorizontalOrTilt,          // A1_FloorHeatCeilingCool_UnstableTilted
     113             :             HcInt::ISO15099Windows,                         // A1_FloorHeatCeilingCool_Windows
     114             :             HcInt::KhalifaEq6NonHeatedWalls,                // A2_WallPanelHeat_VertWallsNonHeated
     115             :             HcInt::AwbiHattonHeatedWall,                    // A2_WallPanelHeat_HeatedVerticalWall
     116             :             HcInt::AlamdariHammondStableHorizontal,         // A2_WallPanelHeat_StableHoriz
     117             :             HcInt::KhalifaEq7Ceiling,                       // A2_WallPanelHeat_UnstableHoriz
     118             :             HcInt::WaltonStableHorizontalOrTilt,            // A2_WallPanelHeat_StableTilted
     119             :             HcInt::WaltonUnstableHorizontalOrTilt,          // A2_WallPanelHeat_UnstableTilted
     120             :             HcInt::ISO15099Windows,                         // A2_WallPanelHeat_Windows
     121             :             HcInt::FohannoPolidoriVerticalWall,             // B_ConvectiveHeat_VertWall
     122             :             HcInt::KhalifaEq5WallNearHeat,                  // B_ConvectiveHeat_VertWallNearHeater
     123             :             HcInt::AlamdariHammondStableHorizontal,         // B_ConvectiveHeat_StableHoriz
     124             :             HcInt::KhalifaEq7Ceiling,                       // B_ConvectiveHeat_UnstableHoriz
     125             :             HcInt::WaltonStableHorizontalOrTilt,            // B_ConvectiveHeat_StableTilted
     126             :             HcInt::WaltonUnstableHorizontalOrTilt,          // B_ConvectiveHeat_UnstableTilted
     127             :             HcInt::ISO15099Windows,                         // B_ConvectiveHeat_Windows
     128             :             HcInt::GoldsteinNovoselacCeilingDiffuserWalls,  // C_CentralAir_Walls
     129             :             HcInt::FisherPedersenCeilDiffuserCeiling,       // C_CentralAir_Ceiling
     130             :             HcInt::GoldsteinNovoselacCeilingDiffuserFloor,  // C_CentralAir_Floor
     131             :             HcInt::GoldsteinNovoselacCeilingDiffuserWindow, // C_CentralAir_Windows
     132             :             HcInt::KhalifaEq3WallAwayFromHeat,              // D_ZoneFanCirc_VertWall
     133             :             HcInt::AlamdariHammondStableHorizontal,         // D_ZoneFanCirc_StableHoriz
     134             :             HcInt::KhalifaEq4CeilingAwayFromHeat,           // D_ZoneFanCirc_UnstableHoriz
     135             :             HcInt::WaltonStableHorizontalOrTilt,            // D_ZoneFanCirc_StableTilted
     136             :             HcInt::WaltonUnstableHorizontalOrTilt,          // D_ZoneFanCirc_UnstableTilted
     137             :             HcInt::ISO15099Windows,                         // D_ZoneFanCirc_Windows
     138             :             HcInt::BeausoleilMorrisonMixedAssistingWall,    // E_MixedBuoy_AssistFlowWall
     139             :             HcInt::BeausoleilMorrisonMixedOppossingWall,    // E_MixedBuoy_OppositeFlowWall
     140             :             HcInt::BeausoleilMorrisonMixedStableFloor,      // E_MixedBuoy_StableFloor
     141             :             HcInt::BeausoleilMorrisonMixedUnstableFloor,    // E_MixedBuoy_UnstableFloor
     142             :             HcInt::BeausoleilMorrisonMixedStableCeiling,    // E_MixedBuoy_StableCeiling
     143             :             HcInt::BeausoleilMorrisonMixedUnstableCeiling,  // E_MixedBuoy_UnstableCeiling
     144             :             HcInt::GoldsteinNovoselacCeilingDiffuserWindow  // E_MixedBuoy_Windows
     145             :         };
     146             : 
     147             :         std::array<int, static_cast<int>(IntConvClass::Num)> intConvClassUserCurveNums = {
     148             :             0, // A3_SimpleBuoy_VertWalls
     149             :             0, // A3_SimpleBuoy_StableHoriz
     150             :             0, // A3_SimpleBuoy_UnstableHoriz
     151             :             0, // A3_SimpleBuoy_StableTilted
     152             :             0, // A3_SimpleBuoy_UnstableTilted
     153             :             0, // A3_SimpleBuoy_Windows
     154             :             0, // A1_FloorHeatCeilingCool_VertWalls
     155             :             0, // A1_FloorHeatCeilingCool_StableHoriz
     156             :             0, // A1_FloorHeatCeilingCool_UnstableHoriz
     157             :             0, // A1_FloorHeatCeilingCool_HeatedFloor
     158             :             0, // A1_FloorHeatCeilingCool_ChilledCeil
     159             :             0, // A1_FloorHeatCeilingCool_StableTilted
     160             :             0, // A1_FloorHeatCeilingCool_UnstableTilted
     161             :             0, // A1_FloorHeatCeilingCool_Windows
     162             :             0, // A2_WallPanelHeat_VertWallsNonHeated
     163             :             0, // A2_WallPanelHeat_HeatedVerticalWall
     164             :             0, // A2_WallPanelHeat_StableHoriz
     165             :             0, // A2_WallPanelHeat_UnstableHoriz
     166             :             0, // A2_WallPanelHeat_StableTilted
     167             :             0, // A2_WallPanelHeat_UnstableTilted
     168             :             0, // A2_WallPanelHeat_Windows
     169             :             0, // B_ConvectiveHeat_VertWall
     170             :             0, // B_ConvectiveHeat_VertWallNearHeater
     171             :             0, // B_ConvectiveHeat_StableHoriz
     172             :             0, // B_ConvectiveHeat_UnstableHoriz
     173             :             0, // B_ConvectiveHeat_StableTilted
     174             :             0, // B_ConvectiveHeat_UnstableTilted
     175             :             0, // B_ConvectiveHeat_Windows
     176             :             0, // C_CentralAir_Walls
     177             :             0, // C_CentralAir_Ceiling
     178             :             0, // C_CentralAir_Floor
     179             :             0, // C_CentralAir_Windows
     180             :             0, // D_ZoneFanCirc_VertWall
     181             :             0, // D_ZoneFanCirc_StableHoriz
     182             :             0, // D_ZoneFanCirc_UnstableHoriz
     183             :             0, // D_ZoneFanCirc_StableTilted
     184             :             0, // D_ZoneFanCirc_UnstableTilted
     185             :             0, // D_ZoneFanCirc_Windows
     186             :             0, // E_MixedBuoy_AssistFlowWall
     187             :             0, // E_MixedBuoy_OppositeFlowWall
     188             :             0, // E_MixedBuoy_StableFloor
     189             :             0, // E_MixedBuoy_UnstableFloor
     190             :             0, // E_MixedBuoy_StableCeiling
     191             :             0, // E_MixedBuoy_UnstableCeiling
     192             :             0  // E_MixedBuoy_Windows
     193             :         };
     194             :     };
     195             : 
     196             :     struct ExtAdaptiveConvAlgo
     197             :     {
     198             :         // Members
     199             :         std::string Name;
     200             :         bool suppressRainChange = false;
     201             : 
     202             :         std::array<HcExt, static_cast<int>(ExtConvClass2::Num)> extConvClass2EqNums = {
     203             :             HcExt::SparrowWindward,                      // WindConvection_WindwardWall
     204             :             HcExt::SparrowLeeward,                       // WindConvection_LeewardWall
     205             :             HcExt::ClearRoof,                            // WindConvection_HorizRoof
     206             :             HcExt::NaturalASHRAEVerticalWall,            // NaturalConvection_VertWall
     207             :             HcExt::NaturalWaltonStableHorizontalOrTilt,  // NaturalConvection_StableHorizOrTilt
     208             :             HcExt::NaturalWaltonUnstableHorizontalOrTilt // NaturalConvection_StableHorizOrTilt
     209             :         };
     210             : 
     211             :         std::array<int, static_cast<int>(ExtConvClass2::Num)> extConvClass2UserCurveNums = {
     212             :             0, // WindConvection_WindwardWall
     213             :             0, // WindConvection_LeewardWall
     214             :             0, // WindConvection_HorizRoof
     215             :             0, // NaturalConvection_VertWall
     216             :             0, // NaturalConvection_StableHorizOrTilt
     217             :             0  // NaturalConvection_StableHorizOrTilt
     218             :         };
     219             :     };
     220             : 
     221             :     // Functions
     222             : 
     223             :     void InitIntConvCoeff(EnergyPlusData &state,
     224             :                           const Array1D<Real64> &SurfaceTemperatures,        // Temperature of surfaces for evaluation of HcIn
     225             :                           ObjexxFCL::Optional_int_const ZoneToResimulate = _ // if passed in, then only calculate surfaces that have this zone
     226             :     );
     227             : 
     228             :     void InitExtConvCoeff(EnergyPlusData &state,
     229             :                           int SurfNum,                          // Surface number (in Surface derived type)
     230             :                           Real64 HMovInsul,                     // Equivalent convection coefficient of movable insulation
     231             :                           Material::SurfaceRoughness Roughness, // Roughness index (1-6), see DataHeatBalance parameters
     232             :                           Real64 AbsExt,                        // Exterior thermal absorptance
     233             :                           Real64 TempExt,                       // Exterior surface temperature (C)
     234             :                           Real64 &HExt,                         // Convection coefficient to exterior air
     235             :                           Real64 &HSky,                         // "Convection" coefficient to sky temperature
     236             :                           Real64 &HGround,                      // "Convection" coefficient to ground temperature
     237             :                           Real64 &HAir,                         // Radiation to Air Component
     238             :                           Real64 &HSrdSurf                      // Radiation to surrounding surfaces
     239             :     );
     240             : 
     241             :     Real64 SurroundingSurfacesRadCoeffAverage(EnergyPlusData &state,
     242             :                                               int const SurfNum,     // Surface number (in Surface derived type)
     243             :                                               Real64 const TempExtK, // Exterior surface temperature (K)
     244             :                                               Real64 const AbsExt    // Exterior thermal absorptance
     245             :     );
     246             : 
     247             :     Real64 CalcHfExteriorSparrow(Real64 SurfWindSpeed,                 // Local wind speed at height of the heat transfer surface (m/s)
     248             :                                  Real64 GrossArea,                     // Gross surface area {m2}
     249             :                                  Real64 Perimeter,                     // Surface perimeter length {m}
     250             :                                  Real64 CosTilt,                       // Cosine of the Surface Tilt Angle
     251             :                                  Real64 Azimuth,                       // Facing angle (degrees) of the surface outward normal
     252             :                                  Material::SurfaceRoughness Roughness, // Surface roughness index
     253             :                                  Real64 WindDirection                  // Wind (compass) direction (degrees)
     254             :     );
     255             : 
     256             :     bool Windward(Real64 CosTilt,      // Cosine of the surface tilt angle
     257             :                   Real64 Azimuth,      // or Facing, Direction the surface outward normal faces (degrees)
     258             :                   Real64 WindDirection // Wind direction measured clockwise from geographhic North
     259             :     );
     260             : 
     261             :     void GetUserConvCoeffs(EnergyPlusData &state);
     262             : 
     263             :     void ApplyIntConvValue(EnergyPlusData &state, int surfNum, HcInt model, int userNum);
     264             :     void ApplyExtConvValue(EnergyPlusData &state, int surfNum, HcExt model, int userNum);
     265             :     void ApplyIntConvValueMulti(EnergyPlusData &state, DataSurfaces::SurfaceFilter surfaceFilter, HcInt model, int userNum);
     266             :     void ApplyExtConvValueMulti(EnergyPlusData &state, DataSurfaces::SurfaceFilter surfaceFilter, HcExt model, int userNum);
     267             : 
     268             :     Real64 CalcASHRAESimpExtConvCoeff(Material::SurfaceRoughness Roughness, // Integer index for roughness, relates to parameter array indices
     269             :                                       Real64 SurfWindSpeed                  // Current wind speed, m/s
     270             :     );
     271             : 
     272             :     Real64 CalcASHRAESimpleIntConvCoeff(Real64 Tsurf, Real64 Tamb, Real64 cosTilt);
     273             : 
     274             :     void CalcASHRAESimpleIntConvCoeff(EnergyPlusData &state,
     275             :                                       int SurfNum,                  // surface number for which coefficients are being calculated
     276             :                                       Real64 SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     277             :                                       Real64 ZoneMeanAirTemperature // Mean Air Temperature of Zone
     278             :     );
     279             : 
     280             :     Real64 CalcASHRAETARPNatural(Real64 Tsurf, Real64 Tamb, Real64 cosTilt);
     281             : 
     282             :     void CalcASHRAEDetailedIntConvCoeff(EnergyPlusData &state,
     283             :                                         int SurfNum,                  // surface number for which coefficients are being calculated
     284             :                                         Real64 SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     285             :                                         Real64 ZoneMeanAirTemperature // Mean Air Temperature of Zone
     286             :     );
     287             : 
     288             :     void CalcDetailedHcInForDVModel(EnergyPlusData &state,
     289             :                                     int SurfNum,                                       // surface number for which coefficients are being calculated
     290             :                                     const Array1D<Real64> &SurfaceTemperatures,        // Temperature of surfaces for evaluation of HcIn
     291             :                                     Array1D<Real64> &HcIn,                             // Interior Convection Coeff Array
     292             :                                     ObjexxFCL::Optional<Array1S<Real64> const> Vhc = _ // Velocity array for forced convection coeff calculation
     293             :     );
     294             : 
     295             :     Real64 CalcZoneSupplyAirTemp(EnergyPlusData &state, int ZoneNum);
     296             : 
     297             :     Real64 CalcZoneSystemVolFlowRate(EnergyPlusData &state, int ZoneNum);
     298             : 
     299             :     Real64 CalcZoneSystemACH(EnergyPlusData &state, int ZoneNum);
     300             : 
     301             :     Real64 CalcCeilingDiffuserACH(EnergyPlusData &state, int ZoneNum);
     302             : 
     303             :     Real64 CalcCeilingDiffuserIntConvCoeff(EnergyPlusData &state,
     304             :                                            Real64 ACH, // [1/hr] air system air change rate
     305             :                                            Real64 Tsurf,
     306             :                                            Real64 Tair,
     307             :                                            Real64 cosTilt,
     308             :                                            Real64 humRat,
     309             :                                            Real64 height,
     310             :                                            bool isWindow = false);
     311             : 
     312             :     void CalcCeilingDiffuserIntConvCoeff(EnergyPlusData &state,
     313             :                                          int ZoneNum,
     314             :                                          const Array1D<Real64> &SurfaceTemperatures); // zone number for which coefficients are being calculated
     315             : 
     316             :     // CalcCeilingDiffuserInletCorr should replace CalcCeilingDiffuser (above), if ZoneTempPredictorCorrector can
     317             :     // ever be made to work correctly with the inlet air temperature.
     318             : 
     319             :     void CalcCeilingDiffuserInletCorr(EnergyPlusData &state,
     320             :                                       int ZoneNum,                         // Zone number
     321             :                                       Array1D<Real64> &SurfaceTemperatures // For CalcASHRAEDetailed, if called
     322             :     );
     323             : 
     324             :     void CalcTrombeWallIntConvCoeff(EnergyPlusData &state,
     325             :                                     int ZoneNum,                               // Zone number for which coefficients are being calculated
     326             :                                     const Array1D<Real64> &SurfaceTemperatures // Temperature of surfaces for evaluation of HcIn
     327             :     );
     328             : 
     329             :     Real64 CalcNusselt(EnergyPlusData &state,
     330             :                        int SurfNum, // Surface number
     331             :                        Real64 asp,  // Aspect ratio: window height to gap width
     332             :                        Real64 tso,  // Temperature of gap surface closest to outside (K)
     333             :                        Real64 tsi,  // Temperature of gap surface closest to zone (K)
     334             :                        Real64 gr,   // Gap gas Grashof number
     335             :                        Real64 pr    // Gap gas Prandtl number
     336             :     );
     337             : 
     338             :     Real64 SetExtConvCoeff(EnergyPlusData &state, int SurfNum); // Surface Number
     339             : 
     340             :     Real64 SetIntConvCoeff(EnergyPlusData &state, int SurfNum); // Surface Number
     341             : 
     342             :     Real64 CalcISO15099WindowIntConvCoeff(EnergyPlusData &state,
     343             :                                           Real64 SurfaceTemperature, // Temperature of surface for evaluation of HcIn
     344             :                                           Real64 AirTemperature,     // Mean Air Temperature of Zone (or adjacent air temperature)
     345             :                                           Real64 AirHumRat,          // air humidity ratio
     346             :                                           Real64 Height,             // window cavity height [m]
     347             :                                           Real64 TiltDeg,            // glazing tilt in degrees
     348             :                                           Real64 sineTilt            // sine of glazing tilt
     349             :     );
     350             : 
     351             :     void CalcISO15099WindowIntConvCoeff(EnergyPlusData &state,
     352             :                                         int SurfNum,               // surface number for which coefficients are being calculated
     353             :                                         Real64 SurfaceTemperature, // Temperature of surface for evaluation of HcIn
     354             :                                         Real64 AirTemperature      // Mean Air Temperature of Zone (or adjacent air temperature)
     355             :     );
     356             : 
     357             :     void SetupAdaptiveConvStaticMetaData(EnergyPlusData &state);
     358             : 
     359             :     void SetupAdaptiveConvRadiantSurfaceData(EnergyPlusData &state);
     360             : 
     361             :     void ManageIntAdaptiveConvAlgo(EnergyPlusData &state, int SurfNum); // surface number for which coefficients are being calculated
     362             : 
     363             :     Real64 ManageExtAdaptiveConvAlgo(EnergyPlusData &state,
     364             :                                      int SurfNum); // surface number for which coefficients are being calculated
     365             : 
     366             :     Real64 EvaluateIntHcModels(EnergyPlusData &state, int SurfNum, HcInt ConvModelEquationNum);
     367             : 
     368             :     Real64 EvaluateExtHcModels(EnergyPlusData &state, int SurfNum, HcExt NaturalConvModelEqNum, HcExt ForcedConvModelEqNum);
     369             : 
     370             :     void DynamicExtConvSurfaceClassification(EnergyPlusData &state, int SurfNum); // surface number
     371             : 
     372             :     void MapExtConvClassToHcModels(EnergyPlusData &state, int SurfNum); // surface number
     373             : 
     374             :     void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int SurfNum); // surface number
     375             : 
     376             :     void MapIntConvClassToHcModels(EnergyPlusData &state, int SurfNum); // surface pointer index
     377             : 
     378             :     Real64 CalcUserDefinedIntHcModel(EnergyPlusData &state, int SurfNum, int UserCurveNum);
     379             : 
     380             :     Real64 CalcUserDefinedExtHcModel(EnergyPlusData &state, int SurfNum, int UserCurveNum);
     381             : 
     382             :     void ShowWarningHydraulicDiameterZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh);
     383             : 
     384             :     void ShowWarningDeltaTempZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh);
     385             : 
     386             :     void ShowWarningWindowLocation(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh, IntConvWinLoc winLoc);
     387             : 
     388             :     void ShowWarningPerimeterLengthZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh);
     389             : 
     390             :     void ShowWarningFaceAreaZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh);
     391             : 
     392             :     //** Begin catalog of Hc equation functions. **** !*************************************************
     393             : 
     394    11497935 :     inline Real64 CalcASHRAEVerticalWall(Real64 const DeltaTemp) // [C] temperature difference between surface and air
     395             :     {
     396             : 
     397             :         // FUNCTION INFORMATION:
     398             :         //       AUTHOR         Brent Griffith
     399             :         //       DATE WRITTEN   Aug 2010
     400             :         //       MODIFIED       na
     401             :         //       RE-ENGINEERED  na
     402             : 
     403             :         // PURPOSE OF THIS FUNCTION:
     404             :         // Calculate the model equation attributed to ASHRAE for vertical walls for natural convection
     405             : 
     406             :         // REFERENCES:
     407             :         // 2.  ASHRAE Handbook of Fundamentals 2001, p. 3.12, Table 5.
     408             : 
     409    11497935 :         return 1.31 * std::pow(std::abs(DeltaTemp), 1.0 / 3.0);
     410             :     }
     411             : 
     412   124981378 :     inline Real64 CalcWaltonUnstableHorizontalOrTilt(Real64 const DeltaTemp, // [C] temperature difference between surface and air
     413             :                                                      Real64 const CosineTilt // Cosine of tilt angle
     414             :     )
     415             :     {
     416             : 
     417             :         // FUNCTION INFORMATION:
     418             :         //       AUTHOR         Brent Griffith
     419             :         //       DATE WRITTEN   Aug 2010
     420             :         //       MODIFIED       na
     421             :         //       RE-ENGINEERED  na
     422             : 
     423             :         // PURPOSE OF THIS FUNCTION:
     424             :         // Calculate the model equation attributed to Walton's TARP program for horizontal
     425             :         // and tilted surfaces with enhanced, thermally unstable natural convection
     426             : 
     427             :         // METHODOLOGY EMPLOYED:
     428             : 
     429             :         // REFERENCES:
     430             :         // 1.  Walton, G. N. 1983. Thermal Analysis Research Program (TARP) Reference Manual,
     431             :         //     NBSSIR 83-2655, National Bureau of Standards, "Surface Inside Heat Balances", pp 79-80.
     432             : 
     433   124981378 :         return 9.482 * std::pow(std::abs(DeltaTemp), 1.0 / 3.0) / (7.238 - std::abs(CosineTilt));
     434             :     }
     435             : 
     436    98875950 :     inline Real64 CalcWaltonStableHorizontalOrTilt(Real64 const DeltaTemp, // [C] temperature difference between surface and air
     437             :                                                    Real64 const CosineTilt // Cosine of tilt angle
     438             :     )
     439             :     {
     440             : 
     441             :         // FUNCTION INFORMATION:
     442             :         //       AUTHOR         Brent Griffith
     443             :         //       DATE WRITTEN   Aug 2010
     444             :         //       MODIFIED       na
     445             :         //       RE-ENGINEERED  na
     446             : 
     447             :         // PURPOSE OF THIS FUNCTION:
     448             :         // Calculate the model equation attributed to Walton's TARP program for horizontal
     449             :         // and tilted surfaces with reduced, thermally stable natural convection
     450             : 
     451             :         // REFERENCES:
     452             :         // 1.  Walton, G. N. 1983. Thermal Analysis Research Program (TARP) Reference Manual,
     453             :         //     NBSSIR 83-2655, National Bureau of Standards, "Surface Inside Heat Balances", pp 79-80.
     454             : 
     455    98875950 :         return 1.810 * std::pow(std::abs(DeltaTemp), 1.0 / 3.0) / (1.382 + std::abs(CosineTilt));
     456             :     }
     457             : 
     458             :     Real64 CalcFisherPedersenCeilDiffuserFloor(EnergyPlusData &state,
     459             :                                                Real64 ACH, // [1/hr] air system air change rate
     460             :                                                Real64 Tsurf,
     461             :                                                Real64 Tair,
     462             :                                                Real64 cosTilt,
     463             :                                                Real64 humRat,
     464             :                                                Real64 height,
     465             :                                                bool isWindow = false);
     466             : 
     467             :     Real64 CalcFisherPedersenCeilDiffuserCeiling(EnergyPlusData &state,
     468             :                                                  Real64 ACH, // [1/hr] air system air change rate
     469             :                                                  Real64 Tsurf,
     470             :                                                  Real64 Tair,
     471             :                                                  Real64 cosTilt,
     472             :                                                  Real64 humRat,
     473             :                                                  Real64 height,
     474             :                                                  bool isWindow = false);
     475             : 
     476             :     Real64 CalcFisherPedersenCeilDiffuserWalls(EnergyPlusData &state,
     477             :                                                Real64 ACH, // [1/hr] air system air change rate
     478             :                                                Real64 Tsurf,
     479             :                                                Real64 Tair,
     480             :                                                Real64 cosTilt,
     481             :                                                Real64 humRat,
     482             :                                                Real64 height,
     483             :                                                bool isWindow = false);
     484             : 
     485             :     Real64 CalcFisherPedersenCeilDiffuserNatConv(
     486             :         EnergyPlusData &state, Real64 Hforced, Real64 ACH, Real64 Tsurf, Real64 Tair, Real64 cosTilt, Real64 humRat, Real64 height, bool isWindow);
     487             : 
     488             :     Real64 CalcAlamdariHammondUnstableHorizontal(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     489             :                                                  Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     490             :     );
     491             : 
     492             :     Real64 CalcAlamdariHammondUnstableHorizontal(EnergyPlusData &state,
     493             :                                                  Real64 DeltaTemp,         // [C] temperature difference between surface and air
     494             :                                                  Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     495             :                                                  int SurfNum               // for messages
     496             :     );
     497             : 
     498             :     Real64 CalcAlamdariHammondStableHorizontal(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     499             :                                                Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     500             :     );
     501             : 
     502             :     Real64 CalcAlamdariHammondStableHorizontal(EnergyPlusData &state,
     503             :                                                Real64 DeltaTemp,         // [C] temperature difference between surface and air
     504             :                                                Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     505             :                                                int SurfNum               // for messages
     506             :     );
     507             : 
     508             :     Real64 CalcAlamdariHammondVerticalWall(Real64 DeltaTemp, // [C] temperature difference between surface and air
     509             :                                            Real64 Height     // [m] characteristic size, = zone height
     510             :     );
     511             : 
     512             :     Real64 CalcAlamdariHammondVerticalWall(EnergyPlusData &state,
     513             :                                            Real64 DeltaTemp, // [C] temperature difference between surface and air
     514             :                                            Real64 Height,    // [m] characteristic size, = zone height
     515             :                                            int SurfNum       // for messages
     516             :     );
     517             : 
     518             :     Real64 CalcKhalifaEq3WallAwayFromHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     519             : 
     520             :     Real64 CalcKhalifaEq4CeilingAwayFromHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     521             : 
     522             :     Real64 CalcKhalifaEq5WallsNearHeat(Real64 DeltaTemp); // [C] temperature difference between surface and air
     523             : 
     524             :     Real64 CalcKhalifaEq6NonHeatedWalls(Real64 DeltaTemp); // [C] temperature difference between surface and air
     525             : 
     526             :     Real64 CalcKhalifaEq7Ceiling(Real64 DeltaTemp); // [C] temperature difference between surface and air
     527             : 
     528             :     Real64 CalcAwbiHattonHeatedFloor(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     529             :                                      Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     530             :     );
     531             : 
     532             :     Real64 CalcAwbiHattonHeatedWall(Real64 DeltaTemp,        // [C] temperature difference between surface and air
     533             :                                     Real64 HydraulicDiameter // [m] characteristic size, = (4 * area) / perimeter
     534             :     );
     535             : 
     536             :     Real64 CalcBeausoleilMorrisonMixedAssistedWall(Real64 DeltaTemp,     // [C] temperature difference between surface and air
     537             :                                                    Real64 Height,        // [m] characteristic size
     538             :                                                    Real64 SurfTemp,      // [C] surface temperature
     539             :                                                    Real64 SupplyAirTemp, // [C] temperature of supply air into zone
     540             :                                                    Real64 AirChangeRate  // [ACH] [1/hour] supply air ACH for zone
     541             :     );
     542             : 
     543             :     Real64 CalcBeausoleilMorrisonMixedAssistedWall(EnergyPlusData &state,
     544             :                                                    Real64 DeltaTemp, // [C] temperature difference between surface and air
     545             :                                                    Real64 Height,    // [m] characteristic size
     546             :                                                    Real64 SurfTemp,  // [C] surface temperature
     547             :                                                    int ZoneNum       // index of zone for messaging
     548             :     );
     549             : 
     550             :     Real64 CalcBeausoleilMorrisonMixedOpposingWall(Real64 DeltaTemp,     // [C] temperature difference between surface and air
     551             :                                                    Real64 Height,        // [m] characteristic size
     552             :                                                    Real64 SurfTemp,      // [C] surface temperature
     553             :                                                    Real64 SupplyAirTemp, // [C] temperature of supply air into zone
     554             :                                                    Real64 AirChangeRate  // [ACH] [1/hour] supply air ACH for zone
     555             :     );
     556             : 
     557             :     Real64 CalcBeausoleilMorrisonMixedOpposingWall(EnergyPlusData &state,
     558             :                                                    Real64 DeltaTemp, // [C] temperature difference between surface and air
     559             :                                                    Real64 Height,    // [m] characteristic size
     560             :                                                    Real64 SurfTemp,  // [C] surface temperature
     561             :                                                    int ZoneNum       // index of zone for messaging
     562             :     );
     563             : 
     564             :     Real64 CalcBeausoleilMorrisonMixedStableFloor(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     565             :                                                   Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     566             :                                                   Real64 SurfTemp,          // [C] surface temperature
     567             :                                                   Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     568             :                                                   Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     569             :     );
     570             : 
     571             :     Real64 CalcBeausoleilMorrisonMixedStableFloor(EnergyPlusData &state,
     572             :                                                   Real64 DeltaTemp,         // [C] temperature difference between surface and air
     573             :                                                   Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     574             :                                                   Real64 SurfTemp,          // [C] surface temperature
     575             :                                                   int ZoneNum               // index of zone for messaging
     576             :     );
     577             : 
     578             :     Real64 CalcBeausoleilMorrisonMixedUnstableFloor(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     579             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     580             :                                                     Real64 SurfTemp,          // [C] surface temperature
     581             :                                                     Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     582             :                                                     Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     583             :     );
     584             : 
     585             :     Real64 CalcBeausoleilMorrisonMixedUnstableFloor(EnergyPlusData &state,
     586             :                                                     Real64 DeltaTemp,         // [C] temperature difference between surface and air
     587             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     588             :                                                     Real64 SurfTemp,          // [C] surface temperature
     589             :                                                     int ZoneNum               // index of zone for messaging
     590             :     );
     591             : 
     592             :     Real64 CalcBeausoleilMorrisonMixedStableCeiling(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     593             :                                                     Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     594             :                                                     Real64 SurfTemp,          // [C] surface temperature
     595             :                                                     Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     596             :                                                     Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     597             :     );
     598             : 
     599             :     Real64 CalcBeausoleilMorrisonMixedStableCeiling(EnergyPlusData &state,
     600             :                                                     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             :                                                     int ZoneNum               // index of zone for messaging
     604             :     );
     605             : 
     606             :     Real64 CalcBeausoleilMorrisonMixedUnstableCeiling(Real64 DeltaTemp,         // [C] temperature difference between surface and air
     607             :                                                       Real64 HydraulicDiameter, // [m] characteristic size, = (4 * area) / perimeter
     608             :                                                       Real64 SurfTemp,          // [C] surface temperature
     609             :                                                       Real64 SupplyAirTemp,     // [C] temperature of supply air into zone
     610             :                                                       Real64 AirChangeRate      // [ACH] [1/hour] supply air ACH for zone
     611             :     );
     612             : 
     613             :     Real64 CalcBeausoleilMorrisonMixedUnstableCeiling(EnergyPlusData &state,
     614             :                                                       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             :                                                       int ZoneNum               // index of zone for messaging
     618             :     );
     619             : 
     620             :     Real64 CalcFohannoPolidoriVerticalWall(Real64 DeltaTemp, // [C] temperature difference between surface and air
     621             :                                            Real64 Height,    // [m] characteristic size, height of zone
     622             :                                            Real64 SurfTemp,  // [C] surface temperature
     623             :                                            Real64 QdotConv   // [W/m2] heat flux rate for rayleigh #
     624             :     );
     625             : 
     626             :     Real64 CallCalcFohannoPolidoriVerticalWall(EnergyPlusData &state,
     627             :                                                Real64 DeltaTemp, // [C] temperature difference between surface and air
     628             :                                                Real64 Height,    // [m] characteristic size, height of zone
     629             :                                                Real64 SurfTemp,  // [C] surface temperature
     630             :                                                Real64 QdotConv,  // [W/m2] heat flux rate for rayleigh #
     631             :                                                int SurfNum       // for messages
     632             :     );
     633             : 
     634             :     Real64 CalcKaradagChilledCeiling(Real64 DeltaTemp); // [C] temperature difference between surface and air
     635             : 
     636             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWindow(Real64 AirSystemFlowRate,        // [m3/s] air system flow rate
     637             :                                                        Real64 ZoneExtPerimLength,       // [m] length of zone perimeter with exterior walls
     638             :                                                        Real64 WindWallRatio,            // [ ] fraction of window area to wall area for zone
     639             :                                                        IntConvWinLoc WindowLocationType // index for location types
     640             :     );
     641             : 
     642             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWindow(EnergyPlusData &state,
     643             :                                                        Real64 ZoneExtPerimLength,        // [m] length of zone perimeter with exterior walls
     644             :                                                        Real64 WindWallRatio,             // [ ] fraction of window area to wall area for zone
     645             :                                                        IntConvWinLoc WindowLocationType, // index for location types
     646             :                                                        int ZoneNum                       // for messages
     647             :     );
     648             : 
     649             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWall(Real64 AirSystemFlowRate,        // [m3/s] air system flow rate
     650             :                                                      Real64 ZoneExtPerimLength,       // [m] length of zone perimeter with exterior walls
     651             :                                                      IntConvWinLoc WindowLocationType // index for location types
     652             :     );
     653             : 
     654             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserWall(EnergyPlusData &state,
     655             :                                                      Real64 ZoneExtPerimLength,        // [m] length of zone perimeter with exterior walls
     656             :                                                      IntConvWinLoc WindowLocationType, // index for location types
     657             :                                                      int ZoneNum                       // for messages
     658             :     );
     659             : 
     660             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserFloor(Real64 AirSystemFlowRate, // [m3/s] air system flow rate
     661             :                                                       Real64 ZoneExtPerimLength // [m] length of zone perimeter with exterior walls
     662             :     );
     663             : 
     664             :     Real64 CalcGoldsteinNovoselacCeilingDiffuserFloor(EnergyPlusData &state,
     665             :                                                       Real64 ZoneExtPerimLength, // [m] length of zone perimeter with exterior walls
     666             :                                                       int ZoneNum                // for messages
     667             :     );
     668             : 
     669             :     Real64 CalcSparrowWindward(Material::SurfaceRoughness roughness, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ);
     670             : 
     671             :     Real64 CalcSparrowWindward(
     672             :         EnergyPlusData &state, Material::SurfaceRoughness roughness, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ, int SurfNum);
     673             : 
     674             :     Real64 CalcSparrowLeeward(Material::SurfaceRoughness roughness, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ);
     675             : 
     676             :     Real64 CalcSparrowLeeward(
     677             :         EnergyPlusData &state, Material::SurfaceRoughness roughness, Real64 FacePerimeter, Real64 FaceArea, Real64 WindAtZ, int SurfNum);
     678             : 
     679             :     Real64 CalcMoWITTNatural(Real64 DeltaTemp);
     680             : 
     681             :     Real64 CalcMoWITTForcedWindward(Real64 WindAtZ);
     682             : 
     683             :     Real64 CalcMoWITTForcedLeeward(Real64 WindAtZ);
     684             : 
     685             :     Real64 CalcMoWITTWindward(Real64 DeltaTemp, Real64 WindAtZ);
     686             : 
     687             :     Real64 CalcMoWITTLeeward(Real64 DeltaTemp, Real64 WindAtZ);
     688             : 
     689             :     Real64 CalcDOE2Forced(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 HfSmooth, Material::SurfaceRoughness roughness);
     690             : 
     691             :     Real64 CalcDOE2Windward(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 WindAtZ, Material::SurfaceRoughness roughness);
     692             : 
     693             :     Real64 CalcDOE2Leeward(Real64 SurfaceTemp, Real64 AirTemp, Real64 CosineTilt, Real64 WindAtZ, Material::SurfaceRoughness roughness);
     694             : 
     695             :     Real64 CalcNusseltJurges(Real64 WindAtZ);
     696             : 
     697             :     Real64 CalcMcAdams(Real64 WindAtZ);
     698             : 
     699             :     Real64 CalcMitchell(Real64 WindAtZ, Real64 LengthScale);
     700             : 
     701             :     Real64 CalcMitchell(EnergyPlusData &state, Real64 WindAtZ, Real64 LengthScale, int SurfNum);
     702             : 
     703             :     Real64 CalcBlockenWindward(EnergyPlusData &state,
     704             :                                Real64 WindAt10m,
     705             :                                Real64 WindDir,     // Wind direction measured clockwise from geographic North
     706             :                                Real64 SurfAzimuth, // or Facing, Direction the surface outward normal faces (degrees)
     707             :                                int SurfNum);
     708             : 
     709             :     Real64 CalcWindSurfaceTheta(Real64 const WindDir, Real64 const SurfAzimuth);
     710             : 
     711             :     Real64 CalcEmmelVertical(Real64 WindAt10m,
     712             :                              Real64 WindDir,      // Wind direction measured clockwise from geographic North
     713             :                              Real64 SurfAzimuth); // or Facing, Direction the surface outward normal faces (degrees)
     714             : 
     715             :     Real64 CalcEmmelRoof(Real64 WindAt10m,
     716             :                          Real64 WindDir,                 // Wind direction measured clockwise from geographic North
     717             :                          Real64 LongAxisOutwardAzimuth); // or Facing, Direction the surface outward normal faces (degrees)
     718             : 
     719             :     Real64 CalcClearRoof(EnergyPlusData &state,
     720             :                          Real64 AirTemp,
     721             :                          Real64 WindAtZ,
     722             :                          Real64 WindDirect, // Wind direction measured clockwise from geographic North
     723             :                          Real64 RoofArea,
     724             :                          Real64 RoofPerimeter,
     725             :                          Material::SurfaceRoughness roughness);
     726             : 
     727             :     Real64 CalcClearRoof(EnergyPlusData &state,
     728             :                          int SurfNum,
     729             :                          Real64 SurfTemp,
     730             :                          Real64 AirTemp,
     731             :                          Real64 WindAtZ,
     732             :                          Real64 WindDirect, // Wind direction measured clockwise from geographic North
     733             :                          Real64 RoofArea,
     734             :                          Real64 RoofPerimeter);
     735             : 
     736             :     void CalcASTMC1340ConvCoeff(EnergyPlusData &state,
     737             :                                 int const SurfNum,                  // surface number for which coefficients are being calculated
     738             :                                 Real64 const SurfaceTemperature,    // Temperature of surface for evaluation of HcIn
     739             :                                 Real64 const ZoneMeanAirTemperature // Mean Air Temperature of Zone
     740             :     );
     741             : 
     742             :     Real64
     743             :     CalcASTMC1340ConvCoeff(EnergyPlusData &state, int const SurfNum, Real64 const Tsurf, Real64 const Tair, Real64 const Vair, Real64 const Tilt);
     744             : 
     745             :     SurfOrientation GetSurfConvOrientation(Real64 const Tilt);
     746             : 
     747             :     void ShowSevereValueOutOfRange(EnergyPlusData &state,
     748             :                                    ErrorObjectHeader const &eoh,
     749             :                                    std::string_view fieldName,
     750             :                                    Real64 fieldVal,
     751             :                                    Real64 lo,
     752             :                                    Real64 hi,
     753             :                                    std::string const &msg);
     754             : 
     755             :     void ShowSevereScheduleOutOfRange(EnergyPlusData &state,
     756             :                                       ErrorObjectHeader const &eoh,
     757             :                                       std::string_view fieldName,
     758             :                                       std::string_view fieldVal,
     759             :                                       Real64 lo,
     760             :                                       Real64 hi,
     761             :                                       std::string const &msg);
     762             : 
     763             : } // namespace Convect
     764             : 
     765             : struct ConvectionCoefficientsData : BaseGlobalStruct
     766             : {
     767             : 
     768             :     bool GetUserSuppliedConvectionCoeffs = true;  // Get user input first call for Init
     769             :     Real64 CubeRootOfOverallBuildingVolume = 0.0; // building meta data. cube root of the volume of all the zones
     770             :     Real64 RoofLongAxisOutwardAzimuth = 0.0;      // roof surfaces meta data. outward normal azimuth for longest roof edge
     771             : 
     772             :     int BMMixedAssistedWallErrorIDX1 = 0;
     773             :     int BMMixedAssistedWallErrorIDX2 = 0;
     774             :     int BMMixedOpposingWallErrorIDX1 = 0;
     775             :     int BMMixedOpposingWallErrorIDX2 = 0;
     776             :     int BMMixedStableFloorErrorIDX1 = 0;
     777             :     int BMMixedStableFloorErrorIDX2 = 0;
     778             :     int BMMixedUnstableFloorErrorIDX1 = 0;
     779             :     int BMMixedUnstableFloorErrorIDX2 = 0;
     780             :     int BMMixedStableCeilingErrorIDX1 = 0;
     781             :     int BMMixedStableCeilingErrorIDX2 = 0;
     782             :     int BMMixedUnstableCeilingErrorIDX1 = 0;
     783             :     int BMMixedUnstableCeilingErrorIDX2 = 0;
     784             :     int AHUnstableHorizontalErrorIDX = 0;
     785             :     int AHStableHorizontalErrorIDX = 0;
     786             :     int AHVerticalWallErrorIDX = 0;
     787             :     int CalcFohannoPolidoriVerticalWallErrorIDX = 0;
     788             :     int CalcGoldsteinNovoselacCeilingDiffuserWindowErrorIDX1 = 0;
     789             :     int CalcGoldsteinNovoselacCeilingDiffuserWindowErrorIDX2 = 0;
     790             :     int CalcGoldsteinNovoselacCeilingDiffuserWallErrorIDX1 = 0;
     791             :     int CalcGoldsteinNovoselacCeilingDiffuserWallErrorIDX2 = 0;
     792             :     int CalcGoldsteinNovoselacCeilingDiffuserFloorErrorIDX = 0;
     793             :     int CalcSparrowWindwardErrorIDX = 0;
     794             :     int CalcSparrowLeewardErrorIDX = 0;
     795             :     int CalcBlockenWindwardErrorIDX = 0;
     796             :     int CalcClearRoofErrorIDX = 0;
     797             :     int CalcMitchellErrorIDX = 0;
     798             : 
     799             :     // move random statics so they can be reset for unit tests
     800             :     bool NodeCheck = true;
     801             :     bool ActiveSurfaceCheck = true;
     802             :     bool MyEnvirnFlag = true;
     803             :     bool FirstRoofSurf = true;
     804             : 
     805             :     // Object Data
     806             :     Convect::IntAdaptiveConvAlgo intAdaptiveConvAlgo; // stores rules for Hc model equations
     807             :     Convect::ExtAdaptiveConvAlgo extAdaptiveConvAlgo;
     808             :     Array1D<Convect::HcIntUserCurve> hcIntUserCurve;
     809             :     Array1D<Convect::HcExtUserCurve> hcExtUserCurve;
     810             : 
     811         796 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     812             :     {
     813         796 :     }
     814             : 
     815           0 :     void clear_state() override
     816             :     {
     817           0 :         new (this) ConvectionCoefficientsData();
     818           0 :     }
     819             : };
     820             : 
     821             : } // namespace EnergyPlus
     822             : 
     823             : #endif

Generated by: LCOV version 1.14