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

#include <PrjObjects.hpp>

Public Member Functions

Constructors and Destructors
 Zone ()
 Create a new object with default values.
 
 Zone (unsigned flags, std::string Vol, std::string T0, std::string name)
 Create a new object.
 
 Zone (unsigned flags, double Vol, double T0, std::string name)
 Create a new object.
 
 Zone (int nr, unsigned int flags, int ps, int pc, int pk, int pl, std::string relHt, std::string Vol, std::string T0, std::string P0, std::string name, int color, int u_Ht, int u_V, int u_T, int u_P, int cdaxis, int cfd, std::string cfdname, std::string X1, std::string Y1, std::string H1, std::string X2, std::string Y2, std::string H2, std::string celldx, std::string axialD, int u_aD, int u_L)
 Create a new object.
 
 Zone (int nr, unsigned int flags, int ps, int pc, int pk, int pl, double relHt, double Vol, double T0, double P0, std::string name, int color, int u_Ht, int u_V, int u_T, int u_P, int cdaxis, int cfd, std::string cfdname, double X1, double Y1, double H1, double X2, double Y2, double H2, double celldx, double axialD, int u_aD, int u_L)
 Create a new object.
 
 Zone (const Zone &other)
 Create a new object from another object.
 
 ~Zone ()=default
 Destroy the object.
 
Operators
Zoneoperator= (const Zone &other)
 Copy operator.
 
bool operator== (const Zone &other) const
 Equality operator.
 
bool operator!= (const Zone &other) const
 Inequality operator.
 
Input and Output
void read (Reader &input)
 Read an object from a Reader.
 
std::string write ()
 Write the object to a string.
 
Getters and Setters
int nr () const
 Returns the zone number, in order from 1 to the number of zones.
 
void setNr (const int nr)
 Sets the zone number.
 
unsigned int flags () const
 Returns the zones flags.
 
void setFlags (const unsigned int flags)
 Set the zones flags.
 
int ps () const
 Returns the week schedule index.
 
void setPs (const int ps)
 Sets the week schedule index.
 
int pc () const
 Returns the control node index.
 
void setPc (const int pc)
 Sets the control node index.
 
int pk () const
 Returns the kinetic reaction index.
 
void setPk (const int pk)
 Sets the kinetic reaction index.
 
int pl () const
 Returns the building level index.
 
void setPl (const int pl)
 Sets the building level index.
 
double relHt () const
 Returns the zone height [m].
 
bool setRelHt (const double relHt)
 Sets the zone height [m].
 
bool setRelHt (const std::string &relHt)
 Sets the zone height [m].
 
double Vol () const
 Returns the zone volume [m^3].
 
bool setVol (const double Vol)
 Sets the zone volume [m^3].
 
bool setVol (const std::string &Vol)
 Sets the zone volume [m^3].
 
double T0 () const
 Returns the initial zone temperature [K].
 
bool setT0 (const double T0)
 Sets the initial zone temperature [K].
 
bool setT0 (const std::string &T0)
 Sets the initial zone temperature [K].
 
double P0 () const
 Returns the initial zone pressure [Pa].
 
bool setP0 (const double P0)
 Sets the initial zone pressure [Pa].
 
bool setP0 (const std::string &P0)
 Sets the initial zone pressure [Pa].
 
std::string name () const
 Returns the zone name.
 
void setName (const std::string &name)
 Sets the zone name.
 
int color () const
 Returns the zone fill color.
 
void setColor (const int color)
 Sets the zone fill color.
 
int u_Ht () const
 Returns the units of height.
 
void setU_Ht (const int u_Ht)
 Sets the units of height.
 
int u_V () const
 Returns the units of volume.
 
void setU_V (const int u_V)
 Sets the units of volume.
 
int u_T () const
 Returns the units of temperature.
 
void setU_T (const int u_T)
 Sets the units of temperature.
 
int u_P () const
 Returns the units of pressure.
 
void setU_P (const int u_P)
 sets the units of pressure.
 
int cdaxis () const
 Returns the convection/diffusion axis flag (0=no cd, 1-4 => cd axis direction).
 
void setCdaxis (const int cdaxis)
 Sets the convection/diffusion axis flag (0=no cd, 1-4 => cd axis direction).
 
int cfd () const
 Returns the CFD zone flag (0=no, 1=yes).
 
void setCfd (const int cfd)
 Sets the cfd zone flag (0=no, 1=yes).
 
std::string cfdname () const
 Returns the CFD zone name.
 
void setCfdname (const std::string &cfdname)
 Sets the CFD zone name.
 
double X1 () const
 Returns the X coordinate of one end of the cdaxis.
 
bool setX1 (const double X1)
 Sets the X coordinate of one end of the cdaxis.
 
bool setX1 (const std::string &X1)
 Sets the X coordinate of one end of the cdaxis.
 
double Y1 () const
 Returns the Y coordinate of one end of the cdaxis.
 
bool setY1 (const double Y1)
 Sets the Y coordinate of one end of the cdaxis.
 
bool setY1 (const std::string &Y1)
 Sets the Y coordinate of one end of the cdaxis.
 
double H1 () const
 Returns the relative height of one end of the cdaxis.
 
bool setH1 (const double H1)
 Sets the relative height of one end of the cdaxis.
 
bool setH1 (const std::string &H1)
 Sets the relative height of one end of the cdaxis.
 
double X2 () const
 Returns the X coordinate of the other end of the cdaxis.
 
bool setX2 (const double X2)
 Sets the X coordinate of the other end of the cdaxis.
 
bool setX2 (const std::string &X2)
 Sets the X coordinate of the other end of the cdaxis.
 
double Y2 () const
 Returns the Y coordinate of the other end of the cdaxis.
 
bool setY2 (const double Y2)
 Sets the Y coordinate of the other end of the cdaxis.
 
bool setY2 (const std::string &Y2)
 Sets the Y coordinate of the other end of the cdaxis.
 
double H2 () const
 Returns the relative height of the other end of the cdaxis.
 
bool setH2 (const double H2)
 Sets the relative height of the other end of the cdaxis.
 
bool setH2 (const std::string &H2)
 Sets the relative height of the other end of the cdaxis.
 
double celldx () const
 Returns the convection/diffusion cell length [m].
 
bool setCelldx (const double celldx)
 Returns the convection/diffusion cell length [m].
 
bool setCelldx (const std::string &celldx)
 Returns the convection/diffusion cell length [m].
 
double axialD () const
 Returns the axial diffusion coeff [m^2/s].
 
bool setAxialD (const double axialD)
 Sets the axial diffusion coeff [m^2/s].
 
bool setAxialD (const std::string &axialD)
 Sets the axial diffusion coeff [m^2/s].
 
int u_aD () const
 Returns the display units of axial diffusion.
 
void setU_aD (const int u_aD)
 Sets the display units of axial diffusion.
 
int u_L () const
 Returns the c/d axis limit display units.
 
void setU_L (const int u_L)
 Sets the c/d axis limit display units.
 
bool variablePressure () const
 Returns true if the zone is a variable pressure zone.
 
void setVariablePressure (bool b)
 Set the zone pressure behavior.
 
bool variableContaminants () const
 Returns true if the zone is a variable contaminant zone.
 
void setVariableContaminants (bool b)
 Set the zone contaminant behavior.
 
bool system () const
 Returns true if the zone is a system zone.
 
void setSystem (bool b)
 Set the zone system flag.
 
double ic (const int i) const
 Returns the initial condition of contaminant i.
 
std::vector< double > ic () const
 Returns the contaminant initial conditions as a vector.
 
bool setIc (const int i, const double value)
 Sets the initial condition of contaminant i.
 
bool setIc (const int i, const std::string &value)
 Sets the initial condition of contaminant i.
 
bool setIc (std::vector< double > &ic)
 Sets the contaminant initial condition vector.
 
bool setIc (std::vector< std::string > &ic)
 Sets the contaminant initial condition vector.
 

Detailed Description

The Zone object stores the data that describes an airflow zone.

Constructor & Destructor Documentation

◆ Zone() [1/6]

openstudio::contam::Zone::Zone ( )

Create a new object with default values.

◆ Zone() [2/6]

openstudio::contam::Zone::Zone ( unsigned flags,
std::string Vol,
std::string T0,
std::string name )

Create a new object.

◆ Zone() [3/6]

openstudio::contam::Zone::Zone ( unsigned flags,
double Vol,
double T0,
std::string name )

Create a new object.

◆ Zone() [4/6]

