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.ObjectRepresents a chemical compound.
Parameters: dictionary – Dictionary containing the data required to initialise the compound. -
Cp(phase, T)¶ 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’.
- T – [K] temperature
Returns: [J/mol/K] Heat capacity.
-
G(phase, T)¶ 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’.
- T – [K] temperature
Returns: [J/mol] Gibbs free energy.
-
H(phase, T)¶ 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’.
- T – [K] temperature
Returns: [J/mol] Enthalpy.
-
S(phase, T)¶ 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’.
- T – [K] temperature
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, T, 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]’.
- T – [°C] temperature
- mass – [kg]
Returns: [kWh/K] Heat capacity.
-
class
auxi.tools.chemistry.thermochemistry.CpRecord(dictionary)¶ Bases:
auxi.core.objects.ObjectA 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(T)¶ Calculate the heat capacity of the compound phase.
Parameters: T – [K] temperature Returns: [J/mol/K] Heat capacity.
-
H(T)¶ Calculate the portion of enthalpy of the compound phase covered by this Cp record.
Parameters: T – [K] temperature Returns: [J/mol] Enthalpy.
-
S(T)¶ Calculate the portion of entropy of the compound phase covered by this Cp record.
Parameters: T – [K] temperature 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, T, 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]’.
- T – [°C] temperature
- mass – [kg]
Returns: [kWh] Gibbs free energy.
-
auxi.tools.chemistry.thermochemistry.H(compound_string, T, 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]’.
- T – [°C] temperature
- mass – [kg]
Returns: [kWh] Enthalpy.
-
class
auxi.tools.chemistry.thermochemistry.Phase(dictionary)¶ Bases:
auxi.core.objects.NamedObjectA phase of a chemical compound.
Parameters: dictionary – Dictionary containing the data required to initialise the phase. -
Cp(T)¶ Calculate the heat capacity of the compound phase at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol/K] The heat capacity of the compound phase.
-
Cp_mag(T)¶ Calculate the phase’s magnetic contribution to heat capacity at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol/K] The magnetic heat capacity of the compound phase. Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4), 317–425. http://doi.org/10.1016/0364-5916(91)90030-N
-
DHref= None¶ [J/mol] The formation enthalpy of the phase at Tref.
-
G(T)¶ Calculate the heat capacity of the compound phase at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol] The Gibbs free energy of the compound phase.
-
G_mag(T)¶ Calculate the phase’s magnetic contribution to Gibbs energy at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol] The magnetic Gibbs energy of the compound phase. Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4), 317–425. http://doi.org/10.1016/0364-5916(91)90030-N
-
H(T)¶ Calculate the enthalpy of the compound phase at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol] The enthalpy of the compound phase.
-
H_mag(T)¶ Calculate the phase’s magnetic contribution to enthalpy at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol] The magnetic enthalpy of the compound phase. Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4), 317–425. http://doi.org/10.1016/0364-5916(91)90030-N
-
S(T)¶ Calculate the entropy of the compound phase at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol/K] The entropy of the compound phase.
-
S_mag(T)¶ Calculate the phase’s magnetic contribution to entropy at the specified temperature.
Parameters: T – [K] temperature Returns: [J/mol/K] The magnetic entropy of the compound phase. Dinsdale, A. T. (1991). SGTE data for pure elements. Calphad, 15(4), 317–425. http://doi.org/10.1016/0364-5916(91)90030-N
-
Sref= None¶ [J/mol/K] The standard entropy of the phase at Tref.
-
Tc_mag= None¶ The critical temperature, which is the Curie temperature for ferromagnetic materials or the Neel temperature for antiferromagnetic materials.
-
Tref= None¶ [K] The reference temperature of the phase.
-
Zero_mag(T)¶ Return a zero value for a phase with no magnetic property data.
Parameters: T – [K] temperature Returns: Zero.
-
beta0_mag= None¶ The average magnetic moment per atom.
-
name= None¶ The phase’s name, e.g. solid, liquid, gas, etc.
-
p_mag= None¶ This value can be thought of as the fraction of the magnetic enthalpy absorbed above the critical. It depends on structure.
-
symbol= None¶ The phase’s symbol, e.g. S1 = solid 1, L = liquid, etc.
-
-
auxi.tools.chemistry.thermochemistry.S(compound_string, T, 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]’.
- T – [°C] temperature
- 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.