Solution models

Base class

class burnman.solidsolution.SolidSolution(name=None, solution_type=None, endmembers=None, energy_interaction=None, volume_interaction=None, entropy_interaction=None, alphas=None, molar_fractions=None)[source]

Bases: burnman.mineral.Mineral

This is the base class for all solid solutions. Site occupancies, endmember activities and the constant and pressure and temperature dependencies of the excess properties can be queried after using set_composition() States of the solid solution can only be queried after setting the pressure, temperature and composition using set_state().

This class is available as burnman.SolidSolution. It uses an instance of burnman.SolutionModel to calculate interaction terms between endmembers.

All the solid solution parameters are expected to be in SI units. This means that the interaction parameters should be in J/mol, with the T and P derivatives in J/K/mol and m^3/mol.

name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

get_endmembers()[source]
set_composition(molar_fractions)[source]

Set the composition for this solid solution.

Parameters:

molar_fractions: list of float

molar abundance for each endmember, needs to sum to one.

set_method(method)[source]
set_state(pressure, temperature)[source]
activities

Returns a list of endmember activities [unitless]

activity_coefficients

Returns a list of endmember activity coefficients (gamma = activity / ideal activity) [unitless]

internal_energy

Returns internal energy of the mineral [J] Aliased with self.energy

excess_partial_gibbs

Returns excess partial gibbs free energy [J] Property specific to solid solutions.

partial_gibbs

Returns excess partial gibbs free energy [J] Property specific to solid solutions.

excess_gibbs

Returns excess gibbs free energy [J] Property specific to solid solutions.

molar_gibbs

Returns Gibbs free energy of the solid solution [J] Aliased with self.gibbs

molar_helmholtz

Returns Helmholtz free energy of the solid solution [J] Aliased with self.helmholtz

molar_mass

Returns molar mass of the solid solution [kg/mol]

formula

Returns chemical formula of the solid solution

excess_volume

Returns excess volume of the solid solution [m^3/mol] Specific property for solid solutions

molar_volume

Returns molar volume of the solid solution [m^3/mol] Aliased with self.V

density

Returns density of the solid solution [kg/m^3] Aliased with self.rho

C_p

Alias for heat_capacity_p()

C_v

Alias for heat_capacity_v()

G

Alias for shear_modulus()

H

Alias for molar_enthalpy()

K_S

Alias for adiabatic_bulk_modulus()

K_T

Alias for isothermal_bulk_modulus()

P

Alias for pressure()

S

Alias for molar_entropy()

T

Alias for temperature()

V

Alias for molar_volume()

alpha

Alias for thermal_expansivity()

beta_S

Alias for adiabatic_compressibility()

beta_T

Alias for isothermal_compressibility()

debug_print(indent='')
energy

Alias for internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters:

vars_list : list of strings

Variables to be returned for given conditions

pressures : ndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperatures : ndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns:

output : array of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

excess_entropy

Returns excess entropy [J] Property specific to solid solutions.

gibbs

Alias for molar_gibbs()

gr

Alias for grueneisen_parameter()

helmholtz

Alias for molar_helmholtz()

pressure

Returns current pressure that was set with set_state().

Returns:

pressure : float

Pressure in [Pa].

Notes

  • Aliased with P().
print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

rho

Alias for density()

temperature

Returns current temperature that was set with set_state().

Returns:

temperature : float

Temperature in [K].

Notes

  • Aliased with T().
to_string()

Returns the name of the mineral class

unroll()
v_p

Alias for p_wave_velocity()

v_phi

Alias for bulk_sound_velocity()

v_s

Alias for shear_wave_velocity()

molar_entropy

Returns entropy of the solid solution [J] Aliased with self.S

excess_enthalpy

Returns excess enthalpy [J] Property specific to solid solutions.

molar_enthalpy

Returns enthalpy of the solid solution [J] Aliased with self.H

isothermal_bulk_modulus

Returns isothermal bulk modulus of the solid solution [Pa] Aliased with self.K_T

adiabatic_bulk_modulus

Returns adiabatic bulk modulus of the solid solution [Pa] Aliased with self.K_S

isothermal_compressibility

Returns isothermal compressibility of the solid solution (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.K_T

adiabatic_compressibility

Returns adiabatic compressibility of the solid solution (or inverse adiabatic bulk modulus) [1/Pa] Aliased with self.K_S

shear_modulus

Returns shear modulus of the solid solution [Pa] Aliased with self.G

p_wave_velocity

Returns P wave speed of the solid solution [m/s] Aliased with self.v_p

bulk_sound_velocity

Returns bulk sound speed of the solid solution [m/s] Aliased with self.v_phi

shear_wave_velocity

Returns shear wave speed of the solid solution [m/s] Aliased with self.v_s

grueneisen_parameter

Returns grueneisen parameter of the solid solution [unitless] Aliased with self.gr

thermal_expansivity

Returns thermal expansion coefficient (alpha) of the solid solution [1/K] Aliased with self.alpha

heat_capacity_v

Returns heat capacity at constant volume of the solid solution [J/K/mol] Aliased with self.C_v

heat_capacity_p

Returns heat capacity at constant pressure of the solid solution [J/K/mol] Aliased with self.C_p

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 user-defined 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

Solution models

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.

excess_gibbs_free_energy(pressure, temperature, molar_fractions)[source]
excess_partial_gibbs_free_energies(pressure, temperature, molar_fractions)[source]
activity_coefficients(pressure, temperature, molar_fractions)[source]
activities(pressure, temperature, molar_fractions)[source]
excess_volume(pressure, temperature, molar_fractions)[source]
excess_entropy(pressure, temperature, molar_fractions)[source]
excess_enthalpy(pressure, temperature, molar_fractions)[source]
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_partial_gibbs_free_energies(pressure, temperature, molar_fractions)[source]
activity_coefficients(pressure, temperature, molar_fractions)[source]
activities(pressure, temperature, molar_fractions)[source]
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_partial_gibbs_free_energies(pressure, temperature, molar_fractions)[source]
excess_volume(pressure, temperature, molar_fractions)[source]
excess_entropy(pressure, temperature, molar_fractions)[source]
excess_enthalpy(pressure, temperature, molar_fractions)[source]
activity_coefficients(pressure, temperature, molar_fractions)[source]
activities(pressure, temperature, molar_fractions)[source]
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_partial_gibbs_free_energies(pressure, temperature, molar_fractions)[source]
excess_volume(pressure, temperature, molar_fractions)[source]
excess_entropy(pressure, temperature, molar_fractions)[source]
excess_enthalpy(pressure, temperature, molar_fractions)[source]
activity_coefficients(pressure, temperature, molar_fractions)[source]
activities(pressure, temperature, molar_fractions)[source]
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