Thermodynamics¶
Burnman has a number of functions and classes which deal with the thermodynamics of single phases and aggregates.
Lattice Vibrations¶
Debye model¶
Solution models¶

class
burnman.solutionmodel.
SolutionModel
[source]¶ Bases:
object
This is the base class for a solution model, intended for use in defining solid solutions and performing thermodynamic calculations on them. All minerals of type
burnman.SolidSolution
use a solution model for defining how the endmembers in the solid solution interact.A user wanting a new solution model should define the functions included in the base class. All of the functions in the base class return zero, so if the userdefined solution model does not implement them, they essentially have no effect, and the Gibbs free energy and molar volume of a solid solution will be equal to the weighted arithmetic averages of the different endmember values.

excess_gibbs_free_energy
(pressure, temperature, molar_fractions)[source]¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: G_excess : float
The excess Gibbs free energy

excess_partial_gibbs_free_energies
(pressure, temperature, molar_fractions)[source]¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy for each endmember of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: partial_G_excess : numpy array
The excess Gibbs free energy of each endmember

excess_volume
(pressure, temperature, molar_fractions)[source]¶ Given a list of molar fractions of different phases, compute the excess volume of the solution. The base class implementation assumes that the excess volume is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: V_excess : float
The excess volume of the solution

excess_enthalpy
(pressure, temperature, molar_fractions)[source]¶ Given a list of molar fractions of different phases, compute the excess enthalpy of the solution. The base class implementation assumes that the excess enthalpy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: H_excess : float
The excess enthalpy of the solution

excess_entropy
(pressure, temperature, molar_fractions)[source]¶ Given a list of molar fractions of different phases, compute the excess entropy of the solution. The base class implementation assumes that the excess entropy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: S_excess : float
The excess entropy of the solution


class
burnman.solutionmodel.
MechanicalSolution
(endmembers)[source]¶ Bases:
burnman.solutionmodel.SolutionModel
An extremely simple class representing a mechanical solution model. A mechanical solution experiences no interaction between endmembers. Therefore, unlike ideal solutions there is no entropy of mixing; the total gibbs free energy of the solution is equal to the dot product of the molar gibbs free energies and molar fractions of the constituent materials.

class
burnman.solutionmodel.
IdealSolution
(endmembers)[source]¶ Bases:
burnman.solutionmodel.SolutionModel
A very simple class representing an ideal solution model. Calculate the excess gibbs free energy due to configurational entropy, all the other excess terms return zero.

excess_enthalpy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess enthalpy of the solution. The base class implementation assumes that the excess enthalpy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: H_excess : float
The excess enthalpy of the solution

excess_entropy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess entropy of the solution. The base class implementation assumes that the excess entropy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: S_excess : float
The excess entropy of the solution

excess_gibbs_free_energy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: G_excess : float
The excess Gibbs free energy

excess_volume
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess volume of the solution. The base class implementation assumes that the excess volume is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: V_excess : float
The excess volume of the solution


class
burnman.solutionmodel.
AsymmetricRegularSolution
(endmembers, alphas, energy_interaction, volume_interaction=None, entropy_interaction=None)[source]¶ Bases:
burnman.solutionmodel.IdealSolution
Solution model implementing the asymmetric regular solution model formulation as described in [HollandPowell03].

excess_gibbs_free_energy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: G_excess : float
The excess Gibbs free energy


class
burnman.solutionmodel.
SymmetricRegularSolution
(endmembers, energy_interaction, volume_interaction=None, entropy_interaction=None)[source]¶ Bases:
burnman.solutionmodel.AsymmetricRegularSolution
Solution model implementing the symmetric regular solution model. This is simply a special case of the
burnman.solutionmodel.AsymmetricRegularSolution
class.
activities
(pressure, temperature, molar_fractions)¶

activity_coefficients
(pressure, temperature, molar_fractions)¶

excess_enthalpy
(pressure, temperature, molar_fractions)¶

excess_entropy
(pressure, temperature, molar_fractions)¶

excess_gibbs_free_energy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: G_excess : float
The excess Gibbs free energy

excess_partial_gibbs_free_energies
(pressure, temperature, molar_fractions)¶

