LCOV - code coverage report
Current view: top level - EnergyPlus - DataLoopNode.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 3 6 50.0 %
Date: 2024-08-24 18:31:18 Functions: 2 3 66.7 %

          Line data    Source code
       1             : // EnergyPlus, Copyright (c) 1996-2024, 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 DataLoopNode_hh_INCLUDED
      49             : #define DataLoopNode_hh_INCLUDED
      50             : 
      51             : // ObjexxFCL Headers
      52             : #include <ObjexxFCL/Array1D.hh>
      53             : 
      54             : // EnergyPlus Headers
      55             : #include <EnergyPlus/Data/BaseData.hh>
      56             : #include <EnergyPlus/DataEnvironment.hh>
      57             : #include <EnergyPlus/DataGlobals.hh>
      58             : #include <EnergyPlus/DataHVACGlobals.hh>
      59             : #include <EnergyPlus/EnergyPlus.hh>
      60             : 
      61             : namespace EnergyPlus {
      62             : 
      63             : namespace DataLoopNode {
      64             : 
      65             :     enum class NodeFluidType
      66             :     {
      67             :         Invalid = -1,
      68             :         Blank, // TODO: remove, should be same as Invalid
      69             :         Air,
      70             :         Water,
      71             :         Steam,
      72             :         Electric, // TODO: Electric node "fluid" type?
      73             :         Num
      74             :     };
      75             : 
      76             :     enum class ConnectionType
      77             :     {
      78             :         Invalid = -1,
      79             :         Blank, // TODO: remove, should be same as Invalid
      80             :         Inlet,
      81             :         Outlet,
      82             :         Internal,
      83             :         ZoneNode,
      84             :         Sensor,
      85             :         Actuator,
      86             :         OutsideAir,
      87             :         ReliefAir,
      88             :         ZoneInlet,
      89             :         ZoneReturn,
      90             :         ZoneExhaust,
      91             :         SetPoint,
      92             :         Electric,
      93             :         OutsideAirReference,
      94             :         InducedAir,
      95             :         Num
      96             :     };
      97             : 
      98             :     constexpr Real64 SensedLoadFlagValue(-999.0);
      99             :     constexpr Real64 SensedNodeFlagValue(-999.0);
     100             : 
     101             :     // Valid IsParent Types for Node Connections
     102             :     constexpr bool ObjectIsParent(true);
     103             :     constexpr bool ObjectIsNotParent(false);
     104             :     constexpr bool IncrementFluidStreamYes(true);
     105             : 
     106             :     // Valid Fluid Types for Nodes
     107             :     constexpr static std::array<std::string_view, static_cast<int>(NodeFluidType::Num)> NodeFluidTypeNames = {
     108             :         "blank", "Air", "Water", "Steam", "Electric"};
     109             : 
     110             :     constexpr static std::array<std::string_view, static_cast<int>(NodeFluidType::Num)> NodeFluidTypeNamesUC = {
     111             :         "BLANK", "AIR", "WATER", "STEAM", "ELECTRIC"};
     112             : 
     113             :     constexpr static std::array<std::string_view, static_cast<int>(ConnectionType::Num)> ConnectionTypeNames = {"blank",
     114             :                                                                                                                 "Inlet",
     115             :                                                                                                                 "Outlet",
     116             :                                                                                                                 "Internal",
     117             :                                                                                                                 "ZoneNode",
     118             :                                                                                                                 "Sensor",
     119             :                                                                                                                 "Actuator",
     120             :                                                                                                                 "OutdoorAir",
     121             :                                                                                                                 "ReliefAir",
     122             :                                                                                                                 "ZoneInlet",
     123             :                                                                                                                 "ZoneReturn",
     124             :                                                                                                                 "ZoneExhaust",
     125             :                                                                                                                 "Setpoint",
     126             :                                                                                                                 "Electric",
     127             :                                                                                                                 "OutsideAirReference",
     128             :                                                                                                                 "InducedAir"};
     129             : 
     130             :     constexpr static std::array<std::string_view, static_cast<int>(ConnectionType::Num)> ConnectionTypeNamesUC = {"BLANK",
     131             :                                                                                                                   "INLET",
     132             :                                                                                                                   "OUTLET",
     133             :                                                                                                                   "INTERNAL",
     134             :                                                                                                                   "ZONENODE",
     135             :                                                                                                                   "SENSOR",
     136             :                                                                                                                   "ACTUATOR",
     137             :                                                                                                                   "OUTDOORAIR",
     138             :                                                                                                                   "RELIEFAIR",
     139             :                                                                                                                   "ZONEINLET",
     140             :                                                                                                                   "ZONERETURN",
     141             :                                                                                                                   "ZONEEXHAUST",
     142             :                                                                                                                   "SETPOINT",
     143             :                                                                                                                   "ELECTRIC",
     144             :                                                                                                                   "OUTSIDEAIRREFERENCE",
     145             :                                                                                                                   "INDUCEDAIR"};
     146             : 
     147             :     enum class ConnectionObjectType
     148             :     {
     149             :         Invalid = -1,
     150             :         Undefined,
     151             :         AirConditionerVariableRefrigerantFlow,
     152             :         AirLoopHVAC,
     153             :         AirLoopHVACDedicatedOutdoorAirSystem,
     154             :         AirLoopHVACExhaustSystem,
     155             :         AirLoopHVACMixer,
     156             :         AirLoopHVACOutdoorAirsystem,
     157             :         AirLoopHVACReturnPath,
     158             :         AirLoopHVACReturnPlenum,
     159             :         AirLoopHVACSplitter,
     160             :         AirLoopHVACSupplyPath,
     161             :         AirLoopHVACSupplyPlenum,
     162             :         AirLoopHVACUnitaryFurnaceHeatCool,
     163             :         AirLoopHVACUnitaryFurnaceHeatOnly,
     164             :         AirLoopHVACUnitaryHeatCool,
     165             :         AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass,
     166             :         AirLoopHVACUnitaryHeatOnly,
     167             :         AirLoopHVACUnitaryHeatPumpAirToAir,
     168             :         AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed,
     169             :         AirLoopHVACUnitaryHeatPumpWaterToAir,
     170             :         AirLoopHVACUnitarySystem,
     171             :         AirLoopHVACZoneMixer,
     172             :         AirLoopHVACZoneSplitter,
     173             :         AirTerminalDualDuctConstantVolume,
     174             :         AirTerminalDualDuctConstantVolumeCool,
     175             :         AirTerminalDualDuctConstantVolumeHeat,
     176             :         AirTerminalDualDuctVAV,
     177             :         AirTerminalDualDuctVAVCool,
     178             :         AirTerminalDualDuctVAVHeat,
     179             :         AirTerminalDualDuctVAVOutdoorAir,
     180             :         AirTerminalDualDuctVAVOutdoorAirOutdoorAir,
     181             :         AirTerminalDualDuctVAVOutdoorAirRecirculatedAir,
     182             :         AirTerminalSingleDuctConstantVolumeCooledBeam,
     183             :         AirTerminalSingleDuctConstantVolumeFourPipeBeam,
     184             :         AirTerminalSingleDuctConstantVolumeFourPipeInduction,
     185             :         AirTerminalSingleDuctConstantVolumeNoReheat,
     186             :         AirTerminalSingleDuctConstantVolumeReheat,
     187             :         AirTerminalSingleDuctMixer,
     188             :         AirTerminalSingleDuctParallelPIUReheat,
     189             :         AirTerminalSingleDuctSeriesPIUReheat,
     190             :         AirTerminalSingleDuctUserDefined,
     191             :         AirTerminalSingleDuctVAVHeatAndCoolNoReheat,
     192             :         AirTerminalSingleDuctVAVHeatAndCoolReheat,
     193             :         AirTerminalSingleDuctVAVNoReheat,
     194             :         AirTerminalSingleDuctVAVReheat,
     195             :         AirTerminalSingleDuctVAVReheatVariableSpeedFan,
     196             :         AvailabilityManagerDifferentialThermostat,
     197             :         AvailabilityManagerHighTemperatureTurnOff,
     198             :         AvailabilityManagerHighTemperatureTurnOn,
     199             :         AvailabilityManagerLowTemperatureTurnOff,
     200             :         AvailabilityManagerLowTemperatureTurnOn,
     201             :         BoilerHotWater,
     202             :         BoilerSteam,
     203             :         Branch,
     204             :         CentralHeatPumpSystem,
     205             :         ChillerAbsorption,
     206             :         ChillerAbsorptionIndirect,
     207             :         ChillerCombustionTurbine,
     208             :         ChillerConstantCOP,
     209             :         ChillerElectric,
     210             :         ChillerElectricEIR,
     211             :         ChillerElectricReformulatedEIR,
     212             :         ChillerElectricASHRAE205,
     213             :         ChillerEngineDriven,
     214             :         ChillerHeaterAbsorptionDirectFired,
     215             :         ChillerHeaterAbsorptionDoubleEffect,
     216             :         CoilCoolingDX,
     217             :         CoilCoolingDXCurveFitSpeed,
     218             :         CoilCoolingDXMultiSpeed,
     219             :         CoilCoolingDXSingleSpeed,
     220             :         CoilCoolingDXSingleSpeedThermalStorage,
     221             :         CoilCoolingDXSubcoolReheat,
     222             :         CoilCoolingDXTwoSpeed,
     223             :         CoilCoolingDXTwoStageWithHumidityControlMode,
     224             :         CoilCoolingDXVariableRefrigerantFlow,
     225             :         CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl,
     226             :         CoilCoolingDXVariableSpeed,
     227             :         CoilCoolingWater,
     228             :         CoilCoolingWaterDetailedGeometry,
     229             :         CoilCoolingWaterToAirHeatPumpEquationFit,
     230             :         CoilCoolingWaterToAirHeatPumpParameterEstimation,
     231             :         CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit,
     232             :         CoilHeatingDXMultiSpeed,
     233             :         CoilHeatingDXSingleSpeed,
     234             :         CoilHeatingDXVariableRefrigerantFlow,
     235             :         CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl,
     236             :         CoilHeatingDXVariableSpeed,
     237             :         CoilHeatingDesuperheater,
     238             :         CoilHeatingElectric,
     239             :         CoilHeatingElectricMultiStage,
     240             :         CoilHeatingFuel,
     241             :         CoilHeatingGasMultiStage,
     242             :         CoilHeatingSteam,
     243             :         CoilHeatingWater,
     244             :         CoilHeatingWaterToAirHeatPumpEquationFit,
     245             :         CoilHeatingWaterToAirHeatPumpParameterEstimation,
     246             :         CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit,
     247             :         CoilUserDefined,
     248             :         CoilWaterHeatingAirToWaterHeatPumpPumped,
     249             :         CoilWaterHeatingAirToWaterHeatPumpVariableSpeed,
     250             :         CoilWaterHeatingAirToWaterHeatPumpWrapped,
     251             :         CoilWaterHeatingDesuperheater,
     252             :         CoilSystemCoolingDX,
     253             :         CoilSystemCoolingDXHeatExchangerAssisted,
     254             :         CoilSystemCoolingWater,
     255             :         CoilSystemCoolingWaterHeatExchangerAssisted,
     256             :         CoilSystemHeatingDX,
     257             :         CoilSystemIntegratedHeatPumpAirSource,
     258             :         Condenser,
     259             :         CondenserLoop,
     260             :         ConnectorMixer,
     261             :         ConnectorSplitter,
     262             :         ControllerOutdoorAir,
     263             :         ControllerWaterCoil,
     264             :         CoolingTowerSingleSpeed,
     265             :         CoolingTowerTwoSpeed,
     266             :         CoolingTowerVariableSpeed,
     267             :         CoolingTowerVariableSpeedMerkel,
     268             :         DehumidifierDesiccantNoFans,
     269             :         DehumidifierDesiccantSystem,
     270             :         DistrictCooling,
     271             :         DistrictHeatingWater,
     272             :         DistrictHeatingSteam,
     273             :         Duct,
     274             :         ElectricEquipmentITEAirCooled,
     275             :         EvaporativeCoolerDirectCelDekPad,
     276             :         EvaporativeCoolerDirectResearchSpecial,
     277             :         EvaporativeCoolerIndirectCelDekPad,
     278             :         EvaporativeCoolerIndirectResearchSpecial,
     279             :         EvaporativeCoolerIndirectWetCoil,
     280             :         EvaporativeFluidCoolerSingleSpeed,
     281             :         EvaporativeFluidCoolerTwoSpeed,
     282             :         FanComponentModel,
     283             :         FanConstantVolume,
     284             :         FanOnOff,
     285             :         FanSystemModel,
     286             :         FanVariableVolume,
     287             :         FanZoneExhaust,
     288             :         FluidCoolerSingleSpeed,
     289             :         FluidCoolerTwoSpeed,
     290             :         GeneratorCombustionTurbine,
     291             :         GeneratorFuelCellAirSupply,
     292             :         GeneratorFuelCellExhaustGasToWaterHeatExchanger,
     293             :         GeneratorFuelCellPowerModule,
     294             :         GeneratorFuelCellStackCooler,
     295             :         GeneratorFuelCellWaterSupply,
     296             :         GeneratorFuelSupply,
     297             :         GeneratorInternalCombustionEngine,
     298             :         GeneratorMicroCHP,
     299             :         GeneratorMicroTurbine,
     300             :         GroundHeatExchangerHorizontalTrench,
     301             :         GroundHeatExchangerPond,
     302             :         GroundHeatExchangerSlinky,
     303             :         GroundHeatExchangerSurface,
     304             :         GroundHeatExchangerSystem,
     305             :         HeaderedPumpsConstantSpeed,
     306             :         HeaderedPumpsVariableSpeed,
     307             :         HeatExchangerAirToAirFlatPlate,
     308             :         HeatExchangerAirToAirSensibleAndLatent,
     309             :         HeatExchangerDesiccantBalancedFlow,
     310             :         HeatExchangerFluidToFluid,
     311             :         HeatPumpFuelFiredCooling,
     312             :         HeatPumpFuelFiredHeating,
     313             :         HeatPumpPlantLoopEIRCooling,
     314             :         HeatPumpPlantLoopEIRHeating,
     315             :         HeatPumpWaterToWaterEquationFitCooling,
     316             :         HeatPumpWaterToWaterEquationFitHeating,
     317             :         HeatPumpWaterToWaterParameterEstimationCooling,
     318             :         HeatPumpWaterToWaterParameterEstimationHeating,
     319             :         HumidifierSteamElectric,
     320             :         HumidifierSteamGas,
     321             :         Lights,
     322             :         LoadProfilePlant,
     323             :         OutdoorAirMixer,
     324             :         OutdoorAirNode,
     325             :         OutdoorAirNodeList,
     326             :         PipeAdiabatic,
     327             :         PipeAdiabaticSteam,
     328             :         PipeIndoor,
     329             :         PipeOutdoor,
     330             :         PipeUnderground,
     331             :         PipingSystemUndergroundPipeCircuit,
     332             :         PlantComponentTemperatureSource,
     333             :         PlantComponentUserDefined,
     334             :         PlantEquipmentOperationChillerHeaterChangeover,
     335             :         PlantEquipmentOperationComponentSetpoint,
     336             :         PlantEquipmentOperationOutdoorDewpointDifference,
     337             :         PlantEquipmentOperationOutdoorDrybulbDifference,
     338             :         PlantEquipmentOperationOutdoorWetbulbDifference,
     339             :         PlantEquipmentOperationThermalEnergyStorage,
     340             :         PlantLoop,
     341             :         PumpConstantSpeed,
     342             :         PumpConstantVolume,
     343             :         PumpVariableSpeed,
     344             :         PumpVariableSpeedCondensate,
     345             :         RefrigerationCompressorRack,
     346             :         RefrigerationCondenserAirCooled,
     347             :         RefrigerationCondenserEvaporativeCooled,
     348             :         RefrigerationCondenserWaterCooled,
     349             :         RefrigerationGasCoolerAirCooled,
     350             :         SetpointManagerColdest,
     351             :         SetpointManagerCondenserEnteringReset,
     352             :         SetpointManagerCondenserEnteringResetIdeal,
     353             :         SetpointManagerFollowGroundTemperature,
     354             :         SetpointManagerFollowOutdoorAirTemperature,
     355             :         SetpointManagerFollowSystemNodeTemperature,
     356             :         SetpointManagerMixedAir,
     357             :         SetpointManagerMultiZoneCoolingAverage,
     358             :         SetpointManagerMultiZoneHeatingAverage,
     359             :         SetpointManagerMultiZoneHumidityMaximum,
     360             :         SetpointManagerMultiZoneHumidityMinimum,
     361             :         SetpointManagerMultiZoneMaximumHumidityAverage,
     362             :         SetpointManagerMultiZoneMinimumHumidityAverage,
     363             :         SetpointManagerOutdoorAirPretreat,
     364             :         SetpointManagerOutdoorAirReset,
     365             :         SetpointManagerReturnTemperatureChilledWater,
     366             :         SetpointManagerReturnTemperatureHotWater,
     367             :         SetpointManagerScheduled,
     368             :         SetpointManagerScheduledDualSetpoint,
     369             :         SetpointManagerSingleZoneCooling,
     370             :         SetpointManagerSingleZoneHeating,
     371             :         SetpointManagerSingleZoneHumidityMaximum,
     372             :         SetpointManagerSingleZoneHumidityMinimum,
     373             :         SetpointManagerSingleZoneOneStageCooling,
     374             :         SetpointManagerSingleZoneOneStageHeating,
     375             :         SetpointManagerSingleZoneReheat,
     376             :         SetpointManagerSystemNodeResetTemperature,
     377             :         SetpointManagerSystemNodeResetHumidity,
     378             :         SetpointManagerWarmest,
     379             :         SetpointManagerWarmestTemperatureFlow,
     380             :         SolarCollectorFlatPlatePhotovoltaicThermal,
     381             :         SolarCollectorFlatPlateWater,
     382             :         SolarCollectorIntegralCollectorStorage,
     383             :         SolarCollectorUnglazedTranspired,
     384             :         SurfacePropertyLocalEnvironment,
     385             :         SwimmingPoolIndoor,
     386             :         TemperingValve,
     387             :         ThermalStorageChilledWaterMixed,
     388             :         ThermalStorageChilledWaterStratified,
     389             :         ThermalStorageIceDetailed,
     390             :         ThermalStorageIceSimple,
     391             :         WaterHeaterHeatPump,
     392             :         WaterHeaterHeatPumpPumpedCondenser,
     393             :         WaterHeaterHeatPumpWrappedCondenser,
     394             :         WaterHeaterMixed,
     395             :         WaterHeaterStratified,
     396             :         WaterUseConnections,
     397             :         ZoneHVACAirDistributionUnit,
     398             :         ZoneHVACBaseboardConvectiveElectric,
     399             :         ZoneHVACBaseboardConvectiveWater,
     400             :         ZoneHVACBaseboardRadiantConvectiveElectric,
     401             :         ZoneHVACBaseboardRadiantConvectiveSteam,
     402             :         ZoneHVACBaseboardRadiantConvectiveWater,
     403             :         ZoneHVACCoolingPanelRadiantConvectiveWater,
     404             :         ZoneHVACDehumidifierDX,
     405             :         ZoneHVACEnergyRecoveryVentilator,
     406             :         ZoneHVACEquipmentConnections,
     407             :         ZoneHVACEvaporativeCoolerUnit,
     408             :         ZoneHVACExhaustControl,
     409             :         ZoneHVACForcedAirUserDefined,
     410             :         ZoneHVACFourPipeFanCoil,
     411             :         ZoneHVACHighTemperatureRadiant,
     412             :         ZoneHVACHybridUnitaryHVAC,
     413             :         ZoneHVACIdealLoadsAirSystem,
     414             :         ZoneHVACLowTemperatureRadiantConstantFlow,
     415             :         ZoneHVACLowTemperatureRadiantVariableFlow,
     416             :         ZoneHVACOutdoorAirUnit,
     417             :         ZoneHVACPackagedTerminalAirConditioner,
     418             :         ZoneHVACPackagedTerminalHeatPump,
     419             :         ZoneHVACRefrigerationChillerSet,
     420             :         ZoneHVACTerminalUnitVariableRefrigerantFlow,
     421             :         ZoneHVACUnitHeater,
     422             :         ZoneHVACUnitVentilator,
     423             :         ZoneHVACVentilatedSlab,
     424             :         ZoneHVACWaterToAirHeatPump,
     425             :         ZoneHVACWindowAirConditioner,
     426             :         ZonePropertyLocalEnvironment,
     427             :         SpaceHVACEquipmentConnections,
     428             :         SpaceHVACZoneEquipmentSplitter,
     429             :         SpaceHVACZoneEquipmentMixer,
     430             :         SpaceHVACZoneReturnMixer,
     431             :         Num,
     432             :     };
     433             : 
     434             :     // Types
     435             :     struct NodeData
     436             :     {
     437             :         // Members
     438             :         NodeFluidType FluidType = NodeFluidType::Blank;      // must be one of the valid parameters
     439             :         int FluidIndex = 0;                                  // For Fluid Properties
     440             :         Real64 Temp = 0.0;                                   // {C}
     441             :         Real64 TempMin = 0.0;                                // {C}
     442             :         Real64 TempMax = 0.0;                                // {C}
     443             :         Real64 TempSetPoint = SensedNodeFlagValue;           // {C}
     444             :         Real64 TempLastTimestep = 0.0;                       // [C}
     445             :         Real64 MassFlowRateRequest = 0.0;                    // {kg/s}
     446             :         Real64 MassFlowRate = 0.0;                           // {kg/s}
     447             :         Real64 MassFlowRateMin = 0.0;                        // {kg/s}
     448             :         Real64 MassFlowRateMax = SensedNodeFlagValue;        // {kg/s}
     449             :         Real64 MassFlowRateMinAvail = 0.0;                   // {kg/s}
     450             :         Real64 MassFlowRateMaxAvail = 0.0;                   // {kg/s}
     451             :         Real64 MassFlowRateSetPoint = 0.0;                   // {kg/s}
     452             :         Real64 Quality = 0.0;                                // {0.0-1.0 vapor fraction/percent}
     453             :         Real64 Press = DataEnvironment::StdPressureSeaLevel; // {Pa}
     454             :         Real64 Enthalpy = 0.0;                               // {J/kg}
     455             :         Real64 EnthalpyLastTimestep = 0.0;                   // {J/kg}
     456             :         Real64 HumRat = 0.0;                                 // {}
     457             :         Real64 HumRatMin = SensedNodeFlagValue;              // {}
     458             :         Real64 HumRatMax = SensedNodeFlagValue;              // {}
     459             :         Real64 HumRatSetPoint = SensedNodeFlagValue;         // {}
     460             :         Real64 TempSetPointHi = SensedNodeFlagValue;         // {C}
     461             :         Real64 TempSetPointLo = SensedNodeFlagValue;         // {C}
     462             :         Real64 Height = -1.0;                                // {m}
     463             : 
     464             :         //  Following are for Outdoor Air Nodes Scheduled Properties
     465             :         bool IsLocalNode = false;
     466             :         int OutAirDryBulbSchedNum = 0;
     467             :         int OutAirWetBulbSchedNum = 0;
     468             :         int OutAirWindSpeedSchedNum = 0;
     469             :         int OutAirWindDirSchedNum = 0;
     470             : 
     471             :         //  Following are for Outdoor Air Nodes "read only"
     472             :         Real64 OutAirDryBulb = 0.0;              // {C}
     473             :         bool EMSOverrideOutAirDryBulb = false;   // if true, the EMS is calling to override outdoor air node drybulb setting
     474             :         Real64 EMSValueForOutAirDryBulb = 0.0;   // value EMS is directing to use for outdoor air node's drybulb {C}
     475             :         Real64 OutAirWetBulb = 0.0;              // {C}
     476             :         bool EMSOverrideOutAirWetBulb = false;   // if true, the EMS is calling to override outdoor air node wetbulb setting
     477             :         Real64 EMSValueForOutAirWetBulb = 0.0;   // value EMS is directing to use for outdoor air node's wetbulb {C}
     478             :         Real64 OutAirWindSpeed = 0.0;            // {m/s}
     479             :         bool EMSOverrideOutAirWindSpeed = false; // if true, the EMS is calling to override outdoor air node wind speed setting
     480             :         Real64 EMSValueForOutAirWindSpeed = 0.0; // value EMS is directing to use for outdoor air node's drybulb {m/s}
     481             :         Real64 OutAirWindDir = 0.0;              // {degree}
     482             :         bool EMSOverrideOutAirWindDir = false;   // if true, the EMS is calling to override outdoor air node wind direction setting
     483             :         Real64 EMSValueForOutAirWindDir = 0.0;   // value EMS is directing to use for outdoor air node's wind directio {degree}
     484             :         // Contaminant
     485             :         Real64 CO2 = 0.0;                  // {ppm}
     486             :         Real64 CO2SetPoint = 0.0;          // {ppm}
     487             :         Real64 GenContam = 0.0;            // {ppm}
     488             :         Real64 GenContamSetPoint = 0.0;    // {ppm}
     489             :         bool SPMNodeWetBulbRepReq = false; // Set to true when node has SPM which follows wetbulb
     490             : 
     491             :         // error message flag
     492             :         bool plantNodeErrorMsgIssued = false;
     493             : 
     494             :         // Default Constructor
     495       63117 :         NodeData() = default;
     496             :     };
     497             : 
     498             :     struct MoreNodeData
     499             :     {
     500             :         // Members
     501             :         Real64 RelHumidity = 0.0;        // {%}
     502             :         Real64 ReportEnthalpy = 0.0;     // specific enthalpy calculated at the HVAC timestep [J/kg]
     503             :         Real64 VolFlowRateStdRho = 0.0;  // volume flow rate at standard density [m3/s]
     504             :         Real64 VolFlowRateCrntRho = 0.0; // volume flow rate at current density, only used for air nodes [m3/s]
     505             :         Real64 WetBulbTemp = 0.0;        // wetbulb temperature [C]
     506             :         Real64 Density = 0.0;            // reported density at current temperature [kg/m3]
     507             :         Real64 AirDewPointTemp = 0.0;    // reported system node dewpoint temperature [C]
     508             :         Real64 SpecificHeat = 0.0;       // reported node specific heat [J/kg-C]
     509             :     };
     510             : 
     511             :     struct MarkedNodeData
     512             :     {
     513             :         // Members
     514             :         bool IsMarked = false;                                           // true if this is a marked node
     515             :         ConnectionObjectType ObjectType = ConnectionObjectType::Invalid; // Object Type that needs it "marked"
     516             :         std::string ObjectName;                                          // Object Name that needs it "marked"
     517             :         std::string FieldName;                                           // FieldName that needs it "marked"
     518             :     };
     519             : 
     520             :     // A struct to defer checking whether a node did correctly get a setpoint via the API / PythonPlugin
     521             :     struct NodeSetpointCheckData
     522             :     {
     523             :         bool needsSetpointChecking = false;
     524             :         std::array<bool, (int)HVAC::CtrlVarType::Num> checkSetPoint = {false, false, false, false, false, false, false, false, false};
     525             :     };
     526             : } // namespace DataLoopNode
     527             : 
     528             : struct LoopNodeData : BaseGlobalStruct
     529             : {
     530             : 
     531             :     int NumOfNodes = 0;
     532             :     int NumofSplitters = 0;
     533             :     int NumofMixers = 0;
     534             :     Array1D_string NodeID;
     535             :     Array1D<DataLoopNode::NodeData> Node; // dim to num nodes in SimHVAC
     536             :     DataLoopNode::NodeData DefaultNodeValues{DataLoopNode::NodeData()};
     537             :     Array1D<DataLoopNode::MoreNodeData> MoreNodeInfo;
     538             :     Array1D<DataLoopNode::MarkedNodeData> MarkedNode;
     539             :     Array1D<DataLoopNode::NodeSetpointCheckData> NodeSetpointCheck;
     540             : 
     541         796 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     542             :     {
     543         796 :     }
     544             : 
     545           0 :     void clear_state() override
     546             :     {
     547           0 :         new (this) LoopNodeData();
     548           0 :     }
     549             : };
     550             : 
     551             : } // namespace EnergyPlus
     552             : 
     553             : #endif

Generated by: LCOV version 1.14