Isotopes

Some of the functions to calculate isotopic variations during degassing.

VolFe.isotopes.allocate_species(element, comp, alphas, species_distribution)[source]

Specifies species order for subsequent calculations.

Parameters:
  • element (str) – Element of interest: H, S, or C.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

  • alphas (dict) – Consistent alpha fractionation factors.

  • species_distribution (dict) – Fraction of element in each species.

Returns:

Dictionary of alphas and species distribution in correct order.

Return type:

tuple(dict,dict)

VolFe.isotopes.alpha2Delta(a)[source]

Convert alpha fractionation factor to cap-delta fractionation factor.

Parameters:

isotope (float) – alpha fractionation factor

Returns:

cap-delta fractionation factor

Return type:

float

VolFe.isotopes.alpha_gas_using_beta(element, A, B, PT, models)[source]

Calculate alpha fractionation factor from beta-factors.

Parameters:
  • element (str) – Element of interest: S, C, or H.

  • A (str) – Nominator species.

  • B (str) – Denominator species.

  • PT (dict) – Pressure (bars) as “P” and temperature (‘C) as “T”.

  • models (pandas.DataFrame) – Models options.

Returns:

alpha fractionation factor for A-B

Return type:

float

VolFe.isotopes.alphas_C(PT, comp, models)[source]

Calculate consistant alpha fractionation factors for C-bearing species (i.e., all relative to the same species). If vapor is present, the species is CO2(v), otherwise it is CO2mol(m) or CO32-(m).

Parameters:
  • PT (dict) – Pressure (bars) as “P” and temperature (‘C) as “T”.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

  • models (pandas.DataFrame) – Models options.

Returns:

alpha fractionation factor for all C-bearing species relative to one species

Return type:

dict

VolFe.isotopes.alphas_H(PT, comp, models)[source]

Calculate consistant alpha fractionation factors for H-bearing species (i.e., all relative to the same species). If vapor is present, the species is H2O(v), otherwise it is H2Omol(m) or OH-(m).

Parameters:
  • PT (dict) – Pressure (bars) as “P” and temperature (‘C) as “T”.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

  • models (pandas.DataFrame) – Models options.

Returns:

alpha fractionation factor for all H-bearing species relative to one species

Return type:

dict

VolFe.isotopes.alphas_S(PT, comp, models)[source]

Calculate consistant alpha fractionation factors for S-bearing species (i.e., all relative to the same species) against *S2-(m).

Parameters:
  • PT (dict) – Pressure (bars) as “P” and temperature (‘C) as “T”.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

  • models (pandas.DataFrame) – Models options.

Returns:

alpha fractionation factor for all S-bearing species relative to *S2-

Return type:

dict

VolFe.isotopes.av_m_g(element, ratio, constants)[source]

Melt and vapor isotope ratio based on isotope ratio of species within them.

Parameters:
  • element (str) – Element of interest: H, C, or S.

  • ratio (dict) – Isotope ratios of all species

  • constants (tuple(dict,dict,float)) – Consistent alpha fractionation factors. Fraction of element in each species. Bulk isotope ratio.

Returns:

Melt and vapor isotope ratio.

Return type:

dict

VolFe.isotopes.delta2ratio(standard, isotope, element, d)[source]

Convert delta value to isotope ratio.

Parameters:
  • standard (str) – Standard material of interest: VCDT for S, VPDB for C, and VSMOW for H.

  • isotope (float) – Minor isotope if interest: 34 for S, 13 for C, and 2 for H

  • element (str) – Element of interest: S, C, or H.

  • d (float) – delta-value.

Returns:

isotope ratio of delta-value.

Return type:

float

VolFe.isotopes.delta_standard(standard, isotope, element)[source]

Get the isotopic ratio reference value for a standard for an element.

Parameters:
  • standard (str) – Standard material of interest: VCDT for S, VPDB for C, and VSMOW for H.

  • isotope (float) – Minor isotope if interest: 34 for S, 13 for C, and 2 for H

  • element (str) – Element of interest: S, C, or H.

Returns:

isotope ratio for reference material

Return type:

float

VolFe.isotopes.i2s9(element, PT, comp, R, models, nr_step, nr_tol)[source]

Calculate the isotope ratios of up to nine species with two isotopes.

Parameters:
  • element (str) – Element of interest: H, S, or C.

  • PT (dict) – Pressure (bars) as “P” and temperature (‘C) as “T”.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

  • R (dict) – Bulk isotope ratio of the system.

  • models (dict) – Model options.

  • nr_step (float) – Step-size for Newton-Raphson solver.

  • nr_tol (float) – Tolerance for Newton-Raphson solver.

Returns:

Isotope ratio of each species. Average isotope ratio of melt and vapor.

Return type:

tuple(dict,dict)

VolFe.isotopes.iso_initial_guesses(element, R, comp)[source]

Initial guess for Newton-Raphson solver.

Parameters:
  • element (str) – Element of interest: S, C, or H.

  • R (dict) – Isotope ratio of bulk system.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

Returns:

Initial guess for Newton-Raphson solver.

Return type:

float

VolFe.isotopes.newton_raphson(x0, constants, e1, step, eqs, deriv, maxiter=100)[source]

Newton-Raphson solver.

Parameters:
  • x0 (float) – Initial guess

  • constants (list) – Constants required to evaluate equations

  • e1 (float) – Tolerance for solver

  • step (float) – Step-size for solver

  • eqs (func) – Equations to solve

  • deriv (func) – Differentials of equations to solve

  • maxiter (int, optional) – Maximum number of iterations to try. Defaults to 100.

Returns:

Solution

Return type:

float

VolFe.isotopes.ratio2delta(standard, isotope, element, ratio)[source]

Convert isotope ratio to delta value.

Parameters:
  • standard (str) – Standard material of interest: VCDT for S, VPDB for C, and VSMOW for H.

  • isotope (float) – Minor isotope if interest: 34 for S, 13 for C, and 2 for H

  • element (str) – Element of interest: S, C, or H.

  • ratio (float) – Value of isotope ratio.

Returns:

delta-value of isotope ratio

Return type:

float

VolFe.isotopes.rename_output(element, input, comp)[source]

Renames generic output with species names.

Parameters:
  • element (str) – Element of interest: H, S, or C.

  • input (dict) – Dictionary of interest with generic names.

  • comp (pandas.DataFrame) – Composition of the melt and vapor by species, including weight fraction of vapor.

Returns:

Species names instead of generic names.

Return type:

dict

VolFe.isotopes.simple_isotope_fractionation(D, db)[source]

Calculates isotopic composition of melt and vapor during closed- and open-system degassing for a constant fractionation factor.

Parameters:
  • D (float) – Cap-delta Fractionation factor between vapor and melt in per mil.

  • db (float) – Initial little-delta isotope value of bulk system in per mil.

Returns:

Isotopic composition of melt and vapor during closed- and open-system degassing

Return type:

pandas.DataFrame