OpenStudio:airflow
Loading...
Searching...
No Matches
openstudio::contam::ForwardTranslator Class Reference

#include <ForwardTranslator.hpp>

+ Inheritance diagram for openstudio::contam::ForwardTranslator:

Public Member Functions

Constructors and Destructors
 ForwardTranslator ()
 Construct a new, empty translator.
 
 ~ForwardTranslator ()=default
 Destroy the translator.
 
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).
 
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).
 
boost::optional< std::string > airtightnessLevel () const
 Returns the airtightness level as a string if it has been set.
 
void setAirtightnessLevel (std::string level)
 Set the airtightness level.
 
boost::optional< double > exteriorFlowRate () const
 Returns the test data flow rate of envelope flow paths if it has been set.
 
boost::optional< double > exteriorExponent () const
 Returns the test data flow exponent of envelope flow paths if it has been set.
 
boost::optional< double > exteriorDeltaP () const
 Returns the test data pressure difference of envelope flow paths if it has been set.
 
bool setExteriorFlowRate (double flow, double n, double deltaP)
 Set the test data point for envelope flow paths.
 
double returnSupplyRatio () const
 Returns the return-to-supply ratio.
 
void setReturnSupplyRatio (double returnSupplyRatio)
 Sets the return-to-supply ratio.
 
bool ratioOverride () const
 Returns true if the return/supply ratio will be used to set return flows, false otherwise.
 
void setRatioOverride (bool ratioOverride)
 Set the behavior of the translator in setting return flows.
 
bool translateHVAC () const
 Returns true if HVAC will be translated, false otherwise.
 
void setTranslateHVAC (bool translateHVAC)
 Set the translator's HVAC translation behavior.
 
boost::optional< openstudio::DateTime > startDateTime () const
 Returns the simulation start time of the translated model.
 
boost::optional< openstudio::DateTime > endDateTime () const
 Returns the simulation end time of the translated model.
 
- Public Member Functions inherited from openstudio::airflow::SurfaceNetworkBuilder
 SurfaceNetworkBuilder (ProgressBar *progressBar=nullptr)
 Construct a new object.
 
virtual ~SurfaceNetworkBuilder ()=default
 Destroy the translator.
 
bool build (model::Model &model)
 
ProgressBar * progressBar () const
 Returns the progress bar currently associated with the object.
 
void setProgressBar (ProgressBar *progressBar)
 Sets the progress bar to be updated by the object.
 
std::vector< LogMessage > warnings () const
 Returns warning messages generated by the last translation.
 
std::vector< LogMessage > errors () const
 Returns error messages generated by the last translation.
 
std::vector< LogMessage > logMessages () const
 Returns error messages generated by the last translation.
 

Miscellaneous Functions

bool writeCvFile (openstudio::path filepath)
 Write out any continuous value file information to the specified path.
 
std::vector< LogMessage > warnings () const
 Returns warning messages generated by the last translation.
 
std::vector< LogMessage > errors () const
 Returns error messages generated by the last translation.
 
virtual bool linkExteriorSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface) override
 
virtual bool linkExteriorSubSurface (openstudio::model::ThermalZone zone, openstudio::model::Space space, openstudio::model::Surface surface, openstudio::model::SubSurface subSurface) 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
 
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
 

Translation Functions

boost::optional< contam::IndexModeltranslateModel (model::Model model)
 Translates an OpenStudio thermal model into a CONTAM airflow model.
 
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.
 

Additional Inherited Members

- Protected Member Functions inherited from openstudio::airflow::SurfaceNetworkBuilder
void progress ()
 
void initProgress (int max, std::string label)
 
virtual bool linkExteriorSurface (model::ThermalZone zone, model::Space space, model::Surface surface)
 
virtual bool linkExteriorSubSurface (model::ThermalZone zone, model::Space space, model::Surface surface, model::SubSurface subSurface)
 
virtual bool linkInteriorSurface (model::ThermalZone zone, model::Space space, model::Surface surface, model::Surface adjacentSurface, model::Space adjacentSpace, model::ThermalZone adjacentZone)
 
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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ForwardTranslator()

openstudio::contam::ForwardTranslator::ForwardTranslator ( )

Construct a new, empty translator.

◆ ~ForwardTranslator()

openstudio::contam::ForwardTranslator::~ForwardTranslator ( )
default

Destroy the translator.

Member Function Documentation

◆ airtightnessLevel()

boost::optional< std::string > openstudio::contam::ForwardTranslator::airtightnessLevel ( ) const

Returns the airtightness level as a string if it has been set.

◆ endDateTime()

