Viscosity calculator

Thermobar.viscosity.calculate_viscosity_giordano_2008(liq_comps, T=None, H2O_Liq=None, F2O_content=0)[source]

Calculates viscosity parameters A, B, C from Giordano et al. 2008. If a temperature is supplied, calculates viscosity.

Parameters:
  • liq_comps (pandas.DataFrame) – liquid compositions with column headings SiO2_Liq, MgO_Liq etc.

  • F2O_content (int, pd.series) – F2O content of the liquid (wt%), by default is set at zero.

  • Optional

  • T (int, flt, pd.Series) – Temperature in Kelvin. If specified, returns viscosity and log viscosity

  • H2O_Liq (int, flt, pd.Series) – Water content in wt%, overwrites that in input spreadsheet

Returns:

viscosity parameters, viscosity (if T supplied), as well user-entered liquid composition.

Return type:

pd.DataFrame

Thermobar.viscosity.convert_F2O_to_F_ppm(F2O_wt=None)[source]

Converts from F2O in wt% to F in ppm

Thermobar.viscosity.convert_F_to_F2O(F_ppm=None)[source]

Converts from F in ppm to F2O in wt%

Thermobar.viscosity.normalize_anhydrous_to_100_incF_mol_prop(liq_comps, F2O_content=0)[source]

Calculates normalized hydrous molar proportions following the normalization scheme of Giordano et al. (2008) in their excel spreadsheet.

Parameters:
  • liq_comps (pandas.DataFrame) – liquid compositions with column headings SiO2_Liq, MgO_Liq etc.

  • F2O_content (int, pd.series) – F2O content of the liquid (wt%), by default is set at zero.

Returns:

column headings of the form Liq_mol_frac_hyd, …

Return type:

pd.DataFrame