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:
- VolFe.isotopes.alpha2Delta(a)[source]
Convert alpha fractionation factor to cap-delta fractionation factor.
- VolFe.isotopes.alpha_gas_using_beta(element, A, B, PT, models)[source]
Calculate alpha fractionation factor from beta-factors.
- 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:
- 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:
- 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:
- VolFe.isotopes.av_m_g(element, ratio, constants)[source]
Melt and vapor isotope ratio based on isotope ratio of species within them.
- VolFe.isotopes.delta2ratio(standard, isotope, element, d)[source]
Convert delta value to isotope ratio.
- Parameters:
- Returns:
isotope ratio of delta-value.
- Return type:
- VolFe.isotopes.delta_standard(standard, isotope, element)[source]
Get the isotopic ratio reference value for a standard for an element.
- 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:
- 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:
- 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:
- VolFe.isotopes.ratio2delta(standard, isotope, element, ratio)[source]
Convert isotope ratio to delta value.
- Parameters:
- Returns:
delta-value of isotope ratio
- Return type:
- 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:
- 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:
- Returns:
Isotopic composition of melt and vapor during closed- and open-system degassing
- Return type: