Skip to content

Commit

Permalink
Populated clear_state
Browse files Browse the repository at this point in the history
  • Loading branch information
jmythms committed Feb 26, 2021
1 parent 50f72bb commit 1c09767
Showing 1 changed file with 43 additions and 18 deletions.
61 changes: 43 additions & 18 deletions src/EnergyPlus/LowTempRadiantSystem.hh
Original file line number Diff line number Diff line change
Expand Up @@ -520,37 +520,27 @@ struct LowTempRadiantSystemData : BaseGlobalStruct {
int NumOfHydrLowTempRadSys = 0; // Number of hydronic low tempererature radiant systems
int NumOfHydrLowTempRadSysDes = 0; // Number of hydronic low tempererature radiant design systems
int NumOfCFloLowTempRadSys = 0; // Number of constant flow (hydronic) low tempererature radiant systems
int NumOfCFloLowTempRadSysDes = 0 ; // Number of constant flow (hydronic) low tempererature radiant design systems
int NumOfCFloLowTempRadSysDes = 0; // Number of constant flow (hydronic) low tempererature radiant design systems
int NumOfElecLowTempRadSys = 0; // Number of electric low tempererature radiant systems
int TotalNumOfRadSystems = 0; // Total number of low temperature radiant systems

// Limit temperatures to indicate that a system cannot heat or cannot cool
Real64 LowTempHeating = -200.0; // Used to indicate that a user does not have a heating control temperature
Real64 LowTempHeating = -200.0; // Used to indicate that a user does not have a heating control temperature
Real64 HighTempCooling = 200.0; // Used to indicate that a user does not have a cooling control temperature

Array1D<Real64> QRadSysSrcAvg; // Average source over the time step for a particular radiant surface
Array1D<Real64> QRadSysSrcAvg; // Average source over the time step for a particular radiant surface
Array1D<Real64> ZeroSourceSumHATsurf; // Equal to SumHATsurf for all the walls in a zone with no source
// Record keeping variables used to calculate QRadSysSrcAvg locally
Array1D<Real64> LastQRadSysSrc; // Need to keep the last value in case we are still iterating
Array1D<Real64> LastSysTimeElapsed; // Need to keep the last value in case we are still iterating
Array1D<Real64> LastTimeStepSys; // Need to keep the last value in case we are still iterating

// Object Data
Array1D<LowTempRadiantSystem::VariableFlowRadiantSystemData> HydrRadSys;
Array1D<LowTempRadiantSystem::ConstantFlowRadiantSystemData> CFloRadSys;
Array1D<LowTempRadiantSystem::ElectricRadiantSystemData> ElecRadSys;
Array1D<LowTempRadiantSystem::RadSysTypeData> RadSysTypes;
Array1D<LowTempRadiantSystem::ElecRadSysNumericFieldData> ElecRadSysNumericFields;
Array1D<LowTempRadiantSystem::HydronicRadiantSysNumericFieldData> HydronicRadiantSysNumericFields;
Array1D<LowTempRadiantSystem::ConstantFlowRadDesignData> CflowRadiantSysDesign;
Array1D<LowTempRadiantSystem::VarFlowRadDesignData> HydronicRadiantSysDesign;

Array1D<Real64> Ckj; // Coefficients for individual surfaces within a radiant system
Array1D<Real64> Ckj; // Coefficients for individual surfaces within a radiant system
Array1D<Real64> Cmj;
Array1D<Real64> WaterTempOut; // Array of outlet water temperatures for
// each surface in the radiant system
Array1D<Real64> WaterTempOut; // Array of outlet water temperatures for
// each surface in the radiant system

// For Init:
// For Init:
Array1D_bool MyEnvrnFlagHydr;
Array1D_bool MyEnvrnFlagCFlo;
Array1D_bool MyEnvrnFlagElec;
Expand All @@ -562,10 +552,45 @@ struct LowTempRadiantSystemData : BaseGlobalStruct {
Array1D_bool MySizeFlagElec;
Array1D_bool CheckEquipName;

// Object Data
Array1D<LowTempRadiantSystem::VariableFlowRadiantSystemData> HydrRadSys;
Array1D<LowTempRadiantSystem::ConstantFlowRadiantSystemData> CFloRadSys;
Array1D<LowTempRadiantSystem::ElectricRadiantSystemData> ElecRadSys;
Array1D<LowTempRadiantSystem::RadSysTypeData> RadSysTypes;
Array1D<LowTempRadiantSystem::ElecRadSysNumericFieldData> ElecRadSysNumericFields;
Array1D<LowTempRadiantSystem::HydronicRadiantSysNumericFieldData> HydronicRadiantSysNumericFields;
Array1D<LowTempRadiantSystem::ConstantFlowRadDesignData> CflowRadiantSysDesign;
Array1D<LowTempRadiantSystem::VarFlowRadDesignData> HydronicRadiantSysDesign;

void clear_state() override
{
HydrRadSys.clear();
LowTempHeating = -200.0;
HighTempCooling = 200.0;
NumOfHydrLowTempRadSys = 0;
NumOfHydrLowTempRadSysDes = 0;
NumOfCFloLowTempRadSys = 0;
NumOfCFloLowTempRadSysDes = 0;
NumOfElecLowTempRadSys = 0;
TotalNumOfRadSystems = 0;

QRadSysSrcAvg.clear();
ZeroSourceSumHATsurf.clear();
LastQRadSysSrc.clear();
LastSysTimeElapsed.clear();
LastTimeStepSys.clear();
Ckj.clear();
Cmj.clear();
WaterTempOut.clear();
MyEnvrnFlagHydr.clear();
MyEnvrnFlagCFlo.clear();
MyEnvrnFlagElec.clear();
MyPlantScanFlagHydr.clear();
MyPlantScanFlagCFlo.clear();
MySizeFlagHydr.clear();
MySizeFlagCFlo.clear();
MySizeFlagElec.clear();
CheckEquipName.clear();
HydrRadSys.clear(); //
CFloRadSys.clear();
ElecRadSys.clear();
RadSysTypes.clear();
Expand Down

5 comments on commit 1c09767

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LowTempRadOptimize (jmythms) - x86_64-MacOS-10.15-clang-11.0.0: OK (3054 of 3054 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LowTempRadOptimize (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3094 of 3094 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LowTempRadOptimize (jmythms) - Win64-Windows-10-VisualStudio-16: OK (2305 of 2305 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LowTempRadOptimize (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1608 of 1608 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LowTempRadOptimize (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (727 of 727 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.