-
Notifications
You must be signed in to change notification settings - Fork 422
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
Various DX coil fixes #8576
Various DX coil fixes #8576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code walkthru. Note that UnitarySystem changes overlap (duplicate?) changes in #8558.
(1.0 - S12RuntimeFraction) * S1OutletAirEnthalpy + S12RuntimeFraction * S12OutletAirEnthalpy; | ||
state.dataDXCoils->DXCoil(DXCoilNum).OutletAirHumRat = (1.0 - S12RuntimeFraction) * S1OutletAirHumRat + S12RuntimeFraction * S12OutletAirHumRat; | ||
(1.0 - S2PLR) * S1OutletAirEnthalpy + S2PLR * S12OutletAirEnthalpy; | ||
state.dataDXCoils->DXCoil(DXCoilNum).OutletAirHumRat = (1.0 - S2PLR) * S1OutletAirHumRat + S2PLR * S12OutletAirHumRat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use PLR
, not RuntimeFraction
to calculate leaving conditions for 2-stage operation (Coil:Cooling:DX:TwoStageWithHumidityControlMode). RuntimeFraction
is appropriate for power consumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
src/EnergyPlus/DXCoils.cc
Outdated
if (FanOpMode == ContFanCycCoil) { | ||
Real64 MinAirHumRat(0.0); // set to zero because MinAirHumRat is unused argument | ||
Hfg = PsyHfgAirFnWTdb(MinAirHumRat, HSOutletAirDryBulbTemp * SpeedRatio + (1.0 - SpeedRatio) * LSOutletAirDryBulbTemp); | ||
// Average outlet HR | ||
OutletAirHumRat = InletAirHumRat - state.dataDXCoils->DXCoil(DXCoilNum).LatCoolingEnergyRate / Hfg / state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate; | ||
} else { | ||
OutletAirHumRat = (HSOutletAirHumRat * SpeedRatio) + (LSOutletAirHumRat * (1.0 - SpeedRatio)); | ||
} | ||
OutletAirHumRat = | ||
((HSOutletAirHumRat * SpeedRatio * MSHPMassFlowRateHigh) + (LSOutletAirHumRat * (1.0 - SpeedRatio) * MSHPMassFlowRateLow)) / | ||
state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multispeed DX fix massflow weighting between speeds (2398ce6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall this from @lgu1234 a while back.
src/EnergyPlus/DXCoils.cc
Outdated
// Now reset runtime fraction to 1.0 (because LS is running the full timestep) | ||
state.dataDXCoils->DXCoil(DXCoilNum).CoolingCoilRuntimeFraction = 1.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This inside a big if (SpeedNum > 1 && SingleMode == 0) {
so this means it running at speed 2 or higher. (bd8aa38)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
src/EnergyPlus/DXCoils.cc
Outdated
OutletAirHumRat = LSOutletAirHumRat; | ||
OutletAirDryBulbTemp = LSOutletAirDryBulbTemp; | ||
if (FanOpMode == ContFanCycCoil) { | ||
// outlet conditions are average of inlet and low speed weighted by CycRatio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multispeed DX fix outlet conditions at low speed (bd8aa38)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see in here where OutletAir* variables are calculated. Oh, there it is, in the else they are also set for cycling fan. OK then.
src/EnergyPlus/UnitarySystem.cc
Outdated
} else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling) { | ||
} else if (this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling || | ||
this->m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow 2-speed dx to have variable speeds (ea02126)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually missing from develop? And now things line up better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but at least I'm consistent. And that whole conversation of what does idle speed anything mean is still a little confusing. I see now there is a call to DXCoils::SimDXCoilMultiSpeed. That is the correct call for 2-spd coil? I've lost track but thought is was a different function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's fine. There are further checks on coil type in that function.
line 343 if (SELECT_CASE_var == CoilDX_CoolingTwoSpeed) {
@@ -2179,6 +2180,15 @@ namespace UnitarySystems { | |||
this->m_IdleVolumeAirRate = this->m_MaxNoCoolHeatAirVolFlow; | |||
this->m_IdleMassFlowRate = this->MaxNoCoolHeatAirMassFlow; | |||
this->m_IdleSpeedRatio = this->m_IdleVolumeAirRate / this->m_DesignFanVolFlowRate; | |||
} else { | |||
for ( Iter = this->m_NumOfSpeedCooling; Iter > 0; --Iter ) { | |||
this->m_CoolVolumeFlowRate[ Iter ] = this->m_MaxCoolAirVolFlow * Iter / this->m_NumOfSpeedCooling; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More allow 2-speed dx to be variable speed (ea02126)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this goes with the 2-speed coil addition to this section.
src/EnergyPlus/UnitarySystem.cc
Outdated
@@ -4414,7 +4424,13 @@ namespace UnitarySystems { | |||
|
|||
} else { // mine data from DX cooling coil | |||
|
|||
if (thisSys.m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) thisSys.m_NumOfSpeedCooling = 2; | |||
if (thisSys.m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More allow 2-speed dx to be variable speed (ea02126)
src/EnergyPlus/DXCoils.cc
Outdated
state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above deleted code looks like it's catching up to develop.
src/EnergyPlus/UnitarySystem.cc
Outdated
@@ -7286,6 +7290,7 @@ namespace UnitarySystems { | |||
} | |||
|
|||
if (state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedCooling || | |||
state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_CoolingTwoSpeed || | |||
state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilType_Num == DataHVACGlobals::CoilDX_Cooling || | |||
state.dataUnitarySystems->unitarySys[sysNum].m_HeatingCoilType_Num == DataHVACGlobals::CoilDX_MultiSpeedHeating || | |||
state.dataUnitarySystems->unitarySys[sysNum].m_HeatingCoilType_Num == DataHVACGlobals::Coil_HeatingElectric_MultiStage || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, you moved the report variable set up to here (but didn't get rid of the "if" in above code at 7207).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - will clean that up.
src/EnergyPlus/UnitarySystem.cc
Outdated
@@ -9077,7 +9082,10 @@ namespace UnitarySystems { | |||
// RETURN if the moisture load is met | |||
if (state.dataUnitarySystems->MoistureLoad >= 0.0 || state.dataUnitarySystems->MoistureLoad >= TempLatOutput) return; | |||
// Multimode does not meet the latent load, only the sensible load with or without HX active | |||
// what if there is a heating load for a system using Multimode? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May need to create a new issue to see if this works as expected.
Real64 totalAncillaryPower = | ||
thisSys->m_AncillaryOnPower * thisSys->m_PartLoadFrac + thisSys->m_AncillaryOffPower * (1.0 - thisSys->m_PartLoadFrac); | ||
EXPECT_NEAR(totalAncillaryPower, thisSys->m_TotalAuxElecPower, 0.00000001); | ||
// at PLR very near 0.5, m_TotalAuxElecPower should be very near 75 W. | ||
EXPECT_NEAR(74.694, thisSys->m_TotalAuxElecPower, 0.0001); | ||
EXPECT_NEAR(74.4036, thisSys->m_TotalAuxElecPower, 0.0001); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small diff's in unit tests, good to go so far.
@rraustad Thanks for the review. |
@mjwitte my global branch is about to merge. I don't anticipate major conflicts with this branch. I believe @mitchute also has another globals branch soon to be ready to merge. After that I'm back to trying to get the other PRs reviewed and merged for a little while, then more globals tomorrow afternoon. All that to say, if any more conflicts arise, I'm happy to resolve them. 👍 |
@Myoldmopar Much appreciated. I'm done with this for the time being. I have not looked at the diffs to make sure there's nothing ridiculous in here. |
Pulled develop in, there was only a tiny conflict even after all those PRs. I ran the unit test suite, and I am starting to see some SQL related unit tests fail, but they only seem to be happening when the unit tests are run serially, and it's not consistent. I don't have time to investigate right now, so I'm just going to pretend for tonight like they aren't happening. I'll run the regressions locally, and assuming CI is OK with my merge I'll take a peek into the diffs and we'll see if we can drop this right in tomorrow morning, then follow it up with the other coil branch. |
I am able to reproduce the diffs locally as they are on CI.
I took the big diff math files and re-ran them with only annual results and got zero out of range math diffs. I believe this is good to go in. Thanks @mjwitte and @rraustad ! This is great! |
Pull request overview
PLR
, notRuntimeFraction
to calculate leaving conditions for 2-stage operation (Coil:Cooling:DX:TwoStageWithHumidityControlMode).Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.