Materials#

Burnman operates on materials (type Material) most prominently in the form of minerals (Mineral) and composites (Composite).

Material Base Class#

class burnman.Material[source]#

Bases: object

Base class for all materials. The main functionality is unroll() which returns a list of objects of type Mineral and their molar fractions. This class is available as burnman.Material.

The user needs to call set_method() (once in the beginning) and set_state() before querying the material with unroll() or density().

property 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.

set_method(method)[source]#

Set the averaging method. See Averaging Schemes for details.

Note

Needs to be implemented in derived classes.

to_string()[source]#

Returns a human-readable name of this material. The default implementation will return the name of the class, which is a reasonable default.

Returns:

A human-readable name of the material.

Return type:

str

debug_print(indent='')[source]#

Print a human-readable representation of this Material.

print_minerals_of_current_state()[source]#

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.

set_state(pressure, temperature)[source]#

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])[source]#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

reset()[source]#

Resets all cached material properties.

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

copy()[source]#
unroll()[source]#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

evaluate(vars_list, pressures, temperatures, molar_fractions=None)[source]#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)[source]#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property molar_internal_energy#

Returns the molar internal energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with energy().

Returns:

The internal energy in [J/mol].

Return type:

float

property molar_gibbs#

Returns the molar Gibbs free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gibbs().

Returns:

Gibbs free energy in [J/mol].

Return type:

float

property molar_helmholtz#

Returns the molar Helmholtz free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with helmholtz().

Returns:

Helmholtz free energy in [J/mol].

Return type:

float

property molar_mass#

Returns molar mass of the mineral.

Note

Needs to be implemented in derived classes.

Returns:

Molar mass in [kg/mol].

Return type:

float

property molar_volume#

Returns molar volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with V().

Returns:

Molar volume in [m^3/mol].

Return type:

float

property density#

Returns the density of this material.

Note

Needs to be implemented in derived classes. Aliased with rho().

Returns:

The density of this material in [kg/m^3].

Return type:

float

property molar_entropy#

Returns molar entropy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with S().

Returns:

Entropy in [J/K/mol].

Return type:

float

property molar_enthalpy#

Returns molar enthalpy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with H().

Returns:

Enthalpy in [J/mol].

Return type:

float

property isothermal_bulk_modulus_reuss#

Returns isothermal bulk modulus of the material.

Note

Needs to be implemented in derived classes. Aliased with K_T().

Returns:

Isothermal bulk modulus in [Pa].

Return type:

float

property isentropic_bulk_modulus_reuss#

Returns the adiabatic bulk modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with K_S().

Returns:

Adiabatic bulk modulus in [Pa].

Return type:

float

property isothermal_compressibility_reuss#

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_T().

Returns:

Isothermal compressibility in [1/Pa].

Return type:

float

property isentropic_compressibility_reuss#

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_S().

Returns:

Adiabatic compressibility in [1/Pa].

Return type:

float

property shear_modulus#

Returns shear modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with beta_G().

Returns:

Shear modulus in [Pa].

Return type:

float

property p_wave_velocity#

Returns P wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_p().

Returns:

P wave speed in [m/s].

Return type:

float

property bulk_sound_velocity#

Returns bulk sound speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_phi().

Returns:

Bulk sound velocity in [m/s].

Return type:

float

property shear_wave_velocity#

Returns shear wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_s().

Returns:

Shear wave speed in [m/s].

Return type:

float

property grueneisen_parameter#

Returns the grueneisen parameter of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gr().

Returns:

Grueneisen parameter [unitless].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the mineral.

Note

Needs to be implemented in derived classes. Aliased with alpha().

Returns:

Thermal expansivity in [1/K].

Return type:

float

property molar_heat_capacity_v#

Returns molar heat capacity at constant volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_v().

Returns:

Isochoric heat capacity in [J/K/mol].

Return type:

float

property molar_heat_capacity_p#

Returns molar heat capacity at constant pressure of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_p().

Returns:

Isobaric heat capacity in [J/K/mol].

Return type:

float

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property P#

Alias for pressure()

property T#

Alias for temperature()

property energy#

Alias for molar_internal_energy()

property helmholtz#

Alias for molar_helmholtz()

property gibbs#

Alias for molar_gibbs()

property V#

Alias for molar_volume()

property rho#

Alias for density()

property S#

Alias for molar_entropy()

property H#

Alias for molar_enthalpy()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

property beta_S#

Alias for isentropic_compressibility_reuss()

property G#

Alias for shear_modulus()

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

property gr#

Alias for grueneisen_parameter()

property alpha#

Alias for thermal_expansivity()

property C_v#

Alias for molar_heat_capacity_v()

property C_p#

Alias for molar_heat_capacity_p()

Perple_X Class#

class burnman.PerplexMaterial(tab_file, name='Perple_X material')[source]#

Bases: Material

This is the base class for a PerpleX material. States of the material can only be queried after setting the pressure and temperature using set_state().

Instances of this class are initialised with a 2D PerpleX tab file. This file should be in the standard format (as output by werami), and should have columns with the following names: ‘rho,kg/m3’, ‘alpha,1/K’, ‘beta,1/bar’, ‘Ks,bar’, ‘Gs,bar’, ‘v0,km/s’, ‘vp,km/s’, ‘vs,km/s’, ‘s,J/K/kg’, ‘h,J/kg’, ‘cp,J/K/kg’, ‘V,J/bar/mol’. The order of these names is not important.

Properties of the material are determined by linear interpolation from the PerpleX grid. They are all returned in SI units on a molar basis, even though the PerpleX tab file is not in these units.

This class is available as burnman.PerplexMaterial.

property 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.

set_state()#

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

property molar_volume#

Returns molar volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with V().

Returns:

Molar volume in [m^3/mol].

Return type:

float

property molar_enthalpy#

Returns molar enthalpy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with H().

Returns:

Enthalpy in [J/mol].

Return type:

float

property molar_entropy#

Returns molar entropy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with S().

Returns:

Entropy in [J/K/mol].

Return type:

float

property isothermal_bulk_modulus_reuss#

Returns isothermal bulk modulus of the material.

Note

Needs to be implemented in derived classes. Aliased with K_T().

Returns:

Isothermal bulk modulus in [Pa].

Return type:

float

property isentropic_bulk_modulus_reuss#

Returns the adiabatic bulk modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with K_S().

Returns:

Adiabatic bulk modulus in [Pa].

Return type:

float

property molar_heat_capacity_p#

Returns molar heat capacity at constant pressure of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_p().

Returns:

Isobaric heat capacity in [J/K/mol].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the mineral.

Note

Needs to be implemented in derived classes. Aliased with alpha().

Returns:

Thermal expansivity in [1/K].

Return type:

float

property shear_modulus#

Returns shear modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with beta_G().

Returns:

Shear modulus in [Pa].

Return type:

float

property p_wave_velocity#

Returns P wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_p().

Returns:

P wave speed in [m/s].

Return type:

float

property bulk_sound_velocity#

Returns bulk sound speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_phi().

Returns:

Bulk sound velocity in [m/s].

Return type:

float

property shear_wave_velocity#

Returns shear wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_s().

Returns:

Shear wave speed in [m/s].

Return type:

float

property molar_gibbs#

Returns the molar Gibbs free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gibbs().

Returns:

Gibbs free energy in [J/mol].

Return type:

float

property molar_mass#

Returns molar mass of the mineral.

Note

Needs to be implemented in derived classes.

Returns:

Molar mass in [kg/mol].

Return type:

float

property density#