boost::optional< openstudio::DateTime > openstudio::contam::ForwardTranslator::endDateTime ( ) const

Returns the simulation end time of the translated model.

◆ errors()

std::vector< LogMessage > openstudio::contam::ForwardTranslator::errors ( ) const

Returns error messages generated by the last translation.

◆ exteriorDeltaP()

boost::optional< double > openstudio::contam::ForwardTranslator::exteriorDeltaP ( ) const

Returns the test data pressure difference of envelope flow paths if it has been set.

◆ exteriorExponent()

boost::optional< double > openstudio::contam::ForwardTranslator::exteriorExponent ( ) const

Returns the test data flow exponent of envelope flow paths if it has been set.

◆ exteriorFlowRate()

boost::optional< double > openstudio::contam::ForwardTranslator::exteriorFlowRate ( ) const

Returns the test data flow rate of envelope flow paths if it has been set.

◆ linkExteriorSubSurface()

virtual bool openstudio::contam::ForwardTranslator::linkExteriorSubSurface ( openstudio::model::ThermalZone zone,
openstudio::model::Space space,
openstudio::model::Surface surface,
openstudio::model::SubSurface subSurface )
overrideprotectedvirtual

◆ linkExteriorSurface()

virtual bool openstudio::contam::ForwardTranslator::linkExteriorSurface ( openstudio::model::ThermalZone zone,
openstudio::model::Space space,
openstudio::model::Surface surface )
overrideprotectedvirtual

◆ linkInteriorSubSurface()

virtual bool openstudio::contam::ForwardTranslator::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 )
overrideprotectedvirtual

◆ linkInteriorSurface()

virtual bool openstudio::contam::ForwardTranslator::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 )
overrideprotectedvirtual

◆ modelToPrj()

static bool openstudio::contam::ForwardTranslator::modelToPrj ( const openstudio::model::Model & model,
const openstudio::path & path,
bool translateHVAC = true,
std::string leakageDescriptor = "Average",
ProgressBar * progressBar = nullptr )
static

Static translation function to translate an OpenStudio into a CONTAM airflow model and write it to a path.

◆ ratioOverride()

bool openstudio::contam::ForwardTranslator::ratioOverride ( ) const

Returns true if the return/supply ratio will be used to set return flows, false otherwise.

◆ returnSupplyRatio()

double openstudio::contam::ForwardTranslator::returnSupplyRatio ( ) const

Returns the return-to-supply ratio.

◆ setAirtightnessLevel()

void openstudio::contam::ForwardTranslator::setAirtightnessLevel ( std::string level)

Set the airtightness level.

Three levels are supported: Leaky, Average, and Tight.

◆ setExteriorFlowRate()

bool openstudio::contam::ForwardTranslator::setExteriorFlowRate ( double flow,
double n,
double deltaP )

Set the test data point for envelope flow paths.

◆ setRatioOverride()

void openstudio::contam::ForwardTranslator::setRatioOverride ( bool ratioOverride)

Set the behavior of the translator in setting return flows.

◆ setReturnSupplyRatio()

void openstudio::contam::ForwardTranslator::setReturnSupplyRatio ( double returnSupplyRatio)

Sets the return-to-supply ratio.

◆ setTranslateHVAC()

void openstudio::contam::ForwardTranslator::setTranslateHVAC ( bool translateHVAC)

Set the translator's HVAC translation behavior.

◆ startDateTime()

boost::optional< openstudio::DateTime > openstudio::contam::ForwardTranslator::startDateTime ( ) const

Returns the simulation start time of the translated model.

◆ surfaceMap()

std::map< Handle, int > openstudio::contam::ForwardTranslator::surfaceMap ( ) const
inline

Returns a map from the OpenStudio surface handles to the CONTAM airflow path index (which runs from 1 to the number of surfaces).

◆ translateHVAC()

bool openstudio::contam::ForwardTranslator::translateHVAC ( ) const

Returns true if HVAC will be translated, false otherwise.

◆ translateModel()

boost::optional< contam::IndexModel > openstudio::contam::ForwardTranslator::translateModel ( model::Model model)

Translates an OpenStudio thermal model into a CONTAM airflow model.

◆ warnings()

std::vector< LogMessage > openstudio::contam::ForwardTranslator::warnings ( ) const

Returns warning messages generated by the last translation.

◆ writeCvFile()

bool openstudio::contam::ForwardTranslator::writeCvFile ( openstudio::path filepath)

Write out any continuous value file information to the specified path.

◆ zoneMap()

std::map< Handle, int > openstudio::contam::ForwardTranslator::zoneMap ( ) const
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).