#include <ForwardTranslator.hpp>
Public Member Functions | |
Constructors and Destructors | |
ForwardTranslator () | |
Construct a new, empty translator. More... | |
~ForwardTranslator ()=default | |
Destroy the translator. More... | |
Getters and Setters | |
std::map< Handle, int > | surfaceMap () const |
Returns a map from the OpenStudio surface handles to the CONTAM airflow path index (which runs from 1 to the number of surfaces). More... | |
std::map< Handle, int > | zoneMap () const |
Returns a map from the OpenStudio thermal zone handles to the CONTAM airflow zone index (which runs from 1 to the number of airflow zones). More... | |
boost::optional< std::string > | airtightnessLevel () const |
Returns the airtightness level as a string if it has been set. More... | |
void | setAirtightnessLevel (std::string level) |
Set the airtightness level. More... | |
boost::optional< double > | exteriorFlowRate () const |
Returns the test data flow rate of envelope flow paths if it has been set. More... | |
boost::optional< double > | exteriorExponent () const |
Returns the test data flow exponent of envelope flow paths if it has been set. More... | |
boost::optional< double > | exteriorDeltaP () const |
Returns the test data pressure difference of envelope flow paths if it has been set. More... | |
bool | setExteriorFlowRate (double flow, double n, double deltaP) |
Set the test data point for envelope flow paths. More... | |
double | returnSupplyRatio () const |
Returns the return-to-supply ratio. More... | |
void | setReturnSupplyRatio (double returnSupplyRatio) |
Sets the return-to-supply ratio. More... | |
bool | ratioOverride () const |
Returns true if the return/supply ratio will be used to set return flows, false otherwise. More... | |
void | setRatioOverride (bool ratioOverride) |
Set the behavior of the translator in setting return flows. More... | |
bool | translateHVAC () const |
Returns true if HVAC will be translated, false otherwise. More... | |
void | setTranslateHVAC (bool translateHVAC) |
Set the translator's HVAC translation behavior. More... | |
boost::optional < openstudio::DateTime > | startDateTime () const |
Returns the simulation start time of the translated model. More... | |
boost::optional < openstudio::DateTime > | endDateTime () const |
Returns the simulation end time of the translated model. More... | |
Miscellaneous Functions | |
bool | writeCvFile (openstudio::path filepath) |
Write out any continuous value file information to the specified path. More... | |
std::vector< LogMessage > | warnings () const |
Returns warning messages generated by the last translation. More... | |
std::vector< LogMessage > | errors () const |
Returns error messages generated by the last translation. More... | |
Public Member Functions inherited from openstudio::airflow::SurfaceNetworkBuilder | |
SurfaceNetworkBuilder (ProgressBar *progressBar=nullptr) | |
Construct a new object. More... | |
virtual | ~SurfaceNetworkBuilder ()=default |
Destroy the translator. More... | |
bool | build (model::Model &model) |
ProgressBar * | progressBar () const |
Returns the progress bar currently associated with the object. More... | |
void | setProgressBar (ProgressBar *progressBar) |
Sets the progress bar to be updated by the object. More... | |
std::vector< LogMessage > | warnings () const |
Returns warning messages generated by the last translation. More... | |
std::vector< LogMessage > | errors () const |
Returns error messages generated by the last translation. More... | |
std::vector< LogMessage > | logMessages () const |
Returns error messages generated by the last translation. More... | |
Protected Member Functions | |
virtual bool | linkExteriorSubSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface, openstudio::model::SubSurface subSurface) override |
virtual bool | linkExteriorSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface) override |
virtual bool | linkInteriorSubSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface, openstudio::model::SubSurface subSurface, openstudio::model::SubSurface adjacentSubSurface, openstudio::model::Surface adjacentSurface, openstudio::model::Space adjacentSpace, openstudio::model::ThermalZone adjacentZone) override |
virtual bool | linkInteriorSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface, openstudio::model::Surface adjacentSurface, openstudio::model::Space adjacentSpace, openstudio::model::ThermalZone adjacentZone) override |
Protected Member Functions inherited from openstudio::airflow::SurfaceNetworkBuilder | |
void | initProgress (int max, std::string label) |
virtual bool | linkExteriorSubSurface (model::ThermalZone zone, model::Space space, model::Surface surface, model::SubSurface subSurface) |
virtual bool | linkExteriorSurface (model::ThermalZone zone, model::Space space, model::Surface surface) |
virtual bool | linkInteriorSubSurface (model::ThermalZone zone, model::Space space, model::Surface surface, model::SubSurface subSurface, model::SubSurface adjacentSubSurface, model::Surface adjacentSurface, model::Space adjacentSpace, model::ThermalZone adjacentZone) |
virtual bool | linkInteriorSurface (model::ThermalZone zone, model::Space space, model::Surface surface, model::Surface adjacentSurface, model::Space adjacentSpace, model::ThermalZone adjacentZone) |
void | progress () |
Translation Functions | |
boost::optional < contam::IndexModel > | translateModel (model::Model model) |
Translates an OpenStudio thermal model into a CONTAM airflow model. More... | |
static bool | modelToPrj (const openstudio::model::Model &model, const openstudio::path &path, bool translateHVAC=true, std::string leakageDescriptor="Average", ProgressBar *progressBar=nullptr) |
Static translation function to translate an OpenStudio into a CONTAM airflow model and write it to a path. More... | |
ForwardTranslator translates an OpenStudio model into a CONTAM model.
ForwardTranslator translates an OpenStudio energy model into a CONTAM airflow model using a streamlined approach. Each wall is assigned an overall leakage rate and individual components are not directly represented.
openstudio::contam::ForwardTranslator::ForwardTranslator | ( | ) |
Construct a new, empty translator.
|
default |
Destroy the translator.
boost::optional<std::string> openstudio::contam::ForwardTranslator::airtightnessLevel | ( | ) | const |
Returns the airtightness level as a string if it has been set.
boost::optional<openstudio::DateTime> openstudio::contam::ForwardTranslator::endDateTime | ( | ) | const |
Returns the simulation end time of the translated model.
std::vector<LogMessage> openstudio::contam::ForwardTranslator::errors | ( | ) | const |
Returns error messages generated by the last translation.
boost::optional<double> openstudio::contam::ForwardTranslator::exteriorDeltaP | ( | ) | const |
Returns the test data pressure difference of envelope flow paths if it has been set.
boost::optional<double> openstudio::contam::ForwardTranslator::exteriorExponent | ( | ) | const |
Returns the test data flow exponent of envelope flow paths if it has been set.
boost::optional<double> openstudio::contam::ForwardTranslator::exteriorFlowRate | ( | ) | const |
Returns the test data flow rate of envelope flow paths if it has been set.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
static |
Static translation function to translate an OpenStudio into a CONTAM airflow model and write it to a path.
bool openstudio::contam::ForwardTranslator::ratioOverride | ( | ) | const |
Returns true if the return/supply ratio will be used to set return flows, false otherwise.
double openstudio::contam::ForwardTranslator::returnSupplyRatio | ( | ) | const |
Returns the return-to-supply ratio.
void openstudio::contam::ForwardTranslator::setAirtightnessLevel | ( | std::string | level | ) |
Set the airtightness level.
Three levels are supported: Leaky, Average, and Tight.
bool openstudio::contam::ForwardTranslator::setExteriorFlowRate | ( | double | flow, |
double | n, | ||
double | deltaP | ||
) |
Set the test data point for envelope flow paths.
void openstudio::contam::ForwardTranslator::setRatioOverride | ( | bool | ratioOverride | ) |
Set the behavior of the translator in setting return flows.
void openstudio::contam::ForwardTranslator::setReturnSupplyRatio | ( | double | returnSupplyRatio | ) |
Sets the return-to-supply ratio.
void openstudio::contam::ForwardTranslator::setTranslateHVAC | ( | bool | translateHVAC | ) |
Set the translator's HVAC translation behavior.
boost::optional<openstudio::DateTime> openstudio::contam::ForwardTranslator::startDateTime | ( | ) | const |
Returns the simulation start time of the translated model.
|
inline |
Returns a map from the OpenStudio surface handles to the CONTAM airflow path index (which runs from 1 to the number of surfaces).
bool openstudio::contam::ForwardTranslator::translateHVAC | ( | ) | const |
Returns true if HVAC will be translated, false otherwise.
boost::optional<contam::IndexModel> openstudio::contam::ForwardTranslator::translateModel | ( | model::Model | model | ) |
Translates an OpenStudio thermal model into a CONTAM airflow model.
std::vector<LogMessage> openstudio::contam::ForwardTranslator::warnings | ( | ) | const |
Returns warning messages generated by the last translation.
bool openstudio::contam::ForwardTranslator::writeCvFile | ( | openstudio::path | filepath | ) |
Write out any continuous value file information to the specified path.
|
inline |
Returns a map from the OpenStudio thermal zone handles to the CONTAM airflow zone index (which runs from 1 to the number of airflow zones).