Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into Post241QuickChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Apr 24, 2024
2 parents f32d814 + df02ec1 commit 95e8e61
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 26 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/epjson.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest] # , macos-latest] # temporarily commenting because it is failing out of nowhere
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -33,6 +33,8 @@ jobs:
echo CMAKE_GENERATOR='Visual Studio 17 2022' >> $GITHUB_ENV
echo CMAKE_GENERATOR_PLATFORM=x64 >> $GITHUB_ENV
choco install ninja
elif [ "$RUNNER_OS" == "macOS" ]; then
echo MACOSX_DEPLOYMENT_TARGET=12.1 >> $GITHUB_ENV
fi;
pip install pytest pytest-timeout
Expand Down
Expand Up @@ -3295,7 +3295,9 @@ \subsubsection{Inputs}\label{inputs-17-001}

\paragraph{Field: Gross Rated Total Cooling Capacity at Selected Nominal Speed Level}\label{field-gross-rated-total-cooling-capacity-at-selected-nominal-speed-level}

This numeric field contains the gross rated total cooling capacity at the nominal speed level. This field is autosizable. The gross rated total cooling capacity is used to determine a capacity scaling factor, as compared to the Reference Unit capacity at the nominal speed level.
This numeric field contains the gross rated total cooling capacity at the nominal speed level. This field is autosizable. Note that if this field is set to zero rather than a positive number or autosized, the coil will be ignored and will not run.

The gross rated total cooling capacity is used to determine a capacity scaling factor, as compared to the Reference Unit capacity at the nominal speed level.

\begin{equation}
{\rm{CapacityScaleFactor}} = \frac{{{\rm{Gross RatedTotalCoolingCapacity}}}}{{{\rm{ReferenceUnitCapacity}}@{\rm{NominalSpeedLevel}}}}
Expand Down Expand Up @@ -7521,7 +7523,9 @@ \subsubsection{Inputs}\label{inputs-31}

\paragraph{Field: Gross Rated Total Cooling Capacity at Selected Nominal Speed Level}\label{field-gross-rated-total-cooling-capacity-at-selected-nominal-speed-level-1}

This numeric field contains the gross rated total cooling capacity at the nominal speed level. This field is autosizable. The gross rated total cooling capacity is used to determine a capacity scaling factor, as compared to the Reference Unit capacity at the nominal speed level.
This numeric field contains the gross rated total cooling capacity at the nominal speed level. This field is autosizable. Note that if this field is set to zero rather than a positive number or autosized, the coil will be ignored and will not run.

The gross rated total cooling capacity is used to determine a capacity scaling factor, as compared to the Reference Unit capacity at the nominal speed level.

