-
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
Changes from 5 commits
874c161
28a7ec4
cdf4f01
f0e1049
1d5e5f3
23573fd
6c67173
3116874
77ee3ad
b118f24
9d534e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -614,8 +614,8 @@ namespace EnergyPlus::DXCoils { | |
|
||
// Determine combined performance | ||
state.dataDXCoils->DXCoil(DXCoilNum).OutletAirEnthalpy = | ||
(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; | ||
state.dataDXCoils->DXCoil(DXCoilNum).OutletAirTemp = PsyTdbFnHW(state.dataDXCoils->DXCoil(DXCoilNum).OutletAirEnthalpy, state.dataDXCoils->DXCoil(DXCoilNum).OutletAirHumRat); | ||
// Check for saturation error and modify temperature at constant enthalpy | ||
if (state.dataDXCoils->DXCoil(DXCoilNum).CondenserInletNodeNum(PerfMode) != 0) { | ||
|
@@ -11822,7 +11822,6 @@ namespace EnergyPlus::DXCoils { | |
Real64 LSElecCoolingPower; // low speed power [W] | ||
Real64 HSElecCoolingPower; // high speed power [W] | ||
Real64 CrankcaseHeatingPower; // Power due to crank case heater | ||
Real64 Hfg; | ||
Real64 AirVolumeFlowRate; // Air volume flow rate across the heating coil | ||
Real64 VolFlowperRatedTotCap; // Air volume flow rate divided by rated total heating capacity | ||
|
||
|
@@ -12193,14 +12192,9 @@ namespace EnergyPlus::DXCoils { | |
OutletAirHumRat = HSOutletAirHumRat; | ||
OutletAirDryBulbTemp = HSOutletAirDryBulbTemp; | ||
} else { | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. I recall this from @lgu1234 a while back. |
||
OutletAirDryBulbTemp = PsyTdbFnHW(OutletAirEnthalpy, OutletAirHumRat); | ||
if (OutletAirDryBulbTemp < OutletAirDryBulbTempSat) { // Limit to saturated conditions at OutletAirEnthalpy | ||
OutletAirDryBulbTemp = OutletAirDryBulbTempSat; | ||
|
@@ -12226,6 +12220,9 @@ namespace EnergyPlus::DXCoils { | |
state.dataDXCoils->DXCoil(DXCoilNum).ElecCoolingPower = state.dataDXCoils->DXCoil(DXCoilNum).CoolingCoilRuntimeFraction * HSElecCoolingPower + | ||
(1.0 - state.dataDXCoils->DXCoil(DXCoilNum).CoolingCoilRuntimeFraction) * LSElecCoolingPower; | ||
} | ||
// 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 commentThe reason will be displayed to describe this comment to others. Learn more. This inside a big There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. |
||
|
||
// Calculation for heat reclaim needs to be corrected to use compressor power (not including condenser fan power) | ||
state.dataHeatBal->HeatReclaimDXCoil(DXCoilNum).AvailCapacity = state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate + state.dataDXCoils->DXCoil(DXCoilNum).ElecCoolingPower; | ||
|
||
|
@@ -12412,10 +12409,22 @@ namespace EnergyPlus::DXCoils { | |
} | ||
|
||
if (FanOpMode == CycFanCycCoil) OnOffFanPartLoadFraction = PLF; | ||
// outlet conditions are average of inlet and low speed weighted by CycRatio | ||
OutletAirEnthalpy = LSOutletAirEnthalpy; | ||
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 commentThe 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 commentThe 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. |
||
// Continuous fan, cycling compressor | ||
Real64 CycAirFlowRatio = | ||
CycRatio * AirMassFlow / | ||
state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate; // ratio of compressor on airflow to average timestep airflow | ||
OutletAirEnthalpy = | ||
CycAirFlowRatio * LSOutletAirEnthalpy + (1.0 - CycAirFlowRatio) * InletAirEnthalpy; | ||
OutletAirHumRat = | ||
CycAirFlowRatio * LSOutletAirHumRat + (1.0 - CycAirFlowRatio) * InletAirHumRat; | ||
OutletAirDryBulbTemp = PsyTdbFnHW(OutletAirEnthalpy, OutletAirHumRat); | ||
} else { | ||
OutletAirHumRat = LSOutletAirHumRat; | ||
OutletAirDryBulbTemp = LSOutletAirDryBulbTemp; | ||
OutletAirEnthalpy = LSOutletAirEnthalpy; | ||
} | ||
// get low speed EIR at current conditions | ||
EIRTempModFacLS = CurveValue(state, state.dataDXCoils->DXCoil(DXCoilNum).MSEIRFTemp(SpeedNum), InletAirWetBulbC, CondInletTemp); | ||
EIRFlowModFacLS = CurveValue(state, state.dataDXCoils->DXCoil(DXCoilNum).MSEIRFFlow(SpeedNum), AirMassFlowRatioLS); | ||
|
@@ -12436,25 +12445,7 @@ namespace EnergyPlus::DXCoils { | |
state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate = state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate * CycRatio; | ||
state.dataDXCoils->DXCoil(DXCoilNum).SensCoolingEnergyRate = state.dataDXCoils->DXCoil(DXCoilNum).SensCoolingEnergyRate * CycRatio; | ||
state.dataDXCoils->DXCoil(DXCoilNum).LatCoolingEnergyRate = state.dataDXCoils->DXCoil(DXCoilNum).LatCoolingEnergyRate * CycRatio; | ||
if (FanOpMode == ContFanCycCoil) { | ||
OutletAirEnthalpy = InletAirEnthalpy - state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate / state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate; | ||
Real64 MinAirHumRat(0.0); // set to zero because MinAirHumRat is unused argument | ||
Hfg = PsyHfgAirFnWTdb(MinAirHumRat, OutletAirDryBulbTemp * CycRatio + (1.0 - CycRatio) * InletAirDryBulbTemp); | ||
OutletAirHumRat = InletAirHumRat - state.dataDXCoils->DXCoil(DXCoilNum).LatCoolingEnergyRate / Hfg / state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate; | ||
OutletAirDryBulbTemp = PsyTdbFnHW(OutletAirEnthalpy, OutletAirHumRat); | ||
if (OutletAirDryBulbTemp < OutletAirDryBulbTempSat) { // Limit to saturated conditions at OutletAirEnthalpy | ||
OutletAirDryBulbTemp = OutletAirDryBulbTempSat; | ||
OutletAirHumRat = PsyWFnTdbH(state, OutletAirDryBulbTemp, OutletAirEnthalpy, RoutineName); | ||
CalcComponentSensibleLatentOutput(state.dataDXCoils->DXCoil(DXCoilNum).InletAirMassFlowRate, | ||
InletAirDryBulbTemp, | ||
InletAirHumRat, | ||
OutletAirDryBulbTemp, | ||
OutletAirHumRat, | ||
state.dataDXCoils->DXCoil(DXCoilNum).SensCoolingEnergyRate, | ||
state.dataDXCoils->DXCoil(DXCoilNum).LatCoolingEnergyRate, | ||
state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate); | ||
} | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The above deleted code looks like it's catching up to develop. |
||
// Calculation for heat reclaim needs to be corrected to use compressor power (not including condenser fan power) | ||
state.dataHeatBal->HeatReclaimDXCoil(DXCoilNum).AvailCapacity = state.dataDXCoils->DXCoil(DXCoilNum).TotalCoolingEnergyRate + state.dataDXCoils->DXCoil(DXCoilNum).ElecCoolingPower; | ||
state.dataDXCoils->DXCoil(DXCoilNum).OutletAirEnthalpy = OutletAirEnthalpy; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2140,7 +2140,8 @@ namespace UnitarySystems { | |
this->m_IdleSpeedRatio = this->m_IdleVolumeAirRate / this->m_DesignFanVolFlowRate; | ||
} | ||
|
||
} 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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. |
||
|
||
if (this->m_NumOfSpeedCooling > 0) { | ||
if (this->m_CoolVolumeFlowRate.size() == 0) this->m_CoolVolumeFlowRate.resize(this->m_NumOfSpeedCooling + 1); | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. and this goes with the 2-speed coil addition to this section. |
||
this->m_CoolMassFlowRate[ Iter ] = this->m_CoolVolumeFlowRate[ Iter ] * state.dataEnvrn->StdRhoAir; | ||
this->m_MSCoolingSpeedRatio[ Iter ] = this->m_CoolVolumeFlowRate[ Iter ] / this->m_DesignFanVolFlowRate; | ||
} | ||
this->m_IdleVolumeAirRate = this->m_MaxNoCoolHeatAirVolFlow; | ||
this->m_IdleMassFlowRate = this->m_IdleVolumeAirRate * state.dataEnvrn->StdRhoAir; | ||
this->m_IdleSpeedRatio = this->m_IdleVolumeAirRate / this->m_DesignFanVolFlowRate; | ||
} | ||
} else if (this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingWater || | ||
this->m_CoolingCoilType_Num == DataHVACGlobals::Coil_CoolingWaterDetailed) { | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. More allow 2-speed dx to be variable speed (ea02126) |
||
thisSys.m_NumOfSpeedCooling = 2; | ||
thisSys.m_MultiOrVarSpeedCoolCoil = true; | ||
} else { | ||
thisSys.m_NumOfSpeedCooling = 1; | ||
thisSys.m_MultiOrVarSpeedCoolCoil = false; | ||
} | ||
|
||
// Get DX cooling coil index | ||
DXCoils::GetDXCoilIndex(state, | ||
|
@@ -7186,21 +7202,33 @@ namespace UnitarySystems { | |
"Average", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name); | ||
|
||
SetupOutputVariable(state, "Unitary System Cooling Ancillary Electricity Energy", | ||
OutputProcessor::Unit::J, | ||
state.dataUnitarySystems->unitarySys[sysNum].m_CoolingAuxElecConsumption, | ||
"System", | ||
"Sum", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name, | ||
_, | ||
"Electricity", | ||
"Cooling", | ||
_, | ||
"System"); | ||
SetupOutputVariable(state, "Unitary System Electricity Rate", | ||
OutputProcessor::Unit::W, | ||
state.dataUnitarySystems->unitarySys[sysNum].m_ElecPower, | ||
"System", | ||
"Average", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name); | ||
SetupOutputVariable(state, "Unitary System Electricity Energy", | ||
OutputProcessor::Unit::J, | ||
state.dataUnitarySystems->unitarySys[sysNum].m_ElecPowerConsumption, | ||
"System", | ||
"Sum", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name); | ||
|
||
{ | ||
auto const SELECT_CASE_var(state.dataUnitarySystems->unitarySys[sysNum].m_CoolingCoilType_Num); | ||
if (SELECT_CASE_var == DataHVACGlobals::CoilDX_CoolingTwoSpeed) { | ||
SetupOutputVariable(state, "Unitary System Cycling Ratio", | ||
OutputProcessor::Unit::None, | ||
state.dataUnitarySystems->unitarySys[sysNum].m_CycRatio, | ||
"System", | ||
"Average", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name); | ||
SetupOutputVariable(state, "Unitary System Compressor Speed Ratio", | ||
OutputProcessor::Unit::None, | ||
state.dataUnitarySystems->unitarySys[sysNum].m_SpeedRatio, | ||
"System", | ||
"Average", | ||
state.dataUnitarySystems->unitarySys[sysNum].Name); | ||
} else if (SELECT_CASE_var == DataHVACGlobals::CoilDX_MultiSpeedCooling || (SELECT_CASE_var == DataHVACGlobals::CoilDX_Cooling)) { | ||
if (state.dataUnitarySystems->unitarySys[sysNum].m_HeatRecActive) { | ||
SetupOutputVariable(state, "Unitary System Heat Recovery Rate", | ||
|
@@ -7286,6 +7314,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 || | ||
|
@@ -9077,7 +9106,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? | ||
if (!state.dataUnitarySystems->CoolingLoad && this->m_DehumidControlType_Num == DehumCtrlType::Multimode) return; | ||
// if HX was previously turned on return since sensible load is already met | ||
if (state.dataUnitarySystems->CoolingLoad && this->m_DehumidControlType_Num == DehumCtrlType::Multimode && HXUnitOn) return; | ||
// IF(HeatingLoad .AND. UnitarySystem(UnitarySysNum)%m_DehumidControlType_Num .EQ. dehumidm_ControlType::CoolReheat)RETURN | ||
|
||
if ((this->m_DehumidControlType_Num == DehumCtrlType::CoolReheat || this->m_DehumidControlType_Num == DehumCtrlType::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.
Use
PLR
, notRuntimeFraction
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.