class Substance

Declaration

class Substance { /* full declaration omitted */ };

Description

A type used to describe a chemical substance (species, dependent components)

Declared at: ThermoFun/Substance.h:17

Method Overview

Methods

Substance(std::string jsonSubstance)

Description

Construct a Substance instance from a JSON string

Declared at: ThermoFun/Substance.h:24

Parameters

std::string jsonSubstance

Substance(const ThermoFun::Substance& other)

Description

Construct a copy of an Substance instance

Declared at: ThermoFun/Substance.h:27

Parameters

const ThermoFun::Substance& other

Substance()

Description

Construct a default Substance instance

Declared at: ThermoFun/Substance.h:21

auto aggregateState() const
    -> AggregateState::type

Description

aggregateState

Declared at: ThermoFun/Substance.h:173

Returns

substance aggregate state

auto charge() const -> int

Description

charge

Declared at: ThermoFun/Substance.h:179

Returns

substance charge

auto checkCalcMethodBounds(
    std::string modelName,
    double T,
    double P,
    ThermoFun::ThermoPropertiesSubstance& tps)
    -> void

Description

Checks if the method of clauclation is out of provided T and P bounds. If out of bounds sets the corresponding message inside the property status

Declared at: ThermoFun/Substance.h:193

Parameters

std::string modelName
Given model name
double T
temparature in Pa
double P
pressure in K
ThermoFun::ThermoPropertiesSubstance& tps
calculated properties of the substance, their status message is changed is T and P is out of bounds

auto formula() const -> std::string

Description

Return the formula of the chemical Substance

Declared at: ThermoFun/Substance.h:119

auto jsonString() const -> std::string

Description

jonString

Declared at: ThermoFun/Substance.h:185

Returns

record in json string

auto lowerP() const -> double

Description

Return upper presure limit of the correction method (Pa)

Declared at: ThermoFun/Substance.h:137

auto lowerT() const -> double

Description

Return upper temperature limit of the correction method (K)

Declared at: ThermoFun/Substance.h:134

auto methodGenEOS() const
    -> MethodGenEoS_Thrift::type

Description

Return the general EOS method code

Declared at: ThermoFun/Substance.h:155

auto method_P() const -> MethodCorrP_Thrift::type

Description

Return the pressure correction method code

Declared at: ThermoFun/Substance.h:161

auto method_T() const -> MethodCorrT_Thrift::type

Description

Return the temperature correction method code

Declared at: ThermoFun/Substance.h:158

auto molarMass() const -> double

Description

Return the molar mass of the chemical species (in units of kg/mol)

Declared at: ThermoFun/Substance.h:125

auto name() const -> std::string

Description

Return the name of the chemical Substance

Declared at: ThermoFun/Substance.h:113

auto reactionSymbol() const -> std::string

Description

Return the reaction name that defines the properties of the chemical Substance

Declared at: ThermoFun/Substance.h:122

auto referenceP() const -> double

Description

Return the referennce pressure (Pa)

Declared at: ThermoFun/Substance.h:131

auto referenceT() const -> double

Description

Return the reference temperature (K)

Declared at: ThermoFun/Substance.h:128

auto setAggregateState(
    AggregateState::type aggregate_state) -> void

Description

Set the code for the aggregate state of the substance

Declared at: ThermoFun/Substance.h:82

Parameters

AggregateState::type aggregate_state

auto setCharge(int charge) -> void

Description

setCharge

Declared at: ThermoFun/Substance.h:91

Parameters

int charge
substance charge

auto setFormula(std::string formula) -> void

Description

Set the formula of the Substance.

Declared at: ThermoFun/Substance.h:43

Parameters

std::string formula

auto setJsonString(const std::string& jString)
    -> void

Description

setJsonString stores the json object of the record

Declared at: ThermoFun/Substance.h:109

Parameters

const std::string& jString

auto setLowerP(double P) -> void

Description

Set upper presure limit of the correction method (Pa)

Declared at: ThermoFun/Substance.h:70

Parameters

double P

auto setLowerT(double T) -> void

Description

Set upper temperature limit of the correction method (K)

Declared at: ThermoFun/Substance.h:67

Parameters

double T

auto setMethodGenEoS(
    MethodGenEoS_Thrift::type method_genEoS)
    -> void

Description

Set the code for general EOS calculation method

Declared at: ThermoFun/Substance.h:58

Parameters

