Skip to content

Commit

Permalink
Fix VariableSpeedCoils_ZeroRatedCoolingCapacity_Test
Browse files Browse the repository at this point in the history
cf #10470 (review)
@RKStrand does that mean sense to you please?
  • Loading branch information
jmarrec committed Aug 9, 2024
1 parent 409f804 commit 7d4e4fa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/EnergyPlus/VariableSpeedCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5556,7 +5556,11 @@ namespace VariableSpeedCoils {
RatedInletEnth = Psychrometrics::PsyHFnTdbW(RatedInletAirTemp, RatedInletAirHumRat);
CBFRated = AdjustCBF(varSpeedCoil.MSRatedCBF(NormSpeed), varSpeedCoil.MSRatedAirMassFlowRate(NormSpeed), RatedAirMassFlowRate);
if (CBFRated > 0.999) CBFRated = 0.999;
AirMassFlowRatio = RatedAirMassFlowRate / varSpeedCoil.MSRatedAirMassFlowRate(NormSpeed);
if (varSpeedCoil.MSRatedAirMassFlowRate(NormSpeed) > 1.0e-10) {
AirMassFlowRatio = RatedAirMassFlowRate / varSpeedCoil.MSRatedAirMassFlowRate(NormSpeed);
} else {
AirMassFlowRatio = 1.0;
}

if (varSpeedCoil.MSRatedWaterVolFlowRate(NormSpeed) > 1.0e-10) {

This comment has been minimized.

Copy link
@jmarrec

jmarrec Aug 13, 2024

Author Contributor

@RKStrand I was duplicating this I guess.

This comment has been minimized.

Copy link
@RKStrand

RKStrand Aug 13, 2024

Contributor

Ah, I didn't catch that. Well, it would be nice to wrap these up in a local constant parameter, but this isn't necessary or a big deal to me. The fix makes sense, and it solves an issue.

WaterMassFlowRatio = varSpeedCoil.RatedWaterVolFlowRate / varSpeedCoil.MSRatedWaterVolFlowRate(NormSpeed);
Expand Down Expand Up @@ -8622,7 +8626,11 @@ namespace VariableSpeedCoils {
Real64 tADP = PsyTsatFnHPb(state, hADP, Pressure, RoutineName); // Apparatus dew point temperature [C]
Real64 wADP = PsyWFnTdbH(state, tADP, hADP, RoutineName); // Apparatus dew point humidity ratio [kg/kg]
Real64 hTinwADP = PsyHFnTdbW(InletDryBulb, wADP); // Enthalpy at inlet dry-bulb and wADP [J/kg]
SHRCalc = min((hTinwADP - hADP) / (InletEnthalpy - hADP), 1.0); // temporary calculated value of SHR
if (TotCapCalc > 1.0e-10) {
SHRCalc = min((hTinwADP - hADP) / (InletEnthalpy - hADP), 1.0); // temporary calculated value of SHR
} else {
SHRCalc = 1.0;
}

// Check for dry evaporator conditions (win < wadp)
if (wADP > InletHumRatCalc || (Counter >= 1 && Counter < MaxIter)) {
Expand Down

1 comment on commit 7d4e4fa

@RKStrand
Copy link
Contributor

Choose a reason for hiding this comment

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

@jmarrec The changes make sense to me with one small "comment". You used 1.0e-10 for these two checks, but I think there is probably a defined parameter for such things in the code. I'd suggest using that as it will then be in line with other stuff. Otherwise, this seems reasonable to me. Please note that I do not have merge privileges, so I'll I'm able to do here is comment.

Please sign in to comment.