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 DataPlant plus a few other PlantComponents #8457

Merged
merged 20 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions src/EnergyPlus/AirLoopHVACDOAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,9 @@ namespace AirLoopHVACDOAS {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_HeatCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->HWLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->HWLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->HWLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->HWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
CoilMaxVolFlowRate * rho,
Expand All @@ -831,9 +831,9 @@ namespace AirLoopHVACDOAS {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
CoilMaxVolFlowRate * rho,
Expand All @@ -848,9 +848,9 @@ namespace AirLoopHVACDOAS {
WaterCoils::SimulateWaterCoilComponents(state, CompName, FirstHVACIteration, this->m_CoolCoilNum);
Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Cooling:Water:DetailedGeometry", CompName, ErrorsFound);
rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->CWLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->CWLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->CWLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->CWLoopNum).FluidIndex,
RoutineName);
PlantUtilities::InitComponentNodes(0.0,
CoilMaxVolFlowRate * rho,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or
} else {
if (this->termUnitIU) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 DesCoilLoad = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizCoolDeltaT * Cp * rho;
Real64 T1Out =
Expand Down
20 changes: 10 additions & 10 deletions src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
// add fan heat to coil load
DesCoilLoad += BaseSizerWithFanHeatInputs::calcFanDesHeatGain(DesVolFlow);
if (DesCoilLoad >= DataHVACGlobals::SmallLoad) {
if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)DataPlant::PlantLoop.size() &&
if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() &&
this->dataWaterCoilSizCoolDeltaT > 0.0) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = DesCoilLoad / (CoilDesWaterDeltaT * Cp * rho);
} else {
Expand All @@ -119,16 +119,16 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
} else {
if (this->curOASysNum > 0) CoilDesWaterDeltaT *= 0.5;
if (this->dataCapacityUsedForSizing >= DataHVACGlobals::SmallLoad) {
if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)DataPlant::PlantLoop.size() && CoilDesWaterDeltaT > 0.0) {
if (this->dataWaterLoopNum > 0 && this->dataWaterLoopNum <= (int)state.dataPlnt->PlantLoop.size() && CoilDesWaterDeltaT > 0.0) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::CWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataCapacityUsedForSizing / (CoilDesWaterDeltaT * Cp * rho);
} else {
Expand Down
24 changes: 12 additions & 12 deletions src/EnergyPlus/Autosizing/HeatingWaterDesCoilLoadUsedForUASizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,40 +71,40 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64
} else {
if (this->termUnitSingDuct && (this->curTermUnitSizingNum > 0)) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho;
coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
} else if ((this->termUnitPIU || this->termUnitIU) && (this->curTermUnitSizingNum > 0)) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho *
this->termUnitSizing(this->curTermUnitSizingNum).ReheatLoadMult;
} else if (this->zoneEqFanCoil || this->zoneEqUnitHeater) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
Real64 rho = FluidProperties::GetDensityGlycol(state,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidName,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
DataGlobalConstants::HWInitConvTemp,
DataPlant::PlantLoop(this->dataWaterLoopNum).FluidIndex,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho;
coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
Expand Down
Loading