Skip to content

Commit

Permalink
Merge pull request #3490 from NREL/Branch_2_8_0_rc4
Browse files Browse the repository at this point in the history
Branch 2 8 0 rc4
  • Loading branch information
macumber authored Apr 9, 2019
2 parents 44c2aee + 4e287fc commit af948aa
Show file tree
Hide file tree
Showing 5 changed files with 499 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ boost::optional<IdfObject> ForwardTranslator::translateCoilHeatingElectric( Coil
if( boost::optional<Node> node = mo->optionalCast<Node>() )
{
idfObject.setString(Coil_Heating_ElectricFields::AirOutletNodeName,node->name().get());
// For now we write the temp setpoint node as the Coil Outlet Node
idfObject.setString(Coil_Heating_ElectricFields::TemperatureSetpointNodeName,node->name().get());
}
}

// Temperature Setpoint Node Name

// If it was hardset we actually use that, otherwise keep above default (coil outlet)
if( boost::optional<Node> node = modelObject.temperatureSetpointNode() )
{
idfObject.setString(Coil_Heating_ElectricFields::TemperatureSetpointNodeName,node->name().get());
Expand Down
16 changes: 2 additions & 14 deletions openstudiocore/src/model/CoilHeatingElectric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,12 @@ namespace detail {
{
if( ! airLoop->demandComponent(node.handle()) )
{
if( StraightComponent_Impl::addToNode( node ) )
{
if( boost::optional<Node> node = outletModelObject()->optionalCast<Node>() )
{
setTemperatureSetpointNode(node.get());
}
return true;
}
return StraightComponent_Impl::addToNode( node );
}
}

if ( auto oa = node.airLoopHVACOutdoorAirSystem() ) {
if ( StraightComponent_Impl::addToNode( node ) ) {
if ( auto _node = outletModelObject()->optionalCast<Node>() ) {
setTemperatureSetpointNode(_node.get());
}
return true;
}
return StraightComponent_Impl::addToNode( node );
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion openstudiocore/src/model/CoilHeatingElectric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class MODEL_API CoilHeatingElectric : public StraightComponent {

/** Creates a new equivalent duct object if an object is not already attached. */
AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);

/** Returns the attached equivalent duct object, if any. */
boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;

Expand Down
Loading

0 comments on commit af948aa

Please sign in to comment.