Burcat

This module extracts the information provided in Third Millennium Ideal Gas and Condensed Phase Thermochemical Database for Combustion with Updates from Active Thermochemical Tables by A. Burcat and B. Ruscic. It needs the actual database BURCAT_THR.xml to run, which is already included in the thermochem library.

class thermochem.burcat.Element(formula, Tmin_, _Tmax, mm, hfr, elements)[source]

This is a helper class. It is intended to be created via an Elementdb object but it can be used on its own. Take a look at Elementdb class for example usage.

Units are in standard units: K, J, kg. Conversion functions are provided in the external units module.

One extra feature not explained in Elementdb documentation is that it contains the number of each atom, useful for computing chemical reactions.

>>> db = Elementdb()
>>> weird = db.getelementdata("C8H6O2")
>>> print(weird.elements)
[('C', 8), ('H', 6), ('O', 2)]
cp

Computes the specific heat capacity in J/kg K at 298 K (Reference T)

cp_(T)[source]

Computes the specific heat capacity in J/kg K for a given temperature

cpo(T)[source]

Calculates the specific heat capacity in J/mol K

density(p, T)[source]

Density in kg/m³.

go(T)[source]

Computes the Gibbs free energy from the sensible enthalpy in J/mol

h(T)[source]

Computes the total enthalpy in J/kg

ho(T)[source]

Computes the sensible enthalpy in J/mol

so(T)[source]

Computes entropy in J/mol K

class thermochem.burcat.Elementdb[source]

Class that reads the Alexander Burcat’s thermochemical database for combustion.

>>> db = Elementdb()
>>> oxygen = db.getelementdata("O2 REF ELEMENT")
>>> print(oxygen)
<element> O2 REF ELEMENT
>>> print('molar mass', oxygen.mm)
molar mass 0.0319988
>>> print('heat capacity', round(oxygen.cp, 6))
heat capacity 918.078952

The reference temperature for enthalpy is 298.15 K

>>> print('entropy', round(oxygen.so(298), 6))
entropy 205.133746
>>> print('gibbs free energy', round(oxygen.go(298), 6))
gibbs free energy -61134.262901

There’s a search function. It is very useful because some names are a bit tricky. Well, not this one.

>>> db.search("AIR")
['AIR']
>>> air = db.getelementdata("AIR")
>>> print('air molar mass', air.mm)
air molar mass 0.02896518
>>> print('heat capacity', round(air.cp, 6))
heat capacity 1004.776251
>>> print(round(air.density(101325, 298), 6))
1.184519

The element database can create also mixtures. It returns an instance of Mixture object that can give you the same as the Element class for any mixture.

>>> mix = db.getmixturedata([("O2 REF ELEMENT", 20.9476),    ("N2  REF ELEMENT", 78.084),    ("CO2", 0.0319),    ("AR REF ELEMENT", 0.9365),    ])
>>> print(mix)
<Mixture>:
    O2 REF ELEMENT at 20.9476
    N2  REF ELEMENT at 78.084
    CO2 at 0.0319
    AR REF ELEMENT at 0.9365
>>> print(round(mix.cp, 6))
1004.722171
>>> print(round(mix.mm, 6))
0.028965
getelementdata(formula)[source]

Returns an element instance given the name of the element.

getmixturedata(components)[source]

Creates a mixture of components given a list of tuples containing the formula and the volume percent

search(formula)[source]

List all the species containing a string. Helpful for interactive use of the database.

class thermochem.burcat.Mixture(config='vol')[source]

Class that models a gas mixture. Currently, only volume (molar) compositions are supported.

You can iterate through all its elements. The item returned is a tuple containing the element and the amount.

>>> db = Elementdb()
>>> mix = db.getmixturedata([("O2 REF ELEMENT", 20.9476),    ("N2  REF ELEMENT", 78.084),    ("CO2", 0.0319),    ("AR REF ELEMENT", 0.9365),    ])
>>> mix_list = [(e[0], round(e[1], 6)) for e in mix]
>>> for e in mix_list: print(e)
(<element> O2 REF ELEMENT, 20.9476)
(<element> N2  REF ELEMENT, 78.084)
(<element> CO2, 0.0319)
(<element> AR REF ELEMENT, 0.9365)

You can get elements either by index or by value.

>>> print(mix['CO2'])
(<element> CO2, 0.0319)

You can also delete components of a mixture. Needed by the MoistAir class

>>> mix.delete('CO2')
>>> print(mix)
<Mixture>:
    O2 REF ELEMENT at 20.9476
    N2  REF ELEMENT at 78.084
    AR REF ELEMENT at 0.9365
add(component, prop)[source]

Add a component to the mixture

cp

Computes the heat capacity at room temperature, 298.15K. Results in J/kg K.

cp_(T)[source]

Computes the heat capacity at a given temperature in J/kg K.

delete(formula)[source]

Delete a formula from the mixture

density(p, T)[source]

Computes the density for a given mix of gases in kg/m³

The equivalent R for a mix is \(R_m = \frac{R_u}{M_n}\), where \(M_n\) is the equivalent molar mass for the mix.

extensive(attr, T)[source]

Computes the extensive value for a mix. Remember that an extensive value depends on the amount of matter. Enthalpy and volume are extensive values.

\[ext = \frac{1}{N_m M_m} \sum_i N_i M_i ext_i\]
go(T)[source]

Estimate the Gibbs free energy using the sensible enthalpy of the mixture in J/mol.

h(T)[source]

Estimate the total enthalpy of the mixture in J/kg.

ho(T)[source]

Estimate the sensible enthalpy of the mixture in J/mol.

mm

Computes the equivalent molar mass for a mix

\[M_m = \frac{1}{N_m} \sum_i N_i M_i\]
so(T)[source]

Estimate the entropy of the mixture in J/mol K.