Address variable speed DX cooling Coil does not run on latent only load#11135
Address variable speed DX cooling Coil does not run on latent only load#11135
Conversation
Nigusse
left a comment
There was a problem hiding this comment.
Variable DX cooling coil is turned off when there is latent load but no sensible load. Need to modify a logic to avoid turning off the VS dx cooling when there is latent load only.
| if ((PartLoadRatio > 0.0) || (PartLoadRatio == 0.0 && this->m_CoolingSpeedRatio > 0.0)) { | ||
| CompressorOn = HVAC::CompressorOp::On; | ||
| this->m_LastMode = CoolingMode; | ||
| } |
There was a problem hiding this comment.
When there is latent load only (i.e., when there is no sensible load), then the above logic if (PartLoadRatio > 0.0) holds true for single speed DX coil only. For variable speed DX cooling coil, the PLR can be zero when the speed ratio is greater than zero. Thus, it needs to add a second logic to avoid turning off a variable DX cooling coil when there is latent load only.
There was a problem hiding this comment.
At the bottom of controlCoolingSystemToSP is:
this->m_CoolingPartLoadFrac = PartLoadFrac;
this->m_CoolingSpeedRatio = SpeedRatio;
this->m_CoolingCycRatio = CycRatio;
this->m_DehumidificationMode = DehumidMode;
I wonder if it would be better to correct this issue here because you would want the UnitarySystem to know what the PartLoadRaio is for control and reporting of m_PartLoadFrac. There is also the calcUnitarySystemToLoad function which may need review to see if an update is needed there as well.
this->m_CoolingPartLoadFrac = std::max(PartLoadFrac, SpeedRatio);
There was a problem hiding this comment.
this->m_CoolingPartLoadFrac = std::max(PartLoadFrac, SpeedRatio);
This logic may work but we will be mixing up two variables. The m_CoolingPartLoadFrac and SpeedRatio have a different meaning and resetting the m_CoolingPartLoadFrac that may have un-intended consequence elsewhere.
There was a problem hiding this comment.
May be use a local variable that does not affect the m_CoolingPartLoadFrac member variable.
There was a problem hiding this comment.
If I understand correctly, for variable speed DX coil, the m_CoolingPartLoadFrac value is set 0.0 whenever the SpeedRatio is > 0.0. @rraustad Do you agree?
There was a problem hiding this comment.
I think it's CycRatio that gets set to 0 when SpeedRatio > 0. The VS coil is tricky. I suggest plotting Unitary System Part Load Ratio to see what that shows during latent only operation. Also, CycRatio > 0 at speed = 1 and SpeedRatio > 0 at speed > 1 so my suggestion was not quite right.
There was a problem hiding this comment.
I see on one place where the PLR is set to SpeedRatio this->m_CoolingPartLoadFrac = SpeedRatio; for VS DX cooling coil. Let me examine the report variables (PLR, CyclingRatio and SpeedRatio).
There was a problem hiding this comment.
That could be a mistake. this->m_CoolingPartLoadFrac is similar to CycRatio and both should be 1 at speed > 1.
src/EnergyPlus/UnitarySystem.cc
Outdated
| PartLoadRatio = this->m_CoolingPartLoadFrac; | ||
| CompressorOn = HVAC::CompressorOp::Off; | ||
| if (PartLoadRatio > 0.0) { | ||
| if ((PartLoadRatio > 0.0) || (PartLoadRatio == 0.0 && this->m_CoolingSpeedRatio > 0.0)) { |
There was a problem hiding this comment.
The same change as the above.
| General::SolveRoot(state, HumRatAcc, MaxIte, SolFla, SpeedRatio, f, 0.0, 1.0); | ||
| CycRatio = 0.0; | ||
| } | ||
| PartLoadFrac = SpeedRatio; |
There was a problem hiding this comment.
Now I reset the PRL in one place using the SpeedRatio and removed the previous code changes.
src/EnergyPlus/UnitarySystem.cc
Outdated
| HVAC::CompressorOp::On); | ||
| }; | ||
| General::SolveRoot(state, HumRatAcc, MaxIte, SolFla, SpeedRatio, f, 0.0, 1.0); | ||
| CycRatio = 0.0; |
There was a problem hiding this comment.
The CycRatio is reset to 0.0 when the SpeedNumber is = 1.
There was a problem hiding this comment.
The CycRatio should be set 1.0 when the SpeedNumber is >1. I will remove the CycRatio = 0.0; statement that added above.
src/EnergyPlus/UnitarySystem.cc
Outdated
| this->controlCoolingSystemToSP(state, AirLoopNum, FirstHVACIteration, HXUnitOn, CompressorOn); | ||
| PartLoadRatio = this->m_CoolingPartLoadFrac; | ||
| CompressorOn = HVAC::CompressorOp::Off; | ||
| // if ((PartLoadRatio > 0.0) || (PartLoadRatio == 0.0 && this->m_CoolingSpeedRatio > 0.0)) { |
There was a problem hiding this comment.
This commented out line will be removed.
|
| EXPECT_NEAR(0.112564, CoilSys.m_CoolingSpeedRatio, 0.000001); | ||
| EXPECT_NEAR(0.008917, CoilSys.m_DesiredOutletHumRat, 0.000001); | ||
| EXPECT_NEAR(0.008917, state->dataLoopNodes->Node(CoilSys.AirOutNode).HumRat, 0.000001); | ||
| } |
There was a problem hiding this comment.
Added a unit test to demonstrate the fix.
| }; | ||
| General::SolveRoot(state, HumRatAcc, MaxIte, SolFla, SpeedRatio, f, 0.0, 1.0); | ||
| } | ||
| PartLoadFrac = SpeedRatio; |
There was a problem hiding this comment.
The SpeedRatio is saved in a local variable which is then assigned to this->m_CoolingPartLoadFrac.
There was a problem hiding this comment.
Not sure where this->m_CoolingPartLoadFrac = SpeedRatio is ever used. If the speedNum > 1 then the coil never turns off during the time step and this->m_CoolingPartLoadFrac = 1. So this line should be:
PartLoadRatio = CycRatio;
At the bottom of this function:
this->m_CoolingPartLoadFrac = PartLoadFrac;
this->m_CoolingSpeedRatio = SpeedRatio;
this->m_CoolingCycRatio = CycRatio;
this->m_DehumidificationMode = DehumidMode;
There was a problem hiding this comment.
Oh, I see it now. It's used a lot in the MuiltStage electric heater. I think that's a mistake. Here speedNum > 1 so the heating coil never turns off during the time step.
case HVAC::Coil_HeatingElectric_MultiStage: {
if (this->m_SuppHeatingSpeedNum > 1) {
auto f = [&state, this, DesOutTemp, CycRatio](Real64 const SpeedRatio) {
return UnitarySys::heatingCoilVarSpeedResidual(state,
SpeedRatio,
this->m_SuppHeatCoilIndex,
DesOutTemp,
this->m_UnitarySysNum,
CycRatio,
this->m_SuppHeatingSpeedNum,
this->m_FanOpMode,
HVAC::CompressorOp::On,
true);
};
General::SolveRoot(state, Acc, MaxIte, SolFla, SpeedRatio, f, 0.0, 1.0);
PartLoadFrac = SpeedRatio;
this->m_SuppHeatPartLoadFrac = PartLoadFrac;
this->m_SuppHeatingCycRatio = CycRatio;
this->m_SuppHeatingSpeedRatio = SpeedRatio;
|
|
@Nigusse @Myoldmopar it has been 30 days since this pull request was last updated. |
|
This looks OK to me. @rraustad any final comments? |
|
|
@mitchute the code change appears to correct the issue. CI failures are unrelated. OK to merge. |



Pull request overview
Description of the purpose of this PR
Pull Request Author
Reviewer