Skip to content
New issue

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

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

Already on GitHub? # to your account

Apply Direct solution in new dx coil #7899

Merged
merged 18 commits into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ \subsection{PerformancePrecisionTradeoffs}\label{performanceprecisiontradeoffs}
\midrule
\endfirsthead

AirLoopHVAC:UnitarySystem & Coil:Cooling:DX:SingleSpeed, Coil:Heating:DX:SingleSpeed, Coil:Heating:Electric, Coil:Heating:Fuel, Coil:Heating:DX:MultiSpeed\tabularnewline
AirLoopHVAC:UnitarySystem & Coil:Cooling:DX:SingleSpeed, Coil:Heating:DX:SingleSpeed, Coil:Heating:Electric, Coil:Heating:Fuel, Coil:Heating:DX:MultiSpeed, Coil:Cooling:DX\tabularnewline
Copy link
Contributor

Choose a reason for hiding this comment

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

Updated I/O ref documentation; added the new DX cooling coil type Coil:Cooling:DX.

AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed & Coil:Heating:DX:MultiSpeed, Coil:Heating:Electric:MultiStage, Coil:Heating:Gas:MultiStage, Coil:Cooling:DX:MultiSpeed\tabularnewline
CoilSystem:Cooling:DX & Coil:Cooling:DX:SingleSpeed, Coil:Cooling:DX:VariableSpeed \tabularnewline
CoilSystem:Heating:DX & Coil:Heating:DX:SingleSpeed, Coil:Heating:DX:VariableSpeed \tabularnewline
Expand All @@ -1045,6 +1045,13 @@ \subsection{PerformancePrecisionTradeoffs}\label{performanceprecisiontradeoffs}
\end{longtable}

Note: The choice of Load in the Control Type of the AirLoopHVAC:UnitarySystem object is required for all coils listed in the above table.
In addition, when Coil:Cooling:DX is specified under AirLoopHVAC:UnitarySystem, the following coil configurations are supported for Direct Solution:

Single speed mode at Norminal Speed Number = 1 in the Coil:Cooling:DX:CurveFit:OperatingMode
Copy link
Member

Choose a reason for hiding this comment

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

Typo: Norminal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Corrected at Nominal. Thanks


Multi speed mode at Norminal Speed Number > 1 in the Coil:Cooling:DX:CurveFit:OperatingMode

Single speed SubcoolReheat mode. The SubcoolReheat mode requires all inputs of 3 fields in the Coil:Cooling:DX:CurveFit:Performance: Base Operating Mode, Alternative Operating Mode 1, and Alternative Operating Mode 2.
Copy link
Contributor

Choose a reason for hiding this comment

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

Updated I/O ref documentation; Coil:Cooling:DX coil model in AirLoopHVAC:UnitarySystem supports Direct Solution for load based control of Single Speed, Multi Speed and Single Speed SubcoolReheat operating modes.


\paragraph{Field: Zone Radiant Exchange Algorithm}\label{zone-radiant-exchange-algorithm}

Expand Down
85 changes: 81 additions & 4 deletions src/EnergyPlus/UnitarySystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4522,8 +4522,8 @@ namespace UnitarySystems {
}
if (thisSys.m_ControlType == ControlType::Setpoint) {
ShowSevereError(cCurrentModuleObject + " = " + thisObjectName);
ShowContinueError(
"Setpoint control is not available for SubcoolReheat cooling coil. Load control is forced. Simulation continues.");
ShowContinueError("Setpoint control is not available for SubcoolReheat cooling coil. Load control is forced. "
"Simulation continues.");
Copy link
Contributor

Choose a reason for hiding this comment

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

If the Coil:Cooling:DX coil type operating mode specified is SubcoolReheat operating mode and the UnitarySystem is SetPoint control, then the UnitarySystem control type is reset to Load. Because SubcoolReheat operating mode is supported in Load based control only.

thisSys.m_ControlType = ControlType::Load;
}
}
Expand All @@ -4542,6 +4542,10 @@ namespace UnitarySystems {
}
}

if (DataGlobals::DoCoilDirectSolutions && thisSys.m_NumOfSpeedCooling > 1) {
thisSys.FullOutput.resize(thisSys.m_NumOfSpeedCooling + 1);
}
Copy link
Member

Choose a reason for hiding this comment

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

OK, so we start by allocating the full output array to the number of cooling speeds + 1.


