LCOV - code coverage report
Current view: top level - EnergyPlus - WindowManagerExteriorThermal.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 1 1 100.0 %
Date: 2023-01-17 19:17:23 Functions: 1 1 100.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 WindowManagerExteriorThermal_hh_INCLUDED
      49             : #define WindowManagerExteriorThermal_hh_INCLUDED
      50             : 
      51             : namespace EnergyPlus {
      52             : 
      53             : namespace DataSurfaces {
      54             :     struct SurfaceData;
      55             : }
      56             : 
      57             : namespace DataHeatBalance {
      58             :     struct MaterialProperties;
      59             : }
      60             : 
      61             : } // namespace EnergyPlus
      62             : 
      63             : namespace Tarcog {
      64             : namespace ISO15099 {
      65             :     class CBaseIGULayer;
      66             :     class CEnvironment;
      67             :     class CIGU;
      68             :     class CSingleSystem;
      69             :     class CSystem;
      70             :     class IIGUSystem;
      71             : } // namespace ISO15099
      72             : } // namespace Tarcog
      73             : 
      74             : namespace Gases {
      75             : 
      76             : class CGas;
      77             : }
      78             : 
      79             : namespace EnergyPlus {
      80             : 
      81             : // Forward declarations
      82             : struct EnergyPlusData;
      83             : 
      84             : namespace WindowManager {
      85             : 
      86             :     enum class ShadePosition
      87             :     {
      88             :         Invalid = -1,
      89             :         NoShade,
      90             :         Interior,
      91             :         Exterior,
      92             :         Between,
      93             :         Num
      94             :     };
      95             : 
      96             :     // Routine that calculates heat transfer balance by using Windows-CalcEngine routines
      97             :     void CalcWindowHeatBalanceExternalRoutines(EnergyPlusData &state,
      98             :                                                int const SurfNum,          // Surface number
      99             :                                                Real64 const HextConvCoeff, // Outside air film conductance coefficient
     100             :                                                Real64 &SurfInsideTemp,     // Inside window surface temperature
     101             :                                                Real64 &SurfOutsideTemp     // Outside surface temperature (C)
     102             :     );
     103             : 
     104             :     Real64 GetIGUUValueForNFRCReport(EnergyPlusData &state, int surfNum, int constrNum, Real64 windowWidth, Real64 windowHeight);
     105             :     Real64 GetSHGCValueForNFRCReporting(EnergyPlusData &state, int surfNum, int constrNum, Real64 windowWidth, Real64 windowHeight);
     106             : 
     107             :     void GetWindowAssemblyNfrcForReport(EnergyPlusData &state,
     108             :                                         int const surfNum,
     109             :                                         int constrNum,
     110             :                                         Real64 windowWidth,
     111             :                                         Real64 windowHeight,
     112             :                                         EnergyPlus::DataSurfaces::NfrcVisionType vision,
     113             :                                         Real64 &uvalue,
     114             :                                         Real64 &shgc,
     115             :                                         Real64 &vt);
     116             : 
     117             :     // Class that is used to create layers for Windows-CalcEngine
     118        4536 :     class CWCEHeatTransferFactory
     119             :     {
     120             :     public:
     121             :         CWCEHeatTransferFactory(EnergyPlusData &state, EnergyPlus::DataSurfaces::SurfaceData const &surface, int t_SurfNum, int t_ConstrNum);
     122             : 
     123             :         std::shared_ptr<Tarcog::ISO15099::CSingleSystem> getTarcogSystem(EnergyPlusData &state, Real64 const t_HextConvCoeff);
     124             : 
     125             :         std::shared_ptr<Tarcog::ISO15099::CBaseIGULayer> getIGULayer(EnergyPlusData &state, int const t_Index);
     126             :         std::shared_ptr<Tarcog::ISO15099::CEnvironment> getIndoor(EnergyPlusData &state) const;
     127             :         std::shared_ptr<Tarcog::ISO15099::CEnvironment> getOutdoor(EnergyPlusData &state, Real64 const t_Hext) const;
     128             :         Tarcog::ISO15099::CIGU getIGU() const;
     129             :         Tarcog::ISO15099::CIGU getIGU(double width, double height, double tilt);
     130             : 
     131             :         static int getActiveConstructionNumber(EnergyPlusData &state, EnergyPlus::DataSurfaces::SurfaceData const &surface, int t_SurfNum);
     132             : 
     133             :         // for assembly windoww reporting
     134             :         std::shared_ptr<Tarcog::ISO15099::IIGUSystem> getTarcogSystemForReporting(
     135             :             EnergyPlusData &state, bool const useSummerConditions, const double width, const double height, const double tilt);
     136             : 
     137             :         // This special case of interior shade is necessary only because of strange calculation of heat flow on interior side
     138             :         // It probably needs to be removed since calculation is no different from any other case. It is left over from
     139             :         // old EnergyPlus code and it needs to be checked.
     140             :         bool isInteriorShade() const;
     141             :         double overallUfactorFromFilmsAndCond(double conductance, double insideFilm, double outsideFilm);
     142             : 
     143             :         // methods specifically for helping in NFRC assembly calculations
     144             :         std::shared_ptr<Tarcog::ISO15099::CEnvironment> getOutdoorNfrc(bool const useSummerConditions);
     145             :         std::shared_ptr<Tarcog::ISO15099::CEnvironment> getIndoorNfrc(bool const useSummerConditions);
     146             : 
     147             :         // Method to determine current construction shade type
     148             :         static EnergyPlus::DataSurfaces::WinShadingType getShadeType(EnergyPlusData &state, int ConstrNum);
     149             : 
     150             :     private:
     151             :         DataSurfaces::SurfaceData m_Surface;
     152             :         DataSurfaces::SurfaceWindowCalc m_Window;
     153             :         ShadePosition m_ShadePosition;
     154             :         int m_SurfNum;
     155             :         size_t m_SolidLayerIndex;
     156             :         int m_ConstructionNumber;
     157             :         int m_TotLay;
     158             : 
     159             :         // Next two booleans are to keep track of order for shading devices. Some variables
     160             :         // are kept in separate arrays for specular glazings and shading devices and it is
     161             :         // important to keep index numbering in order to extract correct results
     162             :         bool m_InteriorBSDFShade;
     163             :         bool m_ExteriorShade;
     164             : 
     165             :         int getNumOfLayers(EnergyPlusData &state) const;
     166             : 
     167             :         std::shared_ptr<Tarcog::ISO15099::CBaseIGULayer>
     168             :         getSolidLayer(EnergyPlusData &state, Material::MaterialProperties const &material, int const t_Index);
     169             : 
     170             :         std::shared_ptr<Tarcog::ISO15099::CBaseIGULayer> getGapLayer(Material::MaterialProperties const &material) const;
     171             : 
     172             :         std::shared_ptr<Tarcog::ISO15099::CBaseIGULayer> getShadeToGlassLayer(EnergyPlusData &state, int const t_Index) const;
     173             : 
     174             :         std::shared_ptr<Tarcog::ISO15099::CBaseIGULayer> getComplexGapLayer(EnergyPlusData &state,
     175             :                                                                             Material::MaterialProperties const &material) const;
     176             : 
     177             :         Gases::CGas getGas(Material::MaterialProperties const &material) const;
     178             :         static Gases::CGas getAir();
     179             :         Material::MaterialProperties *getLayerMaterial(EnergyPlusData &state, int const t_Index) const;
     180             :     };
     181             : } // namespace WindowManager
     182             : 
     183             : } // namespace EnergyPlus
     184             : 
     185             : #endif

Generated by: LCOV version 1.13