{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Benchmarking models for sulfur saturation\n", "\n", "This notebook benchmarks the models for sulfur saturation in VolFe where possible.\n", "\n", "## Python set-up" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import VolFe as vf\n", "import math" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Version of VolFe" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'0.4.1'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "vf.__version__" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Composition and conditions used for benchmarking\n", "\n", "Average of high-SiO2 pillow-rim glasses in HSDP from Mauna Kea volcano from Brounce et al. (2017)." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "my_analysis = {\n", " \"Sample\": \"Hawaiian basalt\",\n", " \"T_C\": 1200.0, # Temperature in 'C\n", " \"SiO2\": 51.29, # wt%\n", " \"TiO2\": 2.50, # wt%\n", " \"Al2O3\": 13.70, # wt%\n", " \"FeOT\": 11.04, # wt%\n", " \"MnO\": 0.02, # wt%\n", " \"MgO\": 6.70, # wt%\n", " \"CaO\": 11.03, # wt%\n", " \"Na2O\": 2.27, # wt%\n", " \"K2O\": 0.43, # wt%\n", " \"P2O5\": 0.21, # wt%\n", " \"H2O\": 3., # wt%\n", " \"CO2ppm\": 1000., # ppm\n", " \"STppm\": 0., # ppm\n", " \"Xppm\": 0.0, # ppm\n", " \"Fe3FeT\": 0.1,\n", " }\n", "\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "PT = {\"P\":1000.}\n", "PT[\"T\"]=1200.\n", "\n", "melt_wf=vf.melt_comp(0.,my_analysis)\n", "melt_wf['CO2'] = my_analysis.loc[0.,\"CO2ppm\"]/1000000.\n", "melt_wf[\"H2OT\"] = my_analysis.loc[0,\"H2O\"]/100.\n", "melt_wf['ST'] = my_analysis.loc[0.,\"STppm\"]/1000000.\n", "melt_wf['CT'] = (melt_wf['CO2']/vf.species.loc['CO2','M'])*vf.species.loc['C','M']\n", "melt_wf['HT'] = (melt_wf['H2OT']/vf.species.loc['H2O','M'])*(2.*vf.species.loc['H','M'])\n", "melt_wf['XT'] = my_analysis.loc[0.,\"Xppm\"]/1000000.\n", "melt_wf[\"Fe3FeT\"] = my_analysis.loc[0.,\"Fe3FeT\"]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Models for Sulfide Content at Sulfide Saturation (S2-CSS)\n", "\n", "option = SCSS, function = SCSS\n", "\n", "Models calculated using PySulfSat have been benchmarked in PySulfSat:\n", "- 'Fortin15_pss' Fortin et al. (2015) using PySulfSat by Wieser & Gleeson (2023)\n", "- 'Liu21_pss' Liu et al. (2021) using PySulfSat by Wieser & Gleeson (2023)\n", "- 'ONeill22_pss' O'Neill & Mavrogenes (2022) using PySulfSat by Wieser & Gleeson (2023)\n", "- 'ONeill21_pss' O'Neill (2021) using PySulfSat by Wieser & Gleeson (2023)\n", "- 'Smythe17_pss' Smythe et al. (2017) using PySulfSat by Wieser & Gleeson (2023)\n", "- 'Li22_pss' Li and Zhang (2022) using PySulfSat by Wieser and Gleeson (2023)\n", "- 'Blanchard21eq11_pss' Eq. (11) from Blanchard et al. (2021) using PySulfSat by Wieser and Gleeson (2023)\n", "- 'Blanchard21eq12_pss' Eq. (12) from Blanchard et al. (2021) using PySulfSat by Wieser and Gleeson (2023)\n", "\n", "The following models do not have material available in the original papers for benchmarking:\n", "- 'ONeill21hyd' Eq. (10.34, 10.43, 10.45, 10.46, 10.49) from O'Neill (2021)\n", "- 'ONeill21dil' Eq. (10.34, 10.43, 10.45, 10.46) including water dilution from O'Neill (2021)\n", "- 'Liu07' Eq. (9) in Liu et al. (2007)\n", "\n", "### 'ONeill21' Eq. (10.34, 10.43, 10.45, 10.46) excluding water dilution from O'Neill (2021)\n", "\n", "Supplementary spreadsheet (sulfide,SCSS=ONeill21.xlsx)\n", "\n", "Cell AR14: 7.437\n", "\n", "Matches to 3 decimal places: Note spreadsheet uses +273 to convert to K, rather than 273.15 used in VolFe so T in spreadsheet = 1200.15 'C" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "7.4369918428928115" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "my_models = [[\"SCSS\", \"ONeill21\"],[\"sulfide\", \"ONeill21\"]]\n", "my_models = vf.make_df_and_add_model_defaults(my_models)\n", "math.log(vf.SCSS(PT,melt_wf,models=my_models))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Models for Sulfate Content at Anhydrite Saturation (S6+CAS)\n", "\n", "option = SCAS, function = SCAS\n", "\n", "Models calculated using PySulfSat have been benchmarked in PySulfSat:\n", "- 'Chowdhury19_pss' Chowdhury & Dasgupta (2019) using PySulfSat by Wieser and Gleeson (2023)\n", "- 'Zajacz19_pss' Zajacz and Tsay (2019) using PySulfSat by Wieser and Gleeson (2023)\n", "\n", "The following models do not have material available in the original papers for benchmarking:\n", "- 'Liu23' Eq. (4) Liu et al. (2023)\n", "\n", "There are no other models to benchmark in VolFe." ] } ], "metadata": { "kernelspec": { "display_name": "volfe-dev", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.0" } }, "nbformat": 4, "nbformat_minor": 2 }