excess_volume
(pressure, temperature, molar_fractions)¶


class
burnman.solutionmodel.
SubregularSolution
(endmembers, energy_interaction, volume_interaction=None, entropy_interaction=None)[source]¶ Bases:
burnman.solutionmodel.IdealSolution
Solution model implementing the subregular solution model formulation as described in [HW89].

excess_gibbs_free_energy
(pressure, temperature, molar_fractions)¶ Given a list of molar fractions of different phases, compute the excess Gibbs free energy of the solution. The base class implementation assumes that the excess gibbs free energy is zero.
Parameters: pressure : float
Pressure at which to evaluate the solution model. [Pa]
temperature : float
Temperature at which to evaluate the solution. [K]
molar_fractions : list of floats
List of molar fractions of the different endmembers in solution
Returns: G_excess : float
The excess Gibbs free energy

Chemistry parsing¶

burnman.processchemistry.
read_masses
()[source]¶ A simple function to read a file with a two column list of elements and their masses into a dictionary

burnman.processchemistry.
dictionarize_formula
(formula)[source]¶ A function to read a chemical formula string and convert it into a dictionary

burnman.processchemistry.
formula_mass
(formula)[source]¶ A function to take chemical formula and atomic mass dictionaries and compute the formula mass.

burnman.processchemistry.
dictionarize_site_formula
(formula)[source]¶ A function to take a chemical formula with sites specified by square brackets and return a standard dictionary with element keys and atoms of each element per formula unit as items.

burnman.processchemistry.
process_solution_chemistry
(formulae)[source]¶ This function parses a set of endmember formulae containing site information, e.g.
[ ‘[Mg]3[Al]2Si3O12’, ‘[Mg]3[Mg1/2Si1/2]2Si3O12’ ]It outputs the bulk composition of each endmember (removing the site information), and also a set of variables and arrays which contain the site information. These are output in a format that can easily be used to calculate activities and gibbs free energies, given molar fractions of the phases and pressure and temperature where necessary.
Parameters: formulae : list of strings
List of chemical formulae with site information
Returns: solution_formulae : list of dictionaries
List of endmember formulae is output from site formula strings
n_sites : integer
Number of sites in the solid solution. Should be the same for all endmembers.
sites : list of lists of strings
A list of elements for each site in the solid solution
n_occupancies : integer
Sum of the number of possible elements on each of the sites in the solid solution. Example: A binary solution [[A][B],[B][C1/2D1/2]] would have n_occupancies = 5, with two possible elements on Site 1 and three on Site 2
endmember_occupancies : 2d array of floats
A 1D array for each endmember in the solid solution, containing the number of atoms of each element on each site.
site_multiplicities : array of floats
The number of each site per formula unit To simplify computations later, the multiplicities are repeated for each element on each site
Chemical potentials¶

burnman.chemicalpotentials.
chemical_potentials
(assemblage, component_formulae)[source]¶ The compositional space of the components does not have to be a superset of the compositional space of the assemblage. Nor do they have to compose an orthogonal basis.
The components must each be described by a linear mineral combination
The mineral compositions must be linearly independent
Parameters: assemblage : list of classes
List of material classes set_method and set_state should already have been used the composition of the solid solutions should also have been set
 component_formulae : list of dictionaries
List of chemical component formula dictionaries No restriction on length
Returns: component_potentials : array of floats
Array of chemical potentials of components

burnman.chemicalpotentials.
fugacity
(standard_material, assemblage)[source]¶ Parameters: standard_material: class
Material class set_method and set_state should already have been used material must have a formula as a dictionary parameter
assemblage: list of classes
List of material classes set_method and set_state should already have been used
Returns: fugacity : float
Value of the fugacity of the component with respect to the standard material

burnman.chemicalpotentials.
relative_fugacity
(standard_material, assemblage, reference_assemblage)[source]¶ Parameters: standard_material: class
Material class set_method and set_state should already have been used material must have a formula as a dictionary parameter
assemblage: list of classes
List of material classes set_method and set_state should already have been used
reference_assemblage: list of classes
List of material classes set_method and set_state should already have been used
Returns: relative_fugacity : float
Value of the fugacity of the component in the assemblage with respect to the reference_assemblage