Skip to content

Commit

Permalink
Start VT rules for #4690
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Sep 21, 2022
1 parent 866817c commit 9cdfb51
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/model/CoilCoolingDXSingleSpeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,6 @@ namespace model {
setEvaporativeCondenserEffectiveness(0.0);
autosizeEvaporativeCondenserAirFlowRate(); //autosize
autosizeEvaporativeCondenserPumpRatedPowerConsumption(); //autosize
setCrankcaseHeaterCapacity(0.0);
setMaximumOutdoorDryBulbTemperatureForCrankcaseHeaterOperation(0.0);
setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0); // Per E+ IDD default
setNominalTimeForCondensateRemovalToBegin(0.0);
Expand Down Expand Up @@ -967,7 +966,6 @@ namespace model {
setEvaporativeCondenserEffectiveness(0.0);
autosizeEvaporativeCondenserAirFlowRate(); //autosize
autosizeEvaporativeCondenserPumpRatedPowerConsumption(); //autosize
setCrankcaseHeaterCapacity(0.0);
setMaximumOutdoorDryBulbTemperatureForCrankcaseHeaterOperation(0.0);
setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0); // Per E+ IDD default
setNominalTimeForCondensateRemovalToBegin(0.0);
Expand Down
34 changes: 34 additions & 0 deletions src/osversion/VersionTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7083,6 +7083,40 @@ namespace osversion {
m_new.emplace_back(std::move(varAdded));
}

} else if (iddname == "OS:Coil:Cooling:DX:SingleSpeed") {

This comment has been minimized.

Copy link
@joseph-robertson

joseph-robertson Sep 21, 2022

Collaborator

Others, like RatedCOP and RatedEvaporatorFanPowerPerVolumeFlowRate, were made required even though the ctor was already setting them to values.


// Remove Construction with Material:AirWall layer
// Replace with Construction:AirBoundary

auto iddObject = idd_3_4_1.getObject(iddname);
IdfObject newObject(iddObject.get());

// new defaults
// From blank to zero
// "Nominal Time for Condensate Removal to Begin"=>16 (blank => 0),
// "Ratio of Initial Moisture Evaporation Rate and Steady State Latent Capacity"=>17,
// "Maximum Cycling Rate"=>18,
// "Latent Capacity Time Constant"=>19,
for (size_t i = 16; i <= 19; ++i) {
newObject.setDouble(i, 0.0);

This comment has been minimized.

Copy link
@joseph-robertson

joseph-robertson Sep 21, 2022

Collaborator

Shouldn't we only do this if the field is blank?

This comment has been minimized.

Copy link
@jmarrec

jmarrec Sep 21, 2022

Author Collaborator

I do this on the brand new object. Then I loop on the old fields and transfer them over

}

// "Evaporative Condenser Effectiveness"=>22 (from 0.0 to 0.9),
// "Maximum Outdoor Dry-Bulb Temperature for Crankcase Heater Operation"=>26 (from 0.0 to 10.0)
newObject.setDouble(22, 0.9);
newObject.setDouble(26, 10.0);

for (size_t i = 0; i < object.numFields(); ++i) {
if ((value = object.getString(i))) {
if ((i != 22 && i != 26) || value.get() != 0.0) {

This comment has been minimized.

Copy link
@jmarrec

jmarrec Sep 21, 2022

Author Collaborator

I will remove this, I actually don't want to change an existing number

newObject.setString(i, value.get());
}
}
}

m_refactored.push_back(RefactoredObjectData(object, newObject));
ss << newObject;

// No-op
} else {
ss << object;
Expand Down

0 comments on commit 9cdfb51

Please sign in to comment.