LCOV - code coverage report
Current view: top level - EnergyPlus - DataLoopNode.hh (source / functions) Coverage Total Hit
Test: lcov.output.filtered Lines: 100.0 % 8 8
Test Date: 2025-05-22 16:09:37 Functions: 100.0 % 4 4

            Line data    Source code
       1              : // EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois,
       2              : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
       3              : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
       4              : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
       5              : // contributors. All rights reserved.
       6              : //
       7              : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
       8              : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
       9              : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
      10              : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
      11              : // derivative works, and perform publicly and display publicly, and to permit others to do so.
      12              : //
      13              : // Redistribution and use in source and binary forms, with or without modification, are permitted
      14              : // provided that the following conditions are met:
      15              : //
      16              : // (1) Redistributions of source code must retain the above copyright notice, this list of
      17              : //     conditions and the following disclaimer.
      18              : //
      19              : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
      20              : //     conditions and the following disclaimer in the documentation and/or other materials
      21              : //     provided with the distribution.
      22              : //
      23              : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
      24              : //     the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
      25              : //     used to endorse or promote products derived from this software without specific prior
      26              : //     written permission.
      27              : //
      28              : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
      29              : //     without changes from the version obtained under this License, or (ii) Licensee makes a
      30              : //     reference solely to the software portion of its product, Licensee must refer to the
      31              : //     software as "EnergyPlus version X" software, where "X" is the version number Licensee
      32              : //     obtained under this License and may not use a different name for the software. Except as
      33              : //     specifically required in this Section (4), Licensee shall not use in a company name, a
      34              : //     product name, in advertising, publicity, or other promotional activities any name, trade
      35              : //     name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
      36              : //     similar designation, without the U.S. Department of Energy's prior written consent.
      37              : //
      38              : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
      39              : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
      40              : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
      41              : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      42              : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      43              : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      44              : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
      45              : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
      46              : // POSSIBILITY OF SUCH DAMAGE.
      47              : 
      48              : #ifndef 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              : #include <EnergyPlus/ScheduleManager.hh>
      61              : 
      62              : namespace EnergyPlus {
      63              : 
      64              : namespace DataLoopNode {
      65              : 
      66              :     enum class NodeFluidType
      67              :     {
      68              :         Invalid = -1,
      69              :         Blank, // TODO: remove, should be same as Invalid
      70              :         Air,
      71              :         Water,
      72              :         Steam,
      73              :         Electric, // TODO: Electric node "fluid" type?
      74              :         Num
      75              :     };
      76              : 
      77              :     enum class ConnectionType
      78              :     {
      79              :         Invalid = -1,
      80              :         Blank, // TODO: remove, should be same as Invalid
      81              :         Inlet,
      82              :         Outlet,
      83              :         Internal,
      84              :         ZoneNode,
      85              :         Sensor,
      86              :         Actuator,
      87              :         OutsideAir,
      88              :         ReliefAir,
      89              :         ZoneInlet,
      90              :         ZoneReturn,
      91              :         ZoneExhaust,
      92              :         SetPoint,
      93              :         Electric,
      94              :         OutsideAirReference,
      95              :         InducedAir,
      96              :         Num
      97              :     };
      98              : 
      99              :     constexpr Real64 SensedLoadFlagValue(-999.0);
     100              :     constexpr Real64 SensedNodeFlagValue(-999.0);
     101              : 
     102              :     // Valid IsParent Types for Node Connections
     103              :     constexpr bool ObjectIsParent(true);
     104              :     constexpr bool ObjectIsNotParent(false);
     105              :     constexpr bool IncrementFluidStreamYes(true);
     106              : 
     107              :     // Valid Fluid Types for Nodes
     108              :     constexpr static std::array<std::string_view, static_cast<int>(NodeFluidType::Num)> NodeFluidTypeNames = {
     109              :         "blank", "Air", "Water", "Steam", "Electric"};
     110              : 
     111              :     constexpr static std::array<std::string_view, static_cast<int>(NodeFluidType::Num)> NodeFluidTypeNamesUC = {
     112              :         "BLANK", "AIR", "WATER", "STEAM", "ELECTRIC"};
     113              : 
     114              :     constexpr static std::array<std::string_view, static_cast<int>(ConnectionType::Num)> ConnectionTypeNames = {"blank",
     115              :                                                                                                                 "Inlet",
     116              :                                                                                                                 "Outlet",
     117              :                                                                                                                 "Internal",
     118              :                                                                                                                 "ZoneNode",
     119              :                                                                                                                 "Sensor",
     120              :                                                                                                                 "Actuator",
     121              :                                                                                                                 "OutdoorAir",
     122              :                                                                                                                 "ReliefAir",
     123              :                                                                                                                 "ZoneInlet",
     124              :                                                                                                                 "ZoneReturn",
     125              :                                                                                                                 "ZoneExhaust",
     126              :                                                                                                                 "Setpoint",
     127              :                                                                                                                 "Electric",
     128              :                                                                                                                 "OutsideAirReference",
     129              :                                                                                                                 "InducedAir"};
     130              : 
     131              :     constexpr static std::array<std::string_view, static_cast<int>(ConnectionType::Num)> ConnectionTypeNamesUC = {"BLANK",
     132              :                                                                                                                   "INLET",
     133              :                                                                                                                   "OUTLET",
     134              :                                                                                                                   "INTERNAL",
     135              :                                                                                                                   "ZONENODE",
     136              :                                                                                                                   "SENSOR",
     137              :                                                                                                                   "ACTUATOR",
     138              :                                                                                                                   "OUTDOORAIR",
     139              :                                                                                                                   "RELIEFAIR",
     140              :                                                                                                                   "ZONEINLET",
     141              :                                                                                                                   "ZONERETURN",
     142              :                                                                                                                   "ZONEEXHAUST",
     143              :                                                                                                                   "SETPOINT",
     144              :                                                                                                                   "ELECTRIC",
     145              :                                                                                                                   "OUTSIDEAIRREFERENCE",
     146              :                                                                                                                   "INDUCEDAIR"};
     147              : 
     148              :     enum class ConnectionObjectType
     149              :     {
     150              :         Invalid = -1,
     151              :         Undefined,
     152              :         AirConditionerVariableRefrigerantFlow,
     153              :         AirLoopHVAC,
     154              :         AirLoopHVACDedicatedOutdoorAirSystem,
     155              :         AirLoopHVACExhaustSystem,
     156              :         AirLoopHVACMixer,
     157              :         AirLoopHVACOutdoorAirsystem,
     158              :         AirLoopHVACReturnPath,
     159              :         AirLoopHVACReturnPlenum,
     160              :         AirLoopHVACSplitter,
     161              :         AirLoopHVACSupplyPath,
     162              :         AirLoopHVACSupplyPlenum,
     163              :         AirLoopHVACUnitaryFurnaceHeatCool,
     164              :         AirLoopHVACUnitaryFurnaceHeatOnly,
     165              :         AirLoopHVACUnitaryHeatCool,
     166              :         AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass,
     167              :         AirLoopHVACUnitaryHeatOnly,
     168              :         AirLoopHVACUnitaryHeatPumpAirToAir,
     169              :         AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed,
     170              :         AirLoopHVACUnitaryHeatPumpWaterToAir,
     171              :         AirLoopHVACUnitarySystem,
     172              :         AirLoopHVACZoneMixer,
     173              :         AirLoopHVACZoneSplitter,
     174              :         AirTerminalDualDuctConstantVolume,
     175              :         AirTerminalDualDuctConstantVolumeCool,
     176              :         AirTerminalDualDuctConstantVolumeHeat,
     177              :         AirTerminalDualDuctVAV,
     178              :         AirTerminalDualDuctVAVCool,
     179              :         AirTerminalDualDuctVAVHeat,
     180              :         AirTerminalDualDuctVAVOutdoorAir,
     181              :         AirTerminalDualDuctVAVOutdoorAirOutdoorAir,
     182              :         AirTerminalDualDuctVAVOutdoorAirRecirculatedAir,
     183              :         AirTerminalSingleDuctConstantVolumeCooledBeam,
     184              :         AirTerminalSingleDuctConstantVolumeFourPipeBeam,
     185              :         AirTerminalSingleDuctConstantVolumeFourPipeInduction,
     186              :         AirTerminalSingleDuctConstantVolumeNoReheat,
     187              :         AirTerminalSingleDuctConstantVolumeReheat,
     188              :         AirTerminalSingleDuctMixer,
     189              :         AirTerminalSingleDuctParallelPIUReheat,
     190              :         AirTerminalSingleDuctSeriesPIUReheat,
     191              :         AirTerminalSingleDuctUserDefined,
     192              :         AirTerminalSingleDuctVAVHeatAndCoolNoReheat,
     193              :         AirTerminalSingleDuctVAVHeatAndCoolReheat,
     194              :         AirTerminalSingleDuctVAVNoReheat,
     195              :         AirTerminalSingleDuctVAVReheat,
     196              :         AirTerminalSingleDuctVAVReheatVariableSpeedFan,
     197              :         AvailabilityManagerDifferentialThermostat,
     198              :         AvailabilityManagerHighTemperatureTurnOff,
     199              :         AvailabilityManagerHighTemperatureTurnOn,
     200              :         AvailabilityManagerLowTemperatureTurnOff,
     201              :         AvailabilityManagerLowTemperatureTurnOn,
     202              :         BoilerHotWater,
     203              :         BoilerSteam,
     204              :         Branch,
     205              :         CentralHeatPumpSystem,
     206              :         ChillerAbsorption,
     207              :         ChillerAbsorptionIndirect,
     208              :         ChillerCombustionTurbine,
     209              :         ChillerConstantCOP,
     210              :         ChillerElectric,
     211              :         ChillerElectricEIR,
     212              :         ChillerElectricReformulatedEIR,
     213              :         ChillerElectricASHRAE205,
     214              :         ChillerEngineDriven,
     215              :         ChillerHeaterAbsorptionDirectFired,
     216              :         ChillerHeaterAbsorptionDoubleEffect,
     217              :         CoilCoolingDX,
     218              :         CoilCoolingDXCurveFitSpeed,
     219              :         CoilCoolingDXMultiSpeed,
     220              :         CoilCoolingDXSingleSpeed,
     221              :         CoilCoolingDXSingleSpeedThermalStorage,
     222              :         CoilCoolingDXSubcoolReheat,
     223              :         CoilCoolingDXTwoSpeed,
     224              :         CoilCoolingDXTwoStageWithHumidityControlMode,
     225              :         CoilCoolingDXVariableRefrigerantFlow,
     226              :         CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl,
     227              :         CoilCoolingDXVariableSpeed,
     228              :         CoilCoolingWater,
     229              :         CoilCoolingWaterDetailedGeometry,
     230              :         CoilCoolingWaterToAirHeatPumpEquationFit,
     231              :         CoilCoolingWaterToAirHeatPumpParameterEstimation,
     232              :         CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit,
     233              :         CoilHeatingDXMultiSpeed,
     234              :         CoilHeatingDXSingleSpeed,
     235              :         CoilHeatingDXVariableRefrigerantFlow,
     236              :         CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl,
     237              :         CoilHeatingDXVariableSpeed,
     238              :         CoilHeatingDesuperheater,
     239              :         CoilHeatingElectric,
     240              :         CoilHeatingElectricMultiStage,
     241              :         CoilHeatingFuel,
     242              :         CoilHeatingGasMultiStage,
     243              :         CoilHeatingSteam,
     244              :         CoilHeatingWater,
     245              :         CoilHeatingWaterToAirHeatPumpEquationFit,
     246              :         CoilHeatingWaterToAirHeatPumpParameterEstimation,
     247              :         CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit,
     248              :         CoilUserDefined,
     249              :         CoilWaterHeatingAirToWaterHeatPumpPumped,
     250              :         CoilWaterHeatingAirToWaterHeatPumpVariableSpeed,
     251              :         CoilWaterHeatingAirToWaterHeatPumpWrapped,
     252              :         CoilWaterHeatingDesuperheater,
     253              :         CoilSystemCoolingDX,
     254              :         CoilSystemCoolingDXHeatExchangerAssisted,
     255              :         CoilSystemCoolingWater,
     256              :         CoilSystemCoolingWaterHeatExchangerAssisted,
     257              :         CoilSystemHeatingDX,
     258              :         CoilSystemIntegratedHeatPumpAirSource,
     259              :         Condenser,
     260              :         CondenserLoop,
     261              :         ConnectorMixer,
     262              :         ConnectorSplitter,
     263              :         ControllerOutdoorAir,
     264              :         ControllerWaterCoil,
     265              :         CoolingTowerSingleSpeed,
     266              :         CoolingTowerTwoSpeed,
     267              :         CoolingTowerVariableSpeed,
     268              :         CoolingTowerVariableSpeedMerkel,
     269              :         DehumidifierDesiccantNoFans,
     270              :         DehumidifierDesiccantSystem,
     271              :         DistrictCooling,
     272              :         DistrictHeatingWater,
     273              :         DistrictHeatingSteam,
     274              :         Duct,
     275              :         ElectricEquipmentITEAirCooled,
     276              :         EvaporativeCoolerDirectCelDekPad,
     277              :         EvaporativeCoolerDirectResearchSpecial,
     278              :         EvaporativeCoolerIndirectCelDekPad,
     279              :         EvaporativeCoolerIndirectResearchSpecial,
     280              :         EvaporativeCoolerIndirectWetCoil,
     281              :         EvaporativeFluidCoolerSingleSpeed,
     282              :         EvaporativeFluidCoolerTwoSpeed,
     283              :         FanComponentModel,
     284              :         FanConstantVolume,
     285              :         FanOnOff,
     286              :         FanSystemModel,
     287              :         FanVariableVolume,
     288              :         FanZoneExhaust,
     289              :         FluidCoolerSingleSpeed,
     290              :         FluidCoolerTwoSpeed,
     291              :         GeneratorCombustionTurbine,
     292              :         GeneratorFuelCellAirSupply,
     293              :         GeneratorFuelCellExhaustGasToWaterHeatExchanger,
     294              :         GeneratorFuelCellPowerModule,
     295              :         GeneratorFuelCellStackCooler,
     296              :         GeneratorFuelCellWaterSupply,
     297              :         GeneratorFuelSupply,
     298              :         GeneratorInternalCombustionEngine,
     299              :         GeneratorMicroCHP,
     300              :         GeneratorMicroTurbine,
     301              :         GroundHeatExchangerHorizontalTrench,
     302              :         GroundHeatExchangerPond,
     303              :         GroundHeatExchangerSlinky,
     304              :         GroundHeatExchangerSurface,
     305              :         GroundHeatExchangerSystem,
     306              :         HeaderedPumpsConstantSpeed,
     307              :         HeaderedPumpsVariableSpeed,
     308              :         HeatExchangerAirToAirFlatPlate,
     309              :         HeatExchangerAirToAirSensibleAndLatent,
     310              :         HeatExchangerDesiccantBalancedFlow,
     311              :         HeatExchangerFluidToFluid,
     312              :         HeatPumpFuelFiredCooling,
     313              :         HeatPumpFuelFiredHeating,
     314              :         HeatPumpPlantLoopEIRCooling,
     315              :         HeatPumpPlantLoopEIRHeating,
     316              :         HeatPumpWaterToWaterEquationFitCooling,
     317              :         HeatPumpWaterToWaterEquationFitHeating,
     318              :         HeatPumpWaterToWaterParameterEstimationCooling,
     319              :         HeatPumpWaterToWaterParameterEstimationHeating,
     320              :         HumidifierSteamElectric,
     321              :         HumidifierSteamGas,
     322              :         Lights,
     323              :         LoadProfilePlant,
     324              :         OutdoorAirMixer,
     325              :         OutdoorAirNode,
     326              :         OutdoorAirNodeList,
     327              :         PipeAdiabatic,
     328              :         PipeAdiabaticSteam,
     329              :         PipeIndoor,
     330              :         PipeOutdoor,
     331              :         PipeUnderground,
     332              :         PipingSystemUndergroundPipeCircuit,
     333              :         PlantComponentTemperatureSource,
     334              :         PlantComponentUserDefined,
     335              :         PlantEquipmentOperationChillerHeaterChangeover,
     336              :         PlantEquipmentOperationComponentSetpoint,
     337              :         PlantEquipmentOperationOutdoorDewpointDifference,
     338              :         PlantEquipmentOperationOutdoorDrybulbDifference,
     339              :         PlantEquipmentOperationOutdoorWetbulbDifference,
     340              :         PlantEquipmentOperationThermalEnergyStorage,
     341              :         PlantLoop,
     342              :         PumpConstantSpeed,
     343              :         PumpConstantVolume,
     344              :         PumpVariableSpeed,
     345              :         PumpVariableSpeedCondensate,
     346              :         RefrigerationCompressorRack,
     347              :         RefrigerationCondenserAirCooled,
     348              :         RefrigerationCondenserEvaporativeCooled,
     349              :         RefrigerationCondenserWaterCooled,
     350              :         RefrigerationGasCoolerAirCooled,
     351              :         SetpointManagerColdest,
     352              :         SetpointManagerCondenserEnteringReset,
     353              :         SetpointManagerCondenserEnteringResetIdeal,
     354              :         SetpointManagerFollowGroundTemperature,
     355              :         SetpointManagerFollowOutdoorAirTemperature,
     356              :         SetpointManagerFollowSystemNodeTemperature,
     357              :         SetpointManagerMixedAir,
     358              :         SetpointManagerMultiZoneCoolingAverage,
     359              :         SetpointManagerMultiZoneHeatingAverage,
     360              :         SetpointManagerMultiZoneHumidityMaximum,
     361              :         SetpointManagerMultiZoneHumidityMinimum,
     362              :         SetpointManagerMultiZoneMaximumHumidityAverage,
     363              :         SetpointManagerMultiZoneMinimumHumidityAverage,
     364              :         SetpointManagerOutdoorAirPretreat,
     365              :         SetpointManagerOutdoorAirReset,
     366              :         SetpointManagerReturnTemperatureChilledWater,
     367              :         SetpointManagerReturnTemperatureHotWater,
     368              :         SetpointManagerScheduled,
     369              :         SetpointManagerScheduledDualSetpoint,
     370              :         SetpointManagerSingleZoneCooling,
     371              :         SetpointManagerSingleZoneHeating,
     372              :         SetpointManagerSingleZoneHumidityMaximum,
     373              :         SetpointManagerSingleZoneHumidityMinimum,
     374              :         SetpointManagerSingleZoneOneStageCooling,
     375              :         SetpointManagerSingleZoneOneStageHeating,
     376              :         SetpointManagerSingleZoneReheat,
     377              :         SetpointManagerSystemNodeResetTemperature,
     378              :         SetpointManagerSystemNodeResetHumidity,
     379              :         SetpointManagerWarmest,
     380              :         SetpointManagerWarmestTemperatureFlow,
     381              :         SolarCollectorFlatPlatePhotovoltaicThermal,
     382              :         SolarCollectorFlatPlateWater,
     383              :         SolarCollectorIntegralCollectorStorage,
     384              :         SolarCollectorUnglazedTranspired,
     385              :         SurfacePropertyLocalEnvironment,
     386              :         SwimmingPoolIndoor,
     387              :         TemperingValve,
     388              :         ThermalStorageChilledWaterMixed,
     389              :         ThermalStorageChilledWaterStratified,
     390              :         ThermalStorageIceDetailed,
     391              :         ThermalStorageIceSimple,
     392              :         WaterHeaterHeatPump,
     393              :         WaterHeaterHeatPumpPumpedCondenser,
     394              :         WaterHeaterHeatPumpWrappedCondenser,
     395              :         WaterHeaterMixed,
     396              :         WaterHeaterStratified,
     397              :         WaterUseConnections,
     398              :         ZoneHVACAirDistributionUnit,
     399              :         ZoneHVACBaseboardConvectiveElectric,
     400              :         ZoneHVACBaseboardConvectiveWater,
     401              :         ZoneHVACBaseboardRadiantConvectiveElectric,
     402              :         ZoneHVACBaseboardRadiantConvectiveSteam,
     403              :         ZoneHVACBaseboardRadiantConvectiveWater,
     404              :         ZoneHVACCoolingPanelRadiantConvectiveWater,
     405              :         ZoneHVACDehumidifierDX,
     406              :         ZoneHVACEnergyRecoveryVentilator,
     407              :         ZoneHVACEquipmentConnections,
     408              :         ZoneHVACEvaporativeCoolerUnit,
     409              :         ZoneHVACExhaustControl,
     410              :         ZoneHVACForcedAirUserDefined,
     411              :         ZoneHVACFourPipeFanCoil,
     412              :         ZoneHVACHighTemperatureRadiant,
     413              :         ZoneHVACHybridUnitaryHVAC,
     414              :         ZoneHVACIdealLoadsAirSystem,
     415              :         ZoneHVACLowTemperatureRadiantConstantFlow,
     416              :         ZoneHVACLowTemperatureRadiantVariableFlow,
     417              :         ZoneHVACOutdoorAirUnit,
     418              :         ZoneHVACPackagedTerminalAirConditioner,
     419              :         ZoneHVACPackagedTerminalHeatPump,
     420              :         ZoneHVACRefrigerationChillerSet,
     421              :         ZoneHVACTerminalUnitVariableRefrigerantFlow,
     422              :         ZoneHVACUnitHeater,
     423              :         ZoneHVACUnitVentilator,
     424              :         ZoneHVACVentilatedSlab,
     425              :         ZoneHVACWaterToAirHeatPump,
     426              :         ZoneHVACWindowAirConditioner,
     427              :         ZonePropertyLocalEnvironment,
     428              :         SpaceHVACEquipmentConnections,
     429              :         SpaceHVACZoneEquipmentSplitter,
     430              :         SpaceHVACZoneEquipmentMixer,
     431              :         SpaceHVACZoneReturnMixer,
     432              :         Num,
     433              :     };
     434              : 
     435              :     // Types
     436              :     struct NodeData
     437              :     {
     438              :         // Members
     439              :         NodeFluidType FluidType = NodeFluidType::Blank;      // must be one of the valid parameters
     440              :         int FluidIndex = 0;                                  // For Fluid Properties
     441              :         Real64 Temp = 0.0;                                   // {C}
     442              :         Real64 TempMin = 0.0;                                // {C}
     443              :         Real64 TempMax = 0.0;                                // {C}
     444              :         Real64 TempSetPoint = SensedNodeFlagValue;           // {C}
     445              :         Real64 TempLastTimestep = 0.0;                       // [C}
     446              :         Real64 MassFlowRateRequest = 0.0;                    // {kg/s}
     447              :         Real64 MassFlowRate = 0.0;                           // {kg/s}
     448              :         Real64 MassFlowRateMin = 0.0;                        // {kg/s}
     449              :         Real64 MassFlowRateMax = SensedNodeFlagValue;        // {kg/s}
     450              :         Real64 MassFlowRateMinAvail = 0.0;                   // {kg/s}
     451              :         Real64 MassFlowRateMaxAvail = 0.0;                   // {kg/s}
     452              :         Real64 MassFlowRateSetPoint = 0.0;                   // {kg/s}
     453              :         Real64 Quality = 0.0;                                // {0.0-1.0 vapor fraction/percent}
     454              :         Real64 Press = DataEnvironment::StdPressureSeaLevel; // {Pa}
     455              :         Real64 Enthalpy = 0.0;                               // {J/kg}
     456              :         Real64 EnthalpyLastTimestep = 0.0;                   // {J/kg}
     457              :         Real64 HumRat = 0.0;                                 // {}
     458              :         Real64 HumRatMin = SensedNodeFlagValue;              // {}
     459              :         Real64 HumRatMax = SensedNodeFlagValue;              // {}
     460              :         Real64 HumRatSetPoint = SensedNodeFlagValue;         // {}
     461              :         Real64 TempSetPointHi = SensedNodeFlagValue;         // {C}
     462              :         Real64 TempSetPointLo = SensedNodeFlagValue;         // {C}
     463              :         Real64 Height = -1.0;                                // {m}
     464              : 
     465              :         //  Following are for Outdoor Air Nodes Scheduled Properties
     466              :         bool IsLocalNode = false;
     467              :         Sched::Schedule *outAirDryBulbSched = nullptr;
     468              :         Sched::Schedule *outAirWetBulbSched = nullptr;
     469              :         Sched::Schedule *outAirWindSpeedSched = nullptr;
     470              :         Sched::Schedule *outAirWindDirSched = nullptr;
     471              : 
     472              :         //  Following are for Outdoor Air Nodes "read only"
     473              :         Real64 OutAirDryBulb = 0.0;              // {C}
     474              :         bool EMSOverrideOutAirDryBulb = false;   // if true, the EMS is calling to override outdoor air node drybulb setting
     475              :         Real64 EMSValueForOutAirDryBulb = 0.0;   // value EMS is directing to use for outdoor air node's drybulb {C}
     476              :         Real64 OutAirWetBulb = 0.0;              // {C}
     477              :         bool EMSOverrideOutAirWetBulb = false;   // if true, the EMS is calling to override outdoor air node wetbulb setting
     478              :         Real64 EMSValueForOutAirWetBulb = 0.0;   // value EMS is directing to use for outdoor air node's wetbulb {C}
     479              :         Real64 OutAirWindSpeed = 0.0;            // {m/s}
     480              :         bool EMSOverrideOutAirWindSpeed = false; // if true, the EMS is calling to override outdoor air node wind speed setting
     481              :         Real64 EMSValueForOutAirWindSpeed = 0.0; // value EMS is directing to use for outdoor air node's drybulb {m/s}
     482              :         Real64 OutAirWindDir = 0.0;              // {degree}
     483              :         bool EMSOverrideOutAirWindDir = false;   // if true, the EMS is calling to override outdoor air node wind direction setting
     484              :         Real64 EMSValueForOutAirWindDir = 0.0;   // value EMS is directing to use for outdoor air node's wind directio {degree}
     485              :         // Contaminant
     486              :         Real64 CO2 = 0.0;                  // {ppm}
     487              :         Real64 CO2SetPoint = 0.0;          // {ppm}
     488              :         Real64 GenContam = 0.0;            // {ppm}
     489              :         Real64 GenContamSetPoint = 0.0;    // {ppm}
     490              :         bool SPMNodeWetBulbRepReq = false; // Set to true when node has SPM which follows wetbulb
     491              : 
     492              :         // error message flag
     493              :         bool plantNodeErrorMsgIssued = false;
     494              : 
     495              :         // Default Constructor
     496        10569 :         NodeData() = default;
     497              :     };
     498              : 
     499              :     struct MoreNodeData
     500              :     {
     501              :         // Members
     502              :         Real64 RelHumidity = 0.0;        // {%}
     503              :         Real64 ReportEnthalpy = 0.0;     // specific enthalpy calculated at the HVAC timestep [J/kg]
     504              :         Real64 VolFlowRateStdRho = 0.0;  // volume flow rate at standard density [m3/s]
     505              :         Real64 VolFlowRateCrntRho = 0.0; // volume flow rate at current density, only used for air nodes [m3/s]
     506              :         Real64 WetBulbTemp = 0.0;        // wetbulb temperature [C]
     507              :         Real64 Density = 0.0;            // reported density at current temperature [kg/m3]
     508              :         Real64 AirDewPointTemp = 0.0;    // reported system node dewpoint temperature [C]
     509              :         Real64 SpecificHeat = 0.0;       // reported node specific heat [J/kg-C]
     510              :     };
     511              : 
     512              :     struct MarkedNodeData
     513              :     {
     514              :         // Members
     515              :         bool IsMarked = false;                                           // true if this is a marked node
     516              :         ConnectionObjectType ObjectType = ConnectionObjectType::Invalid; // Object Type that needs it "marked"
     517              :         std::string ObjectName;                                          // Object Name that needs it "marked"
     518              :         std::string FieldName;                                           // FieldName that needs it "marked"
     519              :     };
     520              : 
     521              :     // A struct to defer checking whether a node did correctly get a setpoint via the API / PythonPlugin
     522              :     struct NodeSetpointCheckData
     523              :     {
     524              :         bool needsSetpointChecking = false;
     525              :         std::array<bool, (int)HVAC::CtrlVarType::Num> checkSetPoint = {false, false, false, false, false, false, false, false, false};
     526              :     };
     527              : } // namespace DataLoopNode
     528              : 
     529              : struct LoopNodeData : BaseGlobalStruct
     530              : {
     531              : 
     532              :     int NumOfNodes = 0;
     533              :     int NumofSplitters = 0;
     534              :     int NumofMixers = 0;
     535              :     Array1D_string NodeID;
     536              :     Array1D<DataLoopNode::NodeData> Node; // dim to num nodes in SimHVAC
     537              :     DataLoopNode::NodeData DefaultNodeValues{DataLoopNode::NodeData()};
     538              :     Array1D<DataLoopNode::MoreNodeData> MoreNodeInfo;
     539              :     Array1D<DataLoopNode::MarkedNodeData> MarkedNode;
     540              :     Array1D<DataLoopNode::NodeSetpointCheckData> NodeSetpointCheck;
     541              : 
     542         2126 :     void init_constant_state([[maybe_unused]] EnergyPlusData &state) override
     543              :     {
     544         2126 :     }
     545              : 
     546         1152 :     void init_state([[maybe_unused]] EnergyPlusData &state) override
     547              :     {
     548         1152 :     }
     549              : 
     550         2101 :     void clear_state() override
     551              :     {
     552         2101 :         new (this) LoopNodeData();
     553         2101 :     }
     554              : };
     555              : 
     556              : } // namespace EnergyPlus
     557              : 
     558              : #endif
        

Generated by: LCOV version 2.0-1