Returns the density of this material.

Note

Needs to be implemented in derived classes. Aliased with rho().

Returns:

The density of this material in [kg/m^3].

Return type:

float

property molar_internal_energy#

Returns the molar internal energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with energy().

Returns:

The internal energy in [J/mol].

Return type:

float

property molar_helmholtz#

Returns the molar Helmholtz free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with helmholtz().

Returns:

Helmholtz free energy in [J/mol].

Return type:

float

property isothermal_compressibility_reuss#

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_T().

Returns:

Isothermal compressibility in [1/Pa].

Return type:

float

property isentropic_compressibility_reuss#

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_S().

Returns:

Adiabatic compressibility in [1/Pa].

Return type:

float

property molar_heat_capacity_v#

Returns molar heat capacity at constant volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_v().

Returns:

Isochoric heat capacity in [J/K/mol].

Return type:

float

property grueneisen_parameter#

Returns the grueneisen parameter of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gr().

Returns:

Grueneisen parameter [unitless].

Return type:

float

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

copy()#
debug_print(indent='')#

Print a human-readable representation of this Material.

property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_method(method)#

Set the averaging method. See Averaging Schemes for details.

Note

Needs to be implemented in derived classes.

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

to_string()#

Returns a human-readable name of this material. The default implementation will return the name of the class, which is a reasonable default.

Returns:

A human-readable name of the material.

Return type:

str

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

Minerals#

Endmembers#

class burnman.Mineral(params=None, property_modifiers=None)[source]#

Bases: Material

This is the base class for all minerals. States of the mineral can only be queried after setting the pressure and temperature using set_state(). The method for computing properties of the material is set using set_method(). This is done during initialisation if the param ‘equation_of_state’ has been defined. The method can be overridden later by the user.

This class is available as burnman.Mineral.

If deriving from this class, set the properties in self.params to the desired values. For more complicated materials you can overwrite set_state(), change the params and then call set_state() from this class.

All the material parameters are expected to be in plain SI units. This means that the elastic moduli should be in Pascals and NOT Gigapascals, and the Debye temperature should be in K not C. Additionally, the reference volume should be in m^3/(mol molecule) and not in unit cell volume and ‘n’ should be the number of atoms per molecule. Frequently in the literature the reference volume is given in Angstrom^3 per unit cell. To convert this to m^3/(mol of molecule) you should multiply by 10^(-30) * N_a / Z, where N_a is Avogadro’s number and Z is the number of formula units per unit cell. You can look up Z in many places, including www.mindat.org

property 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.

set_method(equation_of_state)[source]#

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

to_string()[source]#

Returns the name of the mineral class

debug_print(indent='')[source]#

Print a human-readable representation of this Material.

unroll()[source]#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

set_state()#

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

property molar_gibbs#

Returns the molar Gibbs free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gibbs().

Returns:

Gibbs free energy in [J/mol].

Return type:

float

property molar_volume#

Returns molar volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with V().

Returns:

Molar volume in [m^3/mol].

Return type:

float

property molar_entropy#

Returns molar entropy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with S().

Returns:

Entropy in [J/K/mol].

Return type:

float

property isothermal_bulk_modulus_reuss#

Returns isothermal bulk modulus of the material.

Note

Needs to be implemented in derived classes. Aliased with K_T().

Returns:

Isothermal bulk modulus in [Pa].

Return type:

float

property molar_heat_capacity_p#

Returns molar heat capacity at constant pressure of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_p().

Returns:

Isobaric heat capacity in [J/K/mol].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the mineral.

Note

Needs to be implemented in derived classes. Aliased with alpha().

Returns:

Thermal expansivity in [1/K].

Return type:

float

property shear_modulus#

Returns shear modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with beta_G().

Returns:

Shear modulus in [Pa].

Return type:

float

property formula#

Returns the chemical formula of the Mineral class

property molar_mass#

Returns molar mass of the mineral.

Note

Needs to be implemented in derived classes.

Returns:

Molar mass in [kg/mol].

Return type:

float

property density#

Returns the density of this material.

Note

Needs to be implemented in derived classes. Aliased with rho().

Returns:

The density of this material in [kg/m^3].

Return type:

float

property molar_internal_energy#

Returns the molar internal energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with energy().

Returns:

The internal energy in [J/mol].

Return type:

float

property molar_helmholtz#

Returns the molar Helmholtz free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with helmholtz().

Returns:

Helmholtz free energy in [J/mol].

Return type:

float

property molar_enthalpy#

Returns molar enthalpy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with H().

Returns:

Enthalpy in [J/mol].

Return type:

float

property isentropic_bulk_modulus_reuss#

Returns the adiabatic bulk modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with K_S().

Returns:

Adiabatic bulk modulus in [Pa].

Return type:

float

property isothermal_compressibility_reuss#

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_T().

Returns:

Isothermal compressibility in [1/Pa].

Return type:

float

property isentropic_compressibility_reuss#

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_S().

Returns:

Adiabatic compressibility in [1/Pa].

Return type:

float

property p_wave_velocity#

Returns P wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_p().

Returns:

P wave speed in [m/s].

Return type:

float

property bulk_sound_velocity#

Returns bulk sound speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_phi().

Returns:

Bulk sound velocity in [m/s].

Return type:

float

property shear_wave_velocity#

Returns shear wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_s().

Returns:

Shear wave speed in [m/s].

Return type:

float

property grueneisen_parameter#

Returns the grueneisen parameter of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gr().

Returns:

Grueneisen parameter [unitless].

Return type:

float

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

copy()#
property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property molar_heat_capacity_v#

Returns molar heat capacity at constant volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_v().

Returns:

Isochoric heat capacity in [J/K/mol].

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

Solutions#

class burnman.Solution(name=None, solution_model=None, molar_fractions=None)[source]#

Bases: Mineral

This is the base class for all 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 solution can only be queried after setting the pressure, temperature and composition using set_state().

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

All the 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.

The parameters are relevant to all solution models. Please see the documentation for individual models for details about other parameters.

Parameters:
  • name (string) – Name of the solution.

  • solution_model (burnman.SolutionModel) – The SolutionModel object defining the properties of the solution.

  • molar_fractions (numpy.array) – The molar fractions of each endmember in the solution. Can be reset using the set_composition() method.

property 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.

property endmembers[source]#
set_composition(molar_fractions)[source]#

Set the composition for this solution. Resets cached properties.

Parameters:

molar_fractions (list of float) – Molar abundance for each endmember, needs to sum to one.

set_method(method)[source]#

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

set_state(pressure, temperature)[source]#

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

property formula#

Returns molar chemical formula of the solution. :rtype: Counter

property site_occupancies#
Returns:

The fractional occupancies of species on each site.

Return type:

list of OrderedDicts

site_formula(precision=2)[source]#
Returns the molar chemical formula of the solution with

site occupancies. For example, [Mg0.4Fe0.6]2SiO4.

Parameters:

precision (int) – Precision with which to print the site occupancies

Returns:

Molar chemical formula of the solution with site occupancies

Return type:

str

property activities#

Returns a list of endmember activities [unitless].

property activity_coefficients#

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

property molar_internal_energy#

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

property excess_partial_gibbs#

Returns excess partial molar gibbs free energy [J/mol]. Property specific to solutions.

property excess_partial_volumes#

Returns excess partial volumes [m^3]. Property specific to solutions.

property excess_partial_entropies#

Returns excess partial entropies [J/K]. Property specific to solutions.

property partial_gibbs#

Returns endmember partial molar gibbs free energy [J/mol]. Property specific to solutions.

