auxi.tools.chemistry.thermochemistry module

This module provides classes and functions for doing thermochemical calculations.

class auxi.tools.chemistry.thermochemistry.Compound(dictionary)

Bases: auxi.core.objects.Object

Represents a chemical compound.

Parameters:dictionary – Dictionary containing the data required to initialise the compound.
Cp(phase, temperature)

Calculate the heat capacity of a phase of the compound at a specified temperature.

Parameters:
  • phase – A phase of the compound, e.g. ‘S’, ‘L’, ‘G’.
  • temperature – [K]
Returns:

[J/mol/K] Heat capacity.

G(phase, temperature)

Calculate the Gibbs free energy of a phase of the compound at a specified temperature.

Parameters:
  • phase – A phase of the compound, e.g. ‘S’, ‘L’, ‘G’.
  • temperature – [K]
Returns:

[J/mol] Gibbs free energy.

H(phase, temperature)

Calculate the enthalpy of a phase of the compound at a specified temperature.

Parameters:
  • phase – A phase of the compound, e.g. ‘S’, ‘L’, ‘G’.
  • temperature – [K]
Returns:

[J/mol] Enthalpy.

S(phase, temperature)

Calculate the enthalpy of a phase of the compound at a specified temperature.

Parameters:
  • phase – A phase of the compound, e.g. ‘S’, ‘L’, ‘G’.
  • temperature – [K]
Returns:

[J/mol/K] Entropy.

formula = None

Chemical formula, e.g. ‘Fe’, ‘CO2’.

get_phase_list()

Get a list of the compound’s phases.

Returns:List of phases.
get_reference()
molar_mass = None

Molar mass. [kg/mol]

auxi.tools.chemistry.thermochemistry.Cp(compound_string, temperature, mass=1.0)

Calculate the heat capacity of the compound for the specified temperature and mass.

Parameters:
  • compound_string – Formula and phase of chemical compound, e.g. ‘Fe2O3[S1]’.
  • temperature – [°C]
  • mass – [kg]
Returns:

[kWh/K] Heat capacity.

class auxi.tools.chemistry.thermochemistry.CpRecord(dictionary)

Bases: auxi.core.objects.Object

A heat capacity (Cp) equation record for a compound phase over a specific temperature range.

Parameters:dictionary – A dictionary containing the data required to initialise the phase.
Cp(temperature)

Calculate the heat capacity of the compound phase.

Parameters:temperature – [K]
Returns:[J/mol/K] Heat capacity.
H(temperature)

Calculate the portion of enthalpy of the compound phase covered by this Cp record.

Parameters:temperature – [K]
Returns:[J/mol] Enthalpy.
S(temperature)

Calculate the portion of entropy of the compound phase covered by this Cp record.

Parameters:temperature – [K]
Returns:Entropy. [J/mol/K]
Tmax = None

[K] The maximum temperature of the range covered by this record.

Tmin = None

[K] The minimum temperature of the range covered by this record.

auxi.tools.chemistry.thermochemistry.G(compound_string, temperature, mass=1.0)

Calculate the Gibbs free energy of the compound for the specified temperature and mass.

Parameters:
  • compound_string – Formula and phase of chemical compound, e.g. ‘Fe2O3[S1]’.
  • temperature – [°C]
  • mass – [kg]
Returns:

[kWh] Gibbs free energy.

auxi.tools.chemistry.thermochemistry.H(compound_string, temperature, mass=1.0)

Calculate the enthalpy of the compound for the specified temperature and mass.

Parameters:
  • compound_string – Formula and phase of chemical compound, e.g. ‘Fe2O3[S1]’.
  • temperature – [°C]
  • mass – [kg]
Returns:

[kWh] Enthalpy.

class auxi.tools.chemistry.thermochemistry.Phase(dictionary)

Bases: auxi.core.objects.NamedObject

A phase of a chemical compound.

Parameters:dictionary – Dictionary containing the data required to initialise the phase.
Cp(temperature)

Calculate the heat capacity of the compound phase at the specified temperature.

Parameters:temperature – [K]
Returns:[J/mol/K] The heat capacity of the compound phase.
DHref = None

[J/mol] The formation enthalpy of the phase at Tref.

G(temperature)

Calculate the heat capacity of the compound phase at the specified temperature.

Parameters:temperature – [K]
Returns:[J/mol] The Gibbs free energy of the compound phase.
H(temperature)

Calculate the enthalpy of the compound phase at the specified temperature.

Parameters:temperature – [K]
Returns:[J/mol] The enthalpy of the compound phase.
S(temperature)

Calculate the entropy of the compound phase at the specified temperature.

Parameters:temperature – [K]
Returns:[J/mol/K] The entropy of the compound phase.
Sref = None

[J/mol/K] The standard entropy of the phase at Tref.

Tref = None

[K] The reference temperature of the phase.

name = None

The phase’s name, e.g. solid, liquid, gas, etc.

symbol = None

The phase’s symbol, e.g. S1 = solid 1, L = liquid, etc.

auxi.tools.chemistry.thermochemistry.S(compound_string, temperature, mass=1.0)

Calculate the entropy of the compound for the specified temperature and mass.

Parameters:
  • compound_string – Formula and phase of chemical compound, e.g. ‘Fe2O3[S1]’.
  • temperature – [°C]
  • mass – [kg]
Returns:

[kWh/K] Entropy.

auxi.tools.chemistry.thermochemistry.get_datafile_references()

Retrieve all the references used by the datafiles.

auxi.tools.chemistry.thermochemistry.list_compounds()

List all compounds that are currently loaded in the thermo module, and their phases.

auxi.tools.chemistry.thermochemistry.load_data_auxi(path='')

Load all the thermochemical data auxi files located at a path.

Parameters:path – Path at which the data files are located.
auxi.tools.chemistry.thermochemistry.load_data_factsage(path='')

Load all the thermochemical data factsage files located at a path.

Parameters:path – Path at which the data files are located.
auxi.tools.chemistry.thermochemistry.molar_mass(compound)

Determine the molar mass of a chemical compound.

Parameters:compound – Formula of a chemical compound, e.g. ‘Fe2O3’.
Returns:[kg/mol] Molar mass.
auxi.tools.chemistry.thermochemistry.write_compound_to_auxi_file(directory, compound)

Writes a compound to an auxi file at the specified directory.

Parameters:
  • dir – The directory.
  • compound – The compound.