openstudio::contam::Zone::Zone ( int nr,
unsigned int flags,
int ps,
int pc,
int pk,
int pl,
std::string relHt,
std::string Vol,
std::string T0,
std::string P0,
std::string name,
int color,
int u_Ht,
int u_V,
int u_T,
int u_P,
int cdaxis,
int cfd,
std::string cfdname,
std::string X1,
std::string Y1,
std::string H1,
std::string X2,
std::string Y2,
std::string H2,
std::string celldx,
std::string axialD,
int u_aD,
int u_L )

Create a new object.

◆ Zone() [5/6]

openstudio::contam::Zone::Zone ( int nr,
unsigned int flags,
int ps,
int pc,
int pk,
int pl,
double relHt,
double Vol,
double T0,
double P0,
std::string name,
int color,
int u_Ht,
int u_V,
int u_T,
int u_P,
int cdaxis,
int cfd,
std::string cfdname,
double X1,
double Y1,
double H1,
double X2,
double Y2,
double H2,
double celldx,
double axialD,
int u_aD,
int u_L )

Create a new object.

◆ Zone() [6/6]

openstudio::contam::Zone::Zone ( const Zone & other)

Create a new object from another object.

◆ ~Zone()

openstudio::contam::Zone::~Zone ( )
default

Destroy the object.

Member Function Documentation

◆ axialD()

double openstudio::contam::Zone::axialD ( ) const

Returns the axial diffusion coeff [m^2/s].

◆ cdaxis()

int openstudio::contam::Zone::cdaxis ( ) const

Returns the convection/diffusion axis flag (0=no cd, 1-4 => cd axis direction).

◆ celldx()

double openstudio::contam::Zone::celldx ( ) const

Returns the convection/diffusion cell length [m].

◆ cfd()

int openstudio::contam::Zone::cfd ( ) const

Returns the CFD zone flag (0=no, 1=yes).

◆ cfdname()

std::string openstudio::contam::Zone::cfdname ( ) const

Returns the CFD zone name.

◆ color()

int openstudio::contam::Zone::color ( ) const

Returns the zone fill color.

◆ flags()

unsigned int openstudio::contam::Zone::flags ( ) const

Returns the zones flags.

See the ZoneFlags enum for more information.

◆ H1()

double openstudio::contam::Zone::H1 ( ) const

Returns the relative height of one end of the cdaxis.

◆ H2()

double openstudio::contam::Zone::H2 ( ) const

Returns the relative height of the other end of the cdaxis.

◆ ic() [1/2]

std::vector< double > openstudio::contam::Zone::ic ( ) const

Returns the contaminant initial conditions as a vector.

◆ ic() [2/2]

double openstudio::contam::Zone::ic ( const int i) const

Returns the initial condition of contaminant i.

◆ name()

std::string openstudio::contam::Zone::name ( ) const

Returns the zone name.

◆ nr()

int openstudio::contam::Zone::nr ( ) const

Returns the zone number, in order from 1 to the number of zones.

◆ operator!=()

bool openstudio::contam::Zone::operator!= ( const Zone & other) const

Inequality operator.

◆ operator=()

Zone & openstudio::contam::Zone::operator= ( const Zone & other)

Copy operator.

◆ operator==()

bool openstudio::contam::Zone::operator== ( const Zone & other) const

Equality operator.

◆ P0()

double openstudio::contam::Zone::P0 ( ) const

Returns the initial zone pressure [Pa].

◆ pc()

int openstudio::contam::Zone::pc ( ) const

Returns the control node index.

It is converted to pointer by CONTAM.

◆ pk()

int openstudio::contam::Zone::pk ( ) const

Returns the kinetic reaction index.

It is converted to pointer by CONTAM.

◆ pl()

int openstudio::contam::Zone::pl ( ) const

Returns the building level index.

It is converted to pointer by CONTAM.

◆ ps()

int openstudio::contam::Zone::ps ( ) const

Returns the week schedule index.

It is converted to pointer by CONTAM.

◆ read()

void openstudio::contam::Zone::read ( Reader & input)

Read an object from a Reader.

◆ relHt()

double openstudio::contam::Zone::relHt ( ) const

Returns the zone height [m].

◆ setAxialD() [1/2]

bool openstudio::contam::Zone::setAxialD ( const double axialD)

Sets the axial diffusion coeff [m^2/s].