property partial_volumes#

Returns endmember partial volumes [m^3]. Property specific to solutions.

property partial_entropies#

Returns endmember partial entropies [J/K]. Property specific to solutions.

property excess_gibbs#

Returns molar excess gibbs free energy [J/mol]. Property specific to solutions.

property gibbs_hessian#

Returns an array containing the second compositional derivative of the Gibbs free energy [J]. Property specific to solutions.

property entropy_hessian#

Returns an array containing the second compositional derivative of the entropy [J/K]. Property specific to solutions.

property volume_hessian#

Returns an array containing the second compositional derivative of the volume [m^3]. Property specific to solutions.

property molar_gibbs#

Returns molar Gibbs free energy of the solution [J/mol]. Aliased with self.gibbs.

property molar_helmholtz#

Returns molar Helmholtz free energy of the solution [J/mol]. Aliased with self.helmholtz.

property molar_mass#

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

property excess_volume#

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

property molar_volume#

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

property density#

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

property excess_entropy#

Returns excess molar entropy [J/K/mol]. Property specific to solutions.

property molar_entropy#

Returns molar entropy of the solution [J/K/mol]. Aliased with self.S.

property excess_enthalpy#

Returns excess molar enthalpy [J/mol]. Property specific to solutions.

property molar_enthalpy#

Returns molar enthalpy of the solution [J/mol]. Aliased with self.H.

property isothermal_bulk_modulus_reuss#

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

property isentropic_bulk_modulus_reuss#

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

property isothermal_compressibility_reuss#

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

property isentropic_compressibility_reuss#

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

property shear_modulus#

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

property p_wave_velocity#

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

property bulk_sound_velocity#

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

property shear_wave_velocity#

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

property grueneisen_parameter#

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

property thermal_expansivity#

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

property molar_heat_capacity_v#

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

property molar_heat_capacity_p#

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

property stoichiometric_matrix[source]#

