Skip to content

Commit

Permalink
Merge branch '86711324-OSToSDDTranslateHVAC' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kbenne committed Feb 19, 2015
2 parents f2c750d + ff3a646 commit 5dca1eb
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 48 deletions.
44 changes: 22 additions & 22 deletions openstudiocore/src/model/CoilHeatingGas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "Node_Impl.hpp"
#include "AirLoopHVAC.hpp"
#include "AirLoopHVAC_Impl.hpp"
#include <utilities/idd/OS_Coil_Heating_Gas_FieldEnums.hxx>
#include <utilities/idd/OS_Coil_Heating_Gas_FieldEnums.hxx>
#include <utilities/idd/IddEnums.hxx>
#include "../utilities/core/Compare.hpp"
#include "../utilities/core/Assert.hpp"
Expand Down Expand Up @@ -133,7 +133,7 @@ namespace detail{
return result;
}

double CoilHeatingGas_Impl::gasBurnerEfficiency()
double CoilHeatingGas_Impl::gasBurnerEfficiency() const
{
return this->getDouble(OS_Coil_Heating_GasFields::GasBurnerEfficiency).get();
}
Expand All @@ -143,7 +143,7 @@ namespace detail{
this->setDouble(OS_Coil_Heating_GasFields::GasBurnerEfficiency,val);
}

double CoilHeatingGas_Impl::parasiticElectricLoad()
double CoilHeatingGas_Impl::parasiticElectricLoad() const
{
return this->getDouble(OS_Coil_Heating_GasFields::ParasiticElectricLoad).get();
}
Expand All @@ -153,7 +153,7 @@ namespace detail{
this->setDouble(OS_Coil_Heating_GasFields::ParasiticElectricLoad,val);
}

double CoilHeatingGas_Impl::parasiticGasLoad()
double CoilHeatingGas_Impl::parasiticGasLoad() const
{
return this->getDouble(OS_Coil_Heating_GasFields::ParasiticGasLoad).get();
}
Expand Down Expand Up @@ -455,21 +455,21 @@ CoilHeatingGas::CoilHeatingGas(const Model& model,
setParasiticElectricLoad(0);
setParasiticGasLoad(0);
}

CoilHeatingGas::CoilHeatingGas(const Model& model)
: StraightComponent(CoilHeatingGas::iddObjectType(),model)
{
OS_ASSERT(getImpl<detail::CoilHeatingGas_Impl>());

auto schedule = model.alwaysOnDiscreteSchedule();
setAvailableSchedule(schedule);

setGasBurnerEfficiency(0.8);
setString(openstudio::OS_Coil_Heating_GasFields::NominalCapacity,"AutoSize");
setParasiticElectricLoad(0);
setParasiticGasLoad(0);
}


CoilHeatingGas::CoilHeatingGas(const Model& model)
: StraightComponent(CoilHeatingGas::iddObjectType(),model)
{
OS_ASSERT(getImpl<detail::CoilHeatingGas_Impl>());

auto schedule = model.alwaysOnDiscreteSchedule();
setAvailableSchedule(schedule);

setGasBurnerEfficiency(0.8);
setString(openstudio::OS_Coil_Heating_GasFields::NominalCapacity,"AutoSize");
setParasiticElectricLoad(0);
setParasiticGasLoad(0);
}

CoilHeatingGas::CoilHeatingGas(std::shared_ptr<detail::CoilHeatingGas_Impl> p)
: StraightComponent(p)
{}
Expand All @@ -491,7 +491,7 @@ bool CoilHeatingGas::setAvailableSchedule(Schedule & schedule )
return getImpl<detail::CoilHeatingGas_Impl>()->setAvailabilitySchedule( schedule );
}

double CoilHeatingGas::gasBurnerEfficiency()
double CoilHeatingGas::gasBurnerEfficiency() const
{
return getImpl<detail::CoilHeatingGas_Impl>()->gasBurnerEfficiency();
}
Expand All @@ -501,7 +501,7 @@ void CoilHeatingGas::setGasBurnerEfficiency(double val)
getImpl<detail::CoilHeatingGas_Impl>()->setGasBurnerEfficiency(val);
}

double CoilHeatingGas::parasiticElectricLoad()
double CoilHeatingGas::parasiticElectricLoad() const
{
return getImpl<detail::CoilHeatingGas_Impl>()->parasiticElectricLoad();
}
Expand All @@ -511,7 +511,7 @@ void CoilHeatingGas::setParasiticElectricLoad(double val)
getImpl<detail::CoilHeatingGas_Impl>()->setParasiticElectricLoad(val);
}

