LCOV - code coverage report
Current view: top level - EnergyPlus/Coils - CoilCoolingDXPerformanceBase.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 20.0 % 35 7
Test Date: 2025-07-17 05:04:31 Functions: 26.7 % 15 4

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #ifndef ENERGYPLUS_COILS_COIL_COOLING_DX_PERFORMANCE_BASE
      49              : #define ENERGYPLUS_COILS_COIL_COOLING_DX_PERFORMANCE_BASE
      50              : 
      51              : #include <EnergyPlus/DataLoopNode.hh>
      52              : #include <EnergyPlus/UtilityRoutines.hh>
      53              : #include <optional>
      54              : #include <string>
      55              : #include <vector>
      56              : 
      57              : namespace EnergyPlus {
      58              : 
      59              : // Forward declarations
      60              : struct EnergyPlusData;
      61              : 
      62              : struct CoilCoolingDXPerformanceBase
      63              : {
      64           55 :     CoilCoolingDXPerformanceBase() = default;
      65              : 
      66              :     std::string name;
      67              :     std::string parentName;
      68              : 
      69              :     // standard rating stuff -- for now just 210/240
      70              :     Real64 standardRatingCoolingCapacity = 0.0; // net cooling capacity of single speed DX cooling coil
      71              :     Real64 standardRatingSEER = 0.0;            // seasonal energy efficiency ratio of single speed DX cooling coil
      72              :     Real64 standardRatingSEER_Standard = 0.0;   // seasonal energy efficiency ratio
      73              :     Real64 standardRatingEER = 0.0;             // energy efficiency ratio of single speed DX cooling coil
      74              :     Real64 standardRatingIEER = 0.0;            // Integrated energy efficiency ratio of single speed DX cooling coil
      75              : 
      76              :     // standard rating stuff -- for now just 210/240 2023
      77              :     Real64 standardRatingCoolingCapacity2023 = 0.0; // net cooling capacity of single speed DX cooling coil
      78              :     Real64 standardRatingSEER2_User = 0.0;          // seasonal energy efficiency ratio of single speed DX cooling coil
      79              :     Real64 standardRatingSEER2_Standard = 0.0;
      80              :     Real64 standardRatingEER2 = 0.0;  // energy efficiency ratio of single speed DX cooling coil
      81              :     Real64 standardRatingIEER2 = 0.0; // Integrated energy efficiency ratio of singgle speed DX cooling coil | AHRI Std.340/360-2022(IP)
      82              : 
      83              :     Real64 powerUse = 0.0;
      84              :     Real64 RTF = 0.0;
      85              :     Real64 wasteHeatRate = 0.0;
      86              :     Real64 recoveredEnergyRate = 0.0;
      87              : 
      88              :     Real64 crankcaseHeaterCap = 0.0;
      89              :     Real64 crankcaseHeaterPower = 0.0;
      90              :     int crankcaseHeaterCapacityCurveIndex = 0;
      91              :     Real64 crankcaseHeaterElectricityConsumption = 0.0;
      92              :     Constant::eFuel compressorFuelType = Constant::eFuel::Invalid;
      93              :     std::string compressorFuelTypeForOutput;
      94              :     Real64 compressorFuelRate = 0.0;
      95              :     Real64 compressorFuelConsumption = 0.0;
      96              :     Real64 electricityConsumption = 0.0;
      97              :     Real64 evapCondBasinHeatCap = 0.0;
      98              :     Real64 basinHeaterPower = 0.0;
      99              :     Real64 basinHeaterElectricityConsumption = 0.0;
     100              :     Real64 minOutdoorDrybulb = 0.0;
     101              :     // int hasAlternateMode = 0; // 0 Normal, 1 Enhanced, 2 SubcoolReheat
     102              :     int OperatingMode = 0;
     103              :     Real64 ModeRatio = 0.0;
     104              :     Real64 NormalSHR = 0.0;
     105              :     HVAC::CoilMode maxAvailCoilMode = HVAC::CoilMode::Normal; // max available coil mode, 0 Normal, 1 Enhanced, 2 SubcoolReheat
     106              : 
     107              :     enum CapControlMethod
     108              :     {
     109              :         CONTINUOUS,
     110              :         DISCRETE
     111              :     };
     112              :     CapControlMethod capControlMethod = CapControlMethod::DISCRETE;
     113              : 
     114            0 :     virtual void size(EnergyPlusData &)
     115              :     {
     116            0 :     }
     117              : 
     118            0 :     virtual void simulate(EnergyPlusData &,
     119              :                           const DataLoopNode::NodeData &,
     120              :                           DataLoopNode::NodeData &,
     121              :                           HVAC::CoilMode,
     122              :                           // Real64 &,
     123              :                           int,
     124              :                           Real64,
     125              :                           HVAC::FanOp const,
     126              :                           DataLoopNode::NodeData &,
     127              :                           DataLoopNode::NodeData &,
     128              :                           bool const,
     129              :                           Real64 = 0.0)
     130              :     {
     131            0 :     }
     132              : 
     133              :     virtual Real64 ratedCBF(EnergyPlusData &state) = 0;
     134              : 
     135              :     virtual Real64 grossRatedSHR(EnergyPlusData &state) = 0;
     136              : 
     137              :     virtual Real64 ratedEvapAirMassFlowRate(EnergyPlusData &state) = 0;
     138              : 
     139              :     virtual Real64 ratedEvapAirFlowRate(EnergyPlusData &state) = 0;
     140              : 
     141              :     virtual Real64 ratedGrossTotalCap() = 0;
     142              : 
     143              :     virtual int numSpeeds() = 0;
     144              : 
     145              :     virtual Real64 evapAirFlowRateAtSpeedIndex(EnergyPlusData &state, int) = 0;
     146              : 
     147              :     virtual Real64 ratedTotalCapacityAtSpeedIndex(EnergyPlusData &, int) = 0;
     148              : 
     149            0 :     virtual Real64 grossRatedCoolingCOPAtMaxSpeed(EnergyPlusData &state)
     150              :     {
     151            0 :         ShowFatalError(state, "Gross Rated Cooling COP is not an available parameter for this coil type.");
     152            0 :         return 0.0;
     153              :     }
     154              : 
     155            0 :     virtual const std::string_view nameAtSpeed(int)
     156              :     {
     157            0 :         return "";
     158              :     }
     159              : 
     160            0 :     virtual Real64 ratedAirMassFlowRateMaxSpeed(EnergyPlusData &state, HVAC::CoilMode const mode = HVAC::CoilMode::Normal)
     161              :     {
     162            0 :         ShowFatalError(state, "Rated Air Mass Flow Rate is not an available parameter for this coil type.");
     163            0 :         return 0.0;
     164              :     }
     165              : 
     166            0 :     virtual Real64 ratedAirMassFlowRateMinSpeed(EnergyPlusData &state, HVAC::CoilMode const mode = HVAC::CoilMode::Normal)
     167              :     {
     168            0 :         ShowFatalError(state, "Rated Air Mass Flow Rate is not an available parameter for this coil type.");
     169            0 :         return 0.0;
     170              :     }
     171              : 
     172        35113 :     virtual Real64 ratedCondAirMassFlowRateNomSpeed(EnergyPlusData &state, HVAC::CoilMode const mode)
     173              :     {
     174        35113 :         return 0.0;
     175              :     }
     176              : 
     177            0 :     virtual int indexCapFT(HVAC::CoilMode const mode)
     178              :     {
     179            0 :         return 0;
     180              :     }
     181              : 
     182            1 :     virtual bool subcoolReheatFlag()
     183              :     {
     184            1 :         return false;
     185              :     }
     186              : 
     187            1 :     virtual void calcStandardRatings210240(EnergyPlusData &)
     188              :     {
     189            1 :     }
     190              : 
     191            0 :     virtual void setToHundredPercentDOAS()
     192              :     {
     193            0 :     }
     194              : 
     195            0 :     virtual Real64 currentEvapCondPumpPowerAtSpeed(EnergyPlusData &state, int)
     196              :     {
     197            0 :         ShowFatalError(state, "Current Evaporator Condenser Pump Power is not an available parameter for this coil type.");
     198            0 :         return 0.0;
     199              :     }
     200              : 
     201            0 :     virtual Real64 evapCondenserEffectivenessAtSpeedIndex(EnergyPlusData &state, int)
     202              :     {
     203            0 :         ShowFatalError(state, "Evaporator Condenser Effectiveness is not an available parameter for this coil type.");
     204            0 :         return 0.0;
     205              :     }
     206              : 
     207            0 :     virtual Real64 evapAirFlowFraction(EnergyPlusData &state)
     208              :     {
     209            0 :         ShowFatalError(state, "Evaporator Air Flow Fraction is not an available parameter for this coil type.");
     210            0 :         return 0.0;
     211              :     }
     212              : };
     213              : 
     214              : } // namespace EnergyPlus
     215              : #endif // ENERGYPLUS_COILS_COIL_COOLING_DX_PERFORMANCE_BASE
        

Generated by: LCOV version 2.0-1