mineral_data module

equilib(tini, tfin, npoint, pini=1, prod=['py', 1], rea=['ens', 1.5, 'cor', 1], out=False, tex=False, title=True, save='')[source]

Computes the equilibrium pressure for a reaction involving a given set of minerals, in a range of temperatures.

Parameters:
  • tini – minimum temperature in the range

  • tfin – maximum temperature in the range

  • npoint – number of points in the T range

  • pini (optional) – initial guess for the pressure

  • prod – list of products of the reaction in the form [name_1, c_name_1, name_2, c_name_2, …] where name_i is the name of the i^th mineral, as stored in the database, and c_name_i is the corresponding stoichiometric coefficient

  • rea – list of reactants; same syntax as the “prod” list.

Example

equilib(300, 500, 12, prod=[‘py’,1], rea=[‘ens’, 1.5, ‘cor’, 1])

export(mineral_nick)[source]
field(tmin, tmax, pmin, pmax, prod_spec, prod_coef, rea_spec, rea_coef, nx=6, ny=6)[source]
import_database()[source]
class latex_class[source]

Bases: object

Setup for the use of LaTeX for axis labels and titles; sets of parameters for graphics output.

get_dpi()[source]
get_ext()[source]
get_fontsize()[source]
get_tsize()[source]
off()[source]
on()[source]
set_param(dpi=300, fsize=14, tsize=12, ext='jpg')[source]
Parameters:
  • dpi – resolution of the graphics file (default 300)

  • fsize – size of the labels of the axes in points (default 14)

  • tsize – size of the ticks in points (default 12)

  • ext – extension of the graphics file (default ‘jpg’); this argument is only used in those routines where the name of the file is automatically produced by the program (e.g. check_poly or check_spline functions). In other cases, the extension is directly part of the name of the file given as argument to the function itself, and ‘ext’ is ignored.

load_database()[source]
class mineral(name, nick)[source]

Bases: object

alpha_p(tt, pp)[source]
alpha_t(tt)[source]
cp_t(tt)[source]
entropy(tt)[source]
g_t(tt)[source]
g_tp(tt, pp)[source]
h_tp(tt, pp)[source]
helm_vt(temp, volume, pmin=0.0, pmax=30.0, npp=40, p_del=2)[source]
info()[source]
kt(tt)[source]
load_alpha(alc, alp)[source]
load_bulk(k0, kp, dkt)[source]
load_cp(cpc, cpp)[source]
load_eos_type(eos)[source]
load_ref(v0, g0, s0)[source]
pressure_vt(temp, volume, pmin=0.0, pmax=30.0, npp=40, p_del=1.0)[source]
s_tp(tt, pp)[source]
vdp(tt, pp)[source]
volume_fix_t_p(tt)[source]
volume_p(tt, pp)[source]
volume_t(tt)[source]
class name_data[source]

Bases: object

add(nlist)[source]
pressure_react(tt, pini, prod_spec, prod_coef, rea_spec, rea_coef)[source]

Computes the pressure at which a given set of minerals is at the equilibrium for a specified temperature. “pini” is a initial guess for the pressure. Output in GPa.

“pressure_react” calls “reactions, and it is invoked by “equilib”.

reaction(tt, pp, prod_spec, prod_coef, rea_spec, rea_coef)[source]

Computes the Gibbs free energy of reaction at given temperature (tt) and pressure (pp), involving specified minerals.