LCOV - code coverage report
Current view: top level - EnergyPlus - VentilatedSlab.hh (source / functions) Hit Total Coverage
Test: lcov.output.filtered Lines: 13 39 33.3 %
Date: 2023-01-17 19:17:23 Functions: 8 11 72.7 %

          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 VentilatedSlab_hh_INCLUDED
      49             : #define VentilatedSlab_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             : #include <EnergyPlus/Plant/Enums.hh>
      59             : #include <EnergyPlus/Plant/PlantLocation.hh>
      60             : 
      61             : namespace EnergyPlus {
      62             : 
      63             : // Forward declarations
      64             : struct EnergyPlusData;
      65             : 
      66             : namespace VentilatedSlab {
      67             : 
      68             :     enum class HeatingCoilType
      69             :     {
      70             :         Invalid = -1,
      71             :         Electric,
      72             :         Gas,
      73             :         Water,
      74             :         Steam,
      75             :         Num
      76             :     };
      77             : 
      78             :     enum class CoolingCoilType
      79             :     {
      80             :         Invalid = -1,
      81             :         WaterCooling,
      82             :         DetailedCooling,
      83             :         HXAssisted,
      84             :         Num
      85             :     };
      86             : 
      87             :     // Parameters for outside air control types:
      88             :     enum class OutsideAirControlType
      89             :     {
      90             :         Invalid = -1,
      91             :         VariablePercent,
      92             :         FixedTemperature,
      93             :         FixedOAControl,
      94             :         Num
      95             :     };
      96             : 
      97             :     enum class CoilType
      98             :     {
      99             :         Invalid = -1,
     100             :         None,
     101             :         Heating,
     102             :         Cooling,
     103             :         Both,
     104             :         Num
     105             :     };
     106             : 
     107             :     //  Control Types
     108             :     enum class ControlType
     109             :     {
     110             :         Invalid = -1,
     111             :         MeanAirTemp,        // Controls system using mean air temperature
     112             :         MeanRadTemp,        // Controls system using mean radiant temperature
     113             :         OperativeTemp,      // Controls system using operative temperature
     114             :         OutdoorDryBulbTemp, // Controls system using outside air dry-bulb temperature
     115             :         OutdoorWetBulbTemp, // Controls system using outside air wet-bulb temperature
     116             :         SurfaceTemp,        // Controls system using surface temperature !Phase2-A
     117             :         DewPointTemp,       // Controls system using dew-point temperature of zone!Phase2-A
     118             :         Num
     119             :     };
     120             : 
     121             :     // Ventilated Slab Configurations
     122             :     enum class VentilatedSlabConfig
     123             :     {
     124             :         Invalid = -1,
     125             :         SlabOnly,    // Air circulate through cores of slab only
     126             :         SlabAndZone, // Circulated Air is introduced to zone
     127             :         SeriesSlabs,
     128             :         Num
     129             :     };
     130             : 
     131          16 :     struct VentilatedSlabData
     132             :     {
     133             :         // Members
     134             :         // Input data
     135             :         std::string Name; // name of system
     136             :         int SchedPtr;     // index to schedule
     137             :         int ZonePtr;      // Point to this zone in the Zone derived type
     138             :         // Variables for Delivery Config.
     139             :         Array1D_string ZName;            // Name of zone the system is serving
     140             :         Array1D_int ZPtr;                // Point to this zone in the Zone derived type
     141             :         std::string SurfListName;        // Name of surface/surface list that is the radiant system
     142             :         int NumOfSurfaces;               // Number of surfaces included in this system (coordinated control)
     143             :         Array1D_int SurfacePtr;          // Pointer to the slabs in the Surface derived type
     144             :         Array1D_string SurfaceName;      // Name of surfaces that are the radiant system (can be one or more)
     145             :         Array1D<Real64> SurfaceFlowFrac; // Fraction of flow/pipe length for a particular surface
     146             :         Array1D<Real64> CDiameter;       // Number of core diameter
     147             :         Array1D<Real64> CLength;         // Number of core length
     148             :         Array1D<Real64> CNumbers;        // Number of core numbers
     149             :         Array1D_string SlabIn;           // Name of node that is slab inlet node
     150             :         Array1D_string SlabOut;          // Name of node that is slab outlet node
     151             :         Real64 TotalSurfaceArea;         // Total surface area for all surfaces that are part of this system
     152             :         Real64 CoreDiameter;             // tube diameter for embedded tubing
     153             :         Real64 CoreLength;               // tube length embedded in radiant surface
     154             :         Real64 CoreNumbers;              // tube length embedded in radiant surface
     155             :         ControlType controlType;         // Control type for the system
     156             :         // (MAT, MRT, Op temp, ODB, OWB, DPTZ, Surf Temp.)
     157             :         int ReturnAirNode; // inlet air node number
     158             :         int RadInNode;     // outlet air node number
     159             :         int ZoneAirInNode; // outlet air node number
     160             :         int FanOutletNode; // outlet node number for fan exit
     161             :         // (assumes fan is upstream of heating coil)
     162             :         int MSlabInNode;
     163             :         int MSlabOutNode;
     164             :         std::string FanName; // name of fan
     165             :         int Fan_Index;       // index of fan in array or vector
     166             :         int FanType_Num;     // type of fan
     167             :         int ControlCompTypeNum;
     168             :         int CompErrIndex;
     169             :         Real64 MaxAirVolFlow;                        // m3/s
     170             :         Real64 MaxAirMassFlow;                       // kg/s
     171             :         OutsideAirControlType outsideAirControlType; // type of control; options are VARIABLE PERCENT and FIXED TEMPERATURE
     172             :         int MinOASchedPtr;                           // index to schedule
     173             :         int MaxOASchedPtr;                           // index to schedule
     174             :         // temperature (fixed temp.)
     175             :         int TempSchedPtr;              // index to schedule
     176             :         int OutsideAirNode;            // outside air node number
     177             :         int AirReliefNode;             // relief air node number
     178             :         int OAMixerOutNode;            // outlet node after the outside air mixer (inlet to coils if present)
     179             :         Real64 OutAirVolFlow;          // m3/s
     180             :         Real64 OutAirMassFlow;         // kg/s
     181             :         Real64 MinOutAirVolFlow;       // m3/s
     182             :         Real64 MinOutAirMassFlow;      // kg/s
     183             :         VentilatedSlabConfig SysConfg; // type of coil option; options are BOTH, HEATING, COOLING, AND NONE
     184             :         CoilType coilOption;           // type of coil option; options are BOTH, HEATING, COOLING, AND NONE
     185             :         bool heatingCoilPresent;       // .TRUE. if ventilated slab has a heating coil
     186             :         HeatingCoilType hCoilType;     // type of heating coil (water, gas, electric, etc.)
     187             :         std::string heatingCoilName;   // name of heating coil
     188             :         std::string heatingCoilTypeCh; // type of heating coil (character string)
     189             :         int heatingCoil_Index;
     190             :         DataPlant::PlantEquipmentType heatingCoilType;
     191             :         int heatingCoil_FluidIndex;
     192             :         int heatingCoilSchedPtr; // index to schedule
     193             :         Real64 heatingCoilSchedValue;
     194             :         Real64 MaxVolHotWaterFlow; // m3/s
     195             :         Real64 MaxVolHotSteamFlow; // m3/s
     196             :         Real64 MaxHotWaterFlow;    // kg/s
     197             :         Real64 MaxHotSteamFlow;
     198             :         Real64 MinHotSteamFlow;
     199             :         Real64 MinVolHotWaterFlow; // m3/s
     200             :         Real64 MinVolHotSteamFlow; // m3/s
     201             :         Real64 MinHotWaterFlow;    // kg/s
     202             :         int HotControlNode;        // hot water control node
     203             :         int HotCoilOutNodeNum;     // outlet of coil
     204             :         Real64 HotControlOffset;   // control tolerance
     205             :         PlantLocation HWPlantLoc;  // index for plant component for hot water coil
     206             :         int HotAirHiTempSchedPtr;  // Schedule index for the highest Air temperature
     207             :         int HotAirLoTempSchedPtr;  // Schedule index for the lowest Air temperature
     208             :         // (where the lowest Air temperature is requested)
     209             :         int HotCtrlHiTempSchedPtr; // Schedule index for the highest control temperature
     210             :         // (where the lowest Air temperature is requested)
     211             :         // (where the highest Air temperature is requested)
     212             :         int HotCtrlLoTempSchedPtr; // Schedule index for the lowest control temperature
     213             :         // (where the highest Air temperature is requested)
     214             :         bool coolingCoilPresent;       // .TRUE. if ventilated slab has a cooling coil
     215             :         std::string coolingCoilName;   // name of cooling coil
     216             :         std::string coolingCoilTypeCh; // type of cooling coil (character string)
     217             :         int coolingCoil_Index;
     218             :         std::string coolingCoilPlantName; // name of cooling coil (child<=CoilSystem:Cooling:Water:HeatExchangerAssisted)
     219             :         std::string coolingCoilPlantType; // type of cooling coil (child<=CoilSystem:Cooling:Water:HeatExchangerAssisted)
     220             :         DataPlant::PlantEquipmentType coolingCoilType;
     221             :         CoolingCoilType cCoilType; // type of cooling coil:
     222             :         // 'Coil:Cooling:Water:DetailedGeometry' or
     223             :         // 'CoilSystem:Cooling:Water:HeatExchangerAssisted'
     224             :         int coolingCoilSchedPtr; // index to schedule
     225             :         Real64 coolingCoilSchedValue;
     226             :         Real64 MaxVolColdWaterFlow; // m3/s
     227             :         Real64 MaxColdWaterFlow;    // kg/s
     228             :         Real64 MinVolColdWaterFlow; // m3/s
     229             :         Real64 MinColdWaterFlow;    // kg/s
     230             :         int ColdControlNode;        // chilled water control node
     231             :         int ColdCoilOutNodeNum;     // chilled water coil out nod
     232             :         Real64 ColdControlOffset;   // control tolerance
     233             :         PlantLocation CWPlantLoc;   // index for plant component for chilled water coil
     234             :         int ColdAirHiTempSchedPtr;  // Schedule index for the highest Air temperature
     235             :         int ColdAirLoTempSchedPtr;  // Schedule index for the lowest Air temperature
     236             :         // (where the lowest Air temperature is requested)
     237             :         int ColdCtrlHiTempSchedPtr; // Schedule index for the highest control temperature
     238             :         // (where the lowest Air temperature is requested)
     239             :         // (where the highest Air temperature is requested)
     240             :         int ColdCtrlLoTempSchedPtr; // Schedule index for the lowest control temperature
     241             :         // (where the highest Air temperature is requested)
     242             :         int CondErrIndex;       // Error index for recurring warning messages
     243             :         int EnrgyImbalErrIndex; // Error index for recurring warning messages
     244             :         int RadSurfNum;         // Radiant Surface Number
     245             :         int MSlabIn;            // Internal Slab Inlet Node Number
     246             :         int MSlabOut;           // INternal Slab Outlet Node Number
     247             :         // Report data
     248             :         Real64 DirectHeatLossPower;  // system direct heat loss in W
     249             :         Real64 DirectHeatLossEnergy; // system direct heat loss in J
     250             :         Real64 DirectHeatGainPower;  // system direct heat gain in W
     251             :         Real64 DirectHeatGainEnergy; // system direct heat gain in J
     252             :         Real64 TotalVentSlabRadPower;
     253             :         Real64 RadHeatingPower;  // radiant heating output in watts
     254             :         Real64 RadHeatingEnergy; // radiant heating output in J
     255             :         Real64 RadCoolingPower;  // radiant cooling output in watts
     256             :         Real64 RadCoolingEnergy; // radiant cooling output in J
     257             :         Real64 HeatCoilPower;
     258             :         Real64 HeatCoilEnergy;
     259             :         Real64 TotCoolCoilPower;
     260             :         Real64 TotCoolCoilEnergy;
     261             :         Real64 SensCoolCoilPower;
     262             :         Real64 SensCoolCoilEnergy;
     263             :         Real64 LateCoolCoilPower;
     264             :         Real64 LateCoolCoilEnergy;
     265             :         Real64 ElecFanPower;
     266             :         Real64 ElecFanEnergy;
     267             :         Real64 AirMassFlowRate; // Circulated air mass flow rate in kg/s
     268             :         Real64 AirVolFlow;      // Circulated air volumetric flow rate in m3/s
     269             :         Real64 SlabInTemp;      // Slab inlet temp in degree C
     270             :         Real64 SlabOutTemp;     // Slab outlet temp in degree C
     271             :         Real64 ReturnAirTemp;
     272             :         Real64 FanOutletTemp;             // FanOutlet temp in degree C
     273             :         Real64 ZoneInletTemp;             // supply air temp
     274             :         std::string AvailManagerListName; // Name of an availability manager list object
     275             :         int AvailStatus;
     276             :         int HVACSizingIndex; // index of a HVACSizing object for a ventilator slab
     277             :         bool FirstPass;      // detects first time through for resetting sizing data
     278             :         // Default Constructor
     279           9 :         VentilatedSlabData()
     280           9 :             : SchedPtr(0), ZonePtr(0), NumOfSurfaces(0), TotalSurfaceArea(0.0), CoreDiameter(0.0), CoreLength(0.0), CoreNumbers(0.0),
     281             :               controlType(ControlType::Invalid), ReturnAirNode(0), RadInNode(0), ZoneAirInNode(0), FanOutletNode(0), MSlabInNode(0), MSlabOutNode(0),
     282             :               Fan_Index(0), FanType_Num(0), ControlCompTypeNum(0), CompErrIndex(0), MaxAirVolFlow(0.0), MaxAirMassFlow(0.0),
     283             :               outsideAirControlType(OutsideAirControlType::Invalid), MinOASchedPtr(0), MaxOASchedPtr(0), TempSchedPtr(0), OutsideAirNode(0),
     284             :               AirReliefNode(0), OAMixerOutNode(0), OutAirVolFlow(0.0), OutAirMassFlow(0.0), MinOutAirVolFlow(0.0), MinOutAirMassFlow(0.0),
     285             :               SysConfg(VentilatedSlabConfig::Invalid), coilOption(CoilType::Invalid), heatingCoilPresent(false), hCoilType(HeatingCoilType::Invalid),
     286             :               heatingCoil_Index(0), heatingCoilType(DataPlant::PlantEquipmentType::Invalid), heatingCoil_FluidIndex(0), heatingCoilSchedPtr(0),
     287             :               heatingCoilSchedValue(0.0), MaxVolHotWaterFlow(0.0), MaxVolHotSteamFlow(0.0), MaxHotWaterFlow(0.0), MaxHotSteamFlow(0.0),
     288             :               MinHotSteamFlow(0.0), MinVolHotWaterFlow(0.0), MinVolHotSteamFlow(0.0), MinHotWaterFlow(0.0), HotControlNode(0), HotCoilOutNodeNum(0),
     289             :               HotControlOffset(0.0), HWPlantLoc{}, HotAirHiTempSchedPtr(0), HotAirLoTempSchedPtr(0), HotCtrlHiTempSchedPtr(0),
     290             :               HotCtrlLoTempSchedPtr(0), coolingCoilPresent(false), coolingCoil_Index(0), coolingCoilType(DataPlant::PlantEquipmentType::Invalid),
     291             :               cCoilType(CoolingCoilType::Invalid), coolingCoilSchedPtr(0), coolingCoilSchedValue(0.0), MaxVolColdWaterFlow(0.0),
     292             :               MaxColdWaterFlow(0.0), MinVolColdWaterFlow(0.0), MinColdWaterFlow(0.0), ColdControlNode(0), ColdCoilOutNodeNum(0),
     293             :               ColdControlOffset(0.0), CWPlantLoc{}, ColdAirHiTempSchedPtr(0), ColdAirLoTempSchedPtr(0), ColdCtrlHiTempSchedPtr(0),
     294             :               ColdCtrlLoTempSchedPtr(0), CondErrIndex(0), EnrgyImbalErrIndex(0), RadSurfNum(0), MSlabIn(0), MSlabOut(0), DirectHeatLossPower(0.0),
     295             :               DirectHeatLossEnergy(0.0), DirectHeatGainPower(0.0), DirectHeatGainEnergy(0.0), TotalVentSlabRadPower(0.0), RadHeatingPower(0.0),
     296             :               RadHeatingEnergy(0.0), RadCoolingPower(0.0), RadCoolingEnergy(0.0), HeatCoilPower(0.0), HeatCoilEnergy(0.0), TotCoolCoilPower(0.0),
     297             :               TotCoolCoilEnergy(0.0), SensCoolCoilPower(0.0), SensCoolCoilEnergy(0.0), LateCoolCoilPower(0.0), LateCoolCoilEnergy(0.0),
     298             :               ElecFanPower(0.0), ElecFanEnergy(0.0), AirMassFlowRate(0.0), AirVolFlow(0.0), SlabInTemp(0.0), SlabOutTemp(0.0), ReturnAirTemp(0.0),
     299           9 :               FanOutletTemp(0.0), ZoneInletTemp(0.0), AvailStatus(0), HVACSizingIndex(0), FirstPass(true)
     300             :         {
     301           9 :         }
     302             :     };
     303             : 
     304          16 :     struct VentSlabNumericFieldData
     305             :     {
     306             :         // Members
     307             :         Array1D_string FieldNames;
     308             : 
     309             :         // Default Constructor
     310           9 :         VentSlabNumericFieldData()
     311           9 :         {
     312           9 :         }
     313             :     };
     314             : 
     315             :     // Functions
     316             : 
     317             :     void SimVentilatedSlab(EnergyPlusData &state,
     318             :                            std::string const &CompName,   // name of the fan coil unit
     319             :                            int const ZoneNum,             // number of zone being served
     320             :                            bool const FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
     321             :                            Real64 &PowerMet,              // Sensible power supplied (W)
     322             :                            Real64 &LatOutputProvided,     // Latent add/removal supplied by window AC (kg/s), dehumid = negative
     323             :                            int &CompIndex);
     324             : 
     325             :     void GetVentilatedSlabInput(EnergyPlusData &state);
     326             : 
     327             :     void InitVentilatedSlab(EnergyPlusData &state,
     328             :                             int const Item,               // index for the current ventilated slab
     329             :                             int const VentSlabZoneNum,    // number of zone being served
     330             :                             bool const FirstHVACIteration // TRUE if 1st HVAC simulation of system timestep
     331             :     );
     332             : 
     333             :     void SizeVentilatedSlab(EnergyPlusData &state, int const Item);
     334             : 
     335             :     void CalcVentilatedSlab(EnergyPlusData &state,
     336             :                             int &Item,                     // number of the current ventilated slab being simulated
     337             :                             int const ZoneNum,             // number of zone being served
     338             :                             bool const FirstHVACIteration, // TRUE if 1st HVAC simulation of system timestep
     339             :                             Real64 &PowerMet,              // power supplied (W)
     340             :                             Real64 &LatOutputProvided      // latent capacity supplied (kg/s)
     341             :     );
     342             : 
     343             :     void CalcVentilatedSlabComps(EnergyPlusData &state,
     344             :                                  int const Item,                // system index in ventilated slab array
     345             :                                  bool const FirstHVACIteration, // flag for 1st HVAV iteration in the time step
     346             :                                  Real64 &LoadMet                // load met by the system (watts)
     347             :     );
     348             : 
     349             :     void CalcVentilatedSlabCoilOutput(EnergyPlusData &state,
     350             :                                       int const Item,           // system index in ventilated slab array
     351             :                                       Real64 &PowerMet,         // power supplied (W)
     352             :                                       Real64 &LatOutputProvided // latent capacity supplied (kg/s)
     353             :     );
     354             : 
     355             :     void CalcVentilatedSlabRadComps(EnergyPlusData &state,
     356             :                                     int const Item,               // System index in ventilated slab array
     357             :                                     bool const FirstHVACIteration // flag for 1st HVAV iteration in the time step !unused1208
     358             :     );
     359             : 
     360             :     void SimVentSlabOAMixer(EnergyPlusData &state, int const Item); // System index in Ventilated Slab array
     361             : 
     362             :     void UpdateVentilatedSlab(EnergyPlusData &state,
     363             :                               int const Item,               // Index for the ventilated slab under consideration within the derived types
     364             :                               bool const FirstHVACIteration // TRUE if 1st HVAC simulation of system timestep !unused1208
     365             :     );
     366             : 
     367             :     Real64 CalcVentSlabHXEffectTerm(EnergyPlusData &state,
     368             :                                     int const Item,            // Index number of radiant system under consideration
     369             :                                     Real64 const Temperature,  // Temperature of air entering the radiant system, in C
     370             :                                     Real64 const AirMassFlow,  // Mass flow rate of water in the radiant system, in kg/s
     371             :                                     Real64 const FlowFraction, // Mass flow rate fraction for this surface in the radiant system
     372             :                                     Real64 const CoreLength,   // Length of tubing in the radiant system, in m
     373             :                                     Real64 const CoreDiameter, // Inside diameter of the tubing in the radiant system, in m
     374             :                                     Real64 const CoreNumbers);
     375             : 
     376             :     void ReportVentilatedSlab(EnergyPlusData &state, int const Item); // Index for the ventilated slab under consideration within the derived types
     377             : 
     378             :     //*****************************************************************************************
     379             : 
     380             : } // namespace VentilatedSlab
     381             : 
     382         771 : struct VentilatedSlabData : BaseGlobalStruct
     383             : {
     384             : 
     385             :     int OperatingMode = 0; // Used to keep track of whether system is in heating or cooling mode
     386             : 
     387             :     // MODULE VARIABLE DECLARATIONS:
     388             :     bool HCoilOn = false;                 // TRUE if the heating coil (gas or electric especially) should be running
     389             :     int NumOfVentSlabs = 0;               // Number of ventilated slab in the input file
     390             :     Real64 OAMassFlowRate = 0.0;          // Outside air mass flow rate for the ventilated slab
     391             :     Array1D_double QRadSysSrcAvg;         // Average source over the time step for a particular radiant surfaceD
     392             :     Array1D<Real64> ZeroSourceSumHATsurf; // Equal to SumHATsurf for all the walls in a zone with no source
     393             :     int MaxCloNumOfSurfaces = 0;          // Used to set allocate size in CalcClo routine
     394             :     Real64 QZnReq = 0.0;                  // heating or cooling needed by system [watts]
     395             : 
     396             :     // Record keeping variables used to calculate QRadSysSrcAvg locally
     397             : 
     398             :     Array1D_double LastQRadSysSrc;      // Need to keep the last value in case we are still iterating
     399             :     Array1D<Real64> LastSysTimeElapsed; // Need to keep the last value in case we are still iterating
     400             :     Array1D<Real64> LastTimeStepSys;    // Need to keep the last value in case we are still iterating
     401             :     Array1D_bool CheckEquipName;
     402             : 
     403             :     // Autosizing variables
     404             :     bool GetInputFlag = true;
     405             :     bool MyOneTimeFlag = true;
     406             :     Array1D_bool MySizeFlag;
     407             : 
     408             :     // Object Data
     409             :     EPVector<VentilatedSlab::VentilatedSlabData> VentSlab;
     410             :     EPVector<VentilatedSlab::VentSlabNumericFieldData> VentSlabNumericFields;
     411             : 
     412             :     bool ZoneEquipmentListChecked = false; // True after the Zone Equipment List has been checked for items
     413             :     Array1D_bool MyEnvrnFlag;
     414             :     Array1D_bool MyPlantScanFlag;
     415             :     Array1D_bool MyZoneEqFlag; // used to set up zone equipment availability managers
     416             : 
     417             :     Array1D<Real64> AirTempOut; // Array of outlet air temperatures for each surface in the radiant system
     418             : 
     419             :     int CondensationErrorCount = 0;    // Counts for # times the radiant systems are shutdown due to condensation
     420             :     int EnergyImbalanceErrorCount = 0; // Counts for # times a temperature mismatch is found in the energy balance check
     421             :     bool FirstTimeFlag = true;         // for setting size of AirTempOut array
     422             : 
     423           0 :     void clear_state() override
     424             :     {
     425           0 :         this->MyOneTimeFlag = true;
     426           0 :         this->GetInputFlag = true;
     427           0 :         this->HCoilOn = false;
     428           0 :         this->NumOfVentSlabs = 0;
     429           0 :         this->OAMassFlowRate = 0.0;
     430           0 :         this->MaxCloNumOfSurfaces = 0;
     431           0 :         this->QZnReq = 0.0;
     432           0 :         this->QRadSysSrcAvg.deallocate();
     433           0 :         this->ZeroSourceSumHATsurf.deallocate();
     434           0 :         this->LastQRadSysSrc.deallocate();
     435           0 :         this->LastSysTimeElapsed.deallocate();
     436           0 :         this->LastTimeStepSys.deallocate();
     437           0 :         this->CheckEquipName.deallocate();
     438           0 :         this->MySizeFlag.deallocate();
     439           0 :         this->VentSlab.deallocate();
     440           0 :         this->VentSlabNumericFields.deallocate();
     441           0 :         this->ZoneEquipmentListChecked = false;
     442           0 :         this->MyEnvrnFlag.deallocate();
     443           0 :         this->MyPlantScanFlag.deallocate();
     444           0 :         this->MyZoneEqFlag.deallocate();
     445           0 :         this->AirTempOut.deallocate();
     446           0 :         this->CondensationErrorCount = 0;
     447           0 :         this->EnergyImbalanceErrorCount = 0;
     448           0 :         this->FirstTimeFlag = true;
     449           0 :     }
     450             : 
     451             :     // Default Constructor
     452         771 :     VentilatedSlabData()
     453         771 :     {
     454         771 :     }
     455             : };
     456             : 
     457             : } // namespace EnergyPlus
     458             : 
     459             : #endif

Generated by: LCOV version 1.13