LCOV - code coverage report
Current view: top level - EnergyPlus - TarcogShading.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 1 7 14.3 %
Date: 2023-01-17 19:17:23 Functions: 2 3 66.7 %

          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 TarcogShading_hh_INCLUDED
      49             : #define TarcogShading_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array2A.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/EnergyPlus.hh>
      56             : #include <EnergyPlus/TARCOGGassesParams.hh>
      57             : #include <EnergyPlus/TARCOGParams.hh>
      58             : 
      59             : namespace EnergyPlus {
      60             : 
      61             : // Using/Aliasing
      62             : using namespace TARCOGGassesParams;
      63             : using namespace TARCOGParams;
      64             : 
      65             : namespace TarcogShading {
      66             : 
      67             :     // Functions
      68             : 
      69             :     void shading(EnergyPlusData &state,
      70             :                  Array1D<Real64> const &theta,
      71             :                  Array1D<Real64> const &gap,
      72             :                  Array1D<Real64> &hgas,
      73             :                  Array1D<Real64> &hcgas,
      74             :                  Array1D<Real64> &hrgas,
      75             :                  Array2<Real64> const &frct,
      76             :                  Array2_int const &iprop,
      77             :                  Array1D<Real64> const &pressure,
      78             :                  Array1D_int const &nmix,
      79             :                  const Array1D<Real64> &xwght,
      80             :                  Array2<Real64> const &xgcon,
      81             :                  Array2<Real64> const &xgvis,
      82             :                  Array2<Real64> const &xgcp,
      83             :                  int const nlayer,
      84             :                  Real64 const width,
      85             :                  Real64 const height,
      86             :                  Real64 const angle,
      87             :                  Real64 const Tout,
      88             :                  Real64 const Tin,
      89             :                  Array1D<Real64> const &Atop,
      90             :                  Array1D<Real64> const &Abot,
      91             :                  Array1D<Real64> const &Al,
      92             :                  Array1D<Real64> const &Ar,
      93             :                  Array1D<Real64> const &Ah,
      94             :                  Array1D<Real64> const &vvent,
      95             :                  Array1D<Real64> const &tvent,
      96             :                  Array1D<TARCOGLayerType> LayerType,
      97             :                  Array1D<Real64> &Tgaps,
      98             :                  Array1D<Real64> &qv,
      99             :                  Array1D<Real64> &hcv,
     100             :                  int &nperr,
     101             :                  std::string &ErrorMessage,
     102             :                  Array1D<Real64> &vfreevent);
     103             : 
     104             :     void forcedventilation(EnergyPlusData &state,
     105             :                            const Array1D_int &iprop,
     106             :                            const Array1D<Real64> &frct,
     107             :                            Real64 const press,
     108             :                            int const nmix,
     109             :                            const Array1D<Real64> &xwght,
     110             :                            Array2A<Real64> const xgcon,
     111             :                            Array2A<Real64> const xgvis,
     112             :                            Array2A<Real64> const xgcp,
     113             :                            Real64 const s,
     114             :                            Real64 const H,
     115             :                            Real64 const hc,
     116             :                            Real64 const forcedspeed,
     117             :                            Real64 const Tinlet,
     118             :                            Real64 &Toutlet,
     119             :                            Real64 const Tav,
     120             :                            Real64 &hcv,
     121             :                            Real64 &qv,
     122             :                            int &nperr,
     123             :                            std::string &ErrorMessage);
     124             : 
     125             :     void shadingin(EnergyPlusData &state,
     126             :                    const Array1D_int &iprop1,
     127             :                    const Array1D<Real64> &frct1,
     128             :                    Real64 const press1,
     129             :                    int const nmix1,
     130             :                    const Array1D_int &iprop2,
     131             :                    const Array1D<Real64> &frct2,
     132             :                    Real64 const press2,
     133             :                    int const nmix2,
     134             :                    const Array1D<Real64> &xwght,
     135             :                    Array2A<Real64> const xgcon,
     136             :                    Array2A<Real64> const xgvis,
     137             :                    Array2A<Real64> const xgcp,
     138             :                    Real64 &Atop,
     139             :                    Real64 &Abot,
     140             :                    Real64 const Al,
     141             :                    Real64 const Ar,
     142             :                    Real64 const Ah,
     143             :                    Real64 const s1,
     144             :                    Real64 const s2,
     145             :                    Real64 const H,
     146             :                    Real64 const L,
     147             :                    Real64 const angle,
     148             :                    Real64 const hc1,
     149             :                    Real64 const hc2,
     150             :                    Real64 &speed1,
     151             :                    Real64 &speed2,
     152             :                    Real64 &Tgap1,
     153             :                    Real64 &Tgap2,
     154             :                    Real64 const Tav1,
     155             :                    Real64 const Tav2,
     156             :                    Real64 &hcv1,
     157             :                    Real64 &hcv2,
     158             :                    Real64 &qv1,
     159             :                    Real64 &qv2,
     160             :                    int &nperr,
     161             :                    std::string &ErrorMessage);
     162             : 
     163             :     void shadingedge(EnergyPlusData &state,
     164             :                      const Array1D_int &iprop1,
     165             :                      const Array1D<Real64> &frct1,
     166             :                      Real64 const press1,
     167             :                      int const nmix1,
     168             :                      const Array1D_int &iprop2,
     169             :                      const Array1D<Real64> &frct2,
     170             :                      Real64 const press2,
     171             :                      int const nmix2,
     172             :                      const Array1D<Real64> &xwght,
     173             :                      Array2A<Real64> const xgcon,
     174             :                      Array2A<Real64> const xgvis,
     175             :                      Array2A<Real64> const xgcp,
     176             :                      Real64 &Atop,
     177             :                      Real64 &Abot,
     178             :                      Real64 const Al,
     179             :                      Real64 const Ar,
     180             :                      Real64 &Ah,
     181             :                      Real64 const s,
     182             :                      Real64 const H,
     183             :                      Real64 const L,
     184             :                      Real64 const angle,
     185             :                      Real64 const forcedspeed,
     186             :                      Real64 const hc,
     187             :                      Real64 const Tenv,
     188             :                      Real64 const Tav,
     189             :                      Real64 &Tgap,
     190             :                      Real64 &hcv,
     191             :                      Real64 &qv,
     192             :                      int &nperr,
     193             :                      std::string &ErrorMessage,
     194             :                      Real64 &speed);
     195             : 
     196             :     void updateEffectiveMultipliers(int const nlayer,                          // Number of layers
     197             :                                     Real64 const width,                        // IGU width [m]
     198             :                                     Real64 const height,                       // IGU height [m]
     199             :                                     const Array1D<Real64> &Atop,               // Top openning area [m2]
     200             :                                     const Array1D<Real64> &Abot,               // Bottom openning area [m2]
     201             :                                     const Array1D<Real64> &Al,                 // Left side openning area [m2]
     202             :                                     const Array1D<Real64> &Ar,                 // Right side openning area [m2]
     203             :                                     const Array1D<Real64> &Ah,                 // Front side openning area [m2]
     204             :                                     Array1D<Real64> &Atop_eff,                 // Output - Effective top openning area [m2]
     205             :                                     Array1D<Real64> &Abot_eff,                 // Output - Effective bottom openning area [m2]
     206             :                                     Array1D<Real64> &Al_eff,                   // Output - Effective left side openning area [m2]
     207             :                                     Array1D<Real64> &Ar_eff,                   // Output - Effective right side openning area [m2]
     208             :                                     Array1D<Real64> &Ah_eff,                   // Output - Effective front side openning area [m2]
     209             :                                     const Array1D<TARCOGLayerType> &LayerType, // Layer type
     210             :                                     const Array1D<Real64> &SlatAngle           // Venetian layer slat angle [deg]
     211             :     );
     212             : 
     213             : } // namespace TarcogShading
     214             : 
     215        1542 : struct TarcogShadingData : BaseGlobalStruct
     216             : {
     217             : 
     218             :     Array1D<Real64> frct1 = Array1D<Real64>(TARCOGGassesParams::maxgas);
     219             :     Array1D<Real64> frct2 = Array1D<Real64>(TARCOGGassesParams::maxgas);
     220             :     Array1D_int iprop1 = Array1D_int(TARCOGGassesParams::maxgas);
     221             :     Array1D_int iprop2 = Array1D_int(TARCOGGassesParams::maxgas);
     222             : 
     223           0 :     void clear_state() override
     224             :     {
     225           0 :         frct1 = Array1D<Real64>(TARCOGGassesParams::maxgas);
     226           0 :         frct2 = Array1D<Real64>(TARCOGGassesParams::maxgas);
     227           0 :         iprop1 = Array1D_int(TARCOGGassesParams::maxgas);
     228           0 :         iprop2 = Array1D_int(TARCOGGassesParams::maxgas);
     229           0 :     }
     230             : };
     231             : 
     232             : } // namespace EnergyPlus
     233             : 
     234             : #endif

Generated by: LCOV version 1.13