MethodGenEoS_Thrift::type method_genEoS

auto setMethod_P(
    MethodCorrP_Thrift::type method_P) -> void

Description

Set the code for the pressure correction method

Declared at: ThermoFun/Substance.h:64

Parameters

MethodCorrP_Thrift::type method_P

auto setMethod_T(
    MethodCorrT_Thrift::type method_T) -> void

Description

Set the code for the temperature correction method

Declared at: ThermoFun/Substance.h:61

Parameters

MethodCorrT_Thrift::type method_T

auto setMolarMass(double molar_mass) -> void

Description

Set the molar mass of the chemical species (in units of kg/mol)

Declared at: ThermoFun/Substance.h:49

Parameters

double molar_mass

auto setName(std::string symbol) -> void

Description

Set the name of the Substance.

Declared at: ThermoFun/Substance.h:37

Parameters

std::string symbol

auto setReactionSymbol(std::string reactionSymbol)
    -> void

Description

Set the name of the reaction that defines the substance properties.

Declared at: ThermoFun/Substance.h:46

Parameters

std::string reactionSymbol

auto setReferenceP(double P) -> void

Description

setReferenceP

Declared at: ThermoFun/Substance.h:103

Parameters

double P
pressure in Pa

auto setReferenceT(double T) -> void

Description

setReferenceT

Declared at: ThermoFun/Substance.h:97

Parameters

double T
temperature in K

auto setSubstanceClass(
    SubstanceClass::type substance_class) -> void

Description

Set the code for the substance class

Declared at: ThermoFun/Substance.h:79

Parameters

SubstanceClass::type substance_class

auto setSymbol(std::string symbol) -> void

Description

Set the symbol of the Substance.

Declared at: ThermoFun/Substance.h:40

Parameters

std::string symbol

auto setThermoCalculationType(
    SubstanceThermoCalculationType::type
        calculation_type) -> void

Description

Set the code for the substance calculation type

Declared at: ThermoFun/Substance.h:85

Parameters

SubstanceThermoCalculationType::type calculation_type

auto setThermoParameters(
    ThermoFun::ThermoParametersSubstance
        thermo_param) -> void

Description

Set the reference thermodynamic data of the substance.

Declared at: ThermoFun/Substance.h:55

Parameters

ThermoFun::ThermoParametersSubstance thermo_param

auto setThermoReferenceProperties(
    ThermoFun::ThermoPropertiesSubstance
        thermo_ref_prop) -> void

Description

Set the reference thermodynamic data of the substance.

Declared at: ThermoFun/Substance.h:52

Parameters

ThermoFun::ThermoPropertiesSubstance thermo_ref_prop

auto setUpperP(double P) -> void

Description

Set lower pressure limit for the correction method (Pa)

Declared at: ThermoFun/Substance.h:76

Parameters

double P

auto setUpperT(double T) -> void

Description

Set lower temperature limit of the correction method (K)

Declared at: ThermoFun/Substance.h:73

Parameters

double T

auto substanceClass() const
    -> SubstanceClass::type

Description

Return the class type of the substance

Declared at: ThermoFun/Substance.h:164

auto symbol() const -> std::string

Description

Return the symbol of the chemical Substance

Declared at: ThermoFun/Substance.h:116

auto thermoCalculationType() const
    -> SubstanceThermoCalculationType::type

Description

Return the code of the substance proeprties calculation type

Declared at: ThermoFun/Substance.h:167

auto thermoParameters() const
    -> ThermoFun::ThermoParametersSubstance

Description

Return the thermodynamic parameters for calculating thermodynamic properties of the substance.

Declared at: ThermoFun/Substance.h:149

auto thermoProperties() const
    -> ThermoFun::ThermoPropertiesSubstance

Description

Return the thermodynamic data of the substance.

Declared at: ThermoFun/Substance.h:146

auto thermoReferenceProperties() const
    -> ThermoFun::ThermoPropertiesSubstance

Description

Return the reference thermodynamic data of the substance.

Declared at: ThermoFun/Substance.h:152

auto upperP() const -> double

Description

Return lower pressure limit for the correction method (Pa)

Declared at: ThermoFun/Substance.h:143

auto upperT() const -> double

Description

Return lower temperature limit of the correction method (K)

Declared at: ThermoFun/Substance.h:140

virtual ~Substance()

Description

Destroy this instance

Declared at: ThermoFun/Substance.h:33