Sulfide Saturation Functions

PySulfSat.scss_calcs2.Loop_Smythe_sulf_calc_residual(single_argx0, FeO_Liq, T_K, Ni_Liq, Cu_Liq)[source]

Calculates the residual between the Ni and Cu content of the Liquid and that of the sulfide for a Ni and Cu Kd calculated from Kiseeva et al. (2015). This function is used by the calculate_Smythe_sulf_minimisation function to calculate the sulfide compositoin, analagous to the Solver function in the supporting spreadsheet of Smythe et al.(2017).

Parameters:
  • single_argx0 (float) – arguement for Ni and Cu in the sulfide to be solved by the scipy minimisation function function.

  • FeO_Liq (int, float) – FeO (2+) content of the liquid in wt%

  • Ni_Liq (int, float) – Ni content of the Liquid in ppm

  • Cu_Liq (int, float) – Cu content of the Liquid in ppm

  • T_K (int, float) – Temperature in Kelvin.

Returns:

Calculated residual between measured Ni and Cu in the liquid, and that predicted from the sulfide composition and the Kd.

Return type:

float

PySulfSat.scss_calcs2.calculate_B2021_SCSS(*, df, T_K, P_kbar, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, H2O_Liq=None, Fe_Sulf=None, Ni_Sulf=None, Cu_Sulf=None, Ni_Liq=None, Cu_Liq=None, Fe3Fet_Liq=None)[source]

Calculates SCSS using the model of Blanchard et al. 2021 doi: https://doi.org/10.2138/am-2021-7649 designed for calculating sulfide saturation in peridotitic melt at upper mantle conditions

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions from the import_data function. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

H2O_Liq: int, float, pandas series (optional)

Overwrites H2O in the user entered dataframes

Sulfide Composition: Options to calculate from the liquid composition, enter the comp in el wt%, or enter the FeFeNiCu, Cu

if you want to calculate sulfide composition:

Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

Or

Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

if you want to input a Fe_FeNiCu_Sulf ratio:

Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

if you want to input a measured sulfide composition in el wt%

Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

Returns:

Calculated SCSS using eq11, eq12, mol fractions, and input compositions.

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_F2015_SCSS(df, T_K, P_kbar, H2O_Liq=None, Fe3Fet_Liq=None, Fe_FeNiCu_Sulf=None)[source]

Calculates SCSS using the model of Fortin et al. (2015). doi: http://dx.doi.org/10.1016/j.gca.2015.03.0220 Unlike the models of Symthe et al. (2017) or O’Neill (2021) this model doesn’t require the sulfide composition, or the proportion of Fe3 in the liqiud.

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions from the import_data function. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

  • Optional

  • H2O_Liq (int, float, pandas.Series) – Option input, overwrites H2O_Liq in input dataframe

  • Fe3Fet_Liq

  • functions (Fe_FeNiCu_Sulf - Doesnt use these values. here for consistency with other)

Returns:

Calculated SCSS, mol fractions, and input compositions.

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_LiZhang2022_SCSS(*, df, T_K, P_kbar, H2O_Liq=None, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Fe3Fet_Liq=None, logfo2=None, Ni_Liq=None, Cu_Liq=None, Ni_Sulf_init=5, Cu_Sulf_init=5, Fe_Sulf=None, Cu_Sulf=None, Ni_Sulf=None, T_K_transition=True, highT=False, lowT=False)[source]

Calculates SCSS using the model of Liu and Zhang (2022), doi: https://doi.org/10.1016/j.gca.2022.03.0080 with options for users to calculate sulfide composition from liquid composition using the approach of Smythe et al. (2017), the empirical parameterization of O’Neill (2021), or input a sulfide composition.

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

T_K_transitionbool

The model shows a flip at 1200C. If T_K_transition is False, this doesnt happen. This generates more coherent results. You then also need to specify whether you want to use the highT or lowT optoin (highT=True)

Optional

H2O_Liq: int, float, pandas.Series

Option input, overwrites H2O_Liq in input dataframe

logfo2: int, float, or pandas.Series

logfo2, used to convert to Fe3 following the method of Li and Zhang (2022)

Fe3Fet_Liq: int, float, pandas.Series, or “Calc_ONeill”

