This page was generated from docs/Examples/Amphibole/Amp_Liq_Melt_Matching.ipynb. Interactive online version: Binder badge.

Python Notebook Download

Amp-Liq Melt mathcing

You need to install Thermobar once on your machine, if you haven’t done this yet, uncomment the line below (remove the #)

[1]:
#!pip install Thermobar

Load python things

[2]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import Thermobar as pt
pd.options.display.max_columns = None

Load data

[3]:
out1=pt.import_excel('Amphibole_Liquids.xlsx', sheet_name="Amp")
Amps=out1['Amps']
out2=pt.import_excel('Amphibole_Liquids.xlsx', sheet_name="Liq")
Liqs=out2['Liqs']

Checking data read in correctly (check no columns are full of zeros that you think you inputted)

[4]:
display(Amps.head())
display(Liqs.head())
SiO2_Amp TiO2_Amp Al2O3_Amp FeOt_Amp MnO_Amp MgO_Amp CaO_Amp Na2O_Amp K2O_Amp Cr2O3_Amp F_Amp Cl_Amp Sample_ID_Amp
0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.20 0.92 0.00 0 0 probe1
1 39.45 1.88 10.80 11.85 0.00 11.32 10.94 2.04 0.75 0.00 0 0 probe2
2 42.88 3.46 14.28 15.99 0.54 14.25 12.12 2.43 1.18 0.03 0 0 probe3
3 42.20 2.75 11.10 13.10 0.39 13.55 11.07 2.27 0.95 0.01 0 0 probe4
4 40.37 2.28 10.06 11.76 0.19 12.41 10.40 2.09 0.82 0.00 0 0 probe5
SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq NiO_Liq CoO_Liq CO2_Liq Sample_ID_Liq
0 62.317403 0.592583 17.015042 5.578974 0.147384 1.493784 5.199067 3.799517 3.840125 0 0.320967 5 0.0 0.0 0.0 0.0 probe_s2_1
1 63.410655 0.567627 16.682223 5.211648 0.139473 1.343074 4.680291 3.797226 4.118336 0 0.320854 5 0.0 0.0 0.0 0.0 probe_s2_2
2 64.978351 0.531840 16.204967 4.684912 0.128130 1.126960 3.936379 3.793940 4.517285 0 0.320691 5 0.0 0.0 0.0 0.0 probe_s2_3
3 60.953715 0.623712 17.430191 6.037164 0.157251 1.681775 5.846172 3.802375 3.493093 0 0.321109 5 0.0 0.0 0.0 0.0 probe_s2_4
4 60.188394 0.641183 17.663178 6.294307 0.162789 1.787278 6.209337 3.803979 3.298333 0 0.321189 5 0.0 0.0 0.0 0.0 probe_s2_5

Assessing all possible Amp-Liq matches

[11]:
dict_out=pt.calculate_amp_liq_press_temp_matching(liq_comps=Liqs, amp_comps=Amps, equationT="T_Put2016_eq4b",
equationP="P_Put2016_eq7a",Kd_Match=0.28, Kd_Err=0.11, return_all_pairs=False)
Note - Putirka 2016 spreadsheet calculates H2O using a H2O-solubility law of uncertian origin based on the pressure calculated for 7a, and iterates H2O and P. We dont do this, as we dont believe a pure h2o model is necessarily valid as you may be mixed fluid saturated or undersaturated. We recomend instead you choose a reasonable H2O content based on your system.
Considering N=22 Amp & N=6 Liqs, which is a total of N=132 Amp-Liq pairs, be patient if this is >>1 million!
Youve selected a P-independent function
Youve selected a T-independent function
Done!!! I found a total of N=114 Amp-Liq matches using the specified filter. N=20 Amp out of the N=22 Amp that you input matched to 1 or more liquids

This returns the average PT for each amphibole

[12]:
dict_out['Av_PTs'].head()
[12]:
Sample_ID_Amp # of Liqs Averaged Mean_T_K_calc Std_T_K_calc Mean_P_kbar_calc Std_P_kbar_calc ID_AMP Mean_Sample_ID_Amp Mean_Delta_P_kbar_Iter Mean_Delta_T_K_Iter Mean_SiO2_Liq Mean_SiO2_Liq Mean_TiO2_Liq Mean_TiO2_Liq Mean_Al2O3_Liq Mean_Al2O3_Liq Mean_FeOt_Liq Mean_FeOt_Liq Mean_MnO_Liq Mean_MnO_Liq Mean_MgO_Liq Mean_MgO_Liq Mean_CaO_Liq Mean_CaO_Liq Mean_Na2O_Liq Mean_Na2O_Liq Mean_K2O_Liq Mean_K2O_Liq Mean_Cr2O3_Liq Mean_Cr2O3_Liq Mean_P2O5_Liq Mean_P2O5_Liq Mean_H2O_Liq Mean_H2O_Liq Mean_Fe3Fet_Liq Mean_Fe3Fet_Liq Mean_NiO_Liq Mean_NiO_Liq Mean_CoO_Liq Mean_CoO_Liq Mean_CO2_Liq Mean_CO2_Liq Mean_ID_Liq Mean_ID_Liq Mean_SiO2_Liq_mol_frac_hyd Mean_MgO_Liq_mol_frac_hyd Mean_MnO_Liq_mol_frac_hyd Mean_FeOt_Liq_mol_frac_hyd Mean_CaO_Liq_mol_frac_hyd Mean_Al2O3_Liq_mol_frac_hyd Mean_Na2O_Liq_mol_frac_hyd Mean_K2O_Liq_mol_frac_hyd Mean_TiO2_Liq_mol_frac_hyd Mean_P2O5_Liq_mol_frac_hyd Mean_Cr2O3_Liq_mol_frac_hyd Mean_H2O_Liq_mol_frac_hyd Mean_Si_Liq_cat_frac_hyd Mean_Mg_Liq_cat_frac_hyd Mean_Mn_Liq_cat_frac_hyd Mean_Fet_Liq_cat_frac_hyd Mean_Ca_Liq_cat_frac_hyd Mean_Al_Liq_cat_frac_hyd Mean_Na_Liq_cat_frac_hyd Mean_K_Liq_cat_frac_hyd Mean_Ti_Liq_cat_frac_hyd Mean_P_Liq_cat_frac_hyd Mean_Cr_Liq_cat_frac_hyd Mean_H2O_Liq_cat_frac_hyd Mean_Fe2_Liq_cat_frac_hyd Mean_Mg_Number_Liq_NoFe3 Mean_Mg_Number_Liq_NoFe3 Mean_Mg_Number_Liq_Fe3 Mean_Mg_Number_Liq_Fe3 Mean_SiO2_Liq Mean_SiO2_Liq Mean_TiO2_Liq Mean_TiO2_Liq Mean_Al2O3_Liq Mean_Al2O3_Liq Mean_FeOt_Liq Mean_FeOt_Liq Mean_MnO_Liq Mean_MnO_Liq Mean_MgO_Liq Mean_MgO_Liq Mean_CaO_Liq Mean_CaO_Liq Mean_Na2O_Liq Mean_Na2O_Liq Mean_K2O_Liq Mean_K2O_Liq Mean_Cr2O3_Liq Mean_Cr2O3_Liq Mean_P2O5_Liq Mean_P2O5_Liq Mean_H2O_Liq Mean_H2O_Liq Mean_Fe3Fet_Liq Mean_Fe3Fet_Liq Mean_NiO_Liq Mean_NiO_Liq Mean_CoO_Liq Mean_CoO_Liq Mean_CO2_Liq Mean_CO2_Liq Mean_ID_Liq Mean_ID_Liq Mean_SiO2_Liq_mol_frac Mean_MgO_Liq_mol_frac Mean_MnO_Liq_mol_frac Mean_FeOt_Liq_mol_frac Mean_CaO_Liq_mol_frac Mean_Al2O3_Liq_mol_frac Mean_Na2O_Liq_mol_frac Mean_K2O_Liq_mol_frac Mean_TiO2_Liq_mol_frac Mean_P2O5_Liq_mol_frac Mean_Cr2O3_Liq_mol_frac Mean_Si_Liq_cat_frac Mean_Mg_Liq_cat_frac Mean_Mn_Liq_cat_frac Mean_Fet_Liq_cat_frac Mean_Ca_Liq_cat_frac Mean_Al_Liq_cat_frac Mean_Na_Liq_cat_frac Mean_K_Liq_cat_frac Mean_Ti_Liq_cat_frac Mean_P_Liq_cat_frac Mean_Cr_Liq_cat_frac Mean_Mg_Number_Liq_NoFe3 Mean_Mg_Number_Liq_NoFe3 Mean_Mg_Number_Liq_Fe3 Mean_Mg_Number_Liq_Fe3 Std_Sample_ID_Amp Std_Delta_P_kbar_Iter Std_Delta_T_K_Iter Std_SiO2_Liq Std_SiO2_Liq Std_TiO2_Liq Std_TiO2_Liq Std_Al2O3_Liq Std_Al2O3_Liq Std_FeOt_Liq Std_FeOt_Liq Std_MnO_Liq Std_MnO_Liq Std_MgO_Liq Std_MgO_Liq Std_CaO_Liq Std_CaO_Liq Std_Na2O_Liq Std_Na2O_Liq Std_K2O_Liq Std_K2O_Liq Std_Cr2O3_Liq Std_Cr2O3_Liq Std_P2O5_Liq Std_P2O5_Liq Std_H2O_Liq Std_H2O_Liq Std_Fe3Fet_Liq Std_Fe3Fet_Liq Std_NiO_Liq Std_NiO_Liq Std_CoO_Liq Std_CoO_Liq Std_CO2_Liq Std_CO2_Liq Std_ID_Liq Std_ID_Liq Std_SiO2_Liq_mol_frac_hyd Std_MgO_Liq_mol_frac_hyd Std_MnO_Liq_mol_frac_hyd Std_FeOt_Liq_mol_frac_hyd Std_CaO_Liq_mol_frac_hyd Std_Al2O3_Liq_mol_frac_hyd Std_Na2O_Liq_mol_frac_hyd Std_K2O_Liq_mol_frac_hyd Std_TiO2_Liq_mol_frac_hyd Std_P2O5_Liq_mol_frac_hyd Std_Cr2O3_Liq_mol_frac_hyd Std_H2O_Liq_mol_frac_hyd Std_Si_Liq_cat_frac_hyd Std_Mg_Liq_cat_frac_hyd Std_Mn_Liq_cat_frac_hyd Std_Fet_Liq_cat_frac_hyd Std_Ca_Liq_cat_frac_hyd Std_Al_Liq_cat_frac_hyd Std_Na_Liq_cat_frac_hyd Std_K_Liq_cat_frac_hyd Std_Ti_Liq_cat_frac_hyd Std_P_Liq_cat_frac_hyd Std_Cr_Liq_cat_frac_hyd Std_H2O_Liq_cat_frac_hyd Std_Fe2_Liq_cat_frac_hyd Std_Mg_Number_Liq_NoFe3 Std_Mg_Number_Liq_NoFe3 Std_Mg_Number_Liq_Fe3 Std_Mg_Number_Liq_Fe3 Std_SiO2_Liq Std_SiO2_Liq Std_TiO2_Liq Std_TiO2_Liq Std_Al2O3_Liq Std_Al2O3_Liq Std_FeOt_Liq Std_FeOt_Liq Std_MnO_Liq Std_MnO_Liq Std_MgO_Liq Std_MgO_Liq Std_CaO_Liq Std_CaO_Liq Std_Na2O_Liq Std_Na2O_Liq Std_K2O_Liq Std_K2O_Liq Std_Cr2O3_Liq Std_Cr2O3_Liq Std_P2O5_Liq Std_P2O5_Liq Std_H2O_Liq Std_H2O_Liq Std_Fe3Fet_Liq Std_Fe3Fet_Liq Std_NiO_Liq Std_NiO_Liq Std_CoO_Liq Std_CoO_Liq Std_CO2_Liq Std_CO2_Liq Std_ID_Liq Std_ID_Liq Std_SiO2_Liq_mol_frac Std_MgO_Liq_mol_frac Std_MnO_Liq_mol_frac Std_FeOt_Liq_mol_frac Std_CaO_Liq_mol_frac Std_Al2O3_Liq_mol_frac Std_Na2O_Liq_mol_frac Std_K2O_Liq_mol_frac Std_TiO2_Liq_mol_frac Std_P2O5_Liq_mol_frac Std_Cr2O3_Liq_mol_frac Std_Si_Liq_cat_frac Std_Mg_Liq_cat_frac Std_Mn_Liq_cat_frac Std_Fet_Liq_cat_frac Std_Ca_Liq_cat_frac Std_Al_Liq_cat_frac Std_Na_Liq_cat_frac Std_K_Liq_cat_frac Std_Ti_Liq_cat_frac Std_P_Liq_cat_frac Std_Cr_Liq_cat_frac Std_Mg_Number_Liq_NoFe3 Std_Mg_Number_Liq_NoFe3 Std_Mg_Number_Liq_Fe3 Std_Mg_Number_Liq_Fe3
0 probe1 6 1200.539151 10.916860 6.165268 0.015728 0 probe1 0.0 0.0 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.578023 0.020011 0.001136 0.042327 0.050073 0.092094 0.034002 0.023049 0.004069 0.001254 0.0 0.153962 0.443147 0.015341 0.000871 0.03245 0.038388 0.141209 0.052135 0.035341 0.00312 0.001923 0.0 0.236073 0.03245 0.319569 0.319569 0.319569 0.319569 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.683214 0.023652 0.001343 0.050028 0.059184 0.108853 0.040189 0.027243 0.00481 0.001483 0.0 0.580095 0.020082 0.00114 0.042476 0.05025 0.184845 0.068247 0.046264 0.004084 0.002518 0.0 0.319569 0.319569 0.319569 0.319569 probe1 0.0 0.0 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.017042 0.003416 0.000102 0.004661 0.00845 0.002935 0.000013 0.002722 0.000284 4.867091e-08 0.0 0.000096 0.01311 0.002617 0.000078 0.00357 0.006475 0.004487 0.000014 0.004178 0.000217 2.657463e-07 0.0 0.000171 0.00357 0.01341 0.01341 0.01341 0.01341 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.020221 0.004035 0.00012 0.005503 0.009981 0.003457 0.00001 0.003221 0.000335 2.255172e-07 0.0 0.01729 0.003421 0.000102 0.004664 0.008464 0.005832 0.000003 0.005479 0.000284 9.099756e-07 0.0 0.01341 0.01341 0.01341 0.01341
1 probe2 6 1194.006260 10.763558 4.808047 0.015728 1 probe2 0.0 0.0 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.578023 0.020011 0.001136 0.042327 0.050073 0.092094 0.034002 0.023049 0.004069 0.001254 0.0 0.153962 0.443147 0.015341 0.000871 0.03245 0.038388 0.141209 0.052135 0.035341 0.00312 0.001923 0.0 0.236073 0.03245 0.319569 0.319569 0.319569 0.319569 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.683214 0.023652 0.001343 0.050028 0.059184 0.108853 0.040189 0.027243 0.00481 0.001483 0.0 0.580095 0.020082 0.00114 0.042476 0.05025 0.184845 0.068247 0.046264 0.004084 0.002518 0.0 0.319569 0.319569 0.319569 0.319569 probe2 0.0 0.0 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.017042 0.003416 0.000102 0.004661 0.00845 0.002935 0.000013 0.002722 0.000284 4.867091e-08 0.0 0.000096 0.01311 0.002617 0.000078 0.00357 0.006475 0.004487 0.000014 0.004178 0.000217 2.657463e-07 0.0 0.000171 0.00357 0.01341 0.01341 0.01341 0.01341 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.020221 0.004035 0.00012 0.005503 0.009981 0.003457 0.00001 0.003221 0.000335 2.255172e-07 0.0 0.01729 0.003421 0.000102 0.004664 0.008464 0.005832 0.000003 0.005479 0.000284 9.099756e-07 0.0 0.01341 0.01341 0.01341 0.01341
2 probe3 6 1199.690816 10.896892 7.044792 0.015728 2 probe3 0.0 0.0 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.578023 0.020011 0.001136 0.042327 0.050073 0.092094 0.034002 0.023049 0.004069 0.001254 0.0 0.153962 0.443147 0.015341 0.000871 0.03245 0.038388 0.141209 0.052135 0.035341 0.00312 0.001923 0.0 0.236073 0.03245 0.319569 0.319569 0.319569 0.319569 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.683214 0.023652 0.001343 0.050028 0.059184 0.108853 0.040189 0.027243 0.00481 0.001483 0.0 0.580095 0.020082 0.00114 0.042476 0.05025 0.184845 0.068247 0.046264 0.004084 0.002518 0.0 0.319569 0.319569 0.319569 0.319569 probe3 0.0 0.0 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.017042 0.003416 0.000102 0.004661 0.00845 0.002935 0.000013 0.002722 0.000284 4.867091e-08 0.0 0.000096 0.01311 0.002617 0.000078 0.00357 0.006475 0.004487 0.000014 0.004178 0.000217 2.657463e-07 0.0 0.000171 0.00357 0.01341 0.01341 0.01341 0.01341 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.020221 0.004035 0.00012 0.005503 0.009981 0.003457 0.00001 0.003221 0.000335 2.255172e-07 0.0 0.01729 0.003421 0.000102 0.004664 0.008464 0.005832 0.000003 0.005479 0.000284 9.099756e-07 0.0 0.01341 0.01341 0.01341 0.01341
3 probe4 6 1206.838580 11.065710 4.992487 0.015728 3 probe4 0.0 0.0 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.578023 0.020011 0.001136 0.042327 0.050073 0.092094 0.034002 0.023049 0.004069 0.001254 0.0 0.153962 0.443147 0.015341 0.000871 0.03245 0.038388 0.141209 0.052135 0.035341 0.00312 0.001923 0.0 0.236073 0.03245 0.319569 0.319569 0.319569 0.319569 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.683214 0.023652 0.001343 0.050028 0.059184 0.108853 0.040189 0.027243 0.00481 0.001483 0.0 0.580095 0.020082 0.00114 0.042476 0.05025 0.184845 0.068247 0.046264 0.004084 0.002518 0.0 0.319569 0.319569 0.319569 0.319569 probe4 0.0 0.0 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.017042 0.003416 0.000102 0.004661 0.00845 0.002935 0.000013 0.002722 0.000284 4.867091e-08 0.0 0.000096 0.01311 0.002617 0.000078 0.00357 0.006475 0.004487 0.000014 0.004178 0.000217 2.657463e-07 0.0 0.000171 0.00357 0.01341 0.01341 0.01341 0.01341 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.020221 0.004035 0.00012 0.005503 0.009981 0.003457 0.00001 0.003221 0.000335 2.255172e-07 0.0 0.01729 0.003421 0.000102 0.004664 0.008464 0.005832 0.000003 0.005479 0.000284 9.099756e-07 0.0 0.01341 0.01341 0.01341 0.01341
4 probe5 6 1205.412944 11.031935 4.546120 0.015728 4 probe5 0.0 0.0 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.578023 0.020011 0.001136 0.042327 0.050073 0.092094 0.034002 0.023049 0.004069 0.001254 0.0 0.153962 0.443147 0.015341 0.000871 0.03245 0.038388 0.141209 0.052135 0.035341 0.00312 0.001923 0.0 0.236073 0.03245 0.319569 0.319569 0.319569 0.319569 62.605707 62.605707 0.586002 0.586002 16.927273 16.927273 5.482105 5.482105 0.145298 0.145298 1.45404 1.45404 5.062259 5.062259 3.798913 3.798913 3.913493 3.913493 0.0 0.0 0.320937 0.320937 5.0 5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5 2.5 0.683214 0.023652 0.001343 0.050028 0.059184 0.108853 0.040189 0.027243 0.00481 0.001483 0.0 0.580095 0.020082 0.00114 0.042476 0.05025 0.184845 0.068247 0.046264 0.004084 0.002518 0.0 0.319569 0.319569 0.319569 0.319569 probe5 0.0 0.0 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.017042 0.003416 0.000102 0.004661 0.00845 0.002935 0.000013 0.002722 0.000284 4.867091e-08 0.0 0.000096 0.01311 0.002617 0.000078 0.00357 0.006475 0.004487 0.000014 0.004178 0.000217 2.657463e-07 0.0 0.000171 0.00357 0.01341 0.01341 0.01341 0.01341 1.806955 1.806955 0.041248 0.041248 0.550093 0.550093 0.607125 0.607125 0.013075 0.013075 0.249097 0.249097 0.857447 0.857447 0.003787 0.003787 0.459835 0.459835 0.0 0.0 0.000188 0.000188 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.870829 1.870829 0.020221 0.004035 0.00012 0.005503 0.009981 0.003457 0.00001 0.003221 0.000335 2.255172e-07 0.0 0.01729 0.003421 0.000102 0.004664 0.008464 0.005832 0.000003 0.005479 0.000284 9.099756e-07 0.0 0.01341 0.01341 0.01341 0.01341

This returns all Amp-Liq matches

[13]:
dict_out['All_PTs'].head()
[13]:
P_kbar_calc T_K_calc Delta_P_kbar_Iter Delta_T_K_Iter Delta_Kd SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq NiO_Liq CoO_Liq CO2_Liq Sample_ID_Liq ID_Liq SiO2_Liq_mol_frac_hyd MgO_Liq_mol_frac_hyd MnO_Liq_mol_frac_hyd FeOt_Liq_mol_frac_hyd CaO_Liq_mol_frac_hyd Al2O3_Liq_mol_frac_hyd Na2O_Liq_mol_frac_hyd K2O_Liq_mol_frac_hyd TiO2_Liq_mol_frac_hyd P2O5_Liq_mol_frac_hyd Cr2O3_Liq_mol_frac_hyd H2O_Liq_mol_frac_hyd Si_Liq_cat_frac_hyd Mg_Liq_cat_frac_hyd Mn_Liq_cat_frac_hyd Fet_Liq_cat_frac_hyd Ca_Liq_cat_frac_hyd Al_Liq_cat_frac_hyd Na_Liq_cat_frac_hyd K_Liq_cat_frac_hyd Ti_Liq_cat_frac_hyd P_Liq_cat_frac_hyd Cr_Liq_cat_frac_hyd H2O_Liq_cat_frac_hyd Fe2_Liq_cat_frac_hyd Mg_Number_Liq_NoFe3 Mg_Number_Liq_Fe3 SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq NiO_Liq CoO_Liq CO2_Liq Sample_ID_Liq ID_Liq SiO2_Liq_mol_frac MgO_Liq_mol_frac MnO_Liq_mol_frac FeOt_Liq_mol_frac CaO_Liq_mol_frac Al2O3_Liq_mol_frac Na2O_Liq_mol_frac K2O_Liq_mol_frac TiO2_Liq_mol_frac P2O5_Liq_mol_frac Cr2O3_Liq_mol_frac Si_Liq_cat_frac Mg_Liq_cat_frac Mn_Liq_cat_frac Fet_Liq_cat_frac Ca_Liq_cat_frac Al_Liq_cat_frac Na_Liq_cat_frac K_Liq_cat_frac Ti_Liq_cat_frac P_Liq_cat_frac Cr_Liq_cat_frac Mg_Number_Liq_NoFe3 Mg_Number_Liq_Fe3 Si_Amp_cat_23ox Mg_Amp_cat_23ox Fet_Amp_cat_23ox Ca_Amp_cat_23ox Al_Amp_cat_23ox Na_Amp_cat_23ox K_Amp_cat_23ox Mn_Amp_cat_23ox Ti_Amp_cat_23ox Cr_Amp_cat_23ox oxy_renorm_factor cation_sum_Si_Mg cation_sum_Si_Ca cation_sum_All Mgno_Amp SiO2_Amp_mol_prop MgO_Amp_mol_prop FeOt_Amp_mol_prop CaO_Amp_mol_prop Al2O3_Amp_mol_prop Na2O_Amp_mol_prop K2O_Amp_mol_prop MnO_Amp_mol_prop TiO2_Amp_mol_prop Cr2O3_Amp_mol_prop SiO2_Amp TiO2_Amp Al2O3_Amp FeOt_Amp MnO_Amp MgO_Amp CaO_Amp Na2O_Amp K2O_Amp Cr2O3_Amp F_Amp Cl_Amp Sample_ID_Amp ID_AMP Kd
0 6.168027 1202.507284 0.0 0.0 0.010406 62.317403 0.592583 17.015042 5.578974 0.147384 1.493784 5.199067 3.799517 3.840125 0 0.320967 5 0.0 0.0 0.0 0.0 probe_s2_1 0 0.575295 0.020558 0.001152 0.043073 0.051426 0.092564 0.034004 0.022613 0.004115 0.001254 0.0 0.153947 0.441048 0.015761 0.000884 0.033022 0.039425 0.141927 0.052138 0.034672 0.003155 0.001923 0.0 0.236046 0.033022 0.323079 0.323079 62.317403 0.592583 17.015042 5.578974 0.147384 1.493784 5.199067 3.799517 3.840125 0 0.320967 5 0.0 0.0 0.0 0.0 probe_s2_1 0 0.679976 0.024299 0.001362 0.050909 0.060783 0.109407 0.040191 0.026727 0.004864 0.001483 0.0 0.577323 0.020630 0.001156 0.043224 0.051607 0.185780 0.068247 0.045385 0.004129 0.002517 0.0 0.323079 0.323079 6.088253 2.912777 1.645305 1.869995 2.267423 0.640114 0.17613 0.033048 0.276556 0.0 0.0 13.223362 15.093357 15.909602 0.639036 0.675218 0.323042 0.182473 0.207392 0.125734 0.035496 0.009767 0.003665 0.030671 0.0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.2 0.92 0.0 0 0 probe1 0 0.269594
1 6.158444 1195.842758 0.0 0.0 0.020521 63.410655 0.567627 16.682223 5.211648 0.139473 1.343074 4.680291 3.797226 4.118336 0 0.320854 5 0.0 0.0 0.0 0.0 probe_s2_2 1 0.585608 0.018491 0.001091 0.040252 0.046312 0.090787 0.033996 0.024260 0.003943 0.001254 0.0 0.154005 0.448982 0.014177 0.000836 0.030861 0.035507 0.139212 0.052129 0.037200 0.003023 0.001923 0.0 0.236149 0.030861 0.314773 0.314773 63.410655 0.567627 16.682223 5.211648 0.139473 1.343074 4.680291 3.797226 4.118336 0 0.320854 5 0.0 0.0 0.0 0.0 probe_s2_2 1 0.692213 0.021857 0.001290 0.047578 0.054742 0.107315 0.040185 0.028677 0.004661 0.001483 0.0 0.587788 0.018560 0.001095 0.040401 0.046484 0.182251 0.068245 0.048701 0.003958 0.002518 0.0 0.314773 0.314773 6.088253 2.912777 1.645305 1.869995 2.267423 0.640114 0.17613 0.033048 0.276556 0.0 0.0 13.223362 15.093357 15.909602 0.639036 0.675218 0.323042 0.182473 0.207392 0.125734 0.035496 0.009767 0.003665 0.030671 0.0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.2 0.92 0.0 0 0 probe1 0 0.259479
2 6.144301 1185.918765 0.0 0.0 0.037794 64.978351 0.531840 16.204967 4.684912 0.128130 1.126960 3.936379 3.793940 4.517285 0 0.320691 5 0.0 0.0 0.0 0.0 probe_s2_3 2 0.600411 0.015524 0.001003 0.036204 0.038972 0.088238 0.033985 0.026625 0.003696 0.001254 0.0 0.154088 0.460371 0.011903 0.000769 0.027759 0.029882 0.135314 0.052117 0.040830 0.002834 0.001924 0.0 0.236297 0.027759 0.300107 0.300107 64.978351 0.531840 16.204967 4.684912 0.128130 1.126960 3.936379 3.793940 4.517285 0 0.320691 5 0.0 0.0 0.0 0.0 probe_s2_3 2 0.709781 0.018352 0.001185 0.042797 0.046071 0.104311 0.040176 0.031475 0.004370 0.001483 0.0 0.602815 0.015586 0.001007 0.036347 0.039128 0.177182 0.068242 0.053463 0.003711 0.002519 0.0 0.300107 0.300107 6.088253 2.912777 1.645305 1.869995 2.267423 0.640114 0.17613 0.033048 0.276556 0.0 0.0 13.223362 15.093357 15.909602 0.639036 0.675218 0.323042 0.182473 0.207392 0.125734 0.035496 0.009767 0.003665 0.030671 0.0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.2 0.92 0.0 0 0 probe1 0 0.242206
3 6.179671 1210.539481 0.0 0.0 -0.000487 60.953715 0.623712 17.430191 6.037164 0.157251 1.681775 5.846172 3.802375 3.493093 0 0.321109 5 0.0 0.0 0.0 0.0 probe_s2_4 3 0.562441 0.023134 0.001229 0.046589 0.057799 0.094778 0.034013 0.020560 0.004329 0.001254 0.0 0.153874 0.431161 0.017734 0.000942 0.035714 0.044308 0.145311 0.052148 0.031522 0.003319 0.001923 0.0 0.235917 0.035714 0.331801 0.331801 60.953715 0.623712 17.430191 6.037164 0.157251 1.681775 5.846172 3.802375 3.493093 0 0.321109 5 0.0 0.0 0.0 0.0 probe_s2_4 3 0.664726 0.027341 0.001453 0.055059 0.068310 0.112014 0.040199 0.024299 0.005116 0.001482 0.0 0.564287 0.023210 0.001233 0.046740 0.057989 0.190177 0.068250 0.041254 0.004343 0.002517 0.0 0.331801 0.331801 6.088253 2.912777 1.645305 1.869995 2.267423 0.640114 0.17613 0.033048 0.276556 0.0 0.0 13.223362 15.093357 15.909602 0.639036 0.675218 0.323042 0.182473 0.207392 0.125734 0.035496 0.009767 0.003665 0.030671 0.0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.2 0.92 0.0 0 0 probe1 0 0.280487
4 6.186062 1214.918408 0.0 0.0 -0.005905 60.188394 0.641183 17.663178 6.294307 0.162789 1.787278 6.209337 3.803979 3.298333 0 0.321189 5 0.0 0.0 0.0 0.0 probe_s2_5 4 0.555232 0.024579 0.001272 0.048560 0.061373 0.096019 0.034019 0.019408 0.004449 0.001254 0.0 0.153834 0.425617 0.018841 0.000975 0.037224 0.047046 0.147208 0.052154 0.029755 0.003410 0.001923 0.0 0.235845 0.037224 0.336057 0.336057 60.188394 0.641183 17.663178 6.294307 0.162789 1.787278 6.209337 3.803979 3.298333 0 0.321189 5 0.0 0.0 0.0 0.0 probe_s2_5 4 0.656175 0.029047 0.001503 0.057387 0.072531 0.113476 0.040203 0.022937 0.005258 0.001482 0.0 0.556979 0.024656 0.001276 0.048711 0.061566 0.192642 0.068251 0.038938 0.004463 0.002516 0.0 0.336057 0.336057 6.088253 2.912777 1.645305 1.869995 2.267423 0.640114 0.17613 0.033048 0.276556 0.0 0.0 13.223362 15.093357 15.909602 0.639036 0.675218 0.323042 0.182473 0.207392 0.125734 0.035496 0.009767 0.003665 0.030671 0.0 40.57 2.45 12.82 13.11 0.26 13.02 11.63 2.2 0.92 0.0 0 0 probe1 0 0.285905

Or, if you want to filter yourself, say return all pairs

[14]:
dict_out_all=pt.calculate_amp_liq_press_temp_matching(liq_comps=Liqs, amp_comps=Amps, equationT="T_Put2016_eq4b",
equationP="P_Put2016_eq7a", return_all_pairs=True)
Note - Putirka 2016 spreadsheet calculates H2O using a H2O-solubility law of uncertian origin based on the pressure calculated for 7a, and iterates H2O and P. We dont do this, as we dont believe a pure h2o model is necessarily valid as you may be mixed fluid saturated or undersaturated. We recomend instead you choose a reasonable H2O content based on your system.
Considering N=22 Amp & N=6 Liqs, which is a total of N=132 Amp-Liq pairs, be patient if this is >>1 million!
Youve selected a P-independent function
Youve selected a T-independent function
Done!!! I found a total of N=132 Amp-Liq matches using the specified filter. N=22 Amp out of the N=22 Amp that you input matched to 1 or more liquids
[ ]:

[ ]: