Burnman has a number of functions and classes which deal with the thermodynamics of single phases and aggregates.
Evaluate the Debye function. Takes the parameter xi = Debye_T/T
Evaluate the Debye function using a Chebyshev series expansion coupled with asymptotic solutions of the function. Shamelessly adapted from the GSL implementation of the same function (Itself adapted from Collected Algorithms from ACM). Should give the same result as debye_fn(x) to near machineprecision.
Entropy due to lattice vibrations in the Debye model [J/K]
Heat capacity at constant volume. In J/K/mol
Helmholtz free energy of lattice vibrations in the Debye model. It is important to note that this does NOT include the zero point energy of vibration for the lattice. As long as you are calculating relative differences in F, this should cancel anyways. In Joules.
calculate the thermal energy of a substance. Takes the temperature, the Debye temperature, and n, the number of atoms per molecule. Returns thermal energy in J/mol
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 below. In the base class all of these return zero, so if the solution model does not implement them, they essentially have no effect, and then the Gibbs free energy and molar volume of a solid solution are just the weighted arithmetic averages of the different endmember values.
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
temperature : float
molar_fractions : list of floats


Returns:  G_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  partial_G_excess : numpy array

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
temperature : float
molar_fractions : list of floats


Returns:  V_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  H_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  S_excess : float

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.
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
temperature : float
molar_fractions : list of floats


Returns:  H_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  S_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  G_excess : float

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
temperature : float
molar_fractions : list of floats


Returns:  V_excess : float

Bases: burnman.solutionmodel.IdealSolution
Solution model implementing the asymmetric regular solution model formulation (Holland and Powell, 2003)
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
temperature : float
molar_fractions : list of floats


Returns:  G_excess : float

Bases: burnman.solutionmodel.AsymmetricRegularSolution
Solution model implementing the symmetric regular solution model
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
temperature : float
molar_fractions : list of floats


Returns:  G_excess : float

Bases: burnman.solutionmodel.IdealSolution
Solution model implementing the subregular solution model formulation (Helffrich and Wood, 1989)
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
temperature : float
molar_fractions : list of floats


Returns:  G_excess : float

A simple function to read a file with a two column list of elements and their masses into a dictionary
A function to read a chemical formula string and convert it into a dictionary
A function to take chemical formula and atomic mass dictionaries and
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.
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


Returns:  solution_formulae : list of dictionaries
n_sites : integer
sites : list of lists of strings
n_occupancies : integer
endmember_occupancies : 2d array of floats
site_multiplicities : array of floats

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


Returns:  component_potentials : array of floats

Parameters:  standard_material: class :
assemblage: list of classes :


Returns:  fugacity : float

Parameters:  standard_material: class :
assemblage: list of classes :
reference_assemblage: list of classes :


Returns:  relative_fugacity : float
