Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
0fbc857
Separate coil cooling water ft into without unitary and coil system.
joseph-robertson Jan 31, 2025
22abca8
Stub ft test for coil cooling water.
joseph-robertson Jan 31, 2025
9c21359
Few typos in new ft method.
joseph-robertson Jan 31, 2025
f29ca2e
Expand new ft test.
joseph-robertson Feb 3, 2025
beff059
Typo.
joseph-robertson Feb 3, 2025
43e8165
Fix ft test.
joseph-robertson Feb 3, 2025
68870dc
Separate coilsystem cooling water hx assisted ft into without unitary…
joseph-robertson Feb 3, 2025
8dfc486
Formatting.
joseph-robertson Feb 3, 2025
b3235b7
Typo in cmakelists.
joseph-robertson Feb 3, 2025
7ba0733
Few typos in new ft.
joseph-robertson Feb 3, 2025
2a7b8c3
Update new ft.
joseph-robertson Feb 3, 2025
d974d09
Another typo in ft.
joseph-robertson Feb 3, 2025
45254a6
Special case for coilsystem ft on plant loop branch.
joseph-robertson Feb 4, 2025
8d6f69c
Fix and update ft tests.
joseph-robertson Feb 4, 2025
a6e0711
Separate coil cooling water ft into without unitary and coil system.
joseph-robertson Jan 31, 2025
d63b3f1
Stub ft test for coil cooling water.
joseph-robertson Jan 31, 2025
5b02c72
Few typos in new ft method.
joseph-robertson Jan 31, 2025
f2a8287
Expand new ft test.
joseph-robertson Feb 3, 2025
25ab778
Typo.
joseph-robertson Feb 3, 2025
c8248d6
Fix ft test.
joseph-robertson Feb 3, 2025
6d65d77
Separate coilsystem cooling water hx assisted ft into without unitary…
joseph-robertson Feb 3, 2025
63303d3
Formatting.
joseph-robertson Feb 3, 2025
74b017a
Typo in cmakelists.
joseph-robertson Feb 3, 2025
46da7e4
Few typos in new ft.
joseph-robertson Feb 3, 2025
451c466
Update new ft.
joseph-robertson Feb 3, 2025
9aa1aa3
Another typo in ft.
joseph-robertson Feb 3, 2025
62a9ef5
Special case for coilsystem ft on plant loop branch.
joseph-robertson Feb 4, 2025
a739973
Fix and update ft tests.
joseph-robertson Feb 4, 2025
f00dcfe
Merge branch 'coilsystem-cooling-water' of github.com:NREL/OpenStudio…
joseph-robertson Mar 18, 2025
ce9f5d1
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Mar 18, 2025
82f9c0f
Check for ControllerWaterCoil in ft tests.
joseph-robertson Mar 18, 2025
16c916c
Clean up and update test.
joseph-robertson Mar 18, 2025
cb7ae7e
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Mar 19, 2025
ded5355
Add CoilSystemCoolingWater to idd.
joseph-robertson Mar 19, 2025
6591034
First add of CoilSystemCoolingWater src files.
joseph-robertson Mar 19, 2025
21bebc8
Update other src files.
joseph-robertson Mar 19, 2025
50301ed
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Mar 20, 2025
0fb2a2e
Revise model and ft files.
joseph-robertson Mar 20, 2025
20b38f2
Update model and ft tests.
joseph-robertson Mar 20, 2025
9906df1
Update model, ft, and stub tests.
joseph-robertson Mar 21, 2025
2944388
Progress toward node connections and tests passing.
joseph-robertson Mar 21, 2025
e04dc26
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Mar 21, 2025
0b4d0f1
Cleanup.
joseph-robertson Mar 21, 2025
c5e4d4f
Update plant eq op schemes ft for special case of coilsystemcoolingwa…
joseph-robertson Mar 27, 2025
105478e
Update companion coil air outlet node name and test.
joseph-robertson Mar 27, 2025
f9169ee
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Mar 28, 2025
97dd14d
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Apr 1, 2025
39d8693
Some cleanup.
joseph-robertson Apr 1, 2025
4c3a4a3
Merge branch 'develop' into coilsystem-cooling-water
joseph-robertson Apr 30, 2025
041adbd
Make the coolingCoil/companion return a HVACComponent + restrict the …
jmarrec May 5, 2025
310a14f
Improve model gtests
jmarrec May 5, 2025
d0cc34b
Test Explicit Ctor, including wrong cooling coil type + fixup explici…
jmarrec May 5, 2025
ba57cda
Remove useless optionalCompanionCoilUsedForHeatRecovery
jmarrec May 5, 2025
4f3e2d4
CoilSystemCoolingWaterHXAssisted:containingHVACComponent picks up Coi…
jmarrec May 5, 2025
63acda6
Extend testing to ensure that remove works in particular
jmarrec May 5, 2025
b264a56
Override remove() for CoilSystemCoolingWaterXX objects: need to disco…
jmarrec May 5, 2025
53780c8
Fixup the creation of the ControllerWaterCoil and disallow connection…
jmarrec May 5, 2025
14c7357
I have no reason to believe that CoilSystemCoolingWater would be allo…
jmarrec May 5, 2025
95c4727
Adjust FT test after changing return type, and remove the Unitary tes…
jmarrec May 5, 2025
3d6d145
Remove unneeded bit in ForwardTranslateAirLoopHVAC
jmarrec May 5, 2025
868633a
Add a private assignEnergyPlusIDDDefaults method to avoid repeating c…
jmarrec May 5, 2025
64dd179
Adjust FT Test: name the nodes and co, and test the relief node that …
jmarrec May 5, 2025
51a0ae3
Fixup the FIXME
jmarrec May 5, 2025
61ea54d
Add a FT Gtest for a Case with a CoilSystemWaterHXAssisted inside a C…
jmarrec May 5, 2025
e1705d9
Fixup FT to handle CoilSystemWaterHXAssisted inside CoilSystemWater
jmarrec May 5, 2025
97e0142
Merge pull request #5404 from NREL/coilsystem-cooling-water2
jmarrec May 5, 2025
be13f9f
Remove copy pasted bit that tries to add a SPM:MixedAir: it's not nee…
jmarrec May 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -18981,6 +18981,104 @@ OS:Coil:Cooling:DX:TwoSpeed,
\type object-list
\object-list ScheduleNames

OS:CoilSystem:Cooling:Water,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Adding CoilSystemCoolingWater to the idd. This is a StraightComponent (like CoilSystemCoolingWaterHeatExchangerAssisted). It has a required primary Cooling Coil field and an optional companion Companion Coil Used For Heat Recovery field.

\memo Virtual container component that consists of a water cooling coil
\memo and its associated controls. This control object supports the
\memo available water coil types and may be placed directly on an
\memo air loop branch or in an outdoor air equipment list.
\min-fields 12
A1, \field Handle
\type handle
\required-field
A2, \field Name
\required-field
\reference ConnectionObject
A3, \field Air Inlet Node Name
\type object-list
\required-field
\object-list ConnectionNames
A4, \field Air Outlet Node Name
\type object-list
\required-field
\object-list ConnectionNames
A5, \field Availability Schedule Name
\note Availability schedule name for this system. Schedule value > 0
\note means the system is available.
\note If this field is blank, the system is always available.
\type object-list
\object-list ScheduleNames
\required-field
Comment thread
jmarrec marked this conversation as resolved.
A6, \field Cooling Coil
\required-field
Comment thread
jmarrec marked this conversation as resolved.
\type object-list
\object-list CoolingCoilsWater
A7, \field Dehumidification Control Type
\type choice
\key None
\key Multimode
\key CoolReheat
\required-field
Comment thread
jmarrec marked this conversation as resolved.
\note None = meet sensible load only. Valid with all cooling coil types. When a heat
\note exchanger assisted cooling coil is used, the heat exchanger is locked on at all times.
\note Multimode = activate water coil and meet sensible load. If no sensible load exists,
\note and Run on Latent Load = Yes, and a latent load exists, the coil will operate to meet
\note the latent load. If the latent load cannot be met the heat exchanger will be activated.
\note Valid only with cooling coil type CoilSystem:Cooling:Water:HeatExchangerAssisted.
\note CoolReheat = cool beyond the dry-bulb setpoint as required to meet the humidity setpoint.
\note Valid with all cooling coil types. When a heat exchanger assisted cooling coil is used,
\note the heat exchanger is locked on at all times.
\note For all dehumidification controls, the max humidity setpoint on the Sensor Node is used.
\note SetpointManager:SingleZone:Humidity:Maximum,
\note SetpointManager:MultiZone:Humidity:Maximum, or
\note SetpointManager:MultiZone:MaximumHumidity:Average, and
\note SetpointManager:OutdoorAirPretreat (optional) objects.
A8, \field Run on Sensible Load
\type choice
\key Yes
\key No
\required-field
Comment thread
jmarrec marked this conversation as resolved.
\note If Yes, unit will run if there is a sensible load.
\note If No, unit will not run if there is only a sensible load.
\note Dehumidification controls will be active if specified.
A9, \field Run on Latent Load
\type choice
\key Yes
\key No
\required-field
Comment thread
jmarrec marked this conversation as resolved.
\note If Yes, unit will run if there is a latent load.
\note even if there is no sensible load.
\note If No, unit will not run if there is only a latent load.
\note Dehumidification controls will be active if specified.
N1, \field Minimum Air To Water Temperature Offset
\note Coil will turn on as required when inlet air temperature is above
\note water temperature by amount of offset. To model a waterside
\note economizer connect to condenser loop and increase offset as desired.
\type real
\units deltaC
\minimum 0.0
\required-field
Comment thread
jmarrec marked this conversation as resolved.
A10, \field Economizer Lockout
\type choice
\key Yes
\key No
\required-field
Comment thread
jmarrec marked this conversation as resolved.
\note Yes means that the heat exchanger will be locked out (off)
N2, \field Minimum Water Loop Temperature For Heat Recovery
\note Only used for heat recovery loops.
\note Loop will turn off below this temperature.
\type real
\units C
\required-field
Comment thread
jmarrec marked this conversation as resolved.
A11; \field Companion Coil Used For Heat Recovery
\note Only used for heat recovery loops.
\note Entering a coil name indicates a heat recovery loop is specified.
\note Coil listed is connected in series with this objects coil on demand side
\note branch of a plant loop. A dedicated plant loop with no supply side
\note equipment, other than a pump, is currently required.
\note Only Coil:Cooling:Water coil type is currently allowed for heat recovery loops.
\type object-list
\object-list CoolingCoilsWater

