Skip to content

Commit

Permalink
Merge pull request #1266 from NREL/81583558-SetpointManagerWarmestTem…
Browse files Browse the repository at this point in the history
…peratureFlow

Add SetpointManagerWarmestTemperatureFlow
  • Loading branch information
asparke2 committed Nov 8, 2014
2 parents effced9 + 1156ca9 commit 255d72f
Show file tree
Hide file tree
Showing 25 changed files with 968 additions and 213 deletions.
37 changes: 37 additions & 0 deletions openstudiocore/resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -15949,6 +15949,43 @@ OS:SetpointManager:Warmest,
\required-field
\object-list Node

OS:SetpointManager:WarmestTemperatureFlow,
\min-fields 1
A1, \field Handle
\type handle
\required-field
A2 , \field Name
\required-field
\reference SetpointManagers
A3 , \field Control Variable
\required-field
\type choice
\key Temperature
N1 , \field Minimum Setpoint Temperature
\required-field
\units C
\type real
\minimum> 0.0
N2 , \field Maximum Setpoint Temperature
\required-field
\units C
\type real
\minimum> 0.0
A4 , \field Strategy
\required-field
\type choice
\key TemperatureFirst
\key FlowFirst
A5 , \field Setpoint Node or NodeList Name
\type object-list
\required-field
\object-list Node
N3 ; \field Minimum Turndown Ratio
\required-field
\units dimensionless
\type real
\minimum> 0.0

OS:Sizing:Plant,
\min-fields 5
A1, \field Handle
Expand Down
1 change: 1 addition & 0 deletions openstudiocore/src/energyplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ set(${target_name}_src
ForwardTranslator/ForwardTranslateSetpointManagerSingleZoneHumidityMinimum.cpp
ForwardTranslator/ForwardTranslateSetpointManagerSingleZoneReheat.cpp
ForwardTranslator/ForwardTranslateSetpointManagerWarmest.cpp
ForwardTranslator/ForwardTranslateSetpointManagerWarmestTemperatureFlow.cpp
ForwardTranslator/ForwardTranslateShade.cpp
ForwardTranslator/ForwardTranslateShadowCalculation.cpp
ForwardTranslator/ForwardTranslateShadingControl.cpp
Expand Down
6 changes: 6 additions & 0 deletions openstudiocore/src/energyplus/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,12 @@ boost::optional<IdfObject> ForwardTranslator::translateAndMapModelObject(ModelOb
retVal = translateSetpointManagerWarmest(spm);
break;
}
case openstudio::IddObjectType::OS_SetpointManager_WarmestTemperatureFlow :
{
model::SetpointManagerWarmestTemperatureFlow spm = modelObject.cast<SetpointManagerWarmestTemperatureFlow>();
retVal = translateSetpointManagerWarmestTemperatureFlow(spm);
break;
}
case openstudio::IddObjectType::OS_ShadingControl :
{
model::ShadingControl shadingControl = modelObject.cast<ShadingControl>();
Expand Down
3 changes: 3 additions & 0 deletions openstudiocore/src/energyplus/ForwardTranslator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class SetpointManagerScheduledDualSetpoint;
class SetpointManagerSingleZoneHumidityMinimum;
class SetpointManagerSingleZoneReheat;
class SetpointManagerWarmest;
class SetpointManagerWarmestTemperatureFlow;
class ShadowCalculation;
class Shade;
class SimulationControl;
Expand Down Expand Up @@ -650,6 +651,8 @@ class ENERGYPLUS_API ForwardTranslator {

boost::optional<IdfObject> translateSetpointManagerWarmest( model::SetpointManagerWarmest & modelObject);

boost::optional<IdfObject> translateSetpointManagerWarmestTemperatureFlow( model::SetpointManagerWarmestTemperatureFlow & modelObject);

boost::optional<IdfObject> translateShade( model::Shade & modelObject );

boost::optional<IdfObject> translateShadingControl( model::ShadingControl & modelObject );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/**********************************************************************
* Copyright (c) 2008-2014, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********************************************************************/

#include "../ForwardTranslator.hpp"
#include "../../model/SetpointManagerWarmestTemperatureFlow.hpp"
#include "../../model/ThermalZone.hpp"
#include "../../model/Node.hpp"
#include "../../model/Node_Impl.hpp"
#include "../../model/PortList.hpp"
#include <utilities/idd/SetpointManager_WarmestTemperatureFlow_FieldEnums.hxx>
#include "../../utilities/idd/IddEnums.hpp"
#include <utilities/idd/IddEnums.hxx>

using namespace openstudio::model;

namespace openstudio {

namespace energyplus {

boost::optional<IdfObject> ForwardTranslator::translateSetpointManagerWarmestTemperatureFlow( SetpointManagerWarmestTemperatureFlow & modelObject )
{
std::string s;
double n;
boost::optional<Node> node;

IdfObject idfObject(IddObjectType::SetpointManager_WarmestTemperatureFlow);

m_idfObjects.push_back(idfObject);

// Name
s = modelObject.name().get();
idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::Name,s);

// ControlVariable
idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::ControlVariable,"Temperature");

// HVACAirLoopName
if( auto node = modelObject.setpointNode() ) {
if( auto airLoop = node->airLoopHVAC() ) {
idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::HVACAirLoopName,airLoop->name().get());
}
}

// Strategy
s = modelObject.strategy();
idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::Strategy,s);

// MinimumSupplyAirTemperature
n = modelObject.minimumSetpointTemperature();
idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MinimumSetpointTemperature,n);

// MaximumSupplyAirTemperature
n = modelObject.maximumSetpointTemperature();
idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MaximumSetpointTemperature,n);

