Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and Refactoring of Plant Structures #7141

Merged
merged 10 commits into from Feb 4, 2019
9 changes: 6 additions & 3 deletions src/EnergyPlus/DataLoopNode.hh
Expand Up @@ -173,18 +173,21 @@ namespace DataLoopNode {
Real64 GenContamSetPoint; // {ppm}
bool SPMNodeWetBulbRepReq; // Set to true when node has SPM which follows wetbulb

// error message flag
bool plantNodeErrorMsgIssued;

// Default Constructor
NodeData()
: FluidType(0), FluidIndex(0), Temp(0.0), TempMin(0.0), TempMax(0.0), TempSetPoint(SensedNodeFlagValue), TempLastTimestep(0.0),
MassFlowRateRequest(0.0), MassFlowRate(0.0), MassFlowRateMin(0.0), MassFlowRateMax(SensedNodeFlagValue), MassFlowRateMinAvail(0.0),
MassFlowRateMaxAvail(0.0), MassFlowRateSetPoint(0.0), Quality(0.0), Press(0.0), Enthalpy(0.0), EnthalpyLastTimestep(0.0), HumRat(0.0),
HumRatMin(SensedNodeFlagValue), HumRatMax(SensedNodeFlagValue), HumRatSetPoint(SensedNodeFlagValue),
TempSetPointHi(SensedNodeFlagValue), TempSetPointLo(SensedNodeFlagValue), Height(-1.0), IsLocalNode(false), OutAirDryBulbSchedNum(0.0),
OutAirWetBulbSchedNum(0.0), OutAirWindSpeedSchedNum(0.0), OutAirWindDirSchedNum(0.0), OutAirDryBulb(0.0),
TempSetPointHi(SensedNodeFlagValue), TempSetPointLo(SensedNodeFlagValue), Height(-1.0), IsLocalNode(false), OutAirDryBulbSchedNum(0),
OutAirWetBulbSchedNum(0), OutAirWindSpeedSchedNum(0), OutAirWindDirSchedNum(0), OutAirDryBulb(0.0),
EMSOverrideOutAirDryBulb(false), EMSValueForOutAirDryBulb(0.0), OutAirWetBulb(0.0), EMSOverrideOutAirWetBulb(false),
EMSValueForOutAirWetBulb(0.0), OutAirWindSpeed(0.0), EMSOverrideOutAirWindSpeed(false), EMSValueForOutAirWindSpeed(0.0),
OutAirWindDir(0.0), EMSOverrideOutAirWindDir(false), EMSValueForOutAirWindDir(0.0), CO2(0.0), CO2SetPoint(0.0), GenContam(0.0),
GenContamSetPoint(0.0), SPMNodeWetBulbRepReq(false)
GenContamSetPoint(0.0), SPMNodeWetBulbRepReq(false), plantNodeErrorMsgIssued(false)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACManager.cc
Expand Up @@ -959,7 +959,7 @@ namespace HVACManager {
// DSU Test plant loop for errors
for (LoopNum = 1; LoopNum <= TotNumLoops; ++LoopNum) {
for (LoopSide = DemandSide; LoopSide <= SupplySide; ++LoopSide) {
CheckPlantMixerSplitterConsistency(LoopNum, LoopSide, 1, 1, FirstHVACIteration);
CheckPlantMixerSplitterConsistency(LoopNum, LoopSide, FirstHVACIteration);
CheckForRunawayPlantTemps(LoopNum, LoopSide);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/EnergyPlus/Plant/Branch.hh
Expand Up @@ -79,13 +79,14 @@ namespace DataPlant {
int PressureCurveIndex; // Curve: index for pressure drop calculations
Real64 PressureEffectiveK;
bool disableOverrideForCSBranchPumping;
int lastComponentSimulated;

// Default Constructor
BranchData()
: ControlType(0), RequestedMassFlow(0.0), HasConstantSpeedBranchPump(false), ConstantSpeedBranchMassFlow(0.0), BranchLevel(0),
FlowErrCount(0), FlowErrIndex(0), TotalComponents(0), NodeNumIn(0), NodeNumOut(0), IsBypass(false), PumpIndex(0), PumpSizFac(1.0),
EMSCtrlOverrideOn(false), EMSCtrlOverrideValue(0.0), HasPressureComponents(false), PressureDrop(0.0), PressureCurveType(0),
PressureCurveIndex(0), PressureEffectiveK(0.0), disableOverrideForCSBranchPumping(false)
PressureCurveIndex(0), PressureEffectiveK(0.0), disableOverrideForCSBranchPumping(false), lastComponentSimulated(0)
{
}

Expand Down
18 changes: 11 additions & 7 deletions src/EnergyPlus/Plant/LoopSide.hh
Expand Up @@ -86,8 +86,6 @@ namespace DataPlant {
std::string NodeNameIn; // Node name for the inlet to this loop
int NodeNumOut; // Node number for the outlet to this loop
std::string NodeNameOut; // Node name for the outlet to this loop
int NumSplitters; // Number of splitters in the half loop
int NumMixers; // Number of mixers in the half loop
bool SplitterExists; // Logical Flag indication splitter exists in the half loop
bool MixerExists; // Logical Flag indication mixer exists in the half loop
int TotalPumps; // total number of pumps on the half loop
Expand All @@ -105,8 +103,8 @@ namespace DataPlant {
int TotalConnected; // total number of other loops connected to this loop side
Array1D<ConnectedLoopData> Connected; // DSU Other loops connected to this Loop side
Array1D<BranchData> Branch; // Branch data
Array1D<SplitterData> Splitter; // Data for splitter on branch (if any)
Array1D<MixerData> Mixer; // Data for splitter on branch (if any)
SplitterData Splitter; // Data for splitter on branch (if any)
MixerData Mixer; // Data for splitter on branch (if any)
bool HasPressureComponents;
bool HasParallelPressComps;
Real64 PressureDrop;
Expand All @@ -123,20 +121,26 @@ namespace DataPlant {
Real64 LoopSideInlet_TotalTime;
PlantConvergencePoint InletNode;
PlantConvergencePoint OutletNode;
Real64 flowRequestNeedIfOn;
Real64 flowRequestNeedAndTurnOn;
Real64 flowRequestFinal;
bool hasConstSpeedBranchPumps;
Array1D<Real64> noLoadConstantSpeedBranchFlowRateSteps;

// Default Constructor
HalfLoopData()
: SimLoopSideNeeded(true), SimZoneEquipNeeded(true), SimAirLoopsNeeded(true), SimNonZoneEquipNeeded(true), SimElectLoadCentrNeeded(true),
OncePerTimeStepOperations(true), TimeElapsed(0.0), FlowRequest(0.0), FlowRequestTemperature(0.0),
TempSetPoint(DataLoopNode::SensedNodeFlagValue), TempSetPointHi(DataLoopNode::SensedNodeFlagValue),
TempSetPointLo(DataLoopNode::SensedNodeFlagValue), TempInterfaceTankOutlet(0.0), LastTempInterfaceTankOutlet(0.0), TotalBranches(0),
NodeNumIn(0), NodeNumOut(0), NumSplitters(0), NumMixers(0), SplitterExists(false), MixerExists(false), TotalPumps(0),
BranchPumpsExist(false), TotalPumpHeat(0.0), BypassExists(false), InletNodeSetPt(false), OutletNodeSetPt(false), EMSCtrl(false),
NodeNumIn(0), NodeNumOut(0), SplitterExists(false), MixerExists(false), TotalPumps(0),
BranchPumpsExist(false), TotalPumpHeat(0.0), BypassExists(false), InletNodeSetPt(false), OutletNodeSetPt(false), EMSCtrl(false), EMSValue(0.0),
FlowRestrictionFlag(false), FlowLock(0), TotalConnected(0), HasPressureComponents(false), HasParallelPressComps(false),
PressureDrop(0.0), PressureEffectiveK(0.0), errCount_LoadWasntDist(0), errIndex_LoadWasntDist(0), errCount_LoadRemains(0),
errIndex_LoadRemains(0), LoopSideInlet_TankTemp(0.0), LoopSideInlet_MdotCpDeltaT(0.0), LoopSideInlet_McpDTdt(0.0),
LoopSideInlet_CapExcessStorageTime(0.0), LoopSideInlet_CapExcessStorageTimeReport(0.0), LoopSideInlet_TotalTime(0.0),
InletNode(0.0, 0.0), OutletNode(0.0, 0.0)
InletNode(0.0, 0.0), OutletNode(0.0, 0.0), flowRequestNeedIfOn(0.0), flowRequestNeedAndTurnOn(0.0), flowRequestFinal(0.0),
hasConstSpeedBranchPumps(false)
{
}
};
Expand Down