A sympy Matrix where each element M[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property stoichiometric_array[source]#

An array where each element arr[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property reaction_basis[source]#

An array where each element arr[i,j] corresponds to the number of moles of endmember[j] involved in reaction[i].

property n_reactions[source]#

The number of reactions in reaction_basis.

property compositional_basis[source]#

_summary_

Returns:

_description_

Return type:

_type_

property independent_element_indices[source]#

A list of an independent set of element indices. If the amounts of these elements are known (element_amounts), the amounts of the other elements can be inferred by -compositional_null_basis[independent_element_indices].dot(element_amounts).

property dependent_element_indices[source]#

The element indices not included in the independent list.

property compositional_null_basis[source]#

An array N such that N.b = 0 for all bulk compositions that can be produced with a linear sum of the endmembers in the solution.

property endmember_formulae[source]#

A list of formulae for all the endmember in the solution.

property endmember_names[source]#

A list of names for all the endmember in the solution.

property n_endmembers[source]#

The number of endmembers in the solution.

property elements[source]#

A list of the elements which could be contained in the solution, returned in the IUPAC element order.

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

copy()#
debug_print(indent='')#

Print a human-readable representation of this Material.

property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

to_string()#

Returns the name of the mineral class

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

burnman.SolidSolution#

alias of Solution

class burnman.ElasticSolution(name=None, solution_model=None, molar_fractions=None)[source]#

Bases: Mineral

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

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

All the solution parameters are expected to be in SI units. This means that the interaction parameters should be in J/mol, with the T and V derivatives in J/K/mol and Pa/mol.

The parameters are relevant to all Elastic solution models. Please see the documentation for individual models for details about other parameters.

Parameters:
  • name (string) – Name of the solution.

  • solution_model (burnman.ElasticSolutionModel) – The ElasticSolutionModel object defining the properties of the solution.

  • molar_fractions (numpy.array) – The molar fractions of each endmember in the solution. Can be reset using the set_composition() method.

property 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.

property endmembers[source]#
set_composition(molar_fractions)[source]#

Set the composition for this solution. Resets cached properties.

Parameters:

molar_fractions (list of float) – Molar abundance for each endmember, needs to sum to one.

set_method(method)[source]#

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

set_state(pressure, temperature)[source]#

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

property formula#

Returns molar chemical formula of the solution.

property activities#

Returns a list of endmember activities [unitless].

property activity_coefficients#

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

property molar_internal_energy#

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

property partial_gibbs#

Returns endmember partial molar Gibbs energy at constant pressure [J/mol]. Property specific to solutions.

property partial_volumes#

Returns endmember partial molar volumes [m^3/mol]. Property specific to solutions.

property partial_entropies#

Returns endmember partial molar entropies [J/K/mol]. Property specific to solutions.

property gibbs_hessian#

Returns an array containing the second compositional derivative of the Gibbs energy at constant pressure [J/mol]. Property specific to solutions.

property molar_helmholtz#

Returns molar Helmholtz energy of the solution [J/mol]. Aliased with self.helmholtz.

property molar_gibbs#

Returns molar Gibbs free energy of the solution [J/mol]. Aliased with self.gibbs.

property molar_mass#

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

property excess_pressure#

Returns excess pressure of the solution [Pa]. Specific property for solutions.

property molar_volume#

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

property density#

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

property excess_entropy#

Returns excess molar entropy [J/K/mol]. Property specific to solutions.

property molar_entropy#

Returns molar entropy of the solution [J/K/mol]. Aliased with self.S.

property excess_enthalpy#

Returns excess molar enthalpy [J/mol]. Property specific to solutions.

property molar_enthalpy#

Returns molar enthalpy of the solution [J/mol]. Aliased with self.H.

property isothermal_bulk_modulus_reuss#

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

property isentropic_bulk_modulus_reuss#

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

property isothermal_compressibility_reuss#

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

property isentropic_compressibility_reuss#

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

property shear_modulus#

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

property p_wave_velocity#

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

property bulk_sound_velocity#

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

property shear_wave_velocity#

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

property grueneisen_parameter#

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

property thermal_expansivity#

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

property molar_heat_capacity_v#

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

property molar_heat_capacity_p#

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

property stoichiometric_matrix[source]#

A sympy Matrix where each element M[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property stoichiometric_array[source]#

An array where each element arr[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property reaction_basis[source]#

An array where each element arr[i,j] corresponds to the number of moles of endmember[j] involved in reaction[i].

property n_reactions[source]#

The number of reactions in reaction_basis.

property independent_element_indices[source]#

A list of an independent set of element indices. If the amounts of these elements are known (element_amounts), the amounts of the other elements can be inferred by -compositional_null_basis[independent_element_indices].dot(element_amounts).

property dependent_element_indices[source]#

The element indices not included in the independent list.

property compositional_null_basis[source]#

An array N such that N.b = 0 for all bulk compositions that can be produced with a linear sum of the endmembers in the solution.

property endmember_formulae[source]#

A list of formulae for all the endmember in the solution.

property endmember_names[source]#

A list of names for all the endmember in the solution.

property n_endmembers[source]#

The number of endmembers in the solution.

property elements[source]#

A list of the elements which could be contained in the solution, returned in the IUPAC element order.

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

copy()#
debug_print(indent='')#

Print a human-readable representation of this Material.

property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

to_string()#

Returns the name of the mineral class

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

burnman.ElasticSolidSolution#

alias of ElasticSolution

Mineral helpers#

class burnman.classes.mineral_helpers.HelperSpinTransition(transition_pressure, ls_mat, hs_mat)[source]#

Bases: Composite

Helper class that makes a mineral that switches between two materials (for low and high spin) based on some transition pressure [Pa]

debug_print(indent='')[source]#

Print a human-readable representation of this Material.

set_state(pressure, temperature)[source]#

Update the material to the given pressure [Pa] and temperature [K].

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

property bulk_sound_velocity#

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

chemical_potential(components=None)#

Returns the chemical potentials of the currently defined components in the composite. Raises an exception if the assemblage is not equilibrated.

Parameters:

components (list of dictionaries) – List of formulae of the desired components. If not specified, the method uses the components specified by a previous call to set_components.

Returns:

The chemical potentials of the desired components in the equilibrium composite.

Return type:

numpy.array of floats

property compositional_null_basis#

An array N such that N.b = 0 for all bulk compositions that can be produced with a linear sum of the endmembers in the composite.

copy()#
property density#

Compute the density of the composite based on the molar volumes and masses Aliased with self.rho

property dependent_element_indices#

The element indices not included in the independent list.

property elements#

A list of the elements which could be contained in the composite, returned in the IUPAC element order.

property endmember_formulae#

A list of the formulae in the composite.

property endmember_names#

A list of the endmember names contained in the composite. Mineral names are returned as given in Mineral.name. Solution endmember names are given in the format Mineral.name in Solution.name.

property endmember_partial_gibbs#

Returns the partial Gibbs energies for all the endmember minerals in the Composite

property endmembers_per_phase#

A list of integers corresponding to the number of endmembers stored within each phase.

property energy#

Alias for molar_internal_energy()

property equilibrated#

Returns True if the reaction affinities are all zero within a given tolerance given by self.equilibrium_tolerance.

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property formula#

Returns molar chemical formula of the composite

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property grueneisen_parameter#

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

property helmholtz#

Alias for molar_helmholtz()

property independent_element_indices#

A list of an independent set of element indices. If the amounts of these elements are known (element_amounts), the amounts of the other elements can be inferred by -compositional_null_basis[independent_element_indices].dot(element_amounts)

property isentropic_bulk_modulus_reuss#

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

property isentropic_compressibility_reuss#

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

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property isothermal_bulk_modulus_reuss#

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

property isothermal_compressibility_reuss#

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

property molar_enthalpy#

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

property molar_entropy#

Returns enthalpy of the mineral [J] Aliased with self.S

property molar_gibbs#

Returns molar Gibbs free energy of the composite [J/mol] Aliased with self.gibbs

property molar_heat_capacity_p#

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

property molar_heat_capacity_v#

Returns molar_heat capacity at constant volume of the composite [J/K/mol] Aliased with self.C_v

property molar_helmholtz#

Returns molar Helmholtz free energy of the mineral [J/mol] Aliased with self.helmholtz

property molar_internal_energy#

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

property molar_mass#

Returns molar mass of the composite [kg/mol]

property molar_volume#

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

property n_elements#

Returns the total number of distinct elements which might be in the composite.

property n_endmembers#

Returns the number of endmembers in the composite.

property n_reactions#

The number of reactions in reaction_basis.

property 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.

property p_wave_velocity#

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

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property reaction_affinities#

Returns the affinities corresponding to each reaction in reaction_basis

property reaction_basis#

An array where each element arr[i,j] corresponds to the number of moles of endmember[j] involved in reaction[i].

property reaction_basis_as_strings#

Returns a list of string representations of all the reactions in reaction_basis.

property reduced_stoichiometric_array#

The stoichiometric array including only the independent elements

reset()#

Resets all cached material properties.

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

property rho#

Alias for density()

set_averaging_scheme(averaging_scheme)#

Set the averaging scheme for the moduli in the composite. Default is set to VoigtReussHill, when Composite is initialized.

set_components(components)#

Sets the components and components_array attributes of the composite material. The components attribute is a list of dictionaries containing the chemical formulae of the components. The components_array attribute is a 2D numpy array describing the linear transformation between endmember amounts and component amounts.

The components do not need to be linearly independent, not do they need to form a complete basis set for the composite. However, it must be possible to obtain the composition of each component from a linear sum of the endmember compositions of the composite. For example, if the composite was composed of MgSiO3 and Mg2SiO4, SiO2 would be a valid component, but Si would not. The method raises an exception if any of the chemical potentials are not defined by the assemblage.

Parameters:

components (list of dictionaries) – List of formulae of the components.

set_fractions(fractions, fraction_type='molar')#

Change the fractions of the phases of this Composite. Resets cached properties

Parameters:
  • fractions – list or numpy array of floats molar or mass fraction for each phase.

  • fraction_type – ‘molar’ or ‘mass’ specify whether molar or mass fractions are specified.

set_method(method)#

set the same equation of state method for all the phases in the composite

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property shear_modulus#

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

property shear_wave_velocity#

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

property stoichiometric_array#

An array where each element arr[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property stoichiometric_matrix#

An sympy Matrix where each element M[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the composite [1/K] Aliased with self.alpha

to_string()#

return the name of the composite

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

Anisotropic materials#

class burnman.AnisotropicMaterial(rho, cijs)[source]#

Bases: Material

A base class for anisotropic elastic materials. The base class is initialised with a density and a full isentropic stiffness tensor in Voigt notation. It can then be interrogated to find the values of different properties, such as bounds on seismic velocities. There are also several functions which can be called to calculate properties along directions oriented with respect to the isentropic elastic tensor.

See [MHS11] and https://docs.materialsproject.org/methodology/elasticity/ for mathematical descriptions of each function.

property isentropic_stiffness_tensor#
property full_isentropic_stiffness_tensor#
property isentropic_compliance_tensor#
property full_isentropic_compliance_tensor#
property density#

Returns the density of this material.

Note

Needs to be implemented in derived classes. Aliased with rho().

Returns:

The density of this material in [kg/m^3].

Return type:

float

property isentropic_bulk_modulus_voigt#
Returns:

The Voigt bound on the isentropic bulk modulus [Pa].

Return type:

float

property isentropic_bulk_modulus_reuss#
Returns:

The Reuss bound on the isentropic bulk modulus [Pa].

Return type:

float

property isentropic_bulk_modulus_vrh#
Returns:

The Voigt-Reuss-Hill average of the isentropic bulk modulus [Pa].

Return type:

float

property isentropic_shear_modulus_voigt#
Returns:

The Voigt bound on the isentropic shear modulus [Pa].

Return type:

float

property isentropic_shear_modulus_reuss#
Returns:

The Reuss bound on the isentropic shear modulus [Pa].

Return type:

float

property isentropic_shear_modulus_vrh#
Returns:

The Voigt-Reuss-Hill average of the isentropic shear modulus [Pa].

Return type:

float

property isentropic_universal_elastic_anisotropy#
Returns:

The universal elastic anisotropy [unitless]

Return type:

float

property isentropic_isotropic_poisson_ratio#
Returns:

The isotropic Poisson ratio (mu) [unitless]. A metric of the lateral response to loading.

Return type:

float

christoffel_tensor(propagation_direction)[source]#
Returns:

The Christoffel tensor from an elastic stiffness tensor and a propagation direction for a seismic wave relative to the stiffness tensor: T_ik = C_ijkl n_j n_l.

Return type:

float

isentropic_linear_compressibility(direction)[source]#
Returns:

The linear isentropic compressibility in a given direction

relative to the stiffness tensor [1/Pa]. :rtype: float

isentropic_youngs_modulus(direction)[source]#
Returns:

The isentropic Youngs modulus in a given direction

relative to the stiffness tensor [Pa]. :rtype: float

isentropic_shear_modulus(plane_normal, shear_direction)[source]#
Returns:

The isentropic shear modulus on a plane in a given

shear direction relative to the stiffness tensor [Pa]. :rtype: float

isentropic_poissons_ratio(axial_direction, lateral_direction)[source]#
Returns:

The isentropic poisson ratio given loading and response

directions relative to the stiffness tensor [unitless]. :rtype: float

wave_velocities(propagation_direction)[source]#
Returns:

The compressional wave velocity, and two

shear wave velocities in a given propagation direction [m/s]. :rtype: list, containing the wave speeds and directions

of particle motion relative to the stiffness tensor

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

property bulk_sound_velocity#

Returns bulk sound speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_phi().

Returns:

Bulk sound velocity in [m/s].

Return type:

float

copy()#
debug_print(indent='')#

Print a human-readable representation of this Material.

property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property grueneisen_parameter#

Returns the grueneisen parameter of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gr().

Returns:

Grueneisen parameter [unitless].

Return type:

float

property helmholtz#

Alias for molar_helmholtz()

property isentropic_compressibility_reuss#

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_S().

Returns:

Adiabatic compressibility in [1/Pa].

Return type:

float

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property isothermal_bulk_modulus_reuss#

Returns isothermal bulk modulus of the material.

Note

Needs to be implemented in derived classes. Aliased with K_T().

Returns:

Isothermal bulk modulus in [Pa].

Return type:

float

property isothermal_compressibility_reuss#

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Note

Needs to be implemented in derived classes. Aliased with beta_T().

Returns:

Isothermal compressibility in [1/Pa].

Return type:

float

property molar_enthalpy#

Returns molar enthalpy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with H().

Returns:

Enthalpy in [J/mol].

Return type:

float

property molar_entropy#

Returns molar entropy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with S().

Returns:

Entropy in [J/K/mol].

Return type:

float

property molar_gibbs#

Returns the molar Gibbs free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gibbs().

Returns:

Gibbs free energy in [J/mol].

Return type:

float

property molar_heat_capacity_p#

Returns molar heat capacity at constant pressure of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_p().

Returns:

Isobaric heat capacity in [J/K/mol].

Return type:

float

property molar_heat_capacity_v#

Returns molar heat capacity at constant volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_v().

Returns:

Isochoric heat capacity in [J/K/mol].

Return type:

float

property molar_helmholtz#

Returns the molar Helmholtz free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with helmholtz().

Returns:

Helmholtz free energy in [J/mol].

Return type:

float

property molar_internal_energy#

Returns the molar internal energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with energy().

Returns:

The internal energy in [J/mol].

Return type:

float

property molar_mass#

Returns molar mass of the mineral.

Note

Needs to be implemented in derived classes.

Returns:

Molar mass in [kg/mol].

Return type:

float

property molar_volume#

Returns molar volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with V().

Returns:

Molar volume in [m^3/mol].

Return type:

float

property 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.

property p_wave_velocity#

Returns P wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_p().

Returns:

P wave speed in [m/s].

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_method(method)#

Set the averaging method. See Averaging Schemes for details.

Note

Needs to be implemented in derived classes.

set_state(pressure, temperature)#

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property shear_modulus#

Returns shear modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with beta_G().

Returns:

Shear modulus in [Pa].

Return type:

float

property shear_wave_velocity#

Returns shear wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_s().

Returns:

Shear wave speed in [m/s].

Return type:

float

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the mineral.

Note

Needs to be implemented in derived classes. Aliased with alpha().

Returns:

Thermal expansivity in [1/K].

Return type:

float

to_string()#

Returns a human-readable name of this material. The default implementation will return the name of the class, which is a reasonable default.

Returns:

A human-readable name of the material.

Return type:

str

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

class burnman.AnisotropicMineral(isotropic_mineral, cell_parameters, anisotropic_parameters, frame_convention=None, psi_function=None, orthotropic=None)[source]#

Bases: Mineral, AnisotropicMaterial

A class implementing the anisotropic mineral equation of state described in [Myhill22]. This class is derived from both Mineral and AnisotropicMaterial, and inherits most of the methods from these classes.

Instantiation of an AnisotropicMineral takes three required arguments; a reference Mineral (i.e. a standard isotropic mineral which provides volume as a function of pressure and temperature), cell_parameters, which give the lengths of the molar cell vectors and the angles between them (see cell_parameters_to_vectors()), and an anisotropic parameters object, which should be either a 4D array of anisotropic parameters or a dictionary of parameters which describe the anisotropic behaviour of the mineral. For a description of the physical meaning of the parameters in the 4D array, please refer to the code or to the original paper.

For non-orthotropic materials, the argument frame_convention should be set to define the orientation of the reference frame relative to the crystallographic axes (see cell_parameters_to_vectors()).

If the user chooses to define their parameters as a dictionary, they must also provide a function to the psi_function argument that describes how to compute the tensors Psi, dPsidf and dPsidPth (in Voigt form). The function arguments should be f, Pth and params, in that order. The output variables Psi, dPsidf and dPsidth must be returned in that order in a tuple. The user should also explicitly state whether the material is orthotropic or not by supplying a boolean to the orthotropic argument.

States of the mineral can only be queried after setting the pressure and temperature using set_state().

This class is available as burnman.AnisotropicMineral.

All the material parameters are expected to be in plain SI units. This means that the elastic moduli should be in Pascals and NOT Gigapascals. Additionally, the cell parameters should be in m/(mol formula unit) and not in unit cell lengths. To convert unit cell lengths given in Angstrom to molar cell parameters you should multiply by 10^(-10) * (N_a / Z)^1/3, where N_a is Avogadro’s number and Z is the number of formula units per unit cell. You can look up Z in many places, including www.mindat.org.

Finally, it is assumed that the unit cell of the anisotropic material is aligned in a particular way relative to the coordinate axes (the anisotropic_parameters are defined relative to the coordinate axes). The crystallographic a-axis is assumed to be parallel to the first spatial coordinate axis, and the crystallographic b-axis is assumed to be perpendicular to the third spatial coordinate axis.

property 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.

standard_psi_function(f, Pth, params)[source]#
set_state()#

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters:
  • pressure (float) – The desired pressure in [Pa].

  • temperature (float) – The desired temperature in [K].

property deformation_gradient_tensor#
Returns:

The deformation gradient tensor describing the deformation of the mineral from its undeformed state (i.e. the state at the reference pressure and temperature).

Return type:

numpy.array (2D)

property unrotated_cell_vectors#
Returns:

The vectors of the cell [m] constructed from one mole of formula units after deformation of the mineral from its undeformed state (i.e. the state at the reference pressure and temperature). See the documentation for the function cell_parameters_to_vectors() for the assumed relationships between the cell vectors and spatial coordinate axes.

Return type:

numpy.array (2D)

property deformed_coordinate_frame#
Returns:

The orientations of the three spatial coordinate axes after deformation of the mineral [m]. For orthotropic minerals, this is equal to the identity matrix, as hydrostatic stresses only induce rotations in monoclinic and triclinic crystals.

Return type:

numpy.array (2D)

property rotation_matrix#
Returns:

The matrix required to rotate the properties of the deformed mineral into the deformed coordinate frame. For orthotropic minerals, this is equal to the identity matrix.

Return type:

numpy.array (2D)

property cell_vectors#
Returns:

The vectors of the cell constructed from one mole of formula units [m]. See the documentation for the function cell_parameters_to_vectors() for the assumed relationships between the cell vectors and spatial coordinate axes.

Return type:

numpy.array (2D)

property cell_parameters#
Returns:

The molar cell parameters of the mineral, given in standard form: [\(a\), \(b\), \(c\), \(\alpha\), \(\beta\), \(\gamma\)], where the first three floats are the lengths of the vectors in [m] defining the cell constructed from one mole of formula units. The last three floats are angles between vectors (given in radians). See the documentation for the function cell_parameters_to_vectors() for the assumed relationships between the cell vectors and spatial coordinate axes.

Return type:

numpy.array (1D)

property shear_modulus#

Anisotropic minerals do not (in general) have a single shear modulus. This function returns a NotImplementedError. Users should instead consider directly querying the elements in the isothermal_stiffness_tensor or isentropic_stiffness_tensor.

property K_T#

Anisotropic minerals do not have a single isothermal bulk modulus. This function returns a NotImplementedError. Users should instead consider either using isothermal_bulk_modulus_reuss, isothermal_bulk_modulus_voigt, or directly querying the elements in the isothermal_stiffness_tensor.

property isothermal_bulk_modulus_reuss#

Returns isothermal bulk modulus of the material.

Note

Needs to be implemented in derived classes. Aliased with K_T().

Returns:

Isothermal bulk modulus in [Pa].

Return type:

float

property K_S#

Anisotropic minerals do not have a single isentropic bulk modulus. This function returns a NotImplementedError. Users should instead consider either using isentropic_bulk_modulus_reuss, isentropic_bulk_modulus_voigt (both derived from AnisotropicMineral), or directly querying the elements in the isentropic_stiffness_tensor.

property isentropic_bulk_modulus_reuss#

Returns the adiabatic bulk modulus of the mineral.

Note

Needs to be implemented in derived classes. Aliased with K_S().

Returns:

Adiabatic bulk modulus in [Pa].

Return type:

float

property beta_S#

Anisotropic minerals do not have a single isentropic compressibility. This function returns a NotImplementedError. Users should instead consider either using isentropic_compressibility_tensor, isentropic_compressibility_reuss or isentropic_compressibility_voigt (all derived from AnisotropicMineral), or directly querying the elements in the isentropic_compliance_tensor.

property isothermal_bulk_modulus_voigt#
Returns:

The Voigt bound on the isothermal bulk modulus in [Pa].

Return type:

float

property isothermal_compressibility_reuss#
Returns:

The Reuss bound on the isothermal compressibility in [1/Pa].

Return type:

float

property beta_T#
Returns:

The Reuss bound on the isothermal compressibility in [1/Pa].

Return type:

float

property isothermal_compressibility_voigt#
Returns:

The Voigt bound on the isothermal compressibility in [1/Pa].

Return type:

float

property isentropic_bulk_modulus_voigt#
Returns:

The Voigt bound on the isentropic bulk modulus in [Pa].

Return type:

float

property isentropic_compressibility_reuss#
Returns:

The Reuss bound on the isentropic compressibility in [1/Pa].

Return type:

float

property isentropic_compressibility_voigt#
Returns:

The Voigt bound on the isentropic compressibility in [1/Pa].

Return type:

float

property isothermal_compliance_tensor#
Returns:

The isothermal compliance tensor [1/Pa] in Voigt form (\(\mathbb{S}_{\text{T} pq}\)).

Return type:

numpy.array (2D)

property thermal_expansivity_tensor#
Returns:

The tensor of thermal expansivities [1/K].

Return type:

numpy.array (2D)

property isothermal_stiffness_tensor#
Returns:

The isothermal stiffness tensor [Pa] in Voigt form (\(\mathbb{C}_{\text{T} pq}\)).

Return type:

numpy.array (2D)

property full_isothermal_compliance_tensor#
Returns:

The isothermal compliance tensor [1/Pa] in standard form (\(\mathbb{S}_{\text{T} ijkl}\)).

Return type:

numpy.array (4D)

property full_isothermal_stiffness_tensor#
Returns:

The isothermal stiffness tensor [Pa] in standard form (\(\mathbb{C}_{\text{T} ijkl}\)).

Return type:

numpy.array (4D)

property full_isentropic_compliance_tensor#
Returns:

The isentropic compliance tensor [1/Pa] in standard form (\(\mathbb{S}_{\text{N} ijkl}\)).

Return type:

numpy.array (4D)

property isentropic_compliance_tensor#
Returns:

The isentropic compliance tensor [1/Pa] in Voigt form (\(\mathbb{S}_{\text{N} pq}\)).

Return type:

numpy.array (2D)

property isentropic_stiffness_tensor#
Returns:

The isentropic stiffness tensor [Pa] in Voigt form (\(\mathbb{C}_{\text{N} pq}\)).

Return type:

numpy.array (2D)

property full_isentropic_stiffness_tensor#
Returns:

The isentropic stiffness tensor [Pa] in standard form (\(\mathbb{C}_{\text{N} ijkl}\)).

Return type:

numpy.array (4D)

property grueneisen_tensor#
Returns:

The grueneisen tensor [unitless]. This is defined by [BM67] as \(\mathbb{C}_{\text{N} ijkl} \alpha_{kl} V/C_{P}\).

Return type:

numpy.array (2D)

property molar_heat_capacity_v#
Returns:

The isochoric, hydrostatic heat capacity [J/K/mol].

Return type:

float

property grueneisen_parameter#
Returns:

The scalar grueneisen parameter [unitless].

Return type:

float

property isothermal_compressibility_tensor#
Returns:

The isothermal compressibility tensor [1/Pa].

Return type:

numpy.array (2D)

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property bulk_sound_velocity#

Returns bulk sound speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_phi().

Returns:

Bulk sound velocity in [m/s].

Return type:

float

christoffel_tensor(propagation_direction)#
Returns:

The Christoffel tensor from an elastic stiffness tensor and a propagation direction for a seismic wave relative to the stiffness tensor: T_ik = C_ijkl n_j n_l.

Return type:

float

copy()#
debug_print(indent='')#

Print a human-readable representation of this Material.

property density#

Returns the density of this material.

Note

Needs to be implemented in derived classes. Aliased with rho().

Returns:

The density of this material in [kg/m^3].

Return type:

float

property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property formula#

Returns the chemical formula of the Mineral class

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property isentropic_bulk_modulus_vrh#
Returns:

The Voigt-Reuss-Hill average of the isentropic bulk modulus [Pa].

Return type:

float

property isentropic_compressibility_tensor#
Returns:

The isentropic compressibility tensor [1/Pa].

Return type:

numpy.array (2D)

property isentropic_isotropic_poisson_ratio#
Returns:

The isotropic Poisson ratio (mu) [unitless]. A metric of the lateral response to loading.

Return type:

float

isentropic_linear_compressibility(direction)#
Returns:

The linear isentropic compressibility in a given direction

relative to the stiffness tensor [1/Pa]. :rtype: float

isentropic_poissons_ratio(axial_direction, lateral_direction)#
Returns:

The isentropic poisson ratio given loading and response

directions relative to the stiffness tensor [unitless]. :rtype: float

isentropic_shear_modulus(plane_normal, shear_direction)#
Returns:

The isentropic shear modulus on a plane in a given

shear direction relative to the stiffness tensor [Pa]. :rtype: float

property isentropic_shear_modulus_reuss#
Returns:

The Reuss bound on the isentropic shear modulus [Pa].

Return type:

float

property isentropic_shear_modulus_voigt#
Returns:

The Voigt bound on the isentropic shear modulus [Pa].

Return type:

float

property isentropic_shear_modulus_vrh#
Returns:

The Voigt-Reuss-Hill average of the isentropic shear modulus [Pa].

Return type:

float

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property isentropic_universal_elastic_anisotropy#
Returns:

The universal elastic anisotropy [unitless]

Return type:

float

isentropic_youngs_modulus(direction)#
Returns:

The isentropic Youngs modulus in a given direction

relative to the stiffness tensor [Pa]. :rtype: float

property molar_enthalpy#

Returns molar enthalpy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with H().

Returns:

Enthalpy in [J/mol].

Return type:

float

property molar_entropy#

Returns molar entropy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with S().

Returns:

Entropy in [J/K/mol].

Return type:

float

property molar_gibbs#

Returns the molar Gibbs free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with gibbs().

Returns:

Gibbs free energy in [J/mol].

Return type:

float

property molar_heat_capacity_p#

Returns molar heat capacity at constant pressure of the mineral.

Note

Needs to be implemented in derived classes. Aliased with C_p().

Returns:

Isobaric heat capacity in [J/K/mol].

Return type:

float

property molar_helmholtz#

Returns the molar Helmholtz free energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with helmholtz().

Returns:

Helmholtz free energy in [J/mol].

Return type:

float

property molar_internal_energy#

Returns the molar internal energy of the mineral.

Note

Needs to be implemented in derived classes. Aliased with energy().

Returns:

The internal energy in [J/mol].

Return type:

float

property molar_mass#

Returns molar mass of the mineral.

Note

Needs to be implemented in derived classes.

Returns:

Molar mass in [kg/mol].

Return type:

float

property molar_volume#

Returns molar volume of the mineral.

Note

Needs to be implemented in derived classes. Aliased with V().

Returns:

Molar volume in [m^3/mol].

Return type:

float

property p_wave_velocity#

Returns P wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_p().

Returns:

P wave speed in [m/s].

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_method(equation_of_state)#

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property shear_wave_velocity#

Returns shear wave speed of the mineral.

Note

Needs to be implemented in derived classes. Aliased with v_s().

Returns:

Shear wave speed in [m/s].

Return type:

float

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property thermal_expansivity#

Returns thermal expansion coefficient of the mineral.

Note

Needs to be implemented in derived classes. Aliased with alpha().

Returns:

Thermal expansivity in [1/K].

Return type:

float

to_string()#

Returns the name of the mineral class

unroll()#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

wave_velocities(propagation_direction)#
Returns:

The compressional wave velocity, and two

shear wave velocities in a given propagation direction [m/s]. :rtype: list, containing the wave speeds and directions

of particle motion relative to the stiffness tensor

property thermal_stress_tensor#
Returns:

The change in stress with temperature at constant strain [Pa/K].

Return type:

numpy.array (2D)

property molar_isometric_heat_capacity#
Returns:

The molar heat capacity at constant strain [J/K/mol].

Return type:

float

check_standard_parameters(anisotropic_parameters)[source]#
burnman.cell_parameters_to_vectors(cell_parameters, frame_convention)[source]#

Converts cell parameters to unit cell vectors.

Parameters:
  • cell_parameters (numpy.array (1D)) – An array containing the three lengths of the unit cell vectors [m], and the three angles [degrees]. The first angle (\(\alpha\)) corresponds to the angle between the second and the third cell vectors, the second (\(\beta\)) to the angle between the first and third cell vectors, and the third (\(\gamma\)) to the angle between the first and second vectors.

  • frame_convention (list of three integers) – A list (c) defining the reference frame convention. This function dictates that the c[0]th cell vector is colinear with the c[0]th axis, the c[1]th cell vector is perpendicular to the c[2]th axis, and the c[2]th cell vector is defined to give a right-handed coordinate system. In common crystallographic shorthand, x[c[0]] // a[c[0]], x[c[2]] // a[c[2]]^* (i.e. perpendicular to a[c[0]] and a[c[1]]).

Returns:

The three vectors defining the parallelopiped cell [m].

Return type:

numpy.array (2D)

burnman.cell_vectors_to_parameters(vectors, frame_convention)[source]#

Converts unit cell vectors to cell parameters.

Parameters:
  • vectors (numpy.array (2D)) – The three vectors defining the parallelopiped cell [m].

  • frame_convention (list of three integers) – A list (c) defining the reference frame convention. This function dictates that the c[0]th cell vector is colinear with the c[0]th axis, the c[1]th cell vector is perpendicular to the c[2]th axis, and the c[2]th cell vector is defined to give a right-handed coordinate system. In common crystallographic shorthand, x[c[0]] // a[c[0]], x[c[2]] // a[c[2]]^* (i.e. perpendicular to a[c[0]] and a[c[1]]).

Returns:

An array containing the three lengths of the unit cell vectors [m], and the three angles [degrees]. The first angle (\(\alpha\)) corresponds to the angle between the second and the third cell vectors, the second (\(\beta\)) to the angle between the first and third cell vectors, and the third (\(\gamma\)) to the angle between the first and second vectors.

Return type:

numpy.array (1D)

Composites#

class burnman.Composite(phases, fractions=None, fraction_type='molar', name='Unnamed composite')[source]#

Bases: Material

Base class for a composite material. The static phases can be minerals or materials, meaning composite can be nested arbitrarily.

The fractions of the phases can be input as either ‘molar’ or ‘mass’ during instantiation, and modified (or initialised) after this point by using set_fractions.

This class is available as burnman.Composite.

property 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.

set_fractions(fractions, fraction_type='molar')[source]#

Change the fractions of the phases of this Composite. Resets cached properties

Parameters:
  • fractions – list or numpy array of floats molar or mass fraction for each phase.

  • fraction_type – ‘molar’ or ‘mass’ specify whether molar or mass fractions are specified.

set_method(method)[source]#

set the same equation of state method for all the phases in the composite

set_averaging_scheme(averaging_scheme)[source]#

Set the averaging scheme for the moduli in the composite. Default is set to VoigtReussHill, when Composite is initialized.

set_state(pressure, temperature)[source]#

Update the material to the given pressure [Pa] and temperature [K].

debug_print(indent='')[source]#

Print a human-readable representation of this Material.

unroll()[source]#

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Note

Needs to be implemented in derived classes.

Returns:

A list of molar fractions which should sum to 1.0, and a list of burnman.Mineral objects containing the minerals in the material.

Return type:

tuple

to_string()[source]#

return the name of the composite

property formula#

Returns molar chemical formula of the composite

property molar_internal_energy#

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

property molar_gibbs#

Returns molar Gibbs free energy of the composite [J/mol] Aliased with self.gibbs

property molar_helmholtz#

Returns molar Helmholtz free energy of the mineral [J/mol] Aliased with self.helmholtz

property molar_volume#

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

property molar_mass#

Returns molar mass of the composite [kg/mol]

property density#

Compute the density of the composite based on the molar volumes and masses Aliased with self.rho

property molar_entropy#

Returns enthalpy of the mineral [J] Aliased with self.S

property molar_enthalpy#

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

property isothermal_bulk_modulus_reuss#

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

property isentropic_bulk_modulus_reuss#

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

property isothermal_compressibility_reuss#

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

property isentropic_compressibility_reuss#

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

property shear_modulus#

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

property p_wave_velocity#

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

property bulk_sound_velocity#

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

property shear_wave_velocity#

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

property grueneisen_parameter#

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

property thermal_expansivity#

Returns thermal expansion coefficient of the composite [1/K] Aliased with self.alpha

property molar_heat_capacity_v#

Returns molar_heat capacity at constant volume of the composite [J/K/mol] Aliased with self.C_v

property molar_heat_capacity_p#

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

property endmember_partial_gibbs#

Returns the partial Gibbs energies for all the endmember minerals in the Composite

property reaction_affinities#

Returns the affinities corresponding to each reaction in reaction_basis

property equilibrated#

Returns True if the reaction affinities are all zero within a given tolerance given by self.equilibrium_tolerance.

set_components(components)[source]#

Sets the components and components_array attributes of the composite material. The components attribute is a list of dictionaries containing the chemical formulae of the components. The components_array attribute is a 2D numpy array describing the linear transformation between endmember amounts and component amounts.

The components do not need to be linearly independent, not do they need to form a complete basis set for the composite. However, it must be possible to obtain the composition of each component from a linear sum of the endmember compositions of the composite. For example, if the composite was composed of MgSiO3 and Mg2SiO4, SiO2 would be a valid component, but Si would not. The method raises an exception if any of the chemical potentials are not defined by the assemblage.

Parameters:

components (list of dictionaries) – List of formulae of the components.

chemical_potential(components=None)[source]#

Returns the chemical potentials of the currently defined components in the composite. Raises an exception if the assemblage is not equilibrated.

Parameters:

components (list of dictionaries) – List of formulae of the desired components. If not specified, the method uses the components specified by a previous call to set_components.

Returns:

The chemical potentials of the desired components in the equilibrium composite.

Return type:

numpy.array of floats

property stoichiometric_matrix[source]#

An sympy Matrix where each element M[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property stoichiometric_array[source]#

An array where each element arr[i,j] corresponds to the number of atoms of element[j] in endmember[i].

property reaction_basis[source]#

An array where each element arr[i,j] corresponds to the number of moles of endmember[j] involved in reaction[i].

property reaction_basis_as_strings[source]#

Returns a list of string representations of all the reactions in reaction_basis.

property n_reactions[source]#

The number of reactions in reaction_basis.

property independent_element_indices[source]#

A list of an independent set of element indices. If the amounts of these elements are known (element_amounts), the amounts of the other elements can be inferred by -compositional_null_basis[independent_element_indices].dot(element_amounts)

property dependent_element_indices[source]#

The element indices not included in the independent list.

property reduced_stoichiometric_array[source]#

The stoichiometric array including only the independent elements

property compositional_null_basis[source]#

An array N such that N.b = 0 for all bulk compositions that can be produced with a linear sum of the endmembers in the composite.

property endmember_formulae[source]#

A list of the formulae in the composite.

property endmember_names[source]#

A list of the endmember names contained in the composite. Mineral names are returned as given in Mineral.name. Solution endmember names are given in the format Mineral.name in Solution.name.

property endmembers_per_phase[source]#

A list of integers corresponding to the number of endmembers stored within each phase.

property elements[source]#

A list of the elements which could be contained in the composite, returned in the IUPAC element order.

property n_endmembers[source]#

Returns the number of endmembers in the composite.

property n_elements[source]#

Returns the total number of distinct elements which might be in the composite.

property C_p#

Alias for molar_heat_capacity_p()

property C_v#

Alias for molar_heat_capacity_v()

property G#

Alias for shear_modulus()

property H#

Alias for molar_enthalpy()

property K_S#

Alias for isentropic_bulk_modulus_reuss()

property K_T#

Alias for isothermal_bulk_modulus_reuss()

property P#

Alias for pressure()

property S#

Alias for molar_entropy()

property T#

Alias for temperature()

property V#

Alias for molar_volume()

property alpha#

Alias for thermal_expansivity()

property beta_S#

Alias for isentropic_compressibility_reuss()

property beta_T#

Alias for isothermal_compressibility_reuss()

copy()#
property energy#

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures, molar_fractions=None)#

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 (numpy.array, n-dimensional) – ndlist or ndarray of float of pressures in [Pa].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

evaluate_with_volumes(vars_list, volumes, temperatures, molar_fractions=None)#

Returns an array of material properties requested through a list of strings at given volume 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

  • volumes (numpy.array, n-dimensional) – ndlist or ndarray of float of volumes in [m^3].

  • temperatures (numpy.array, n-dimensional) – ndlist or ndarray of float of temperatures in [K].

Returns:

List or array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] for temperatures[i] and pressures[i]. Attempts to return an array, falls back to a list if the returned properties have different shapes.

Return type:

list or numpy.array, n-dimensional

property gibbs#

Alias for molar_gibbs()

property gr#

Alias for grueneisen_parameter()

property helmholtz#

Alias for molar_helmholtz()

property isentropic_thermal_gradient#
Returns:

dTdP, the change in temperature with pressure at constant entropy [Pa/K]

Return type:

float

property pressure#

Returns current pressure that was set with set_state().

Note

Aliased with P().

Returns:

Pressure in [Pa].

Return type:

float

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.

property rho#

Alias for density()

set_state_with_volume(volume, temperature, pressure_guesses=[0.0, 10000000000.0])#

This function acts similarly to set_state, but takes volume and temperature as input to find the pressure. In order to ensure self-consistency, this function does not use any pressure functions from the material classes, but instead finds the pressure using the brentq root-finding method.

Parameters:
  • volume (float) – The desired molar volume of the mineral [m^3].

  • temperature (float) – The desired temperature of the mineral [K].

  • pressure_guesses (list) – A list of floats denoting the initial low and high guesses for bracketing of the pressure [Pa]. These guesses should preferably bound the correct pressure, but do not need to do so. More importantly, they should not lie outside the valid region of the equation of state. Defaults to [0.e9, 10.e9].

property temperature#

Returns current temperature that was set with set_state().

Note

Aliased with T().

Returns:

Temperature in [K].

Return type:

float

property v_p#

Alias for p_wave_velocity()

property v_phi#

Alias for bulk_sound_velocity()

property v_s#

Alias for shear_wave_velocity()

Calibrants#

class burnman.Calibrant(calibrant_function, calibrant_function_return_type, params)[source]#

Bases: object

The base class for a pressure calibrant material.

Parameters:
  • calibrant_function (function) – A function that takes either pressure, temperature and a params object as arguments, returning the volume, or takes volume, temperature and a params object, returning the pressure.

  • calibrant_function_return_type (str) – The return type of the calibrant function. Valid values are ‘pressure’ or ‘volume’.

  • params (dictionary) – A dictionary containing the parameters required by the calibrant function.

pressure(volume, temperature, VT_covariance=None)[source]#

Returns the pressure of the calibrant as a function of volume, temperature and (optionally) a volume-temperature variance-covariance matrix.

Parameters:
  • volume (float) – The volume of the calibrant [m^3/mol].

  • temperature (float) – The temperature of the calibrant [K].

  • VT_covariance (2x2 numpy.array) – The volume-temperature variance-covariance matrix [optional].

Returns:

The pressure of the calibrant [Pa] and the pressure-volume-temperature variance-covariance matrix if PT_covariance is provided.

Return type:

float, tuple of a float and a numpy.array (3x3)

volume(pressure, temperature, PT_covariance=None)[source]#

Returns the volume of the calibrant as a function of pressure, temperature and (optionally) a pressure-temperature variance-covariance matrix.

Parameters:
  • pressure (float) – The pressure of the calibrant [Pa].

  • temperature (float) – The temperature of the calibrant [K].

  • PT_covariance (2x2 numpy.array) – The pressure-temperature variance-covariance matrix [optional].

Returns:

The volume of the calibrant [m^3/mol] and the volume-pressure-temperature variance-covariance matrix if VT_covariance is provided.

Return type:

float, tuple of a float and a numpy.array (3x3)