double CoilHeatingGas::parasiticGasLoad()
double CoilHeatingGas::parasiticGasLoad() const
{
return getImpl<detail::CoilHeatingGas_Impl>()->parasiticGasLoad();
}
Expand Down
6 changes: 3 additions & 3 deletions openstudiocore/src/model/CoilHeatingGas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ class MODEL_API CoilHeatingGas : public StraightComponent {
bool setAvailableSchedule(Schedule& schedule);

/** Returns the value of the GasBurnerEfficiency field. **/
double gasBurnerEfficiency();
double gasBurnerEfficiency() const;

/** Sets the value of the GasBurnerEfficiency field. **/
void setGasBurnerEfficiency(double value);

/** Returns the value of the ParasiticElectricLoad field. **/
double parasiticElectricLoad();
double parasiticElectricLoad() const;

/** Sets the value of the ParasiticElectricLoad field. **/
void setParasiticElectricLoad(double value);

/** Returns the value of the ParasiticGasLoad field. **/
double parasiticGasLoad();
double parasiticGasLoad() const;

/** Sets the value of the ParasiticGasLoad field. **/
void setParasiticGasLoad(double value);
Expand Down
6 changes: 3 additions & 3 deletions openstudiocore/src/model/CoilHeatingGas_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ namespace detail {
bool setAvailabilitySchedule(Schedule& schedule);

// Get GasBurnerEfficiency
double gasBurnerEfficiency();
double gasBurnerEfficiency() const;

// Set GasBurnerEfficiency
void setGasBurnerEfficiency(double val);

// Get ParasiticElectricLoad
double parasiticElectricLoad();
double parasiticElectricLoad() const;

// Set parasiticElectricLoad
void setParasiticElectricLoad(double val);

// Get ParasiticGasLoad
double parasiticGasLoad();
double parasiticGasLoad() const;

// Set parasiticGasLoad
void setParasiticGasLoad(double val);
Expand Down
20 changes: 10 additions & 10 deletions openstudiocore/src/model/FanConstantVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace detail {
}


double FanConstantVolume_Impl::fanEfficiency()
double FanConstantVolume_Impl::fanEfficiency() const
{
return this->getDouble(OS_Fan_ConstantVolumeFields::FanEfficiency,true).get();
}
Expand All @@ -152,7 +152,7 @@ namespace detail {
this->setDouble(OS_Fan_ConstantVolumeFields::FanEfficiency,val);
}

double FanConstantVolume_Impl::pressureRise()
double FanConstantVolume_Impl::pressureRise() const
{
return this->getDouble(OS_Fan_ConstantVolumeFields::PressureRise,true).get();
}
Expand All @@ -162,7 +162,7 @@ namespace detail {
this->setDouble(OS_Fan_ConstantVolumeFields::PressureRise,val);
}

double FanConstantVolume_Impl::motorEfficiency()
double FanConstantVolume_Impl::motorEfficiency() const
{
return this->getDouble(OS_Fan_ConstantVolumeFields::MotorEfficiency,true).get();
}
Expand All @@ -172,7 +172,7 @@ namespace detail {
this->setDouble(OS_Fan_ConstantVolumeFields::MotorEfficiency,val);
}

double FanConstantVolume_Impl::motorInAirstreamFraction()
double FanConstantVolume_Impl::motorInAirstreamFraction() const
{
return this->getDouble(OS_Fan_ConstantVolumeFields::MotorInAirstreamFraction,true).get();
}
Expand All @@ -182,7 +182,7 @@ namespace detail {
this->setDouble(OS_Fan_ConstantVolumeFields::MotorInAirstreamFraction,val);
}

std::string FanConstantVolume_Impl::endUseSubcategory()
std::string FanConstantVolume_Impl::endUseSubcategory() const
{
return this->getString(OS_Fan_ConstantVolumeFields::EndUseSubcategory).get();
}
Expand Down Expand Up @@ -487,7 +487,7 @@ bool FanConstantVolume::setAvailabilitySchedule(Schedule& s)
return getImpl<detail::FanConstantVolume_Impl>()->setAvailabilitySchedule(s);
}

double FanConstantVolume::fanEfficiency()
double FanConstantVolume::fanEfficiency() const
{
return getImpl<detail::FanConstantVolume_Impl>()->fanEfficiency();
}
Expand All @@ -497,7 +497,7 @@ void FanConstantVolume::setFanEfficiency(double val)
getImpl<detail::FanConstantVolume_Impl>()->setFanEfficiency(val);
}

double FanConstantVolume::pressureRise()
double FanConstantVolume::pressureRise() const
{
return getImpl<detail::FanConstantVolume_Impl>()->pressureRise();
}
Expand All @@ -507,7 +507,7 @@ void FanConstantVolume::setPressureRise(double val)
getImpl<detail::FanConstantVolume_Impl>()->setPressureRise(val);
}

double FanConstantVolume::motorEfficiency()
double FanConstantVolume::motorEfficiency() const
{
return getImpl<detail::FanConstantVolume_Impl>()->motorEfficiency();
}
Expand All @@ -517,7 +517,7 @@ void FanConstantVolume::setMotorEfficiency(double val)
getImpl<detail::FanConstantVolume_Impl>()->setMotorEfficiency(val);
}