if (thisSys.m_HeatCoilExists) {
if (thisSys.m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingAirToAirVariableSpeed ||
thisSys.m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingWaterToAirHPVSEquationFit ||
Expand Down Expand Up @@ -6678,7 +6682,7 @@ namespace UnitarySystems {
thisSys.m_HeatMassFlowRate.resize(thisSys.m_NumOfSpeedHeating + 1);
thisSys.m_HeatVolumeFlowRate.resize(thisSys.m_NumOfSpeedHeating + 1);
thisSys.m_MSHeatingSpeedRatio.resize(thisSys.m_NumOfSpeedHeating + 1);
if (DataGlobals::DoCoilDirectSolutions) {
if (DataGlobals::DoCoilDirectSolutions && thisSys.m_NumOfSpeedCooling < thisSys.m_NumOfSpeedHeating) {
thisSys.FullOutput.resize(thisSys.m_NumOfSpeedHeating + 1);
}
Copy link
Member

Choose a reason for hiding this comment

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

Then we just increase the size in case heating is larger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@lgu1234 I see that you are resizing twice for CoolingCoilType CoilDX_SubcoolReheat here and here. Because the later is always executed whether the cooling type coil is SubCoolReheat or NOT. Is this intentional?

for (int i = 1; i <= thisSys.m_NumOfSpeedHeating; ++i) {
Expand Down Expand Up @@ -8159,7 +8163,9 @@ namespace UnitarySystems {
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
if (DataGlobals::DoCoilDirectSolutions && this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling) {
if (DataGlobals::DoCoilDirectSolutions &&
(this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling ||
(this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_Cooling && this->m_NumOfSpeedCooling > 1))) {
Copy link
Member

Choose a reason for hiding this comment

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

This is just adding the new coil to this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This is just filling this->FullOutput[SpeedNum] variable for the new DX cooling coil.

this->FullOutput[SpeedNum] = SensOutputOn;
}
// over specified logic? it has to be a water coil? what about other VS coil models?
Expand Down Expand Up @@ -8488,6 +8494,50 @@ namespace UnitarySystems {
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
PartLoadRatio = CoolPLR;
} else if (DataGlobals::DoCoilDirectSolutions && CoolingLoad &&
this->m_CoolingCoilSubType_Num == DataHVACGlobals::CoilDX_SubcoolReheat && this->m_NumOfSpeedCooling == 1) {
HeatPLR = 0.0;
this->calcUnitarySystemToLoad(state, AirLoopNum,
FirstHVACIteration,
1.0,
HeatPLR,
OnOffAirFlowRatio,
SensOutputOn,
LatOutputOn,
HXUnitOn,
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
Copy link
Member

Choose a reason for hiding this comment

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

OK, so first you call to run with cooling PLR of 1.0 to get the full output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Yes, in order to get full outputs at PLR = 1.0.

CoolPLR = (ZoneLoad - SensOutputOff) / (SensOutputOn - SensOutputOff);
Copy link
Member

Choose a reason for hiding this comment

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

Then calculate a new cooling PLR using a simple ratio.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this->calcUnitarySystemToLoad(state, AirLoopNum,
FirstHVACIteration,
CoolPLR,
HeatPLR,
OnOffAirFlowRatio,
SensOutput,
LatOutput,
HXUnitOn,
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
Copy link
Member

Choose a reason for hiding this comment

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

Then just recalculate the system performance at that PLR, and take what it gets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PartLoadRatio = CoolPLR;
} else if (DataGlobals::DoCoilDirectSolutions && CoolingLoad && this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_Cooling &&
this->m_NumOfSpeedCooling == 1) {
CoolPLR = (ZoneLoad - SensOutputOff) / (SensOutputOn - SensOutputOff);
HeatPLR = 0.0;
this->calcUnitarySystemToLoad(state, AirLoopNum,
FirstHVACIteration,
CoolPLR,
HeatPLR,
OnOffAirFlowRatio,
SensOutput,
LatOutput,
HXUnitOn,
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
PartLoadRatio = CoolPLR;
Copy link
Member

Choose a reason for hiding this comment

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

Of course handle the single speed case here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Yes for a single speed coil.

} else if (DataGlobals::DoCoilDirectSolutions && HeatingLoad &&
(this->m_HeatingCoilType_Num == DataHVACGlobals::CoilDX_HeatingEmpirical ||
this->m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingElectric ||
Expand All @@ -8505,6 +8555,7 @@ namespace UnitarySystems {
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
PartLoadRatio = HeatPLR;
} else if (DataGlobals::DoCoilDirectSolutions && HeatingLoad &&
this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedHeating) {
CoolPLR = 0.0;
Expand All @@ -8529,6 +8580,32 @@ namespace UnitarySystems {
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
PartLoadRatio = HeatPLR;
} else if (DataGlobals::DoCoilDirectSolutions && CoolingLoad && this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_Cooling &&
this->m_NumOfSpeedCooling > 1) {
HeatPLR = 0.0;
if (this->m_CoolingSpeedNum == 1) {
this->m_CoolingCycRatio = (ZoneLoad - SensOutputOff) / (this->FullOutput[this->m_CoolingSpeedNum] - SensOutputOff);
CoolPLR = this->m_CoolingCycRatio;
this->m_CoolingSpeedRatio = 0.0;
} else {
this->m_CoolingCycRatio = 1.0;
this->m_CoolingSpeedRatio = (ZoneLoad - this->FullOutput[this->m_CoolingSpeedNum - 1]) /
(this->FullOutput[this->m_CoolingSpeedNum] - this->FullOutput[this->m_CoolingSpeedNum - 1]);
CoolPLR = this->m_CoolingSpeedRatio;
}
this->calcUnitarySystemToLoad(state, AirLoopNum,
FirstHVACIteration,
CoolPLR,
HeatPLR,
OnOffAirFlowRatio,
SensOutput,
LatOutput,
HXUnitOn,
HeatCoilLoad,
SupHeaterLoad,
CompressorONFlag);
PartLoadRatio = CoolPLR;
Copy link
Member

Choose a reason for hiding this comment

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

How does this extra section fit into the grand scheme?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar The extra code is used for a multiple speed coil to recalculate output based on cycleratio (SpeedNumber = 1) or SpeedRatio (SpeedNumber>1) using Direct solution results.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lgu1234 This is not part of this change but wanted to understand that CoolingCycRatio and CoolingSpeedRatio are passed as CoolPLR to calcUnitarySystemToLoad() function. So, the calcUnitarySystemToLoad() handles the difference between the two variables?

} else {

Par[1] = double(this->m_UnitarySysNum);
Expand Down