{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"id": "139c98b6-ecf9-404a-ba8a-be6471124f5a",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import sys\n",
"sys.path.append(\"..\")\n",
"import matplotlib.pyplot as plt\n",
"import Thermobar as pt\n",
"import sympy as sym\n",
"pd.options.display.max_columns = None"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "2d4619c0-2e07-4347-b921-6f5b670f2fea",
"metadata": {},
"outputs": [],
"source": [
"LiqT=pd.DataFrame(data={\"Sample_ID_Liq\": 'test',\n",
" \"SiO2_Liq\": 51,\n",
" \"TiO2_Liq\": 0.48,\n",
" \"Al2O3_Liq\": 19,\n",
" \"FeOt_Liq\": 5.3,\n",
" \"MnO_Liq\": 0.1,\n",
" \"MgO_Liq\": 4.5,\n",
" \"CaO_Liq\": 9,\n",
" \"Na2O_Liq\": 4.2,\n",
" \"K2O_Liq\": 0.1,\n",
" \"Cr2O3_Liq\": 0.11,\n",
" \"P2O5_Liq\": 0.11,\n",
" \"H2O_Liq\": 5,\n",
" \"Fe3FeT_Liq\":0.1,\n",
"}, index=[0])\n",
"\n",
"PlagT=pd.DataFrame(data={\"Sample_ID_Plag\": 'test1',\n",
" \"SiO2_Plag\": 57.3,\n",
" \"TiO2_Plag\": 0.09,\n",
" \"Al2O3_Plag\": 26.6,\n",
" \"FeOt_Plag\": 0.43,\n",
" \"MnO_Plag\": 0,\n",
" \"MgO_Plag\": 0.03,\n",
" \"CaO_Plag\": 8.83,\n",
" \"Na2O_Plag\": 6.11,\n",
" \"K2O_Plag\": 0.49,\n",
" \"Cr2O3_Plag\": 0.0}, index=[0])\n",
"\n",
"PlagT2=pd.DataFrame(data={\"Sample_ID_Plag\": 'testplg2',\n",
" \"SiO2_Plag\": 57.9,\n",
" \"TiO2_Plag\": 1.09,\n",
" \"Al2O3_Plag\": 26.6,\n",
" \"FeOt_Plag\": 0.43,\n",
" \"MnO_Plag\": 0,\n",
" \"MgO_Plag\": 0.03,\n",
" \"CaO_Plag\": 8.83,\n",
" \"Na2O_Plag\": 6.11,\n",
" \"K2O_Plag\": 0.49,\n",
" \"Cr2O3_Plag\": 0.0}, index=[0])\n",
"\n",
"KsparT=pd.DataFrame(data={\"Sample_ID_Kspar\": 'test2',\n",
" \"SiO2_Kspar\": 65.5,\n",
" \"TiO2_Kspar\": 0.0,\n",
" \"Al2O3_Kspar\": 19.6,\n",
" \"FeOt_Kspar\": 0.07,\n",
" \"MnO_Kspar\": 0,\n",
" \"MgO_Kspar\": 0.0,\n",
" \"CaO_Kspar\": 0.75,\n",
" \"Na2O_Kspar\": 4.81,\n",
" \"K2O_Kspar\": 9.36,\n",
" \"Cr2O3_Kspar\": 0.0}, index=[0])\n",
"\n",
"LiqT2=pd.DataFrame(data={\"Sample_ID_Liq\": 'testliq2',\n",
" \"SiO2_Liq\": 61,\n",
" \"TiO2_Liq\": 0.45,\n",
" \"Al2O3_Liq\": 18.56,\n",
" \"FeOt_Liq\": 3.17,\n",
" \"MnO_Liq\": 0.27,\n",
" \"MgO_Liq\": 0.23,\n",
" \"CaO_Liq\": 1.64,\n",
" \"Na2O_Liq\": 6.11,\n",
" \"K2O_Liq\": 7.09,\n",
" \"Cr2O3_Liq\": 0,\n",
" \"P2O5_Liq\": 0.02,\n",
" \"H2O_Liq\": 2,\n",
" \"Fe3FeT_Liq\":0,\n",
"}, index=[0])\n",
"\n",
"\n",
"Liq_Several=pd.concat([LiqT, LiqT2])\n",
"Plag_Several=pd.concat([PlagT, PlagT2])"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "e9d8db07",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Considering N=2 Fspar & N=2 Liqs, which is a total of N=4 Liq-Fspar pairs, be patient if this is >>1 million!\n",
"Applying filter to only average those that pass the An-Ab eq test of Putirka, 2008\n",
"Done!!! I found a total of N=2 Fspar-Liq matches using the specified filter. N=4 Fspar out of the N=2 Fspar that you input matched to 1 or more liquids\n"
]
},
{
"data": {
"text/plain": [
"1236.0082305446053"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_temp_matching(liq_comps=Liq_Several, plag_comps=Plag_Several,\n",
" equationT='T_Put2008_eq24a',\n",
"P=5, Ab_An_P2008=True)['All_PTs']['T_K_calc'][0]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "2aff0b69-fd48-48a1-81ba-21f6535a7af7",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
},
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" # of iterations | \n",
" T_K_calc | \n",
" Delta T (last 2 iters) | \n",
" H2O_calc | \n",
" Delta H (last 2 iters) | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" Si_Plag_cat_prop | \n",
" Mg_Plag_cat_prop | \n",
" Fet_Plag_cat_prop | \n",
" Ca_Plag_cat_prop | \n",
" Al_Plag_cat_prop | \n",
" Na_Plag_cat_prop | \n",
" K_Plag_cat_prop | \n",
" Mn_Plag_cat_prop | \n",
" Ti_Plag_cat_prop | \n",
" Cr_Plag_cat_prop | \n",
" sum | \n",
" Si_Plag_cat_frac | \n",
" Mg_Plag_cat_frac | \n",
" Fet_Plag_cat_frac | \n",
" Ca_Plag_cat_frac | \n",
" Al_Plag_cat_frac | \n",
" Na_Plag_cat_frac | \n",
" K_Plag_cat_frac | \n",
" Mn_Plag_cat_frac | \n",
" Ti_Plag_cat_frac | \n",
" Cr_Plag_cat_frac | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" Si_Liq_cat_frac | \n",
" Mg_Liq_cat_frac | \n",
" Mn_Liq_cat_frac | \n",
" Fet_Liq_cat_frac | \n",
" Ca_Liq_cat_frac | \n",
" Al_Liq_cat_frac | \n",
" Na_Liq_cat_frac | \n",
" K_Liq_cat_frac | \n",
" Ti_Liq_cat_frac | \n",
" P_Liq_cat_frac | \n",
" Cr_Liq_cat_frac | \n",
" Mg_Number_Liq_Fe3 | \n",
" Mg_Number_Liq_NoFe3 | \n",
" P | \n",
" T | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 10 | \n",
" 1362.263707 | \n",
" -0.851053 | \n",
" 3.820911 | \n",
" 0.021159 | \n",
" High T: No | \n",
" 0.247358 | \n",
" 0.361385 | \n",
" 0.027374 | \n",
" 0.678724 | \n",
" 0.178748 | \n",
" 0.001127 | \n",
" 0.65105 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.58185 | \n",
" 0.076535 | \n",
" 0.000966 | \n",
" 0.050568 | \n",
" 0.110016 | \n",
" 0.127738 | \n",
" 0.046452 | \n",
" 0.000728 | \n",
" 0.004119 | \n",
" 0.000531 | \n",
" 0.000496 | \n",
" 0.494793 | \n",
" 0.065084 | \n",
" 0.000822 | \n",
" 0.043002 | \n",
" 0.093555 | \n",
" 0.217252 | \n",
" 0.079004 | \n",
" 0.001238 | \n",
" 0.003503 | \n",
" 0.000904 | \n",
" 0.000844 | \n",
" 0.602144 | \n",
" 0.602144 | \n",
" 10 | \n",
" 1363.11476 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" # of iterations T_K_calc Delta T (last 2 iters) H2O_calc \\\n",
"0 10 1362.263707 -0.851053 3.820911 \n",
"\n",
" Delta H (last 2 iters) Pass An-Ab Eq Test Put2008? Delta_An Delta_Ab \\\n",
"0 0.021159 High T: No 0.247358 0.361385 \n",
"\n",
" Delta_Or Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An SiO2_Plag \\\n",
"0 0.027374 0.678724 0.178748 0.001127 0.65105 57.3 \n",
"\n",
" TiO2_Plag Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag Na2O_Plag \\\n",
"0 0.09 26.6 0.43 0 0.03 8.83 6.11 \n",
"\n",
" K2O_Plag Cr2O3_Plag Si_Plag_cat_prop Mg_Plag_cat_prop \\\n",
"0 0.49 0.0 0.95366 0.000744 \n",
"\n",
" Fet_Plag_cat_prop Ca_Plag_cat_prop Al_Plag_cat_prop Na_Plag_cat_prop \\\n",
"0 0.005985 0.157461 0.521768 0.197164 \n",
"\n",
" K_Plag_cat_prop Mn_Plag_cat_prop Ti_Plag_cat_prop Cr_Plag_cat_prop \\\n",
"0 0.010404 0.0 0.001127 0.0 \n",
"\n",
" sum Si_Plag_cat_frac Mg_Plag_cat_frac Fet_Plag_cat_frac \\\n",
"0 1.848313 0.515962 0.000403 0.003238 \n",
"\n",
" Ca_Plag_cat_frac Al_Plag_cat_frac Na_Plag_cat_frac K_Plag_cat_frac \\\n",
"0 0.085192 0.282294 0.106672 0.005629 \n",
"\n",
" Mn_Plag_cat_frac Ti_Plag_cat_frac Cr_Plag_cat_frac An_Plag Ab_Plag \\\n",
"0 0.0 0.00061 0.0 0.431366 0.540133 \n",
"\n",
" Or_Plag SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq \\\n",
"0 0.028501 51 0.48 19 5.3 0.1 4.5 \n",
"\n",
" CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 9 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.58185 0.076535 0.000966 0.050568 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110016 0.127738 0.046452 0.000728 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac Si_Liq_cat_frac \\\n",
"0 0.004119 0.000531 0.000496 0.494793 \n",
"\n",
" Mg_Liq_cat_frac Mn_Liq_cat_frac Fet_Liq_cat_frac Ca_Liq_cat_frac \\\n",
"0 0.065084 0.000822 0.043002 0.093555 \n",
"\n",
" Al_Liq_cat_frac Na_Liq_cat_frac K_Liq_cat_frac Ti_Liq_cat_frac \\\n",
"0 0.217252 0.079004 0.001238 0.003503 \n",
"\n",
" P_Liq_cat_frac Cr_Liq_cat_frac Mg_Number_Liq_Fe3 Mg_Number_Liq_NoFe3 \\\n",
"0 0.000904 0.000844 0.602144 0.602144 \n",
"\n",
" P T \n",
"0 10 1363.11476 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Temp_H2O=pt.calculate_fspar_liq_temp_hygr(plag_comps=PlagT, liq_comps=LiqT, equationT=\"T_Put2008_eq23\",\n",
" equationH=\"H_Waters2015\", iterations=10, P=10)\n",
"Temp_H2O['T_H_calc']"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "3f1a3c0a-2330-4c00-8a46-c932dbadb3c3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" # of iterations | \n",
" T_K_calc | \n",
" Delta T (last 2 iters) | \n",
" H2O_calc | \n",
" Delta H (last 2 iters) | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" Si_Plag_cat_prop | \n",
" Mg_Plag_cat_prop | \n",
" Fet_Plag_cat_prop | \n",
" Ca_Plag_cat_prop | \n",
" Al_Plag_cat_prop | \n",
" Na_Plag_cat_prop | \n",
" K_Plag_cat_prop | \n",
" Mn_Plag_cat_prop | \n",
" Ti_Plag_cat_prop | \n",
" Cr_Plag_cat_prop | \n",
" sum | \n",
" Si_Plag_cat_frac | \n",
" Mg_Plag_cat_frac | \n",
" Fet_Plag_cat_frac | \n",
" Ca_Plag_cat_frac | \n",
" Al_Plag_cat_frac | \n",
" Na_Plag_cat_frac | \n",
" K_Plag_cat_frac | \n",
" Mn_Plag_cat_frac | \n",
" Ti_Plag_cat_frac | \n",
" Cr_Plag_cat_frac | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" Si_Liq_cat_frac | \n",
" Mg_Liq_cat_frac | \n",
" Mn_Liq_cat_frac | \n",
" Fet_Liq_cat_frac | \n",
" Ca_Liq_cat_frac | \n",
" Al_Liq_cat_frac | \n",
" Na_Liq_cat_frac | \n",
" K_Liq_cat_frac | \n",
" Ti_Liq_cat_frac | \n",
" P_Liq_cat_frac | \n",
" Cr_Liq_cat_frac | \n",
" Mg_Number_Liq_Fe3 | \n",
" Mg_Number_Liq_NoFe3 | \n",
" P | \n",
" T | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 10 | \n",
" 1391.82907 | \n",
" -0.15753 | \n",
" 3.380639 | \n",
" 0.004505 | \n",
" High T: No | \n",
" 0.278812 | \n",
" 0.373775 | \n",
" 0.027185 | \n",
" 0.710178 | \n",
" 0.166358 | \n",
" 0.001316 | \n",
" 0.65105 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.58185 | \n",
" 0.076535 | \n",
" 0.000966 | \n",
" 0.050568 | \n",
" 0.110016 | \n",
" 0.127738 | \n",
" 0.046452 | \n",
" 0.000728 | \n",
" 0.004119 | \n",
" 0.000531 | \n",
" 0.000496 | \n",
" 0.494793 | \n",
" 0.065084 | \n",
" 0.000822 | \n",
" 0.043002 | \n",
" 0.093555 | \n",
" 0.217252 | \n",
" 0.079004 | \n",
" 0.001238 | \n",
" 0.003503 | \n",
" 0.000904 | \n",
" 0.000844 | \n",
" 0.602144 | \n",
" 0.602144 | \n",
" 10 | \n",
" 1391.9866 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" # of iterations T_K_calc Delta T (last 2 iters) H2O_calc \\\n",
"0 10 1391.82907 -0.15753 3.380639 \n",
"\n",
" Delta H (last 2 iters) Pass An-Ab Eq Test Put2008? Delta_An Delta_Ab \\\n",
"0 0.004505 High T: No 0.278812 0.373775 \n",
"\n",
" Delta_Or Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An SiO2_Plag \\\n",
"0 0.027185 0.710178 0.166358 0.001316 0.65105 57.3 \n",
"\n",
" TiO2_Plag Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag Na2O_Plag \\\n",
"0 0.09 26.6 0.43 0 0.03 8.83 6.11 \n",
"\n",
" K2O_Plag Cr2O3_Plag Si_Plag_cat_prop Mg_Plag_cat_prop \\\n",
"0 0.49 0.0 0.95366 0.000744 \n",
"\n",
" Fet_Plag_cat_prop Ca_Plag_cat_prop Al_Plag_cat_prop Na_Plag_cat_prop \\\n",
"0 0.005985 0.157461 0.521768 0.197164 \n",
"\n",
" K_Plag_cat_prop Mn_Plag_cat_prop Ti_Plag_cat_prop Cr_Plag_cat_prop \\\n",
"0 0.010404 0.0 0.001127 0.0 \n",
"\n",
" sum Si_Plag_cat_frac Mg_Plag_cat_frac Fet_Plag_cat_frac \\\n",
"0 1.848313 0.515962 0.000403 0.003238 \n",
"\n",
" Ca_Plag_cat_frac Al_Plag_cat_frac Na_Plag_cat_frac K_Plag_cat_frac \\\n",
"0 0.085192 0.282294 0.106672 0.005629 \n",
"\n",
" Mn_Plag_cat_frac Ti_Plag_cat_frac Cr_Plag_cat_frac An_Plag Ab_Plag \\\n",
"0 0.0 0.00061 0.0 0.431366 0.540133 \n",
"\n",
" Or_Plag SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq \\\n",
"0 0.028501 51 0.48 19 5.3 0.1 4.5 \n",
"\n",
" CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 9 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.58185 0.076535 0.000966 0.050568 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110016 0.127738 0.046452 0.000728 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac Si_Liq_cat_frac \\\n",
"0 0.004119 0.000531 0.000496 0.494793 \n",
"\n",
" Mg_Liq_cat_frac Mn_Liq_cat_frac Fet_Liq_cat_frac Ca_Liq_cat_frac \\\n",
"0 0.065084 0.000822 0.043002 0.093555 \n",
"\n",
" Al_Liq_cat_frac Na_Liq_cat_frac K_Liq_cat_frac Ti_Liq_cat_frac \\\n",
"0 0.217252 0.079004 0.001238 0.003503 \n",
"\n",
" P_Liq_cat_frac Cr_Liq_cat_frac Mg_Number_Liq_Fe3 Mg_Number_Liq_NoFe3 \\\n",
"0 0.000904 0.000844 0.602144 0.602144 \n",
"\n",
" P T \n",
"0 10 1391.9866 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Temp_H2O=pt.calculate_fspar_liq_temp_hygr(plag_comps=PlagT, liq_comps=LiqT, equationT=\"T_Put2008_eq24a\",\n",
" equationH=\"H_Waters2015\", iterations=10, P=10)\n",
"Temp_H2O['T_H_calc']"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "28ea4ad0-9206-4831-a84e-353a0baca763",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" # of iterations | \n",
" T_K_calc | \n",
" Delta T (last 2 iters) | \n",
" H2O_calc | \n",
" Delta H (last 2 iters) | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" Si_Plag_cat_prop | \n",
" Mg_Plag_cat_prop | \n",
" Fet_Plag_cat_prop | \n",
" Ca_Plag_cat_prop | \n",
" Al_Plag_cat_prop | \n",
" Na_Plag_cat_prop | \n",
" K_Plag_cat_prop | \n",
" Mn_Plag_cat_prop | \n",
" Ti_Plag_cat_prop | \n",
" Cr_Plag_cat_prop | \n",
" sum | \n",
" Si_Plag_cat_frac | \n",
" Mg_Plag_cat_frac | \n",
" Fet_Plag_cat_frac | \n",
" Ca_Plag_cat_frac | \n",
" Al_Plag_cat_frac | \n",
" Na_Plag_cat_frac | \n",
" K_Plag_cat_frac | \n",
" Mn_Plag_cat_frac | \n",
" Ti_Plag_cat_frac | \n",
" Cr_Plag_cat_frac | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" Si_Liq_cat_frac | \n",
" Mg_Liq_cat_frac | \n",
" Mn_Liq_cat_frac | \n",
" Fet_Liq_cat_frac | \n",
" Ca_Liq_cat_frac | \n",
" Al_Liq_cat_frac | \n",
" Na_Liq_cat_frac | \n",
" K_Liq_cat_frac | \n",
" Ti_Liq_cat_frac | \n",
" P_Liq_cat_frac | \n",
" Cr_Liq_cat_frac | \n",
" Mg_Number_Liq_Fe3 | \n",
" Mg_Number_Liq_NoFe3 | \n",
" P | \n",
" T | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 10 | \n",
" 1217.044852 | \n",
" -0.00005 | \n",
" 9.09812 | \n",
" 0.000002 | \n",
" Low T: Yes | \n",
" 0.090851 | \n",
" 0.269262 | \n",
" 0.028042 | \n",
" 0.522217 | \n",
" 0.27087 | \n",
" 0.00046 | \n",
" 0.65105 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.58185 | \n",
" 0.076535 | \n",
" 0.000966 | \n",
" 0.050568 | \n",
" 0.110016 | \n",
" 0.127738 | \n",
" 0.046452 | \n",
" 0.000728 | \n",
" 0.004119 | \n",
" 0.000531 | \n",
" 0.000496 | \n",
" 0.494793 | \n",
" 0.065084 | \n",
" 0.000822 | \n",
" 0.043002 | \n",
" 0.093555 | \n",
" 0.217252 | \n",
" 0.079004 | \n",
" 0.001238 | \n",
" 0.003503 | \n",
" 0.000904 | \n",
" 0.000844 | \n",
" 0.602144 | \n",
" 0.602144 | \n",
" 10 | \n",
" 1217.044901 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" # of iterations T_K_calc Delta T (last 2 iters) H2O_calc \\\n",
"0 10 1217.044852 -0.00005 9.09812 \n",
"\n",
" Delta H (last 2 iters) Pass An-Ab Eq Test Put2008? Delta_An Delta_Ab \\\n",
"0 0.000002 Low T: Yes 0.090851 0.269262 \n",
"\n",
" Delta_Or Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An SiO2_Plag \\\n",
"0 0.028042 0.522217 0.27087 0.00046 0.65105 57.3 \n",
"\n",
" TiO2_Plag Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag Na2O_Plag \\\n",
"0 0.09 26.6 0.43 0 0.03 8.83 6.11 \n",
"\n",
" K2O_Plag Cr2O3_Plag Si_Plag_cat_prop Mg_Plag_cat_prop \\\n",
"0 0.49 0.0 0.95366 0.000744 \n",
"\n",
" Fet_Plag_cat_prop Ca_Plag_cat_prop Al_Plag_cat_prop Na_Plag_cat_prop \\\n",
"0 0.005985 0.157461 0.521768 0.197164 \n",
"\n",
" K_Plag_cat_prop Mn_Plag_cat_prop Ti_Plag_cat_prop Cr_Plag_cat_prop \\\n",
"0 0.010404 0.0 0.001127 0.0 \n",
"\n",
" sum Si_Plag_cat_frac Mg_Plag_cat_frac Fet_Plag_cat_frac \\\n",
"0 1.848313 0.515962 0.000403 0.003238 \n",
"\n",
" Ca_Plag_cat_frac Al_Plag_cat_frac Na_Plag_cat_frac K_Plag_cat_frac \\\n",
"0 0.085192 0.282294 0.106672 0.005629 \n",
"\n",
" Mn_Plag_cat_frac Ti_Plag_cat_frac Cr_Plag_cat_frac An_Plag Ab_Plag \\\n",
"0 0.0 0.00061 0.0 0.431366 0.540133 \n",
"\n",
" Or_Plag SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq \\\n",
"0 0.028501 51 0.48 19 5.3 0.1 4.5 \n",
"\n",
" CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 9 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.58185 0.076535 0.000966 0.050568 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110016 0.127738 0.046452 0.000728 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac Si_Liq_cat_frac \\\n",
"0 0.004119 0.000531 0.000496 0.494793 \n",
"\n",
" Mg_Liq_cat_frac Mn_Liq_cat_frac Fet_Liq_cat_frac Ca_Liq_cat_frac \\\n",
"0 0.065084 0.000822 0.043002 0.093555 \n",
"\n",
" Al_Liq_cat_frac Na_Liq_cat_frac K_Liq_cat_frac Ti_Liq_cat_frac \\\n",
"0 0.217252 0.079004 0.001238 0.003503 \n",
"\n",
" P_Liq_cat_frac Cr_Liq_cat_frac Mg_Number_Liq_Fe3 Mg_Number_Liq_NoFe3 \\\n",
"0 0.000904 0.000844 0.602144 0.602144 \n",
"\n",
" P T \n",
"0 10 1217.044901 "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Temp_H2O=pt.calculate_fspar_liq_temp_hygr(plag_comps=PlagT, liq_comps=LiqT, equationT=\"T_Put2008_eq24a\",\n",
" equationH=\"H_Put2005_eqH\", iterations=10, P=10)\n",
"Temp_H2O['T_H_calc']"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "61ddede5-7328-412e-8b27-18408f00cc8b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1295.359719\n",
"dtype: float64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"T_PL_eq23_5kbar=pt.calculate_fspar_liq_temp(plag_comps=PlagT, liq_comps=LiqT, equationT=\"T_Put2008_eq23\", P=5)\n",
"T_PL_eq23_5kbar.head()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2d312b1d-b32c-4dc9-a328-a11699b4e217",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1236.008231\n",
"dtype: float64"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"T_PL_eq23_5kbar=pt.calculate_fspar_liq_temp(plag_comps=PlagT, liq_comps=LiqT2, equationT=\"T_Put2008_eq24a\", P=5)\n",
"T_PL_eq23_5kbar.head()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "e27e6dfb-bd68-4cc6-a7fa-127e98dd4e7a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1483.297388\n",
"dtype: float64"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"T_PL_eq23_5kbar=pt.calculate_fspar_liq_temp(plag_comps=PlagT, liq_comps=LiqT, equationT=\"T_Put2008_eq24a\", P=5, H2O_Liq=0)\n",
"T_PL_eq23_5kbar.head()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "e4f96b2a-2617-4a1f-9642-940668371611",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1207.9736462073308"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_temp(kspar_comps=KsparT, liq_comps=LiqT2, \n",
" equationT=\"T_Put2008_eq24b\", P=5, H2O_Liq=0)[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "7e029a7a-d705-411b-aed7-d850619ecf07",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1207.9736462073308"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_temp(kspar_comps=KsparT, liq_comps=LiqT2, \n",
" equationT=\"T_Put2008_eq24b\", P=5)[0]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "06d8e92a-b2d6-4782-89a7-b4791172836f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 -7.199104\n",
"dtype: float64"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_press(plag_comps=PlagT, liq_comps=LiqT, \n",
" equationP=\"P_Put2008_eq25\", T=1000)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "d5d0b35f-ef0d-418b-bd69-0ddcc95f4284",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" T_K_calc | \n",
" Delta_P_kbar_Iter | \n",
" Delta_T_K_Iter | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 7.005588 | \n",
" 1319.769669 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc T_K_calc Delta_P_kbar_Iter Delta_T_K_Iter\n",
"0 7.005588 1319.769669 0.0 0.0"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_press_temp(plag_comps=PlagT, liq_comps=LiqT, \n",
" equationP=\"P_Put2008_eq25\", equationT=\"T_Put2008_eq24a\")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "eabb3382-31e6-4aad-a847-1ac93650ffe2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" H2O_calc | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" SiO2_Plag_cat_prop | \n",
" MgO_Plag_cat_prop | \n",
" FeOt_Plag_cat_prop | \n",
" CaO_Plag_cat_prop | \n",
" Al2O3_Plag_cat_prop | \n",
" Na2O_Plag_cat_prop | \n",
" K2O_Plag_cat_prop | \n",
" MnO_Plag_cat_prop | \n",
" TiO2_Plag_cat_prop | \n",
" Cr2O3_Plag_cat_prop | \n",
" sum | \n",
" SiO2_Plag_cat_frac | \n",
" MgO_Plag_cat_frac | \n",
" FeOt_Plag_cat_frac | \n",
" CaO_Plag_cat_frac | \n",
" Al2O3_Plag_cat_frac | \n",
" Na2O_Plag_cat_frac | \n",
" K2O_Plag_cat_frac | \n",
" MnO_Plag_cat_frac | \n",
" TiO2_Plag_cat_frac | \n",
" Cr2O3_Plag_cat_frac | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac_v2 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Low T: Yes | \n",
" 5.148449 | \n",
" 0.333778 | \n",
" 0.384882 | \n",
" 0.027837 | \n",
" 0.765144 | \n",
" 0.155251 | \n",
" 0.000665 | \n",
" 0.65105 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.583438 | \n",
" 0.076744 | \n",
" 0.0 | \n",
" 0.050706 | \n",
" 0.110316 | \n",
" 0.0 | \n",
" 0.046579 | \n",
" 0.00073 | \n",
" 0.00413 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.127357 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Pass An-Ab Eq Test Put2008? H2O_calc Delta_An Delta_Ab Delta_Or \\\n",
"0 Low T: Yes 5.148449 0.333778 0.384882 0.027837 \n",
"\n",
" Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An An_Plag Ab_Plag \\\n",
"0 0.765144 0.155251 0.000665 0.65105 0.431366 0.540133 \n",
"\n",
" SiO2_Plag TiO2_Plag Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag \\\n",
"0 57.3 0.09 26.6 0.43 0 0.03 8.83 \n",
"\n",
" Na2O_Plag K2O_Plag Cr2O3_Plag SiO2_Plag_cat_prop MgO_Plag_cat_prop \\\n",
"0 6.11 0.49 0.0 0.95366 0.000744 \n",
"\n",
" FeOt_Plag_cat_prop CaO_Plag_cat_prop Al2O3_Plag_cat_prop \\\n",
"0 0.005985 0.157461 0.521768 \n",
"\n",
" Na2O_Plag_cat_prop K2O_Plag_cat_prop MnO_Plag_cat_prop \\\n",
"0 0.197164 0.010404 0.0 \n",
"\n",
" TiO2_Plag_cat_prop Cr2O3_Plag_cat_prop sum SiO2_Plag_cat_frac \\\n",
"0 0.001127 0.0 1.848313 0.515962 \n",
"\n",
" MgO_Plag_cat_frac FeOt_Plag_cat_frac CaO_Plag_cat_frac \\\n",
"0 0.000403 0.003238 0.085192 \n",
"\n",
" Al2O3_Plag_cat_frac Na2O_Plag_cat_frac K2O_Plag_cat_frac \\\n",
"0 0.282294 0.106672 0.005629 \n",
"\n",
" MnO_Plag_cat_frac TiO2_Plag_cat_frac Cr2O3_Plag_cat_frac Or_Plag \\\n",
"0 0.0 0.00061 0.0 0.028501 \n",
"\n",
" SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq \\\n",
"0 51 0.48 19 5.3 0.1 4.5 9 \n",
"\n",
" Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.583438 0.076744 0.0 0.050706 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110316 0.0 0.046579 0.00073 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac \\\n",
"0 0.00413 0.0 0.0 \n",
"\n",
" Al2O3_Liq_mol_frac_v2 \n",
"0 0.127357 "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, plag_comps=PlagT, equationH=\"H_Waters2015\", T=1000+273.15, P=1)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "7e8cd3d9-cfce-4e87-9350-fb4b9d75c39b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" H2O_calc | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" An | \n",
" Ab | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Low T: Yes | \n",
" 5.289477 | \n",
" 0.265144 | \n",
" 0.244749 | \n",
" 0.000665 | \n",
" 0.765144 | \n",
" 0.155251 | \n",
" 0.000665 | \n",
" 0.415958 | \n",
" 0.5 | \n",
" 0.4 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Pass An-Ab Eq Test Put2008? H2O_calc Delta_An Delta_Ab Delta_Or \\\n",
"0 Low T: Yes 5.289477 0.265144 0.244749 0.000665 \n",
"\n",
" Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An An Ab \n",
"0 0.765144 0.155251 0.000665 0.415958 0.5 0.4 "
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, XAn=0.5, XAb=0.4, equationH=\"H_Waters2015\", T=1000+273.15, P=1)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "a9b9f846-65d5-4be7-9a65-175403610b59",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" H2O_calc | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" SiO2_Plag_cat_prop | \n",
" MgO_Plag_cat_prop | \n",
" FeOt_Plag_cat_prop | \n",
" CaO_Plag_cat_prop | \n",
" Al2O3_Plag_cat_prop | \n",
" Na2O_Plag_cat_prop | \n",
" K2O_Plag_cat_prop | \n",
" MnO_Plag_cat_prop | \n",
" TiO2_Plag_cat_prop | \n",
" Cr2O3_Plag_cat_prop | \n",
" sum | \n",
" SiO2_Plag_cat_frac | \n",
" MgO_Plag_cat_frac | \n",
" FeOt_Plag_cat_frac | \n",
" CaO_Plag_cat_frac | \n",
" Al2O3_Plag_cat_frac | \n",
" Na2O_Plag_cat_frac | \n",
" K2O_Plag_cat_frac | \n",
" MnO_Plag_cat_frac | \n",
" TiO2_Plag_cat_frac | \n",
" Cr2O3_Plag_cat_frac | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" SiO2_Liq_cat_frac | \n",
" MgO_Liq_cat_frac | \n",
" MnO_Liq_cat_frac | \n",
" FeOt_Liq_cat_frac | \n",
" CaO_Liq_cat_frac | \n",
" Al2O3_Liq_cat_frac | \n",
" Na2O_Liq_cat_frac | \n",
" K2O_Liq_cat_frac | \n",
" TiO2_Liq_cat_frac | \n",
" P2O5_Liq_cat_frac | \n",
" Cr2O3_Liq_cat_frac | \n",
" FeO_Liq_cat_frac | \n",
" Mg_Number_Liq_NoFe3 | \n",
" Mg_Number_Liq_Fe3 | \n",
" P | \n",
" T | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 9.646943 | \n",
" Low T: Yes | \n",
" 0.333778 | \n",
" 0.384882 | \n",
" 0.027837 | \n",
" 0.765144 | \n",
" 0.155251 | \n",
" 0.000665 | \n",
" 0.65105 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.58185 | \n",
" 0.076535 | \n",
" 0.000966 | \n",
" 0.050568 | \n",
" 0.110016 | \n",
" 0.127738 | \n",
" 0.046452 | \n",
" 0.000728 | \n",
" 0.004119 | \n",
" 0.000531 | \n",
" 0.000496 | \n",
" 0.494793 | \n",
" 0.065084 | \n",
" 0.000822 | \n",
" 0.043002 | \n",
" 0.093555 | \n",
" 0.217252 | \n",
" 0.079004 | \n",
" 0.001238 | \n",
" 0.003503 | \n",
" 0.000904 | \n",
" 0.000844 | \n",
" 0.038702 | \n",
" 0.602144 | \n",
" 0.627093 | \n",
" 1 | \n",
" 1273.15 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" H2O_calc Pass An-Ab Eq Test Put2008? Delta_An Delta_Ab Delta_Or \\\n",
"0 9.646943 Low T: Yes 0.333778 0.384882 0.027837 \n",
"\n",
" Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An SiO2_Plag TiO2_Plag \\\n",
"0 0.765144 0.155251 0.000665 0.65105 57.3 0.09 \n",
"\n",
" Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag Na2O_Plag K2O_Plag \\\n",
"0 26.6 0.43 0 0.03 8.83 6.11 0.49 \n",
"\n",
" Cr2O3_Plag SiO2_Plag_cat_prop MgO_Plag_cat_prop FeOt_Plag_cat_prop \\\n",
"0 0.0 0.95366 0.000744 0.005985 \n",
"\n",
" CaO_Plag_cat_prop Al2O3_Plag_cat_prop Na2O_Plag_cat_prop \\\n",
"0 0.157461 0.521768 0.197164 \n",
"\n",
" K2O_Plag_cat_prop MnO_Plag_cat_prop TiO2_Plag_cat_prop \\\n",
"0 0.010404 0.0 0.001127 \n",
"\n",
" Cr2O3_Plag_cat_prop sum SiO2_Plag_cat_frac MgO_Plag_cat_frac \\\n",
"0 0.0 1.848313 0.515962 0.000403 \n",
"\n",
" FeOt_Plag_cat_frac CaO_Plag_cat_frac Al2O3_Plag_cat_frac \\\n",
"0 0.003238 0.085192 0.282294 \n",
"\n",
" Na2O_Plag_cat_frac K2O_Plag_cat_frac MnO_Plag_cat_frac \\\n",
"0 0.106672 0.005629 0.0 \n",
"\n",
" TiO2_Plag_cat_frac Cr2O3_Plag_cat_frac An_Plag Ab_Plag Or_Plag \\\n",
"0 0.00061 0.0 0.431366 0.540133 0.028501 \n",
"\n",
" SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq \\\n",
"0 51 0.48 19 5.3 0.1 4.5 9 \n",
"\n",
" Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.58185 0.076535 0.000966 0.050568 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110016 0.127738 0.046452 0.000728 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac \\\n",
"0 0.004119 0.000531 0.000496 \n",
"\n",
" SiO2_Liq_cat_frac MgO_Liq_cat_frac MnO_Liq_cat_frac FeOt_Liq_cat_frac \\\n",
"0 0.494793 0.065084 0.000822 0.043002 \n",
"\n",
" CaO_Liq_cat_frac Al2O3_Liq_cat_frac Na2O_Liq_cat_frac K2O_Liq_cat_frac \\\n",
"0 0.093555 0.217252 0.079004 0.001238 \n",
"\n",
" TiO2_Liq_cat_frac P2O5_Liq_cat_frac Cr2O3_Liq_cat_frac FeO_Liq_cat_frac \\\n",
"0 0.003503 0.000904 0.000844 0.038702 \n",
"\n",
" Mg_Number_Liq_NoFe3 Mg_Number_Liq_Fe3 P T \n",
"0 0.602144 0.627093 1 1273.15 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, plag_comps=PlagT, equationH=\"H_Put2005_eqH\", T=1000+273.15, P=1)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "586d74c5-94c7-4eb3-a883-784706c82041",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" H2O_calc | \n",
" Pass An-Ab Eq Test Put2008? | \n",
" Delta_An | \n",
" Delta_Ab | \n",
" Delta_Or | \n",
" Pred_An_EqE | \n",
" Pred_Ab_EqF | \n",
" Pred_Or_EqG | \n",
" Obs_Kd_Ab_An | \n",
" SiO2_Plag | \n",
" TiO2_Plag | \n",
" Al2O3_Plag | \n",
" FeOt_Plag | \n",
" MnO_Plag | \n",
" MgO_Plag | \n",
" CaO_Plag | \n",
" Na2O_Plag | \n",
" K2O_Plag | \n",
" Cr2O3_Plag | \n",
" SiO2_Plag_cat_prop | \n",
" MgO_Plag_cat_prop | \n",
" FeOt_Plag_cat_prop | \n",
" CaO_Plag_cat_prop | \n",
" Al2O3_Plag_cat_prop | \n",
" Na2O_Plag_cat_prop | \n",
" K2O_Plag_cat_prop | \n",
" MnO_Plag_cat_prop | \n",
" TiO2_Plag_cat_prop | \n",
" Cr2O3_Plag_cat_prop | \n",
" sum | \n",
" SiO2_Plag_cat_frac | \n",
" MgO_Plag_cat_frac | \n",
" FeOt_Plag_cat_frac | \n",
" CaO_Plag_cat_frac | \n",
" Al2O3_Plag_cat_frac | \n",
" Na2O_Plag_cat_frac | \n",
" K2O_Plag_cat_frac | \n",
" MnO_Plag_cat_frac | \n",
" TiO2_Plag_cat_frac | \n",
" Cr2O3_Plag_cat_frac | \n",
" An_Plag | \n",
" Ab_Plag | \n",
" Or_Plag | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3FeT_Liq | \n",
" SiO2_Liq_mol_frac | \n",
" MgO_Liq_mol_frac | \n",
" MnO_Liq_mol_frac | \n",
" FeOt_Liq_mol_frac | \n",
" CaO_Liq_mol_frac | \n",
" Al2O3_Liq_mol_frac | \n",
" Na2O_Liq_mol_frac | \n",
" K2O_Liq_mol_frac | \n",
" TiO2_Liq_mol_frac | \n",
" P2O5_Liq_mol_frac | \n",
" Cr2O3_Liq_mol_frac | \n",
" SiO2_Liq_cat_frac | \n",
" MgO_Liq_cat_frac | \n",
" MnO_Liq_cat_frac | \n",
" FeOt_Liq_cat_frac | \n",
" CaO_Liq_cat_frac | \n",
" Al2O3_Liq_cat_frac | \n",
" Na2O_Liq_cat_frac | \n",
" K2O_Liq_cat_frac | \n",
" TiO2_Liq_cat_frac | \n",
" P2O5_Liq_cat_frac | \n",
" Cr2O3_Liq_cat_frac | \n",
" FeO_Liq_cat_frac | \n",
" Mg_Number_Liq_NoFe3 | \n",
" Mg_Number_Liq_Fe3 | \n",
" P | \n",
" T | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 9.646943 | \n",
" Low T: Yes | \n",
" 0.333778 | \n",
" 0.384882 | \n",
" 0.027837 | \n",
" 0.765144 | \n",
" 0.155251 | \n",
" 0.000665 | \n",
" 0.65105 | \n",
" 57.3 | \n",
" 0.09 | \n",
" 26.6 | \n",
" 0.43 | \n",
" 0 | \n",
" 0.03 | \n",
" 8.83 | \n",
" 6.11 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 0.95366 | \n",
" 0.000744 | \n",
" 0.005985 | \n",
" 0.157461 | \n",
" 0.521768 | \n",
" 0.197164 | \n",
" 0.010404 | \n",
" 0.0 | \n",
" 0.001127 | \n",
" 0.0 | \n",
" 1.848313 | \n",
" 0.515962 | \n",
" 0.000403 | \n",
" 0.003238 | \n",
" 0.085192 | \n",
" 0.282294 | \n",
" 0.106672 | \n",
" 0.005629 | \n",
" 0.0 | \n",
" 0.00061 | \n",
" 0.0 | \n",
" 0.431366 | \n",
" 0.540133 | \n",
" 0.028501 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
" 0.58185 | \n",
" 0.076535 | \n",
" 0.000966 | \n",
" 0.050568 | \n",
" 0.110016 | \n",
" 0.127738 | \n",
" 0.046452 | \n",
" 0.000728 | \n",
" 0.004119 | \n",
" 0.000531 | \n",
" 0.000496 | \n",
" 0.494793 | \n",
" 0.065084 | \n",
" 0.000822 | \n",
" 0.043002 | \n",
" 0.093555 | \n",
" 0.217252 | \n",
" 0.079004 | \n",
" 0.001238 | \n",
" 0.003503 | \n",
" 0.000904 | \n",
" 0.000844 | \n",
" 0.038702 | \n",
" 0.602144 | \n",
" 0.627093 | \n",
" 1 | \n",
" 1273.15 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" H2O_calc Pass An-Ab Eq Test Put2008? Delta_An Delta_Ab Delta_Or \\\n",
"0 9.646943 Low T: Yes 0.333778 0.384882 0.027837 \n",
"\n",
" Pred_An_EqE Pred_Ab_EqF Pred_Or_EqG Obs_Kd_Ab_An SiO2_Plag TiO2_Plag \\\n",
"0 0.765144 0.155251 0.000665 0.65105 57.3 0.09 \n",
"\n",
" Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag Na2O_Plag K2O_Plag \\\n",
"0 26.6 0.43 0 0.03 8.83 6.11 0.49 \n",
"\n",
" Cr2O3_Plag SiO2_Plag_cat_prop MgO_Plag_cat_prop FeOt_Plag_cat_prop \\\n",
"0 0.0 0.95366 0.000744 0.005985 \n",
"\n",
" CaO_Plag_cat_prop Al2O3_Plag_cat_prop Na2O_Plag_cat_prop \\\n",
"0 0.157461 0.521768 0.197164 \n",
"\n",
" K2O_Plag_cat_prop MnO_Plag_cat_prop TiO2_Plag_cat_prop \\\n",
"0 0.010404 0.0 0.001127 \n",
"\n",
" Cr2O3_Plag_cat_prop sum SiO2_Plag_cat_frac MgO_Plag_cat_frac \\\n",
"0 0.0 1.848313 0.515962 0.000403 \n",
"\n",
" FeOt_Plag_cat_frac CaO_Plag_cat_frac Al2O3_Plag_cat_frac \\\n",
"0 0.003238 0.085192 0.282294 \n",
"\n",
" Na2O_Plag_cat_frac K2O_Plag_cat_frac MnO_Plag_cat_frac \\\n",
"0 0.106672 0.005629 0.0 \n",
"\n",
" TiO2_Plag_cat_frac Cr2O3_Plag_cat_frac An_Plag Ab_Plag Or_Plag \\\n",
"0 0.00061 0.0 0.431366 0.540133 0.028501 \n",
"\n",
" SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq \\\n",
"0 51 0.48 19 5.3 0.1 4.5 9 \n",
"\n",
" Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3FeT_Liq \\\n",
"0 4.2 0.1 0.11 0.11 5 0.1 \n",
"\n",
" SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac \\\n",
"0 0.58185 0.076535 0.000966 0.050568 \n",
"\n",
" CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac \\\n",
"0 0.110016 0.127738 0.046452 0.000728 \n",
"\n",
" TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac \\\n",
"0 0.004119 0.000531 0.000496 \n",
"\n",
" SiO2_Liq_cat_frac MgO_Liq_cat_frac MnO_Liq_cat_frac FeOt_Liq_cat_frac \\\n",
"0 0.494793 0.065084 0.000822 0.043002 \n",
"\n",
" CaO_Liq_cat_frac Al2O3_Liq_cat_frac Na2O_Liq_cat_frac K2O_Liq_cat_frac \\\n",
"0 0.093555 0.217252 0.079004 0.001238 \n",
"\n",
" TiO2_Liq_cat_frac P2O5_Liq_cat_frac Cr2O3_Liq_cat_frac FeO_Liq_cat_frac \\\n",
"0 0.003503 0.000904 0.000844 0.038702 \n",
"\n",
" Mg_Number_Liq_NoFe3 Mg_Number_Liq_Fe3 P T \n",
"0 0.602144 0.627093 1 1273.15 "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, plag_comps=PlagT, equationH=\"H_Put2005_eqH\", T=1000+273.15, P=1)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "6d8aa932-3c28-462a-a95a-430ea7ea0640",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.6510495841937365"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, \n",
" plag_comps=PlagT, equationH=\"H_Put2005_eqH\", T=1000+273.15, P=1).Obs_Kd_Ab_An[0]"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "ec582638-616c-40f9-9368-3e5c35c230c7",
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "even if the equation doesnt require a P to be enteredbecause you have selected eq tests, you need to enter a P",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m pt.calculate_fspar_liq_hygr(liq_comps=LiqT, \n\u001b[0m\u001b[0;32m 2\u001b[0m plag_comps=PlagT, equationH=\"H_Put2005_eqH\", T=1000+273.15).Obs_Kd_Ab_An[0]\n",
"\u001b[1;32m~\\OneDrive - Oregon State University\\Postdoc\\PyMME\\MyBarometers\\Thermobar_outer\\Thermobar\\feldspar.py\u001b[0m in \u001b[0;36mcalculate_fspar_liq_hygr\u001b[1;34m(liq_comps, plag_comps, kspar_comps, equationH, P, T, XAn, XAb, XOr)\u001b[0m\n\u001b[0;32m 717\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mequationH\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"H_Put2008_eq25b\"\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mequationH\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"H_Put2005_eqH\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 718\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mP\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 719\u001b[1;33m raise TypeError('even if the equation doesnt require a P to be entered'\n\u001b[0m\u001b[0;32m 720\u001b[0m 'because you have selected eq tests, you need to enter a P')\n\u001b[0;32m 721\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mplag_comps\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mTypeError\u001b[0m: even if the equation doesnt require a P to be enteredbecause you have selected eq tests, you need to enter a P"
]
}
],
"source": [
"pt.calculate_fspar_liq_hygr(liq_comps=LiqT, \n",
" plag_comps=PlagT, equationH=\"H_Put2005_eqH\", T=1000+273.15).Obs_Kd_Ab_An[0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bb2d1e36-dfa5-4965-a0c2-ac83822492b9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}