// SetpointNodeorNodeListName
node = modelObject.setpointNode();
if( node ) {
idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::SetpointNodeorNodeListName,node->name().get());
}

// MinimumTurndownRatio
n = modelObject.minimumTurndownRatio();
idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MinimumTurndownRatio,n);

return idfObject;
}

} // energyplus

} // openstudio

3 changes: 3 additions & 0 deletions openstudiocore/src/model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@ set(${target_name}_src
SetpointManagerWarmest.hpp
SetpointManagerWarmest_Impl.hpp
SetpointManagerWarmest.cpp
SetpointManagerWarmestTemperatureFlow.hpp
SetpointManagerWarmestTemperatureFlow_Impl.hpp
SetpointManagerWarmestTemperatureFlow.cpp
Shade.hpp
Shade_Impl.hpp
Shade.cpp
Expand Down
2 changes: 2 additions & 0 deletions openstudiocore/src/model/ConcreteModelObjects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@
#include "SetpointManagerSingleZoneHumidityMinimum.hpp"
#include "SetpointManagerSingleZoneReheat.hpp"
#include "SetpointManagerWarmest.hpp"
#include "SetpointManagerWarmestTemperatureFlow.hpp"
#include "Shade.hpp"
#include "ShadingControl.hpp"
#include "ShadingSurface.hpp"
Expand Down Expand Up @@ -508,6 +509,7 @@
#include "SetpointManagerSingleZoneHumidityMinimum_Impl.hpp"
#include "SetpointManagerSingleZoneReheat_Impl.hpp"
#include "SetpointManagerWarmest_Impl.hpp"
#include "SetpointManagerWarmestTemperatureFlow_Impl.hpp"
#include "Shade_Impl.hpp"
#include "ShadingControl_Impl.hpp"
#include "ShadingSurface_Impl.hpp"
Expand Down
2 changes: 2 additions & 0 deletions openstudiocore/src/model/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ if (_className::iddObjectType() == typeToCreate) { \
REGISTER_CONSTRUCTOR(SetpointManagerSingleZoneHumidityMinimum);
REGISTER_CONSTRUCTOR(SetpointManagerSingleZoneReheat);
REGISTER_CONSTRUCTOR(SetpointManagerWarmest);
REGISTER_CONSTRUCTOR(SetpointManagerWarmestTemperatureFlow);
REGISTER_CONSTRUCTOR(Shade);
REGISTER_CONSTRUCTOR(ShadingControl);
REGISTER_CONSTRUCTOR(ShadingSurface);
Expand Down Expand Up @@ -705,6 +706,7 @@ if (_className::iddObjectType() == typeToCreate) { \
REGISTER_COPYCONSTRUCTORS(SetpointManagerSingleZoneHumidityMinimum);
REGISTER_COPYCONSTRUCTORS(SetpointManagerSingleZoneReheat);
REGISTER_COPYCONSTRUCTORS(SetpointManagerWarmest);
REGISTER_COPYCONSTRUCTORS(SetpointManagerWarmestTemperatureFlow);
REGISTER_COPYCONSTRUCTORS(Shade);
REGISTER_COPYCONSTRUCTORS(ShadingControl);
REGISTER_COPYCONSTRUCTORS(ShadingSurface);
Expand Down
2 changes: 2 additions & 0 deletions openstudiocore/src/model/ModelHVAC.i
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ MODELOBJECT_TEMPLATES(SetpointManagerScheduledDualSetpoint);
MODELOBJECT_TEMPLATES(SetpointManagerSingleZoneHumidityMinimum);
MODELOBJECT_TEMPLATES(SetpointManagerSingleZoneReheat);
MODELOBJECT_TEMPLATES(SetpointManagerWarmest);
MODELOBJECT_TEMPLATES(SetpointManagerWarmestTemperatureFlow);
MODELOBJECT_TEMPLATES(Splitter);
MODELOBJECT_TEMPLATES(AirLoopHVACSupplyPlenum);
MODELOBJECT_TEMPLATES(AirLoopHVACZoneSplitter);
Expand Down Expand Up @@ -193,6 +194,7 @@ SWIG_MODELOBJECT(SetpointManagerScheduledDualSetpoint, 1);
SWIG_MODELOBJECT(SetpointManagerSingleZoneHumidityMinimum, 1);
SWIG_MODELOBJECT(SetpointManagerSingleZoneReheat, 1);
SWIG_MODELOBJECT(SetpointManagerWarmest, 1);
SWIG_MODELOBJECT(SetpointManagerWarmestTemperatureFlow, 1);
SWIG_MODELOBJECT(Splitter, 0);
SWIG_MODELOBJECT(AirLoopHVACSupplyPlenum, 1);
SWIG_MODELOBJECT(AirLoopHVACZoneSplitter, 1);
Expand Down

4 comments on commit 255d72f

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (asparke2) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2128 of 2149 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (asparke2) - x86_64-MacOS-10.9-clang: OK (2126 of 2149 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (asparke2) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (asparke2) - i386-Windows-7-VisualStudio-12: OK (2133 of 2149 tests passed)

Build Badge Test Badge

Please sign in to comment.