LCOV - code coverage report
Current view: top level - EnergyPlus - DataLoopNode.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 9 12 75.0 %
Date: 2023-01-17 19:17:23 Functions: 10 14 71.4 %

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

Generated by: LCOV version 1.13