Proportion of Fe3+ in the liquid, as various parts of the calculation use only Fe2. If “Calc_ONeill” Calculates as a function of MgO content, using the MORB relationship.

Various options for Sulfide Composition: calculate from the liquid composition, enter the comp in el wt%, or enter the Fe_FeNiCu_Sulf, Cu

Calculate sulfide composition:

Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

Or

Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

if you want to input a Fe_FeNiCu_Sulf ratio:

Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

if you want to input a measured sulfide composition in el wt%

Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

Returns:

Contains column for SCSS

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_Liu2021_SCSS(df, T_K, P_kbar, Fe_FeNiCu_Sulf=None, H2O_Liq=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Ni_Liq=None, Cu_Liq=None, Fe_Sulf=None, Cu_Sulf=None, Ni_Sulf=None, Ni_Sulf_init=5, Cu_Sulf_init=5, Fe3Fet_Liq=None)[source]

Calculates the SCSS using the model of Liu et al. (2021), doesnt depend on silicate melt composition apart from H2O_Liq. Doi - https://doi.org/10.1016/j.chemgeo.2020.119913

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

  • Optional

  • H2O_Liq (int, float, pandas.Series) – Option input, overwrites H2O_Liq in input dataframe

  • Fe3Fet_Liq (int, float, pandas.Series, or "Calc_ONeill") – Proportion of Fe3+ in the liquid, as various parts of the calculation use only Fe2. If “Calc_ONeill” Calculates as a function of MgO content, using the MORB relationship.

  • Composition (Sulfide)

  • FeFeNiCu (or enter the) –

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

  • Cu

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

PySulfSat.scss_calcs2.calculate_O2021_SCSS(*, df, T_K, P_kbar, Fe3Fet_Liq=None, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Fe_Sulf=None, Ni_Sulf=None, Cu_Sulf=None, Ni_Liq=None, Cu_Liq=None, Ni_Sulf_init=5, Cu_Sulf_init=5)[source]

Calculates SCSS using the model of O’Neill (2021). doi: https://doi.org/10.1002/9781119473206.ch10 Has options for users to calculate sulfide composition from liquid composition using the approach of Smythe et al. (2017), the empirical parameterization of O’Neill (2021), or input a sulfide composition.

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

  • Fe3Fet_Liq (int, float, pandas.Series, or "Calc_ONeill") – Proportion of Fe3+ in the liquid, as various parts of the calculation use only Fe2. If “Calc_ONeill” Calculates as a function of MgO content, using the MORB relationship.

  • Composition (Sulfide)

  • FeFeNiCu (or enter the) –

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

  • Cu

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

Returns:

Contains column for SCSS ideal, 1 sigma, input T and P, and the various intermediate steps of the calculation.

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_OM2022_SCSS(*, df, T_K, P_kbar, Fe3Fet_Liq=None, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Fe_Sulf=None, Ni_Sulf=None, Cu_Sulf=None, Ni_Liq=None, Cu_Liq=None, Ni_Sulf_init=5, Cu_Sulf_init=5)[source]

Calculates SCSS using the model of O’Neill (2021) as implemented in the supporting spreadsheet of ONeill and Mavrogenes, 2022 doi: https://doi.org/10.1016/j.gca.2022.06.020 The only difference between OM2022 and O2021 is a 7.2*Fe*Si term in 2021, 7.2*(Mn+Fe)*Si in 2022. This function has options for users to calculate sulfide composition from liquid composition using the approach of Smythe et al. (2017), the empirical parameterization of O’Neill (2021), or input a sulfide composition.

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

  • Fe3Fet_Liq (int, float, pandas.Series, or "Calc_ONeill") – Proportion of Fe3+ in the liquid, as various parts of the calculation use only Fe2. If “Calc_ONeill” Calculates as a function of MgO content, using the MORB relationship.

  • Composition (Sulfide)

  • FeFeNiCu (or enter the) –

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

  • Cu

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

Returns:

Contains column for SCSS ideal, 1 sigma, input T and P, and the various intermediate steps of the calculation.

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_ONeill_sulf(FeOt_Liq, Ni_Liq, Cu_Liq, MgO_Liq=None, Fe3Fet_Liq=None)[source]

