LCOV - code coverage report
Current view: top level - EnergyPlus/Autosizing - WaterHeatingCoilUASizing.cc (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 40.4 % 317 128
Test Date: 2025-05-22 16:09:37 Functions: 100.0 % 3 3

            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              : #include <EnergyPlus/Autosizing/WaterHeatingCoilUASizing.hh>
      49              : #include <EnergyPlus/Data/EnergyPlusData.hh>
      50              : #include <EnergyPlus/DataHVACGlobals.hh>
      51              : #include <EnergyPlus/General.hh>
      52              : #include <EnergyPlus/UtilityRoutines.hh>
      53              : #include <EnergyPlus/WaterCoils.hh>
      54              : 
      55              : namespace EnergyPlus {
      56              : 
      57           47 : Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValue, bool &errorsFound)
      58              : {
      59           47 :     if (!this->checkInitialized(state, errorsFound)) {
      60            1 :         return 0.0;
      61              :     }
      62           46 :     Real64 constexpr Acc(0.0001); // Accuracy of result
      63           46 :     int constexpr MaxIte(500);    // Maximum number of iterations
      64           46 :     int SolFla = 0;               // Flag of solver
      65              : 
      66           46 :     this->preSize(state, _originalValue);
      67           46 :     if (this->curZoneEqNum > 0) {
      68           23 :         if (!this->wasAutoSized && !this->sizingDesRunThisZone) {
      69            4 :             this->autoSizedValue = _originalValue;
      70              :         } else {
      71           19 :             if (this->dataCapacityUsedForSizing > 0.0 && this->dataWaterFlowUsedForSizing > 0.0 && this->dataFlowUsedForSizing > 0.0) {
      72           18 :                 Real64 UA0 = 0.001 * this->dataCapacityUsedForSizing;
      73           18 :                 Real64 UA1 = this->dataCapacityUsedForSizing;
      74              :                 // Invert the simple heating coil model: given the design inlet conditions and the design load,
      75              :                 // find the design UA.
      76          250 :                 auto f = [&state, this](Real64 const UA) {
      77          250 :                     state.dataWaterCoils->WaterCoil(this->dataCoilNum).UACoilVariable = UA;
      78          250 :                     WaterCoils::CalcSimpleHeatingCoil(state, this->dataCoilNum, this->dataFanOp, 1.0, state.dataWaterCoils->SimCalc);
      79          250 :                     state.dataSize->DataDesignCoilCapacity = state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate;
      80          250 :                     return (dataCapacityUsedForSizing - state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate) /
      81          250 :                            dataCapacityUsedForSizing;
      82           18 :                 };
      83           18 :                 General::SolveRoot(state, Acc, MaxIte, SolFla, this->autoSizedValue, f, UA0, UA1);
      84           18 :                 if (SolFla == -1) {
      85            0 :                     errorsFound = true;
      86            0 :                     std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
      87            0 :                     this->addErrorMessage(msg);
      88            0 :                     ShowSevereError(state, msg);
      89            0 :                     msg = "  Iteration limit exceeded in calculating coil UA";
      90            0 :                     this->addErrorMessage(msg);
      91            0 :                     ShowContinueError(state, msg);
      92            0 :                     msg = format("  Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0);
      93            0 :                     this->addErrorMessage(msg);
      94            0 :                     ShowContinueError(state, msg);
      95            0 :                     msg = format("  Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
      96            0 :                     this->addErrorMessage(msg);
      97            0 :                     ShowContinueError(state, msg);
      98            0 :                     msg = format("  Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue);
      99            0 :                     this->addErrorMessage(msg);
     100            0 :                     ShowContinueError(state, msg);
     101            0 :                     msg = "  Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName +
     102            0 :                           "\" coil sizing conditions (may be different than Sizing inputs):";
     103            0 :                     this->addErrorMessage(msg);
     104            0 :                     ShowContinueError(state, msg);
     105            0 :                     msg = format("  Coil inlet air temperature     = {:.3T} C", this->dataDesInletAirTemp);
     106            0 :                     this->addErrorMessage(msg);
     107            0 :                     ShowContinueError(state, msg);
     108            0 :                     msg = format("  Coil inlet air humidity ratio  = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
     109            0 :                     this->addErrorMessage(msg);
     110            0 :                     ShowContinueError(state, msg);
     111            0 :                     msg = format("  Coil inlet air mass flow rate  = {:.6T} kg/s", this->dataFlowUsedForSizing);
     112            0 :                     this->addErrorMessage(msg);
     113            0 :                     ShowContinueError(state, msg);
     114              :                     // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
     115            0 :                     msg = format("  Design Coil Capacity           = {:.3T} W", this->dataDesignCoilCapacity);
     116            0 :                     this->addErrorMessage(msg);
     117            0 :                     ShowContinueError(state, msg);
     118            0 :                     if (this->dataNomCapInpMeth) {
     119            0 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     120            0 :                         this->addErrorMessage(msg);
     121            0 :                         ShowContinueError(state, msg);
     122            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->dataDesOutletAirTemp);
     123            0 :                         this->addErrorMessage(msg);
     124            0 :                         ShowContinueError(state, msg);
     125            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
     126            0 :                         this->addErrorMessage(msg);
     127            0 :                         ShowContinueError(state, msg);
     128            0 :                     } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) {
     129            0 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     130            0 :                         this->addErrorMessage(msg);
     131            0 :                         ShowContinueError(state, msg);
     132              :                     } else {
     133            0 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     134            0 :                         this->addErrorMessage(msg);
     135            0 :                         ShowContinueError(state, msg);
     136            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp);
     137            0 :                         this->addErrorMessage(msg);
     138            0 :                         ShowContinueError(state, msg);
     139            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir",
     140            0 :                                      this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat);
     141            0 :                         this->addErrorMessage(msg);
     142            0 :                         ShowContinueError(state, msg);
     143              :                     }
     144            0 :                     this->dataErrorsFound = true;
     145           18 :                 } else if (SolFla == -2) {
     146            1 :                     this->errorType = AutoSizingResultType::ErrorType1;
     147            1 :                     errorsFound = true;
     148            1 :                     std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
     149            1 :                     this->addErrorMessage(msg);
     150            1 :                     ShowSevereError(state, msg);
     151            1 :                     msg = "  Bad starting values for UA";
     152            1 :                     this->addErrorMessage(msg);
     153            1 :                     ShowContinueError(state, msg);
     154            1 :                     msg = format("  Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0);
     155            1 :                     this->addErrorMessage(msg);
     156            1 :                     ShowContinueError(state, msg);
     157            1 :                     msg = format("  Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
     158            1 :                     this->addErrorMessage(msg);
     159            1 :                     ShowContinueError(state, msg);
     160            2 :                     msg = "  Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName +
     161            1 :                           "\" coil sizing conditions (may be different than Sizing inputs):";
     162            1 :                     this->addErrorMessage(msg);
     163            1 :                     ShowContinueError(state, msg);
     164            1 :                     msg = format("  Coil inlet air temperature     = {:.3T} C", this->dataDesInletAirTemp);
     165            1 :                     this->addErrorMessage(msg);
     166            1 :                     ShowContinueError(state, msg);
     167            1 :                     msg = format("  Coil inlet air humidity ratio  = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
     168            1 :                     this->addErrorMessage(msg);
     169            1 :                     ShowContinueError(state, msg);
     170            1 :                     msg = format("  Coil inlet air mass flow rate  = {:.6T} kg/s", this->dataFlowUsedForSizing);
     171            1 :                     this->addErrorMessage(msg);
     172            1 :                     ShowContinueError(state, msg);
     173            1 :                     msg = format("  Design Coil Capacity           = {:.3T} W", this->dataDesignCoilCapacity);
     174            1 :                     this->addErrorMessage(msg);
     175            1 :                     ShowContinueError(state, msg);
     176            1 :                     if (this->dataNomCapInpMeth) {
     177            0 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     178            0 :                         this->addErrorMessage(msg);
     179            0 :                         ShowContinueError(state, msg);
     180            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->dataDesOutletAirTemp);
     181            0 :                         this->addErrorMessage(msg);
     182            0 :                         ShowContinueError(state, msg);
     183            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
     184            0 :                         this->addErrorMessage(msg);
     185            0 :                         ShowContinueError(state, msg);
     186            1 :                     } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) {
     187            1 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     188            1 :                         this->addErrorMessage(msg);
     189            1 :                         ShowContinueError(state, msg);
     190              :                     } else {
     191            0 :                         msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     192            0 :                         this->addErrorMessage(msg);
     193            0 :                         ShowContinueError(state, msg);
     194            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp);
     195            0 :                         this->addErrorMessage(msg);
     196            0 :                         ShowContinueError(state, msg);
     197            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir",
     198            0 :                                      this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat);
     199            0 :                         this->addErrorMessage(msg);
     200            0 :                         ShowContinueError(state, msg);
     201              :                     }
     202              :                     // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil
     203            1 :                     if (this->dataDesignCoilCapacity < this->dataCapacityUsedForSizing) {
     204            0 :                         msg = "  Inadequate water side capacity: in Plant Sizing for this hot water loop";
     205            0 :                         this->addErrorMessage(msg);
     206            0 :                         ShowContinueError(state, msg);
     207            0 :                         msg = "  increase design loop exit temperature and/or decrease design loop delta T";
     208            0 :                         this->addErrorMessage(msg);
     209            0 :                         ShowContinueError(state, msg);
     210            0 :                         msg = "  Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName;
     211            0 :                         this->addErrorMessage(msg);
     212            0 :                         ShowContinueError(state, msg);
     213            0 :                         msg = format("  Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp);
     214            0 :                         this->addErrorMessage(msg);
     215            0 :                         ShowContinueError(state, msg);
     216            0 :                         msg = format("  Plant design loop delta T          = {:.3T} C", this->dataWaterCoilSizHeatDeltaT);
     217            0 :                         this->addErrorMessage(msg);
     218            0 :                         ShowContinueError(state, msg);
     219              :                     }
     220            1 :                     this->dataErrorsFound = true;
     221            1 :                 }
     222           18 :             } else {
     223            1 :                 this->autoSizedValue = 1.0;
     224            1 :                 if (this->dataWaterFlowUsedForSizing > 0.0 && this->dataCapacityUsedForSizing == 0.0) {
     225            0 :                     std::string msg = "The design coil load used for UA sizing is zero for Coil:Heating:Water " + this->compName;
     226            0 :                     this->addErrorMessage(msg);
     227            0 :                     ShowWarningError(state, msg);
     228            0 :                     msg = "An autosize value for UA cannot be calculated";
     229            0 :                     this->addErrorMessage(msg);
     230            0 :                     ShowContinueError(state, msg);
     231            0 :                     msg = "Input a value for UA, change the heating design day, or raise";
     232            0 :                     this->addErrorMessage(msg);
     233            0 :                     ShowContinueError(state, msg);
     234            0 :                     msg = "  the zone heating design supply air temperature";
     235            0 :                     this->addErrorMessage(msg);
     236            0 :                     ShowContinueError(state, msg);
     237            0 :                     msg = "Water coil UA is set to 1 and the simulation continues.";
     238            0 :                     this->addErrorMessage(msg);
     239            0 :                     ShowContinueError(state, msg);
     240            0 :                 }
     241              :             }
     242              :         }
     243           23 :     } else if (this->curSysNum > 0) {
     244           23 :         if (!this->wasAutoSized && !this->sizingDesRunThisAirSys) {
     245            7 :             this->autoSizedValue = _originalValue;
     246              :         } else {
     247           16 :             if (this->dataCapacityUsedForSizing >= HVAC::SmallLoad && this->dataWaterFlowUsedForSizing > 0.0 && this->dataFlowUsedForSizing > 0.0) {
     248           16 :                 Real64 UA0 = 0.001 * this->dataCapacityUsedForSizing;
     249           16 :                 Real64 UA1 = this->dataCapacityUsedForSizing;
     250              :                 // Invert the simple heating coil model: given the design inlet conditions and the design load,
     251              :                 // find the design UA.
     252          244 :                 auto f = [&state, this](Real64 const UA) {
     253          244 :                     state.dataWaterCoils->WaterCoil(this->dataCoilNum).UACoilVariable = UA;
     254          244 :                     WaterCoils::CalcSimpleHeatingCoil(state, this->dataCoilNum, this->dataFanOp, 1.0, state.dataWaterCoils->SimCalc);
     255          244 :                     state.dataSize->DataDesignCoilCapacity = state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate;
     256          244 :                     return (dataCapacityUsedForSizing - state.dataWaterCoils->WaterCoil(this->dataCoilNum).TotWaterHeatingCoilRate) /
     257          244 :                            dataCapacityUsedForSizing;
     258           16 :                 };
     259           16 :                 General::SolveRoot(state, Acc, MaxIte, SolFla, this->autoSizedValue, f, UA0, UA1);
     260           16 :                 if (SolFla == -1) {
     261            0 :                     errorsFound = true;
     262            0 :                     std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
     263            0 :                     this->addErrorMessage(msg);
     264            0 :                     ShowSevereError(state, msg);
     265            0 :                     msg = "  Iteration limit exceeded in calculating coil UA";
     266            0 :                     this->addErrorMessage(msg);
     267            0 :                     ShowContinueError(state, msg);
     268            0 :                     msg = format("  Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0);
     269            0 :                     this->addErrorMessage(msg);
     270            0 :                     ShowContinueError(state, msg);
     271            0 :                     msg = format("  Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
     272            0 :                     this->addErrorMessage(msg);
     273            0 :                     ShowContinueError(state, msg);
     274            0 :                     msg = format("  Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue);
     275            0 :                     this->addErrorMessage(msg);
     276            0 :                     ShowContinueError(state, msg);
     277            0 :                     msg = "  AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName +
     278            0 :                           "\" coil sizing conditions (may be different than Sizing inputs):";
     279            0 :                     this->addErrorMessage(msg);
     280            0 :                     ShowContinueError(state, msg);
     281            0 :                     msg = format("  Coil inlet air temperature     = {:.3T} C", this->dataDesInletAirTemp);
     282            0 :                     this->addErrorMessage(msg);
     283            0 :                     ShowContinueError(state, msg);
     284            0 :                     msg = format("  Coil inlet air humidity ratio  = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
     285            0 :                     this->addErrorMessage(msg);
     286            0 :                     ShowContinueError(state, msg);
     287            0 :                     msg = format("  Coil inlet air mass flow rate  = {:.6T} kg/s", this->dataFlowUsedForSizing);
     288            0 :                     this->addErrorMessage(msg);
     289            0 :                     ShowContinueError(state, msg);
     290            0 :                     msg = format("  Design Coil Capacity           = {:.3T} W", this->dataDesignCoilCapacity);
     291            0 :                     this->addErrorMessage(msg);
     292            0 :                     ShowContinueError(state, msg);
     293            0 :                     msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     294            0 :                     this->addErrorMessage(msg);
     295            0 :                     ShowContinueError(state, msg);
     296            0 :                     if (this->dataNomCapInpMeth) {
     297            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->dataDesOutletAirTemp);
     298            0 :                         this->addErrorMessage(msg);
     299            0 :                         ShowContinueError(state, msg);
     300            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
     301            0 :                         this->addErrorMessage(msg);
     302            0 :                         ShowContinueError(state, msg);
     303              :                     }
     304            0 :                     this->dataErrorsFound = true;
     305           16 :                 } else if (SolFla == -2) {
     306            1 :                     this->errorType = AutoSizingResultType::ErrorType1;
     307            1 :                     errorsFound = true;
     308            1 :                     std::string msg = "Autosizing of heating coil UA failed for Coil:Heating:Water \"" + this->compName + "\"";
     309            1 :                     this->addErrorMessage(msg);
     310            1 :                     ShowSevereError(state, msg);
     311            1 :                     msg = "  Bad starting values for UA";
     312            1 :                     this->addErrorMessage(msg);
     313            1 :                     ShowContinueError(state, msg);
     314            1 :                     msg = format("  Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0);
     315            1 :                     this->addErrorMessage(msg);
     316            1 :                     ShowContinueError(state, msg);
     317            1 :                     msg = format("  Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1);
     318            1 :                     this->addErrorMessage(msg);
     319            1 :                     ShowContinueError(state, msg);
     320            2 :                     msg = "  AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName +
     321            1 :                           "\" coil sizing conditions (may be different than Sizing inputs):";
     322            1 :                     this->addErrorMessage(msg);
     323            1 :                     ShowContinueError(state, msg);
     324            1 :                     msg = format("  Coil inlet air temperature     = {:.3T} C", this->dataDesInletAirTemp);
     325            1 :                     this->addErrorMessage(msg);
     326            1 :                     ShowContinueError(state, msg);
     327            1 :                     msg = format("  Coil inlet air humidity ratio  = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat);
     328            1 :                     this->addErrorMessage(msg);
     329            1 :                     ShowContinueError(state, msg);
     330            1 :                     msg = format("  Coil inlet air mass flow rate  = {:.6T} kg/s", this->dataFlowUsedForSizing);
     331            1 :                     this->addErrorMessage(msg);
     332            1 :                     ShowContinueError(state, msg);
     333            1 :                     msg = format("  Design Coil Capacity           = {:.3T} W", this->dataDesignCoilCapacity);
     334            1 :                     this->addErrorMessage(msg);
     335            1 :                     ShowContinueError(state, msg);
     336            1 :                     msg = format("  Design Coil Load               = {:.3T} W", this->dataCapacityUsedForSizing);
     337            1 :                     this->addErrorMessage(msg);
     338            1 :                     ShowContinueError(state, msg);
     339            1 :                     if (this->dataNomCapInpMeth) {
     340            0 :                         msg = format("  Coil outlet air temperature    = {:.3T} C", this->dataDesOutletAirTemp);
     341            0 :                         this->addErrorMessage(msg);
     342            0 :                         ShowContinueError(state, msg);
     343            0 :                         msg = format("  Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat);
     344            0 :                         this->addErrorMessage(msg);
     345            0 :                         ShowContinueError(state, msg);
     346              :                     }
     347            1 :                     if (this->dataDesignCoilCapacity < this->dataCapacityUsedForSizing && !this->dataNomCapInpMeth) {
     348            0 :                         msg = "  Inadequate water side capacity: in Plant Sizing for this hot water loop";
     349            0 :                         this->addErrorMessage(msg);
     350            0 :                         ShowContinueError(state, msg);
     351            0 :                         msg = "  increase design loop exit temperature and/or decrease design loop delta T";
     352            0 :                         this->addErrorMessage(msg);
     353            0 :                         ShowContinueError(state, msg);
     354            0 :                         msg = "  Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName;
     355            0 :                         this->addErrorMessage(msg);
     356            0 :                         ShowContinueError(state, msg);
     357            0 :                         msg = format("  Plant design loop exit temperature = {:.3T} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp);
     358            0 :                         this->addErrorMessage(msg);
     359            0 :                         ShowContinueError(state, msg);
     360            0 :                         msg = format("  Plant design loop delta T          = {:.3T} C", this->dataWaterCoilSizHeatDeltaT);
     361            0 :                         this->addErrorMessage(msg);
     362            0 :                         ShowContinueError(state, msg);
     363              :                     }
     364            1 :                     this->dataErrorsFound = true;
     365            1 :                 }
     366           16 :             } else {
     367            0 :                 this->autoSizedValue = 1.0;
     368            0 :                 if (this->dataWaterFlowUsedForSizing > 0.0 && this->dataCapacityUsedForSizing < HVAC::SmallLoad) {
     369            0 :                     std::string msg = "The design coil load used for UA sizing is zero for Coil:Heating:Water " + this->compName;
     370            0 :                     this->addErrorMessage(msg);
     371            0 :                     ShowWarningError(state, msg);
     372            0 :                     msg = "An autosize value for UA cannot be calculated";
     373            0 :                     this->addErrorMessage(msg);
     374            0 :                     ShowContinueError(state, msg);
     375            0 :                     msg = "Input a value for UA, change the heating design day, or raise";
     376            0 :                     this->addErrorMessage(msg);
     377            0 :                     ShowContinueError(state, msg);
     378            0 :                     msg = "  the zone heating design supply air temperature";
     379            0 :                     this->addErrorMessage(msg);
     380            0 :                     ShowContinueError(state, msg);
     381            0 :                     msg = "Water coil UA is set to 1 and the simulation continues.";
     382            0 :                     this->addErrorMessage(msg);
     383            0 :                     ShowContinueError(state, msg);
     384            0 :                 }
     385              :             }
     386              :         }
     387              :     }
     388           46 :     if (this->dataErrorsFound) state.dataSize->DataErrorsFound = true;
     389           46 :     if (this->overrideSizeString) {
     390           46 :         if (this->isEpJSON) this->sizingString = "u-factor_times_area_value [W/K]";
     391              :     }
     392           46 :     this->selectSizerOutput(state, errorsFound);
     393           46 :     if (this->isCoilReportObject && this->curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) {
     394           39 :         state.dataRptCoilSelection->coilSelectionReportObj->setCoilUA(state,
     395           39 :                                                                       this->compName,
     396           39 :                                                                       this->compType,
     397              :                                                                       this->autoSizedValue,
     398              :                                                                       this->dataCapacityUsedForSizing,
     399           39 :                                                                       this->wasAutoSized,
     400              :                                                                       this->curSysNum,
     401              :                                                                       this->curZoneEqNum);
     402              :     }
     403           46 :     return this->autoSizedValue;
     404              : }
     405              : 
     406              : } // namespace EnergyPlus
        

Generated by: LCOV version 2.0-1