Skip to content

Commit 42fe449

Browse files
committed
Temporary (?): Fill PlantLoop's Water Loop Type: hoping this field will be gone by 25.2.0 release (will revert then)
1 parent c864d8d commit 42fe449

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/energyplus/ForwardTranslator/ForwardTranslatePlantLoop.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@
9898
#include "../../model/SetpointManagerScheduledDualSetpoint.hpp"
9999
#include "../../model/SetpointManagerScheduledDualSetpoint_Impl.hpp"
100100
#include "../../model/LifeCycleCost.hpp"
101+
101102
#include "../../utilities/idf/IdfExtensibleGroup.hpp"
103+
#include "../../utilities/data/DataEnums.hpp"
104+
102105
#include <utilities/idd/IddEnums.hxx>
103106
#include <utilities/idd/IddFactory.hxx>
104107
#include <utilities/idd/PlantLoop_FieldEnums.hxx>
@@ -582,6 +585,24 @@ namespace energyplus {
582585
idfObject.setString(PlantLoopFields::CommonPipeSimulation, s.get());
583586
}
584587

588+
// Water Loop Type
589+
// TODO JM 2025-11-13: This field should never have been added to 25.2.0, so it is purposefully NOT wrapped in the model namespace
590+
// MJW is looking into removing it today, will assess later
591+
ComponentType waterLoopType = plantLoop.componentType();
592+
if (waterLoopType == ComponentType::Heating) {
593+
idfObject.setString(PlantLoopFields::WaterLoopType, "HotWater");
594+
} else if (waterLoopType == ComponentType::Cooling) {
595+
idfObject.setString(PlantLoopFields::WaterLoopType, "ChilledWater");
596+
} else if (waterLoopType == ComponentType::None) {
597+
idfObject.setString(PlantLoopFields::WaterLoopType, "None");
598+
} else if (waterLoopType == ComponentType::Both) {
599+
if (!plantLoop.supplyComponents(IddObjectType::OS_HeatPump_AirToWater_Cooling).empty()) {
600+
idfObject.setString(PlantLoopFields::WaterLoopType, "HotWater");
601+
} else if (!plantLoop.supplyComponents(IddObjectType::OS_HeatPump_AirToWater_Heating).empty()) {
602+
idfObject.setString(PlantLoopFields::WaterLoopType, "ChilledWater");
603+
}
604+
}
605+
585606
// Inlet/Outlet Nodes
586607
idfObject.setString(PlantLoopFields::PlantSideInletNodeName, plantLoop.supplyInletNode().name().get());
587608
idfObject.setString(PlantLoopFields::PlantSideOutletNodeName, plantLoop.supplyOutletNode().name().get());

0 commit comments

Comments
 (0)