Calculating the Fe_FeNiCu ratio in the sulfide using the empirical parameterizatin of ONeill et al. (2022) doi: https://doi.org/10.1002/9781119473206.ch10

PySulfSat.scss_calcs2.calculate_S2017_SCSS(*, df, T_K, P_kbar, Fe3Fet_Liq=None, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Fe_Sulf=None, Ni_Sulf=None, Cu_Sulf=None, Ni_Liq=None, Cu_Liq=None, H2O_Liq=None, Ni_Sulf_init=5, Cu_Sulf_init=5)[source]

Calculates SCSS using the model of Smythe et al. (2017). doi: https://doi.org/10.2138/am-2017-5800CCBY

Has with options for users to calculate sulfide composition from liquid composition, or input sulfide composition.

Parameters:
  • df (pandas.DataFrame) – Dataframe of liquid compositions. Needs to have the headings “SiO2_Liq”, “TiO2_Liq” etc, with compositions in oxide wt%. all FeO should be entered as FeOt_Liq, which can then be partitioned using the Fe3Fet_Liq input. Heading order doesn’t matter.

  • T_K (int, float, pandas.Series) – Temperature in Kelvin.

  • P_kbar (int, float, pandas.Series) – Pressure in kbar

  • Fe3Fet_Liq (int, float, pandas.Series) – Proportion of Fe3+ in the liquid. Various parts of the calculation use only Fe2.

  • H2O_Liq (int, float, panda.Series) – Overwrites H2O_Liq in the input dataframe.

  • Composition (Sulfide)

  • FeFeNiCu (or enter the) –

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Also can enter Ni_Sulf_init, and Cu_Sulf_init to help convergence (Default 5 for both)

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

  • Cu

    if you want to calculate sulfide composition:

    Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

    Also can enter Ni_Sulf_init, and Cu_Sulf_init to help convergence (Default 5 for both)

    Or

    Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

    if you want to input a Fe_FeNiCu_Sulf ratio:

    Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

    if you want to input a measured sulfide composition in el wt%

    Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

Returns:

Contains column for SCSS ideal, 1 sigma, input T and P, and the various intermediate steps of the calculation.

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_Symthe_sulf_minimisation(FeOt_Liq, Fe3Fet_Liq, T_K, Ni_Liq, Cu_Liq, Cu_Sulf_init=5, Ni_Sulf_init=5)[source]

Uses the Scipy optimize minimise function to find the Cu and Ni content of the sulfide that minimises the residual between liquid compositions, sulfide compositions and Kd, this minimis the Solver function in the supporting spreadsheet of Smythe et al.(2017).

Parameters:
  • FeOt_Liq (int, float, pd.Series) – FeOt content of the liquid in wt%

  • Fe3Fet_Liq (int, float, pd.Series) – Proportion of Fe3 in the liquid.

:param : Proportion of Fe3 in the liquid. :type : int, float, pd.Series :param Cu_Liq: Cu content of the Liquid in ppm :type Cu_Liq: int, float, pd.Series :param Ni_Liq: Ni content of the Liquid in ppm :type Ni_Liq: int, float, pd.Series :param T_K: Temperature in Kelvin. :type T_K: int, float

Returns:

Calculated residual between measured Ni and Cu in the liquid, and that predicted from the sulfide composition and the Kd.

Return type:

float

PySulfSat.scss_calcs2.calculate_sulf_CuFeNiCu(Ni_Sulf, Cu_Sulf, Fe_Sulf)[source]

Calculates the atomic Cu/(Fe+Ni+Cu) ratio of the sulfide.

Parameters:
  • Ni_Sulf (int, float, pd.Series) – Ni content of sulfide in wt%

  • Cu_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

  • Fe_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

Returns:

Cu/(Fe+Ni+Cu) ratio of the sulfide

Return type:

pd.Series, float

PySulfSat.scss_calcs2.calculate_sulf_FeFeNiCu(Ni_Sulf, Cu_Sulf, Fe_Sulf)[source]

Calculates the atomic Fe/(Fe+Ni+Cu) ratio of the sulfide.

Parameters:
  • Ni_Sulf (int, float, pd.Series) – Ni content of sulfide in wt%

  • Cu_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

  • Fe_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

