IdealGas
This module is a part of ReactionEngine. The purpose of this module is to calculate the thermodynamic properties of gasphase and surface adsorbed species
Documentation for IdealGas.
IdealGas.elementWeight
IdealGas.E0_CO
IdealGas.E0_H2
IdealGas.Gmix
IdealGas.H
IdealGas.H_all
IdealGas.Hmix
IdealGas.S
IdealGas.S_all
IdealGas.Smix
IdealGas.cp
IdealGas.cp_all
IdealGas.cpmix
IdealGas.create_thermo
IdealGas.get_element_weight
IdealGas.nernst
IdealGas.nernst_co
IdealGas.parase_thermo_species_data
IdealGas.parse_thermo_polynomials
IdealGas.elementWeight
— ConstantTuple of element weights. This is used for the calculation of molecular weights
IdealGas.E0_CO
— MethodFunction to calculate the standard potential for CO oxidation
Usage:
E0_CO(thermoObj, T)
- thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- T: Temperature in K
IdealGas.E0_H2
— MethodFunction to calculate the standard potential for H2 oxidation. This function uses the enthalpy of formation of water vapour.
Usage:
E0_H2(thermoObj, T)
- thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- T: Temperature in K
IdealGas.Gmix
— MethodCalculates the Gibbs free energy of a muxture in J/mol
Usage
Gmix(thermoObj,T,p,mlf)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K
- 'p::Float64' : total pressure Pa
- 'mlf::Array{Float64,1} ': mole fractions
IdealGas.H
— MethodH(thermo::NASAThermo, T::Float64) Calculates the enthalpy of pure species J/mol
Usage-1:
H(thermo,T)
- 'thermo::NASAThermo': NASAThermo of the species
- 'T::Float64': Temperature in K at which the property is required
Usage-2:
H(sp,T,thermo,ig)
- sp::String : species name
- T::Float64 : Temperature K
- thermoObj::SpeciesThermoObj : Structure of SpeciesThermoObj
- species_list::Array{String,1} : List of species
IdealGas.H_all
— MethodCalculates the enthalpy of all species in J/mol
Usage
H_all(td,T)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K at which the property is rquired
IdealGas.Hmix
— MethodHmix(thermoObj::SpeciesThermoObj,T::Float64,mlf::Array{Float64,1}) Calculates the enthalpy of a mixture J/mol
Usage
Hmix(td,T,mlf)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K
- 'mlf::Array{Float64,1}' : species mole fractions
IdealGas.S
— MethodS(thermo::NASAThermo, T::Float64) Calculates the entropy of pure species J/mol-K
Usage-1:
S(thermo,T)
- thermo::NASAThermo: NASAThermo of the species
- T::Float64: Temperature in K at which the property is required
Usage-2:
S(sp,T,thermo,ig)
- sp::String : species name
- T::Float64 : Temperature K
- thermo::SpeciesThermoObj : Structure of SpeciesThermoObj
- species_list::Array{String,1} : List of species
IdealGas.S_all
— MethodCalculates the entropy of all species in J/mol-K
Usage
S_all(td,T)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K at which the property is rquired
IdealGas.Smix
— MethodSmix(thermoObj::SpeciesThermoObj,T::Float64,p::Float64,mlf::Array{Float64,1}) Calculates the entropy of a muxture in J/mol-K
Usage
Smix(thermoObj,T,p,mlf)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K
- 'p::Float64' : total pressure Pa
- 'mlf::Array{Float64,1} ': mole fractions
IdealGas.cp
— MethodCalculate the specific heat of pure species J/mol-K
Usage-1:
cp(thermo,T)
- thermo::NASAThermo: NASAThermo of the species
- T::Float64: Temperature in K at which the property is required
Usage-2:
cp(sp,T,thermo,ig)
- sp::String : species name
- T::Float64 : Temperature K
- thermoObj::SpeciesThermoObj : Structure of SpeciesThermoObj
- species_list::Array{String,1} : List of species
IdealGas.cp_all
— MethodCalculates the specific heat of all species in J/mol-K
Usage
cp_all(td,T)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K at which the property is rquired
IdealGas.cpmix
— MethodCalculates the specific heat of a mixture in J/mol-K
Usage
cpmix(td,T,mlf)
- 'thermoObj::SpeciesThermoObj' : Structure of SpeciesThermoObj
- 'T::Float64' : Temperature in K
- 'mlf::Array{Float64,1}' : species mole fractions
IdealGas.create_thermo
— MethodFunction to create thermo object. The function reads the therm.dat file and parses the content based on the ideal gas object to create the thermo data object The function returns SpeciesThermoObj
Usage:
create_thermo(species::Array{T,1}, thermo_file::AbstractString )
- species : Array of species names
- thermo_file : name of the thermo file including the path
IdealGas.get_element_weight
— Methodgetelementweight(el)
function to return the element weights
Usage:
get_element_weight(el)
- 'el::String' : Element name
IdealGas.nernst
— MethodFunction to calculate the Nernst potential for H2 oxidation
Usage:
nernst(E0, T; pH2, pO2, pH2O)
- E0 : standard potential for H2 oxidation
- T : Temperature in K
- pH2 : Partial pressure of H2 (Pa)
- pO2 : Partial pressure of O2 (Pa)
- pH2O : Partial pressure of H2O (Pa)
IdealGas.nernst_co
— MethodFunction to calculate the Nernst potential for CO oxidation
Usage:
nernst(E0, T; pCO, pO2, pCO2)
- E0 : standard potential for CO oxidation
- T : Temperature in K
- pCO : Partial pressure of CO (Pa)
- pO2 : Partial pressure of O2 (Pa)
- pCO2 : Partial pressure of CO2 (Pa)
IdealGas.parase_thermo_species_data
— MethodFunction for parsing the first line of thermo data. It returns the species name, phase, molecular weight, high temperature, low temperature and Common temperature limits Not for external calls
Usage:
parase_thermo_species_data(data_string)
IdealGas.parse_thermo_polynomials
— MethodThis function will parse the polynomials Not for external calls