◆ setAxialD() [2/2]

bool openstudio::contam::Zone::setAxialD ( const std::string & axialD)

Sets the axial diffusion coeff [m^2/s].

◆ setCdaxis()

void openstudio::contam::Zone::setCdaxis ( const int cdaxis)

Sets the convection/diffusion axis flag (0=no cd, 1-4 => cd axis direction).

◆ setCelldx() [1/2]

bool openstudio::contam::Zone::setCelldx ( const double celldx)

Returns the convection/diffusion cell length [m].

◆ setCelldx() [2/2]

bool openstudio::contam::Zone::setCelldx ( const std::string & celldx)

Returns the convection/diffusion cell length [m].

◆ setCfd()

void openstudio::contam::Zone::setCfd ( const int cfd)

Sets the cfd zone flag (0=no, 1=yes).

◆ setCfdname()

void openstudio::contam::Zone::setCfdname ( const std::string & cfdname)

Sets the CFD zone name.

◆ setColor()

void openstudio::contam::Zone::setColor ( const int color)

Sets the zone fill color.

◆ setFlags()

void openstudio::contam::Zone::setFlags ( const unsigned int flags)

Set the zones flags.

See the ZoneFlags enum for more information.

◆ setH1() [1/2]

bool openstudio::contam::Zone::setH1 ( const double H1)

Sets the relative height of one end of the cdaxis.

◆ setH1() [2/2]

bool openstudio::contam::Zone::setH1 ( const std::string & H1)

Sets the relative height of one end of the cdaxis.

◆ setH2() [1/2]

bool openstudio::contam::Zone::setH2 ( const double H2)

Sets the relative height of the other end of the cdaxis.

◆ setH2() [2/2]

bool openstudio::contam::Zone::setH2 ( const std::string & H2)

Sets the relative height of the other end of the cdaxis.

◆ setIc() [1/4]

bool openstudio::contam::Zone::setIc ( const int i,
const double value )

Sets the initial condition of contaminant i.

◆ setIc() [2/4]

bool openstudio::contam::Zone::setIc ( const int i,
const std::string & value )

Sets the initial condition of contaminant i.

◆ setIc() [3/4]

bool openstudio::contam::Zone::setIc ( std::vector< double > & ic)

Sets the contaminant initial condition vector.

◆ setIc() [4/4]

bool openstudio::contam::Zone::setIc ( std::vector< std::string > & ic)

Sets the contaminant initial condition vector.

◆ setName()

void openstudio::contam::Zone::setName ( const std::string & name)

Sets the zone name.

◆ setNr()

void openstudio::contam::Zone::setNr ( const int nr)

Sets the zone number.

This should only be done with care.

◆ setP0() [1/2]

bool openstudio::contam::Zone::setP0 ( const double P0)

Sets the initial zone pressure [Pa].

◆ setP0() [2/2]

bool openstudio::contam::Zone::setP0 ( const std::string & P0)

Sets the initial zone pressure [Pa].

◆ setPc()

void openstudio::contam::Zone::setPc ( const int pc)

Sets the control node index.

It is converted to pointer by CONTAM.

◆ setPk()

void openstudio::contam::Zone::setPk ( const int pk)

Sets the kinetic reaction index.

It is converted to pointer by CONTAM.

◆ setPl()

void openstudio::contam::Zone::setPl ( const int pl)

Sets the building level index.

It is converted to pointer by CONTAM.

◆ setPs()

void openstudio::contam::Zone::setPs ( const int ps)

Sets the week schedule index.

It is converted to pointer by CONTAM.

◆ setRelHt() [1/2]

bool openstudio::contam::Zone::setRelHt ( const double relHt)

Sets the zone height [m].

◆ setRelHt() [2/2]

bool openstudio::contam::Zone::setRelHt ( const std::string & relHt)

Sets the zone height [m].

◆ setSystem()

void openstudio::contam::Zone::setSystem ( bool b)

Set the zone system flag.

◆ setT0() [1/2]

bool openstudio::contam::Zone::setT0 ( const double T0)

Sets the initial zone temperature [K].

◆ setT0() [2/2]

bool openstudio::contam::Zone::setT0 ( const std::string & T0)

Sets the initial zone temperature [K].

◆ setU_aD()

void openstudio::contam::Zone::setU_aD ( const int u_aD)

