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

Global DataSystemVariables+FaultsManager #8588

Merged
merged 12 commits into from
Mar 11, 2021
2 changes: 1 addition & 1 deletion src/EnergyPlus/Boilers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ namespace EnergyPlus::Boilers {
Real64 BoilerNomEff_ff = BoilerNomEff;

// calculate the Faulty Boiler Fouling Factor using fault information
this->FaultyBoilerFoulingFactor = FaultsManager::FaultsBoilerFouling(FaultIndex).CalFoulingFactor(state);
this->FaultyBoilerFoulingFactor = state.dataFaultsMgr->FaultsBoilerFouling(FaultIndex).CalFoulingFactor(state);

// update the boiler nominal capacity at faulty cases
BoilerNomCap = NomCap_ff * this->FaultyBoilerFoulingFactor;
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/ChillerAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ namespace EnergyPlus::ChillerAbsorption {
Real64 EvapOutletTemp_ff = TempEvapOut;

// calculate the sensor offset using fault information
this->FaultyChillerSWTOffset = FaultsManager::FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyChillerSWTOffset = state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the TempEvapOut
TempEvapOut = max(this->TempLowLimitEvapOut,
min(DataLoopNode::Node(this->EvapInletNodeNum).Temp, EvapOutletTemp_ff - this->FaultyChillerSWTOffset));
Expand Down Expand Up @@ -1476,7 +1476,7 @@ namespace EnergyPlus::ChillerAbsorption {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = (this->FlowMode == DataPlant::FlowMode::LeavingSetpointModulated);
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
CpFluid,
Expand Down Expand Up @@ -1577,7 +1577,7 @@ namespace EnergyPlus::ChillerAbsorption {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = false;
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
CpFluid,
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/ChillerElectricEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ namespace EnergyPlus::ChillerElectricEIR {
Real64 ReferenceCOP_ff = ReferenceCOP;

// calculate the Faulty Chiller Fouling Factor using fault information
this->FaultyChillerFoulingFactor = FaultsManager::FaultsChillerFouling(FaultIndex).CalFoulingFactor(state);
this->FaultyChillerFoulingFactor = state.dataFaultsMgr->FaultsChillerFouling(FaultIndex).CalFoulingFactor(state);

// update the Chiller nominal capacity and COP at faulty cases
ChillerRefCap = NomCap_ff * this->FaultyChillerFoulingFactor;
Expand Down Expand Up @@ -1780,7 +1780,7 @@ namespace EnergyPlus::ChillerElectricEIR {
Real64 EvapOutletTempSetPoint_ff = EvapOutletTempSetPoint;

// calculate the sensor offset using fault information
this->FaultyChillerSWTOffset = FaultsManager::FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyChillerSWTOffset = state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the EvapOutletTempSetPoint
EvapOutletTempSetPoint =
max(this->TempLowLimitEvapOut,
Expand Down Expand Up @@ -2035,7 +2035,7 @@ namespace EnergyPlus::ChillerElectricEIR {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = (this->FlowMode == DataPlant::FlowMode::LeavingSetpointModulated);
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
Cp,
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/ChillerIndirectAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ namespace EnergyPlus::ChillerIndirectAbsorption {
Real64 EvapOutletTemp_ff = TempEvapOut;

// calculate the sensor offset using fault information
this->FaultyChillerSWTOffset = FaultsManager::FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyChillerSWTOffset = state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the TempEvapOut
TempEvapOut = max(this->TempLowLimitEvapOut,
min(DataLoopNode::Node(this->EvapInletNodeNum).Temp, EvapOutletTemp_ff - this->FaultyChillerSWTOffset));
Expand Down Expand Up @@ -1704,7 +1704,7 @@ namespace EnergyPlus::ChillerIndirectAbsorption {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = (this->FlowMode == DataPlant::FlowMode::LeavingSetpointModulated);
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
CpFluid,
Expand Down Expand Up @@ -1803,7 +1803,7 @@ namespace EnergyPlus::ChillerIndirectAbsorption {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = false;
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
CpFluid,
Expand Down
8 changes: 4 additions & 4 deletions src/EnergyPlus/ChillerReformulatedEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
Real64 ReferenceCOP_ff = ReferenceCOP;

// calculate the Faulty Chiller Fouling Factor using fault information
this->FaultyChillerFoulingFactor = FaultsManager::FaultsChillerFouling(FaultIndex).CalFoulingFactor(state);
this->FaultyChillerFoulingFactor = state.dataFaultsMgr->FaultsChillerFouling(FaultIndex).CalFoulingFactor(state);

// update the Chiller nominal capacity and COP at faulty cases
ChillerRefCap = NomCap_ff * this->FaultyChillerFoulingFactor;
Expand Down Expand Up @@ -1938,7 +1938,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
Real64 EvapOutletTempSetPoint_ff = EvapOutletTempSetPoint;

// calculate the sensor offset using fault information
this->FaultyChillerSWTOffset = FaultsManager::FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyChillerSWTOffset = state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the EvapOutletTempSetPoint
EvapOutletTempSetPoint =
max(this->TempLowLimitEvapOut,
Expand Down Expand Up @@ -2106,7 +2106,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = (this->FlowMode == DataPlant::FlowMode::LeavingSetpointModulated);
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
Cp,
Expand Down Expand Up @@ -2186,7 +2186,7 @@ namespace EnergyPlus::ChillerReformulatedEIR {
// calculate directly affected variables at faulty case: EvapOutletTemp, EvapMassFlowRate, QEvaporator
int FaultIndex = this->FaultyChillerSWTIndex;
bool VarFlowFlag = false;
FaultsManager::FaultsChillerSWTSensor(FaultIndex)
state.dataFaultsMgr->FaultsChillerSWTSensor(FaultIndex)
.CalFaultChillerSWT(VarFlowFlag,
this->FaultyChillerSWTOffset,
Cp,
Expand Down
14 changes: 7 additions & 7 deletions src/EnergyPlus/CondenserLoopTowers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4083,7 +4083,7 @@ namespace CondenserLoopTowers {
Real64 TowerOutletTemp_ff = TempSetPoint;

// calculate the sensor offset using fault information
this->FaultyCondenserSWTOffset = FaultsManager::FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyCondenserSWTOffset = state.dataFaultsMgr->FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the TempSetPoint
TempSetPoint = TowerOutletTemp_ff - this->FaultyCondenserSWTOffset;
}
Expand All @@ -4095,7 +4095,7 @@ namespace CondenserLoopTowers {
Real64 HighSpeedTowerUA_ff = this->HighSpeedTowerUA;

// calculate the Faulty Tower Fouling Factor using fault information
this->FaultyTowerFoulingFactor = FaultsManager::FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);
this->FaultyTowerFoulingFactor = state.dataFaultsMgr->FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);

// update the tower UA values at faulty cases
freeConvTowerUA = FreeConvTowerUA_ff * this->FaultyTowerFoulingFactor;
Expand Down Expand Up @@ -4385,7 +4385,7 @@ namespace CondenserLoopTowers {
Real64 TowerOutletTemp_ff = TempSetPoint;

// calculate the sensor offset using fault information
this->FaultyCondenserSWTOffset = FaultsManager::FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyCondenserSWTOffset = state.dataFaultsMgr->FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the TempSetPoint
TempSetPoint = TowerOutletTemp_ff - this->FaultyCondenserSWTOffset;
}
Expand All @@ -4397,7 +4397,7 @@ namespace CondenserLoopTowers {
Real64 HighSpeedTowerUA_ff = this->HighSpeedTowerUA;

// calculate the Faulty Tower Fouling Factor using fault information
this->FaultyTowerFoulingFactor = FaultsManager::FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);
this->FaultyTowerFoulingFactor = state.dataFaultsMgr->FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);

// update the tower UA values at faulty cases
freeConvTowerUA = FreeConvTowerUA_ff * this->FaultyTowerFoulingFactor;
Expand Down Expand Up @@ -4639,7 +4639,7 @@ namespace CondenserLoopTowers {
Real64 TowerOutletTemp_ff = TempSetPoint;

// calculate the sensor offset using fault information
this->FaultyCondenserSWTOffset = FaultsManager::FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyCondenserSWTOffset = state.dataFaultsMgr->FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
// update the TempSetPoint
TempSetPoint = TowerOutletTemp_ff - this->FaultyCondenserSWTOffset;
}
Expand Down Expand Up @@ -4899,7 +4899,7 @@ namespace CondenserLoopTowers {
if (this->FaultyCondenserSWTFlag && (!state.dataGlobal->WarmupFlag) && (!state.dataGlobal->DoingSizing) && (!state.dataGlobal->KickOffSimulation)) {
int FaultIndex = this->FaultyCondenserSWTIndex;
// calculate the sensor offset using fault information
this->FaultyCondenserSWTOffset = FaultsManager::FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
this->FaultyCondenserSWTOffset = state.dataFaultsMgr->FaultsCondenserSWTSensor(FaultIndex).CalFaultOffsetAct(state);
}

// If there is a fault of cooling tower fouling
Expand All @@ -4909,7 +4909,7 @@ namespace CondenserLoopTowers {
Real64 HighSpeedTowerUA_ff = this->HighSpeedTowerUA;

// calculate the Faulty Tower Fouling Factor using fault information
this->FaultyTowerFoulingFactor = FaultsManager::FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);
this->FaultyTowerFoulingFactor = state.dataFaultsMgr->FaultsTowerFouling(FaultIndex).CalFaultyTowerFoulingFactor(state);

// update the tower UA values at faulty cases
freeConvTowerUA = FreeConvTowerUA_ff * this->FaultyTowerFoulingFactor;
Expand Down
Loading