\begin{equation}
CapacityScaleFactor = \frac{{GrossRatedTotalCoolingCapacity}}{{ReferenceUnitCapacity@NominalSpeedLevel}}
Expand Down
4 changes: 4 additions & 0 deletions src/EnergyPlus/DXCoils.cc
Expand Up @@ -11964,6 +11964,10 @@ Real64 CalcCBF(EnergyPlusData &state,

auto &DXCT = state.dataHVACGlobal->DXCT;

if (AirVolFlowRate <= 0.0 || TotCap <= 0.0) { // Coil not running or has no capacity, don't calculate CBF
return CBF;
}

AirMassFlowRate = AirVolFlowRate * PsyRhoAirFnPbTdbW(state, DataEnvironment::StdPressureSeaLevel, InletAirTemp, InletAirHumRat, RoutineName);
DeltaH = TotCap / AirMassFlowRate;
InletAirEnthalpy = PsyHFnTdbW(InletAirTemp, InletAirHumRat);
Expand Down
50 changes: 27 additions & 23 deletions src/EnergyPlus/VariableSpeedCoils.cc
Expand Up @@ -3998,6 +3998,7 @@ namespace VariableSpeedCoils {
if ((state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).VSCoilType == DataHVACGlobals::Coil_CoolingWaterToAirHPVSEquationFit) ||
(state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).VSCoilType == Coil_CoolingAirToAirVariableSpeed)) {
for (Mode = 1; Mode <= state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).NumOfSpeeds; ++Mode) {
if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedCapCoolTotal <= 0.0) break;
// Check for zero capacity or zero max flow rate
if (state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).MSRatedTotCap(Mode) <= 0.0) {
ShowSevereError(state,
Expand Down Expand Up @@ -5827,28 +5828,30 @@ namespace VariableSpeedCoils {
DefrostControl = StandardRatings::HPdefrostControl::Timed;
break;
}
StandardRatings::CalcDXCoilStandardRating(state,
varSpeedCoil.Name,
varSpeedCoil.VarSpeedCoilType,
varSpeedCoil.VSCoilType,
varSpeedCoil.NumOfSpeeds,
varSpeedCoil.MSRatedTotCap,
varSpeedCoil.MSRatedCOP,
varSpeedCoil.MSCCapAirFFlow,
varSpeedCoil.MSCCapFTemp,
varSpeedCoil.MSEIRAirFFlow,
varSpeedCoil.MSEIRFTemp,
varSpeedCoil.PLFFPLR,
varSpeedCoil.MSRatedAirVolFlowRate,
varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2017,
varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2023,
CondenserType,
0, // varSpeedCoil.RegionNum, // ??
varSpeedCoil.MinOATCompressor,
varSpeedCoil.OATempCompressorOn,
false, // varSpeedCoil.OATempCompressorOnOffBlank, // ??
DefrostControl,
ObjexxFCL::Optional_bool_const());
if (varSpeedCoil.RatedCapCoolTotal > 0.0) {
StandardRatings::CalcDXCoilStandardRating(state,
varSpeedCoil.Name,
varSpeedCoil.VarSpeedCoilType,
varSpeedCoil.VSCoilType,
varSpeedCoil.NumOfSpeeds,
varSpeedCoil.MSRatedTotCap,
varSpeedCoil.MSRatedCOP,
varSpeedCoil.MSCCapAirFFlow,
varSpeedCoil.MSCCapFTemp,
varSpeedCoil.MSEIRAirFFlow,
varSpeedCoil.MSEIRFTemp,
varSpeedCoil.PLFFPLR,
varSpeedCoil.MSRatedAirVolFlowRate,
varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2017,
varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2023,
CondenserType,
0, // varSpeedCoil.RegionNum, // ??
varSpeedCoil.MinOATCompressor,
varSpeedCoil.OATempCompressorOn,
false, // varSpeedCoil.OATempCompressorOnOffBlank, // ??
DefrostControl,
ObjexxFCL::Optional_bool_const());
}
break;
default:
break;
Expand Down Expand Up @@ -5974,6 +5977,7 @@ namespace VariableSpeedCoils {
state.dataVariableSpeedCoils->CpAir_Init = PsyCpAirFnW(state.dataVariableSpeedCoils->LoadSideInletHumRat_Init);
state.dataVariableSpeedCoils->firstTime = false;
}

state.dataVariableSpeedCoils->LoadSideInletWBTemp_Init = PsyTwbFnTdbWPb(state,
state.dataVariableSpeedCoils->LoadSideInletDBTemp_Init,
state.dataVariableSpeedCoils->LoadSideInletHumRat_Init,
Expand Down Expand Up @@ -6105,7 +6109,7 @@ namespace VariableSpeedCoils {
state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SimFlag = true;
}

if (CompressorOp == CompressorOperation::Off) {
if (CompressorOp == CompressorOperation::Off || state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).RatedCapCoolTotal <= 0.0) {
state.dataVariableSpeedCoils->VarSpeedCoil(DXCoilNum).SimFlag = false;
return;
}
Expand Down
1 change: 1 addition & 0 deletions tst/EnergyPlus/unit/DXCoils.unit.cc
Expand Up @@ -1998,6 +1998,7 @@ TEST_F(EnergyPlusFixture, TestReadingCoilCoolingHeatingDX)
Real64 OnOffAirFlowRatio = 0.5;
state->dataVariableSpeedCoils->VarSpeedCoil(VarSpeedCoilNum).AirMassFlowRate = 1.0;
state->dataVariableSpeedCoils->VarSpeedCoil(VarSpeedCoilNum).RunFrac = 0.0;
state->dataVariableSpeedCoils->VarSpeedCoil(VarSpeedCoilNum).RatedCapCoolTotal = 100.0;
// power = 26 + 2x
VariableSpeedCoils::CalcVarSpeedCoilCooling(*state,
VarSpeedCoilNum,
Expand Down

0 comments on commit 95e8e61

Please sign in to comment.