Sets the display units of axial diffusion.

◆ setU_Ht()

void openstudio::contam::Zone::setU_Ht ( const int u_Ht)

Sets the units of height.

◆ setU_L()

void openstudio::contam::Zone::setU_L ( const int u_L)

Sets the c/d axis limit display units.

◆ setU_P()

void openstudio::contam::Zone::setU_P ( const int u_P)

sets the units of pressure.

◆ setU_T()

void openstudio::contam::Zone::setU_T ( const int u_T)

Sets the units of temperature.

◆ setU_V()

void openstudio::contam::Zone::setU_V ( const int u_V)

Sets the units of volume.

◆ setVariableContaminants()

void openstudio::contam::Zone::setVariableContaminants ( bool b)

Set the zone contaminant behavior.

◆ setVariablePressure()

void openstudio::contam::Zone::setVariablePressure ( bool b)

Set the zone pressure behavior.

◆ setVol() [1/2]

bool openstudio::contam::Zone::setVol ( const double Vol)

Sets the zone volume [m^3].

◆ setVol() [2/2]

bool openstudio::contam::Zone::setVol ( const std::string & Vol)

Sets the zone volume [m^3].

◆ setX1() [1/2]

bool openstudio::contam::Zone::setX1 ( const double X1)

Sets the X coordinate of one end of the cdaxis.

◆ setX1() [2/2]

bool openstudio::contam::Zone::setX1 ( const std::string & X1)

Sets the X coordinate of one end of the cdaxis.

◆ setX2() [1/2]

bool openstudio::contam::Zone::setX2 ( const double X2)

Sets the X coordinate of the other end of the cdaxis.

◆ setX2() [2/2]

bool openstudio::contam::Zone::setX2 ( const std::string & X2)

Sets the X coordinate of the other end of the cdaxis.

◆ setY1() [1/2]

bool openstudio::contam::Zone::setY1 ( const double Y1)

Sets the Y coordinate of one end of the cdaxis.

◆ setY1() [2/2]

bool openstudio::contam::Zone::setY1 ( const std::string & Y1)

Sets the Y coordinate of one end of the cdaxis.

◆ setY2() [1/2]

bool openstudio::contam::Zone::setY2 ( const double Y2)

Sets the Y coordinate of the other end of the cdaxis.

◆ setY2() [2/2]

bool openstudio::contam::Zone::setY2 ( const std::string & Y2)

Sets the Y coordinate of the other end of the cdaxis.

◆ system()

bool openstudio::contam::Zone::system ( ) const

Returns true if the zone is a system zone.

◆ T0()

double openstudio::contam::Zone::T0 ( ) const

Returns the initial zone temperature [K].

◆ u_aD()

int openstudio::contam::Zone::u_aD ( ) const

Returns the display units of axial diffusion.

◆ u_Ht()

int openstudio::contam::Zone::u_Ht ( ) const

Returns the units of height.

◆ u_L()

int openstudio::contam::Zone::u_L ( ) const

Returns the c/d axis limit display units.

◆ u_P()

int openstudio::contam::Zone::u_P ( ) const

Returns the units of pressure.

◆ u_T()

int openstudio::contam::Zone::u_T ( ) const

Returns the units of temperature.

◆ u_V()

int openstudio::contam::Zone::u_V ( ) const

Returns the units of volume.

◆ variableContaminants()

bool openstudio::contam::Zone::variableContaminants ( ) const

Returns true if the zone is a variable contaminant zone.

◆ variablePressure()

bool openstudio::contam::Zone::variablePressure ( ) const

Returns true if the zone is a variable pressure zone.

◆ Vol()

double openstudio::contam::Zone::Vol ( ) const

Returns the zone volume [m^3].

◆ write()

std::string openstudio::contam::Zone::write ( )

Write the object to a string.

◆ X1()

double openstudio::contam::Zone::X1 ( ) const

Returns the X coordinate of one end of the cdaxis.

◆ X2()

double openstudio::contam::Zone::X2 ( ) const

Returns the X coordinate of the other end of the cdaxis.

◆ Y1()

double openstudio::contam::Zone::Y1 ( ) const

Returns the Y coordinate of one end of the cdaxis.

◆ Y2()

double openstudio::contam::Zone::Y2 ( ) const

Returns the Y coordinate of the other end of the cdaxis.