LCOV - code coverage report
Current view: top level - EnergyPlus - PlantLoadProfile.cc (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 128 149 85.9 %
Date: 2023-01-17 19:17:23 Functions: 10 11 90.9 %

          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             : // C++ Headers
      49             : #include <cmath>
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array.functions.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/BranchNodeConnections.hh>
      56             : #include <EnergyPlus/Data/EnergyPlusData.hh>
      57             : #include <EnergyPlus/DataHVACGlobals.hh>
      58             : #include <EnergyPlus/DataIPShortCuts.hh>
      59             : #include <EnergyPlus/DataLoopNode.hh>
      60             : #include <EnergyPlus/EMSManager.hh>
      61             : #include <EnergyPlus/FluidProperties.hh>
      62             : #include <EnergyPlus/InputProcessing/InputProcessor.hh>
      63             : #include <EnergyPlus/NodeInputManager.hh>
      64             : #include <EnergyPlus/OutputProcessor.hh>
      65             : #include <EnergyPlus/Plant/DataPlant.hh>
      66             : #include <EnergyPlus/PlantLoadProfile.hh>
      67             : #include <EnergyPlus/PlantUtilities.hh>
      68             : #include <EnergyPlus/ScheduleManager.hh>
      69             : #include <EnergyPlus/UtilityRoutines.hh>
      70             : 
      71             : namespace EnergyPlus::PlantLoadProfile {
      72             : 
      73             : // MODULE INFORMATION:
      74             : //       AUTHOR         Peter Graham Ellis
      75             : //       DATE WRITTEN   January 2004
      76             : //       MODIFIED       Brent Griffith, plant rewrite, general fluid types
      77             : //                      allow flow requests with out load requests
      78             : //       RE-ENGINEERED  na
      79             : 
      80             : // PURPOSE OF THIS MODULE:
      81             : // This module simulates a scheduled load profile on the demand side of the plant loop.
      82             : 
      83             : // METHODOLOGY EMPLOYED:
      84             : // The plant load profile object provides a scheduled load on the plant loop.  Unlike most plant equipment
      85             : // on the demand side, i.e. zone equipment, this object does not have a zone associated with it.
      86             : // For this reason the plant load profile can only be called for simulation by the non-zone equipment
      87             : // manager (see NonZoneEquipmentManager.cc).
      88             : 
      89             : // Using/Aliasing
      90             : 
      91             : using PlantUtilities::InitComponentNodes;
      92             : using PlantUtilities::ScanPlantLoopsForObject;
      93             : using PlantUtilities::SetComponentFlowRate;
      94             : 
      95          25 : PlantComponent *PlantProfileData::factory(EnergyPlusData &state, std::string const &objectName)
      96             : {
      97          25 :     if (state.dataPlantLoadProfile->GetPlantLoadProfileInputFlag) {
      98          21 :         GetPlantProfileInput(state);
      99          21 :         state.dataPlantLoadProfile->GetPlantLoadProfileInputFlag = false;
     100             :     }
     101             :     // Now look for this particular pipe in the list
     102          29 :     for (auto &plp : state.dataPlantLoadProfile->PlantProfile) {
     103          29 :         if (plp.Name == objectName) {
     104          25 :             return &plp;
     105             :         }
     106             :     }
     107             :     // If we didn't find it, fatal
     108           0 :     ShowFatalError(state, "PlantLoadProfile::factory: Error getting inputs for pipe named: " + objectName);
     109             :     // Shut up the compiler
     110           0 :     return nullptr;
     111             : }
     112             : 
     113         125 : void PlantProfileData::onInitLoopEquip(EnergyPlusData &state, [[maybe_unused]] const PlantLocation &calledFromLocation)
     114             : {
     115         125 :     this->InitPlantProfile(state);
     116         125 : }
     117             : 
     118      114609 : void PlantProfileData::simulate(EnergyPlusData &state,
     119             :                                 [[maybe_unused]] const PlantLocation &calledFromLocation,
     120             :                                 [[maybe_unused]] bool const FirstHVACIteration,
     121             :                                 [[maybe_unused]] Real64 &CurLoad,
     122             :                                 [[maybe_unused]] bool const RunFlag)
     123             : {
     124             : 
     125             :     // SUBROUTINE INFORMATION:
     126             :     //       AUTHOR         Peter Graham Ellis
     127             :     //       DATE WRITTEN   January 2004
     128             :     //       MODIFIED       Brent Griffith, generalize fluid cp
     129             :     //       RE-ENGINEERED  na
     130             : 
     131             :     // PURPOSE OF THIS SUBROUTINE:
     132             :     // Simulates the plant load profile object.
     133             : 
     134             :     // METHODOLOGY EMPLOYED:
     135             :     // This is a very simple simulation.  InitPlantProfile does the work of getting the scheduled load and flow rate.
     136             :     // Flow is requested and the actual available flow is set.  The outlet temperature is calculated.
     137             : 
     138             :     // Using/Aliasing
     139             :     using FluidProperties::GetSpecificHeatGlycol;
     140             : 
     141             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
     142             :     static constexpr std::string_view RoutineName("SimulatePlantProfile");
     143             :     Real64 DeltaTemp;
     144             : 
     145      114609 :     this->InitPlantProfile(state);
     146             : 
     147      114609 :     if (this->MassFlowRate > 0.0) {
     148      204172 :         Real64 Cp = GetSpecificHeatGlycol(state,
     149      102086 :                                           state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName,
     150             :                                           this->InletTemp,
     151      102086 :                                           state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex,
     152      102086 :                                           RoutineName);
     153      102086 :         DeltaTemp = this->Power / (this->MassFlowRate * Cp);
     154             :     } else {
     155       12523 :         this->Power = 0.0;
     156       12523 :         DeltaTemp = 0.0;
     157             :     }
     158             : 
     159      114609 :     this->OutletTemp = this->InletTemp - DeltaTemp;
     160             : 
     161      114609 :     this->UpdatePlantProfile(state);
     162      114609 :     this->ReportPlantProfile(state);
     163             : 
     164      114609 : } // simulate()
     165             : 
     166      114734 : void PlantProfileData::InitPlantProfile(EnergyPlusData &state)
     167             : {
     168             : 
     169             :     // SUBROUTINE INFORMATION:
     170             :     //       AUTHOR         Peter Graham Ellis
     171             :     //       DATE WRITTEN   January 2004
     172             :     //       MODIFIED       na
     173             :     //       RE-ENGINEERED  na
     174             : 
     175             :     // PURPOSE OF THIS SUBROUTINE:
     176             :     // Initializes the plant load profile object during the plant simulation.
     177             : 
     178             :     // METHODOLOGY EMPLOYED:
     179             :     // Inlet and outlet nodes are initialized.  The scheduled load and flow rate is obtained, flow is requested, and the
     180             :     // actual available flow is set.
     181             : 
     182             :     // Using/Aliasing
     183             :     using FluidProperties::GetDensityGlycol;
     184             :     using PlantUtilities::RegisterPlantCompDesignFlow;
     185             :     using ScheduleManager::GetCurrentScheduleValue;
     186             :     using ScheduleManager::GetScheduleMaxValue;
     187             : 
     188             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
     189             :     static constexpr std::string_view RoutineName("InitPlantProfile");
     190             :     Real64 FluidDensityInit;
     191             : 
     192             :     // Do the one time initializations
     193             : 
     194      114734 :     if (!state.dataGlobal->SysSizingCalc && this->InitSizing) {
     195          25 :         RegisterPlantCompDesignFlow(state, InletNode, this->PeakVolFlowRate);
     196          25 :         this->InitSizing = false;
     197             :     }
     198             : 
     199      114734 :     if (state.dataGlobal->BeginEnvrnFlag && this->Init) {
     200             :         // Clear node initial conditions
     201         119 :         state.dataLoopNodes->Node(OutletNode).Temp = 0.0;
     202             : 
     203         238 :         FluidDensityInit = GetDensityGlycol(state,
     204         119 :                                             state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName,
     205             :                                             DataGlobalConstants::InitConvTemp,
     206         119 :                                             state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex,
     207             :                                             RoutineName);
     208             : 
     209         119 :         Real64 MaxFlowMultiplier = GetScheduleMaxValue(state, this->FlowRateFracSchedule);
     210             : 
     211         119 :         InitComponentNodes(state, 0.0, this->PeakVolFlowRate * FluidDensityInit * MaxFlowMultiplier, this->InletNode, this->OutletNode);
     212             : 
     213         119 :         this->EMSOverrideMassFlow = false;
     214         119 :         this->EMSMassFlowValue = 0.0;
     215         119 :         this->EMSOverridePower = false;
     216         119 :         this->EMSPowerValue = 0.0;
     217         119 :         this->Init = false;
     218             :     }
     219             : 
     220      114734 :     if (!state.dataGlobal->BeginEnvrnFlag) this->Init = true;
     221             : 
     222      114734 :     this->InletTemp = state.dataLoopNodes->Node(InletNode).Temp;
     223      114734 :     this->Power = GetCurrentScheduleValue(state, this->LoadSchedule);
     224             : 
     225      114734 :     if (this->EMSOverridePower) this->Power = this->EMSPowerValue;
     226             : 
     227      229468 :     FluidDensityInit = GetDensityGlycol(state,
     228      114734 :                                         state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidName,
     229             :                                         this->InletTemp,
     230      114734 :                                         state.dataPlnt->PlantLoop(this->plantLoc.loopNum).FluidIndex,
     231             :                                         RoutineName);
     232             : 
     233             :     // Get the scheduled mass flow rate
     234      114734 :     this->VolFlowRate = this->PeakVolFlowRate * GetCurrentScheduleValue(state, this->FlowRateFracSchedule);
     235             : 
     236      114734 :     this->MassFlowRate = this->VolFlowRate * FluidDensityInit;
     237             : 
     238      114734 :     if (this->EMSOverrideMassFlow) this->MassFlowRate = this->EMSMassFlowValue;
     239             : 
     240             :     // Request the mass flow rate from the plant component flow utility routine
     241      114734 :     SetComponentFlowRate(state, this->MassFlowRate, InletNode, OutletNode, this->plantLoc);
     242             : 
     243      114734 :     this->VolFlowRate = this->MassFlowRate / FluidDensityInit;
     244             : 
     245      114734 : } // InitPlantProfile()
     246             : 
     247      114609 : void PlantProfileData::UpdatePlantProfile(EnergyPlusData &state) const
     248             : {
     249             : 
     250             :     // SUBROUTINE INFORMATION:
     251             :     //       AUTHOR         Peter Graham Ellis
     252             :     //       DATE WRITTEN   January 2004
     253             :     //       MODIFIED       na
     254             :     //       RE-ENGINEERED  na
     255             : 
     256             :     // PURPOSE OF THIS SUBROUTINE:
     257             :     // Updates the node variables with local variables.
     258             : 
     259             :     // Set outlet node variables that are possibly changed
     260      114609 :     state.dataLoopNodes->Node(this->OutletNode).Temp = this->OutletTemp;
     261      114609 : }
     262             : 
     263      114609 : void PlantProfileData::ReportPlantProfile(EnergyPlusData &state)
     264             : {
     265             : 
     266             :     // SUBROUTINE INFORMATION:
     267             :     //       AUTHOR         Peter Graham Ellis
     268             :     //       DATE WRITTEN   January 2004
     269             :     //       MODIFIED       na
     270             :     //       RE-ENGINEERED  na
     271             : 
     272             :     // PURPOSE OF THIS SUBROUTINE:
     273             :     // Calculates report variables.
     274             : 
     275             :     // Using/Aliasing
     276      114609 :     auto &TimeStepSys = state.dataHVACGlobal->TimeStepSys;
     277             : 
     278      114609 :     this->Energy = this->Power * TimeStepSys * DataGlobalConstants::SecInHour;
     279             : 
     280      114609 :     if (this->Energy >= 0.0) {
     281       83700 :         this->HeatingEnergy = this->Energy;
     282       83700 :         this->CoolingEnergy = 0.0;
     283             :     } else {
     284       30909 :         this->HeatingEnergy = 0.0;
     285       30909 :         this->CoolingEnergy = std::abs(this->Energy);
     286             :     }
     287      114609 : }
     288          25 : void PlantProfileData::oneTimeInit_new(EnergyPlusData &state)
     289             : {
     290             :     bool errFlag;
     291             : 
     292          25 :     if (allocated(state.dataPlnt->PlantLoop)) {
     293          25 :         errFlag = false;
     294          25 :         ScanPlantLoopsForObject(state, this->Name, this->Type, this->plantLoc, errFlag, _, _, _, _, _);
     295          25 :         if (errFlag) {
     296           0 :             ShowFatalError(state, "InitPlantProfile: Program terminated for previous conditions.");
     297             :         }
     298             :     }
     299          25 : }
     300           0 : void PlantProfileData::oneTimeInit([[maybe_unused]] EnergyPlusData &state)
     301             : {
     302           0 : }
     303             : 
     304             : // Functions
     305          21 : void GetPlantProfileInput(EnergyPlusData &state)
     306             : {
     307             : 
     308             :     // SUBROUTINE INFORMATION:
     309             :     //       AUTHOR         Peter Graham Ellis
     310             :     //       DATE WRITTEN   January 2004
     311             :     //       MODIFIED       na
     312             :     //       RE-ENGINEERED  na
     313             : 
     314             :     // PURPOSE OF THIS SUBROUTINE:
     315             :     // Gets the plant load profile input from the input file and sets up the objects.
     316             : 
     317             :     // Using/Aliasing
     318             :     using BranchNodeConnections::TestCompSet;
     319             :     using NodeInputManager::GetOnlySingleNode;
     320             :     using ScheduleManager::GetScheduleIndex;
     321             :     using namespace DataLoopNode;
     322             : 
     323             :     // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
     324          21 :     bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
     325             :     int IOStatus;            // Used in GetObjectItem
     326             :     int NumAlphas;           // Number of Alphas for each GetObjectItem call
     327             :     int NumNumbers;          // Number of Numbers for each GetObjectItem call
     328             :     int ProfileNum;          // PLANT LOAD PROFILE (PlantProfile) object number
     329          21 :     auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
     330             : 
     331          21 :     cCurrentModuleObject = "LoadProfile:Plant";
     332          21 :     state.dataPlantLoadProfile->NumOfPlantProfile = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
     333             : 
     334          21 :     if (state.dataPlantLoadProfile->NumOfPlantProfile > 0) {
     335          21 :         state.dataPlantLoadProfile->PlantProfile.allocate(state.dataPlantLoadProfile->NumOfPlantProfile);
     336             : 
     337          46 :         for (ProfileNum = 1; ProfileNum <= state.dataPlantLoadProfile->NumOfPlantProfile; ++ProfileNum) {
     338         150 :             state.dataInputProcessing->inputProcessor->getObjectItem(state,
     339             :                                                                      cCurrentModuleObject,
     340             :                                                                      ProfileNum,
     341          25 :                                                                      state.dataIPShortCut->cAlphaArgs,
     342             :                                                                      NumAlphas,
     343          25 :                                                                      state.dataIPShortCut->rNumericArgs,
     344             :                                                                      NumNumbers,
     345             :                                                                      IOStatus,
     346          25 :                                                                      state.dataIPShortCut->lNumericFieldBlanks,
     347             :                                                                      _,
     348          25 :                                                                      state.dataIPShortCut->cAlphaFieldNames,
     349          25 :                                                                      state.dataIPShortCut->cNumericFieldNames);
     350          25 :             UtilityRoutines::IsNameEmpty(state, state.dataIPShortCut->cAlphaArgs(1), cCurrentModuleObject, ErrorsFound);
     351             : 
     352          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name = state.dataIPShortCut->cAlphaArgs(1);
     353          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).Type =
     354             :                 DataPlant::PlantEquipmentType::PlantLoadProfile; // parameter assigned in DataPlant
     355             : 
     356          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).InletNode = GetOnlySingleNode(state,
     357          25 :                                                                                                state.dataIPShortCut->cAlphaArgs(2),
     358             :                                                                                                ErrorsFound,
     359             :                                                                                                DataLoopNode::ConnectionObjectType::LoadProfilePlant,
     360          25 :                                                                                                state.dataIPShortCut->cAlphaArgs(1),
     361             :                                                                                                DataLoopNode::NodeFluidType::Water,
     362             :                                                                                                DataLoopNode::ConnectionType::Inlet,
     363             :                                                                                                NodeInputManager::CompFluidStream::Primary,
     364          25 :                                                                                                ObjectIsNotParent);
     365          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).OutletNode = GetOnlySingleNode(state,
     366          25 :                                                                                                 state.dataIPShortCut->cAlphaArgs(3),
     367             :                                                                                                 ErrorsFound,
     368             :                                                                                                 DataLoopNode::ConnectionObjectType::LoadProfilePlant,
     369          25 :                                                                                                 state.dataIPShortCut->cAlphaArgs(1),
     370             :                                                                                                 DataLoopNode::NodeFluidType::Water,
     371             :                                                                                                 DataLoopNode::ConnectionType::Outlet,
     372             :                                                                                                 NodeInputManager::CompFluidStream::Primary,
     373          25 :                                                                                                 ObjectIsNotParent);
     374             : 
     375          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).LoadSchedule = GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(4));
     376             : 
     377          25 :             if (state.dataPlantLoadProfile->PlantProfile(ProfileNum).LoadSchedule == 0) {
     378           0 :                 ShowSevereError(state,
     379           0 :                                 cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\"  The Schedule for " +
     380           0 :                                     state.dataIPShortCut->cAlphaFieldNames(4) + " called " + state.dataIPShortCut->cAlphaArgs(4) + " was not found.");
     381           0 :                 ErrorsFound = true;
     382             :             }
     383             : 
     384          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).PeakVolFlowRate = state.dataIPShortCut->rNumericArgs(1);
     385             : 
     386          25 :             state.dataPlantLoadProfile->PlantProfile(ProfileNum).FlowRateFracSchedule = GetScheduleIndex(state, state.dataIPShortCut->cAlphaArgs(5));
     387             : 
     388          25 :             if (state.dataPlantLoadProfile->PlantProfile(ProfileNum).FlowRateFracSchedule == 0) {
     389           0 :                 ShowSevereError(state,
     390           0 :                                 cCurrentModuleObject + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\"  The Schedule for " +
     391           0 :                                     state.dataIPShortCut->cAlphaFieldNames(5) + " called " + state.dataIPShortCut->cAlphaArgs(5) + " was not found.");
     392             : 
     393           0 :                 ErrorsFound = true;
     394             :             }
     395             : 
     396             :             // Check plant connections
     397          25 :             TestCompSet(state,
     398             :                         cCurrentModuleObject,
     399          25 :                         state.dataIPShortCut->cAlphaArgs(1),
     400          25 :                         state.dataIPShortCut->cAlphaArgs(2),
     401          25 :                         state.dataIPShortCut->cAlphaArgs(3),
     402          50 :                         cCurrentModuleObject + " Nodes");
     403             : 
     404             :             // Setup report variables
     405         100 :             SetupOutputVariable(state,
     406             :                                 "Plant Load Profile Mass Flow Rate",
     407             :                                 OutputProcessor::Unit::kg_s,
     408          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).MassFlowRate,
     409             :                                 OutputProcessor::SOVTimeStepType::System,
     410             :                                 OutputProcessor::SOVStoreType::Average,
     411          50 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name);
     412             : 
     413         100 :             SetupOutputVariable(state,
     414             :                                 "Plant Load Profile Heat Transfer Rate",
     415             :                                 OutputProcessor::Unit::W,
     416          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Power,
     417             :                                 OutputProcessor::SOVTimeStepType::System,
     418             :                                 OutputProcessor::SOVStoreType::Average,
     419          50 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name);
     420             : 
     421         100 :             SetupOutputVariable(state,
     422             :                                 "Plant Load Profile Heat Transfer Energy",
     423             :                                 OutputProcessor::Unit::J,
     424          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Energy,
     425             :                                 OutputProcessor::SOVTimeStepType::System,
     426             :                                 OutputProcessor::SOVStoreType::Summed,
     427          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name,
     428             :                                 _,
     429             :                                 "ENERGYTRANSFER",
     430             :                                 "Heating",
     431             :                                 _,
     432          25 :                                 "Plant"); // is EndUseKey right?
     433             : 
     434         100 :             SetupOutputVariable(state,
     435             :                                 "Plant Load Profile Heating Energy",
     436             :                                 OutputProcessor::Unit::J,
     437          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).HeatingEnergy,
     438             :                                 OutputProcessor::SOVTimeStepType::System,
     439             :                                 OutputProcessor::SOVStoreType::Summed,
     440          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name,
     441             :                                 _,
     442             :                                 "PLANTLOOPHEATINGDEMAND",
     443             :                                 "Heating",
     444             :                                 _,
     445          25 :                                 "Plant");
     446             : 
     447         100 :             SetupOutputVariable(state,
     448             :                                 "Plant Load Profile Cooling Energy",
     449             :                                 OutputProcessor::Unit::J,
     450          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).CoolingEnergy,
     451             :                                 OutputProcessor::SOVTimeStepType::System,
     452             :                                 OutputProcessor::SOVStoreType::Summed,
     453          25 :                                 state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name,
     454             :                                 _,
     455             :                                 "PLANTLOOPCOOLINGDEMAND",
     456             :                                 "Cooling",
     457             :                                 _,
     458          25 :                                 "Plant");
     459             : 
     460          25 :             if (state.dataGlobal->AnyEnergyManagementSystemInModel) {
     461           0 :                 SetupEMSActuator(state,
     462             :                                  "Plant Load Profile",
     463           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name,
     464             :                                  "Mass Flow Rate",
     465             :                                  "[kg/s]",
     466           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).EMSOverrideMassFlow,
     467           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).EMSMassFlowValue);
     468           0 :                 SetupEMSActuator(state,
     469             :                                  "Plant Load Profile",
     470           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).Name,
     471             :                                  "Power",
     472             :                                  "[W]",
     473           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).EMSOverridePower,
     474           0 :                                  state.dataPlantLoadProfile->PlantProfile(ProfileNum).EMSPowerValue);
     475             :             }
     476             : 
     477          25 :             if (ErrorsFound) ShowFatalError(state, "Errors in " + cCurrentModuleObject + " input.");
     478             : 
     479             :         } // ProfileNum
     480             :     }
     481          21 : }
     482             : 
     483        2313 : } // namespace EnergyPlus::PlantLoadProfile

Generated by: LCOV version 1.13