OS:CoilSystem:Cooling:Water:HeatExchangerAssisted,
\memo Virtual component consisting of a chilled-water cooling coil and an air-to-air heat
\memo exchanger. The air-to-air heat exchanger precools the air entering the cooling coil
Expand Down
4 changes: 4 additions & 0 deletions src/energyplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ set(${target_name}_src
ForwardTranslator/ForwardTranslateCoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.cpp
ForwardTranslator/ForwardTranslateCoilPerformanceDXCooling.cpp
ForwardTranslator/ForwardTranslateCoilSystemCoolingDXHeatExchangerAssisted.cpp
ForwardTranslator/ForwardTranslateCoilSystemCoolingWater.cpp
ForwardTranslator/ForwardTranslateCoilSystemCoolingWaterHeatExchangerAssisted.cpp
ForwardTranslator/ForwardTranslateCoilSystemIntegratedHeatPumpAirSource.cpp
ForwardTranslator/ForwardTranslateCoilUserDefined.cpp
Expand Down Expand Up @@ -710,6 +711,7 @@ set(${target_name}_test_src
Test/CoilCoolingDXTwoSpeed_GTest.cpp
Test/CoilCoolingDXTwoStageWithHumidityControlMode_GTest.cpp
Test/CoilCoolingDXVariableSpeed_GTest.cpp
Test/CoilCoolingWater_GTest.cpp
Test/CoilCoolingWaterToAirHeatPumpEquationFit_GTest.cpp
Test/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit_GTest.cpp
Test/CoilHeatingDXMultiSpeed_GTest.cpp
Expand All @@ -720,6 +722,8 @@ set(${target_name}_test_src
Test/CoilHeatingGasMultiStage_GTest.cpp
Test/CoilHeatingWaterToAirHeatPumpEquationFit_GTest.cpp
Test/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_GTest.cpp
Test/CoilSystemCoolingWater_GTest.cpp
Test/CoilSystemCoolingWaterHeatExchangerAssisted_GTest.cpp
Test/CoilSystemIntegratedHeatPumpAirSource_GTest.cpp
Test/CoilUserDefined_GTest.cpp
Test/CoilWaterHeatingAirToWaterHeatPump_GTest.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/energyplus/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,11 @@ namespace energyplus {
retVal = translateCoilPerformanceDXCooling(mo);
break;
}
case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water: {
auto mo = modelObject.cast<CoilSystemCoolingWater>();
retVal = translateCoilSystemCoolingWater(mo);
break;
}
case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water_HeatExchangerAssisted: {
auto mo = modelObject.cast<CoilSystemCoolingWaterHeatExchangerAssisted>();
retVal = translateCoilSystemCoolingWaterHeatExchangerAssisted(mo);
Expand Down
3 changes: 3 additions & 0 deletions src/energyplus/ForwardTranslator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ namespace model {
class CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit;
class CoilPerformanceDXCooling;
class CoilSystemCoolingDXHeatExchangerAssisted;
class CoilSystemCoolingWater;
class CoilSystemCoolingWaterHeatExchangerAssisted;
class CoilSystemIntegratedHeatPumpAirSource;
class CoilUserDefined;
Expand Down Expand Up @@ -844,6 +845,8 @@ namespace energyplus {

boost::optional<IdfObject> translateCoilSystemCoolingDXHeatExchangerAssisted(model::CoilSystemCoolingDXHeatExchangerAssisted& modelObject);

boost::optional<IdfObject> translateCoilSystemCoolingWater(model::CoilSystemCoolingWater& modelObject);

boost::optional<IdfObject> translateCoilSystemCoolingWaterHeatExchangerAssisted(model::CoilSystemCoolingWaterHeatExchangerAssisted& modelObject);

boost::optional<IdfObject> translateCoilSystemIntegratedHeatPumpAirSource(model::CoilSystemIntegratedHeatPumpAirSource& modelObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "../../model/SizingSystem_Impl.hpp"
#include "../../model/CoilCoolingWater.hpp"
#include "../../model/CoilCoolingWater_Impl.hpp"
#include "../../model/CoilSystemCoolingWater.hpp"
#include "../../model/CoilSystemCoolingWater_Impl.hpp"
#include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted.hpp"
#include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted_Impl.hpp"
#include "../../model/CoilHeatingWater.hpp"
Expand Down Expand Up @@ -275,6 +277,13 @@ namespace energyplus {
controller = supplyComponent.cast<CoilHeatingWater>().controllerWaterCoil();
break;
}
case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water: {
auto coolingCoil = supplyComponent.cast<CoilSystemCoolingWater>().coolingCoil();
if (auto coilCoolingWater = coolingCoil.optionalCast<CoilCoolingWater>()) {
controller = coilCoolingWater->controllerWaterCoil();
}
break;
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Pretty sure we don't need this?

case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water_HeatExchangerAssisted: {
auto coolingCoil = supplyComponent.cast<CoilSystemCoolingWaterHeatExchangerAssisted>().coolingCoil();
if (auto coilCoolingWater = coolingCoil.optionalCast<CoilCoolingWater>()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) Alliance for Sustainable Energy, LLC.
* See also https://openstudio.net/license
***********************************************************************************************************************/

#include "../ForwardTranslator.hpp"
#include "../../model/Model.hpp"
#include "../../model/CoilSystemCoolingWater.hpp"
#include "../../model/CoilSystemCoolingWater_Impl.hpp"
#include "../../model/Node.hpp"
#include "../../model/Node_Impl.hpp"
#include "../../model/Schedule.hpp"
#include "../../model/Schedule_Impl.hpp"
#include "../../model/CoilCoolingWater.hpp"
#include "../../model/CoilCoolingWater_Impl.hpp"
#include "../../model/ControllerWaterCoil.hpp"
#include "../../model/ControllerWaterCoil_Impl.hpp"

#include "../../model/AirLoopHVAC.hpp"
#include "../../model/FanVariableVolume.hpp"
#include "../../model/FanVariableVolume_Impl.hpp"
#include "../../model/FanConstantVolume.hpp"
#include "../../model/FanConstantVolume_Impl.hpp"
#include "../../model/FanOnOff.hpp"
#include "../../model/FanOnOff_Impl.hpp"
#include "../../model/FanSystemModel.hpp"
#include "../../model/FanSystemModel_Impl.hpp"
#include "../../model/AirLoopHVACOutdoorAirSystem.hpp"
#include "../../model/AirLoopHVACOutdoorAirSystem_Impl.hpp"

#include <utilities/idd/CoilSystem_Cooling_Water_FieldEnums.hxx>
#include <utilities/idd/Coil_Cooling_Water_FieldEnums.hxx>
#include <utilities/idd/Controller_WaterCoil_FieldEnums.hxx>
#include <utilities/idd/SetpointManager_MixedAir_FieldEnums.hxx>
#include <utilities/idd/IddEnums.hxx>

using namespace openstudio::model;

namespace openstudio {

namespace energyplus {

boost::optional<IdfObject> ForwardTranslator::translateCoilSystemCoolingWater(model::CoilSystemCoolingWater& modelObject) {

IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::CoilSystem_Cooling_Water, modelObject);

std::string airInletNodeName;
// InletNodeName
if (auto mo = modelObject.inletModelObject()) {
if (auto node = mo->optionalCast<Node>()) {
airInletNodeName = node->nameString();
}
}

std::string airOutletNodeName;
// OutletNodeName
if (auto mo = modelObject.outletModelObject()) {
if (auto node = mo->optionalCast<Node>()) {
airOutletNodeName = node->nameString();
}
}

idfObject.setString(CoilSystem_Cooling_WaterFields::AirInletNodeName, airInletNodeName);
idfObject.setString(CoilSystem_Cooling_WaterFields::AirOutletNodeName, airOutletNodeName);

// CoolingCoilObjectType
// CoolingCoilName
{
auto coolingCoil = modelObject.coolingCoil();
if (auto idf = translateAndMapModelObject(coolingCoil)) {
idfObject.setString(CoilSystem_Cooling_WaterFields::CoolingCoilObjectType, idf->iddObject().name());
idfObject.setString(CoilSystem_Cooling_WaterFields::CoolingCoilName, idf->nameString());
if (idf->iddObject().type() == IddObjectType::Coil_Cooling_Water) {
idf->setString(Coil_Cooling_WaterFields::AirInletNodeName, airInletNodeName);
idf->setString(Coil_Cooling_WaterFields::AirOutletNodeName, airOutletNodeName);
// Add IddObjectType::Coil_Cooling_Water_DetailedGeometry if implemented
} else {
// Shouldn't happen, accepts only Coil:Cooling:Water or Coil:Cooling:Water:DetailedGeometry
// Shouldn't happen, accepts only Coil:Cooling:DX:SingleSpeed or Coil:Cooling:DX:VariableSpeed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

first line is wrong, second is a copy paste

LOG(Fatal, modelObject.briefDescription()
<< " appears to have a cooling coil that shouldn't have been accepted: " << coolingCoil.briefDescription());
OS_ASSERT(false);
}
}
if (auto coilCoolingWater = coolingCoil.optionalCast<CoilCoolingWater>()) {
if (auto controller = coilCoolingWater->controllerWaterCoil()) {
if (auto idf = translateAndMapModelObject(controller.get())) {
idf->setString(Controller_WaterCoilFields::SensorNodeName, airOutletNodeName);
}
}
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Pretty sure we don't need this?


// Need a SPM:MixedAir on the Coil:Cooling:Water outlet node (that we **created** just above in IDF directly, so it won't get picked up by the
// ForwardTranslateAirLoopHVAC method)
if (boost::optional<AirLoopHVAC> airLoop_ = modelObject.airLoopHVAC()) {
std::vector<StraightComponent> fans;
std::vector<ModelObject> supplyComponents = airLoop_->supplyComponents();

for (auto it = supplyComponents.begin(); it != supplyComponents.end(); ++it) {
if (auto fan_ = it->optionalCast<FanVariableVolume>()) {
fans.insert(fans.begin(), std::move(*fan_));
} else if (auto fan_ = it->optionalCast<FanConstantVolume>()) {
fans.insert(fans.begin(), std::move(*fan_));
} else if (auto fan_ = it->optionalCast<FanSystemModel>()) {
fans.insert(fans.begin(), std::move(*fan_));
} else if (auto fan_ = it->optionalCast<FanOnOff>()) {
fans.insert(fans.begin(), std::move(*fan_));
}
}

if (!fans.empty()) {
// Fan closest to the supply outlet node
StraightComponent fan = fans.front();
OptionalNode inletNode = fan.inletModelObject()->optionalCast<Node>();
OptionalNode outletNode = fan.outletModelObject()->optionalCast<Node>();

// No reason this wouldn't be ok at this point really...
// TODO: change to OS_ASSERT?
if (inletNode && outletNode) {

IdfObject idf_spm(IddObjectType::SetpointManager_MixedAir);
idf_spm.setString(SetpointManager_MixedAirFields::Name, airOutletNodeName + " OS Default SPM");
idf_spm.setString(SetpointManager_MixedAirFields::ControlVariable, "Temperature");

Node supplyOutletNode = airLoop_->supplyOutletNode();
idf_spm.setString(SetpointManager_MixedAirFields::ReferenceSetpointNodeName, supplyOutletNode.nameString());

idf_spm.setString(SetpointManager_MixedAirFields::FanInletNodeName, inletNode->nameString());
idf_spm.setString(SetpointManager_MixedAirFields::FanOutletNodeName, outletNode->nameString());

idf_spm.setString(SetpointManager_MixedAirFields::SetpointNodeorNodeListName, airOutletNodeName);

m_idfObjects.push_back(idf_spm);
}
}
}
}

// Availability Schedule Name: Optional Object
if (boost::optional<Schedule> availabilitySchedule_ = modelObject.availabilitySchedule()) {
if (boost::optional<IdfObject> wo_ = translateAndMapModelObject(availabilitySchedule_.get())) {
idfObject.setString(CoilSystem_Cooling_WaterFields::AvailabilityScheduleName, wo_->nameString());
}
}

// Dehumidification Control Type: Optional String
const std::string dehumidificationControlType = modelObject.dehumidificationControlType();
idfObject.setString(CoilSystem_Cooling_WaterFields::DehumidificationControlType, dehumidificationControlType);

// Run on Sensible Load: Optional Boolean
if (modelObject.runonSensibleLoad()) {
idfObject.setString(CoilSystem_Cooling_WaterFields::RunonSensibleLoad, "Yes");
} else {
idfObject.setString(CoilSystem_Cooling_WaterFields::RunonSensibleLoad, "No");
}

// Run on Latent Load: Optional Boolean
if (modelObject.runonLatentLoad()) {
idfObject.setString(CoilSystem_Cooling_WaterFields::RunonLatentLoad, "Yes");
} else {
idfObject.setString(CoilSystem_Cooling_WaterFields::RunonLatentLoad, "No");
}

// Minimum Air To Water Temperature Offset: Optional Double
const double minimumAirToWaterTemperatureOffset = modelObject.minimumAirToWaterTemperatureOffset();
idfObject.setDouble(CoilSystem_Cooling_WaterFields::MinimumAirToWaterTemperatureOffset, minimumAirToWaterTemperatureOffset);

// Economizer Lockout: Optional Boolean
if (modelObject.economizerLockout()) {
idfObject.setString(CoilSystem_Cooling_WaterFields::EconomizerLockout, "Yes");
} else {
idfObject.setString(CoilSystem_Cooling_WaterFields::EconomizerLockout, "No");
}

// Minimum Water Loop Temperature For Heat Recovery: Optional Double
const double minimumWaterLoopTemperatureForHeatRecovery = modelObject.minimumWaterLoopTemperatureForHeatRecovery();
idfObject.setDouble(CoilSystem_Cooling_WaterFields::MinimumWaterLoopTemperatureForHeatRecovery, minimumWaterLoopTemperatureForHeatRecovery);

// Companion Coil Used For Heat Recovery: Optional Object
if (boost::optional<WaterToAirComponent> companionCoilUsedForHeatRecovery_ = modelObject.companionCoilUsedForHeatRecovery()) {
if (boost::optional<IdfObject> wo_ = translateAndMapModelObject(companionCoilUsedForHeatRecovery_.get())) {
idfObject.setString(CoilSystem_Cooling_WaterFields::CompanionCoilUsedForHeatRecovery, wo_->nameString());
if (wo_->iddObject().type() == IddObjectType::Coil_Cooling_Water) {
wo_->setString(Coil_Cooling_WaterFields::AirInletNodeName, modelObject.airLoopHVACOutdoorAirSystem()->reliefAirModelObject()->nameString());
wo_->setString(Coil_Cooling_WaterFields::AirOutletNodeName, wo_->nameString() + " Exhaust Outlet Node"); // FIXME

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FIXME?

// Add IddObjectType::Coil_Cooling_Water_DetailedGeometry if implemented
} else {
// Shouldn't happen, accepts only Coil:Cooling:Water or Coil:Cooling:Water:DetailedGeometry
// Shouldn't happen, accepts only Coil:Cooling:DX:SingleSpeed or Coil:Cooling:DX:VariableSpeed
LOG(Fatal, modelObject.briefDescription() << " appears to have a companion coil used for heat recovery that shouldn't have been accepted: "
<< companionCoilUsedForHeatRecovery_.get().briefDescription());
OS_ASSERT(false);
}
}
}

return idfObject;
} // End of translate function

} // end namespace energyplus
} // end namespace openstudio
Loading