Returns:

Fe/(Fe+Ni+Cu) ratio of the sulfide

Return type:

pd.Series, float

PySulfSat.scss_calcs2.calculate_sulf_NiFeNiCu(Ni_Sulf, Cu_Sulf, Fe_Sulf)[source]

Calculates the atomic Ni/(Fe+Ni+Cu) ratio of the sulfide.

Parameters:
  • Ni_Sulf (int, float, pd.Series) – Ni content of sulfide in wt%

  • Cu_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

  • Fe_Sulf (int, float, pd.Series) – Cu content of sulfide in wt%

Returns:

Ni/(Fe+Ni+Cu) ratio of the sulfide

Return type:

pd.Series, float

PySulfSat.scss_calcs2.calculate_sulf_kds(Ni_Sulf, Cu_Sulf, FeOt_Liq, T_K, Fe3Fet_Liq=None)[source]

Calculates the Fe, O, S content of the sulfide using Kiseeva et al. (2015). Users can enter Ni, Cu and FeOt contents they have measured, or use this function once the Ni and Cu content of the sulfide have been calculated using scipy minimisation. Returns Kds, and S-O-Fe of sulfide. Also returns Se and Te calculated using Brenan, 2015

Parameters:
  • Ni_Sulf (pandas.Series) – Ni content of the sulfide in wt%, from the calculate_Smythe_sulf_minimisation function

  • Cu_Sulf (pandas.Series) – Cu content of the sulfide in wt%, from the calculate_Smythe_sulf_minimisation function

  • FeOt_Liq (pandas.Series) – FeOt content of the liquid in wt%, from the read_excel function.

T_K: int, float, pandas.Series

Temperature in Kelvin.

P_kbar: int, float, pandas.Series

Pressure in kbar

Returns:

Calculated Cu, Ni, O, S and Fe content of sulfide, along with Ds from Kiseeva and Brenan

Return type:

pandas.DataFrame

PySulfSat.scss_calcs2.calculate_sulfide_comp_generic(*, T_K=None, Fe_Sulf=None, Ni_Sulf=None, Cu_Sulf=None, Fe_FeNiCu_Sulf=None, Cu_FeNiCu_Sulf=None, Ni_FeNiCu_Sulf=None, Ni_Liq=None, Cu_Liq=None, df_c=None, Ni_Sulf_init=5, Cu_Sulf_init=5)[source]

Generic function for calculating sulfide composition, either from input Fe-Ni-Cu contents in wt%, or using models of ONeill and Smythe

Sulfide Composition: Options to calculate from the liquid composition, enter the comp in el wt%, or enter the FeFeNiCu, Cu

if you want to calculate sulfide composition:

Fe_FeNiCu_Sulf = “Calc_Smythe”, also needs Ni_Sulf_init, and Cu_Sulf_init Calculates sulfide composition analagous to the Solver function in the Smythe et al. (2017) spreadsheet. Here, we use Scipy optimize to find the ideal Ni and Cu contents using Kds from Kiseeva et al. (2015) and the Ni and Cu content of the melt. Requires user to also enter Ni_Liq and Cu_Liq.

Or

Fe_FeNiCu_Sulf = “Calc_ONeill” Calculates sulfide composition using the empirical expression of O’Neill (2021), which depends on FeOt_Liq, Ni_Liq, Cu_Liq, and Fe3Fet_Liq. We allow users to enter their own Fe3Fet_Liq, as we believe the empirical model of Neill where Fe3Fet_Liq is a function of MgO content is not broadly applicable.

if you want to input a Fe_FeNiCu_Sulf ratio:

Fe_FeNiCu_Sulf = int, float, pandas series Calculates SCSS using this ratio. If you want the non-ideal SCSS to be returned, you also need to enter values for Cu_FeNiCu_Sulf and Ni_FeNiCu_Sulf

if you want to input a measured sulfide composition in el wt%

Fe_Sulf, Ni_Sulf, Cu_Sulf = int, float, pandas series

PySulfSat.scss_calcs2.norm_liqs_excl_H2O(Liqs)[source]

Normalizes without H2O (anhydrous total = 100)