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

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

Generated by: LCOV version 2.0-1