Skip to content

Commit

Permalink
#4999 - Align VT defaults for a CoilCoolingWaterToAirHeatPump:XXX tha…
Browse files Browse the repository at this point in the history
…t doesn't have a parent Unitary to the model Ctor values
  • Loading branch information
jmarrec committed Oct 16, 2023
1 parent 5ea4d92 commit 35d8ef8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/osversion/VersionTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8513,8 +8513,9 @@ namespace osversion {
const std::string curveName = hasCoilInfo ? it->curveName() : fmt::format("{}-PLFCorrelationCurve", object.nameString());
newObject.setString(17, curveName);

double maxCyclingRate = 0.0;
double heatPumpTimeConst = 0.0;
// E+ 23.2.0 defaults Maximum Cycling Rate and Latent Capacity Time Constant to 0.0, we don't, cf #4999
double maxCyclingRate = 2.5;
double heatPumpTimeConst = 60.0;
double hpDelayTime = 60.0;
if (hasCoilInfo) {
maxCyclingRate = it->maxCyclingRate;
Expand Down Expand Up @@ -8560,8 +8561,9 @@ namespace osversion {
auto it = CoilLatentTransitionInfo::findFromCoolingCoil(coilTransitionInfos, object);
const bool hasCoilInfo = (it != coilTransitionInfos.end());

double maxCyclingRate = 0.0;
double heatPumpTimeConst = 0.0;
// E+ 23.2.0 defaults Maximum Cycling Rate and Latent Capacity Time Constant to 0.0, we don't, cf #4999
double maxCyclingRate = 2.5;
double heatPumpTimeConst = 60.0;
double hpDelayTime = 60.0;
if (hasCoilInfo) {
maxCyclingRate = it->maxCyclingRate;
Expand Down
10 changes: 6 additions & 4 deletions src/osversion/test/VersionTranslator_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3106,8 +3106,9 @@ TEST_F(OSVersionFixture, update_3_6_1_to_3_7_0_Coils_Latent_solo) {
{
const size_t insertionIndex = 20;
// No Unitary -> IDD DEFAULTS
EXPECT_EQ(0.0, coil.getDouble(insertionIndex).get()); // Maximum Cycling Rate
EXPECT_EQ(0.0, coil.getDouble(insertionIndex + 1).get()); // Latent Capacity Time Constant
// E+ 23.2.0 defaults Maximum Cycling Rate and Latent Capacity Time Constant to 0.0, we don't, cf #4999
EXPECT_EQ(2.5, coil.getDouble(insertionIndex).get()); // Maximum Cycling Rate
EXPECT_EQ(60.0, coil.getDouble(insertionIndex + 1).get()); // Latent Capacity Time Constant
EXPECT_EQ(60.0, coil.getDouble(insertionIndex + 2).get()); // Fan Delay Time
}
}
Expand All @@ -3124,8 +3125,9 @@ TEST_F(OSVersionFixture, update_3_6_1_to_3_7_0_Coils_Latent_solo) {
EXPECT_EQ(0.02, coil.getDouble(insertionIndex - 1).get());

// No Unitary -> IDD DEFAULTS
EXPECT_EQ(0.0, coil.getDouble(insertionIndex).get()); // Maximum Cycling Rate
EXPECT_EQ(0.0, coil.getDouble(insertionIndex + 1).get()); // Latent Capacity Time Constant
// E+ 23.2.0 defaults Maximum Cycling Rate and Latent Capacity Time Constant to 0.0, we don't, cf #4999
EXPECT_EQ(2.5, coil.getDouble(insertionIndex).get()); // Maximum Cycling Rate
EXPECT_EQ(60.0, coil.getDouble(insertionIndex + 1).get()); // Latent Capacity Time Constant
EXPECT_EQ(60.0, coil.getDouble(insertionIndex + 2).get()); // Fan Delay Time

EXPECT_EQ("Yes", coil.getString(insertionIndex + 3).get());
Expand Down

0 comments on commit 35d8ef8

Please sign in to comment.