double FanConstantVolume::motorInAirstreamFraction()
double FanConstantVolume::motorInAirstreamFraction() const
{
return getImpl<detail::FanConstantVolume_Impl>()->motorInAirstreamFraction();
}
Expand All @@ -527,7 +527,7 @@ void FanConstantVolume::setMotorInAirstreamFraction(double val)
getImpl<detail::FanConstantVolume_Impl>()->setMotorInAirstreamFraction(val);
}

std::string FanConstantVolume::endUseSubcategory()
std::string FanConstantVolume::endUseSubcategory() const
{
return getImpl<detail::FanConstantVolume_Impl>()->endUseSubcategory();
}
Expand Down
10 changes: 5 additions & 5 deletions openstudiocore/src/model/FanConstantVolume.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ class MODEL_API FanConstantVolume : public StraightComponent {
Schedule availabilitySchedule() const;

/** Returns the value of the FanEfficiency field. **/
double fanEfficiency();
double fanEfficiency() const;

/** Returns the value of the PressureRise field. **/
double pressureRise();
double pressureRise() const;

/** Returns the value of the MotorEfficiency field. **/
double motorEfficiency();
double motorEfficiency() const;

/** Returns the value of the MotorInAirStreamFraction field. **/
double motorInAirstreamFraction();
double motorInAirstreamFraction() const;

/** Returns the value of the EndUseSubcategory field. **/
std::string endUseSubcategory();
std::string endUseSubcategory() const;

//@}
/** @name Setters */
Expand Down
10 changes: 5 additions & 5 deletions openstudiocore/src/model/FanConstantVolume_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,31 @@ namespace detail {
bool setAvailabilitySchedule(Schedule& s);

// Get FanEfficiency
double fanEfficiency();
double fanEfficiency() const;

// Set fanEfficiency
void setFanEfficiency(double val);

// Get PressureRise
double pressureRise();
double pressureRise() const;

// Set PressureRise
void setPressureRise(double val);

// Get MotorEfficiency
double motorEfficiency();
double motorEfficiency() const;

// Set MotorEfficiency
void setMotorEfficiency(double val);

// Get MotorInAirstreamFraction
double motorInAirstreamFraction();
double motorInAirstreamFraction() const;

// Set MotorInAirstreamFraction
void setMotorInAirstreamFraction(double val);

// Get EndUseSubcategory
std::string endUseSubcategory();
std::string endUseSubcategory() const;

// Set EndUseSubcategory
void setEndUseSubcategory(std::string val);
Expand Down
2 changes: 2 additions & 0 deletions openstudiocore/src/sdd/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ namespace openstudio {
namespace sdd {

ForwardTranslator::ForwardTranslator()
: m_autoHardSize(false),
m_autoEfficiency(false)
{
m_logSink.setLogLevel(Warn);
m_logSink.setChannelRegex(boost::regex("openstudio\\.sdd\\.ForwardTranslator"));
Expand Down
11 changes: 11 additions & 0 deletions openstudiocore/src/sdd/ForwardTranslator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ namespace model {
class SubSurface;
class ShadingSurface;
class AirLoopHVAC;
class FanConstantVolume;
class CoilCoolingDXSingleSpeed;
class CoilHeatingGas;
class AirLoopHVACOutdoorAirSystem;
}

namespace sdd {
Expand Down Expand Up @@ -100,6 +104,10 @@ namespace sdd {
boost::optional<QDomElement> translateShadingSurface(const openstudio::model::ShadingSurface& shadingSurface, const openstudio::Transformation& transformation, QDomDocument& doc);
boost::optional<QDomElement> translateThermalZone(const openstudio::model::ThermalZone& thermalZone, QDomDocument& doc);
boost::optional<QDomElement> translateAirLoopHVAC(const openstudio::model::AirLoopHVAC& airLoop, QDomDocument& doc);
boost::optional<QDomElement> translateFanConstantVolume(const openstudio::model::FanConstantVolume& fan, QDomElement & airSegElement, QDomDocument& doc);
boost::optional<QDomElement> translateCoilCoolingDXSingleSpeed(const openstudio::model::CoilCoolingDXSingleSpeed& coil, QDomElement & airSegElement, QDomDocument& doc);
boost::optional<QDomElement> translateCoilHeatingGas(const openstudio::model::CoilHeatingGas& coil, QDomElement & airSegElement, QDomDocument& doc);
boost::optional<QDomElement> translateAirLoopHVACOutdoorAirSystem(const openstudio::model::AirLoopHVACOutdoorAirSystem& oasys, QDomElement & airSysElement, QDomDocument& doc);

std::map<openstudio::Handle, QDomElement> m_translatedObjects;

Expand All @@ -120,6 +128,9 @@ namespace sdd {

ProgressBar* m_progressBar;

bool m_autoHardSize;
bool m_autoEfficiency;

REGISTER_LOGGER("openstudio.sdd.ForwardTranslator");
};

Expand Down
Loading

3 comments on commit 5dca1eb

@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 (kbenne) - x86_64-MacOS-10.9-clang: Tests Failed

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 (kbenne) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2082 of 2204 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 (kbenne) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

Please sign in to comment.