{ "cells": [ { "cell_type": "markdown", "id": "bb551b95", "metadata": {}, "source": [ "# MELTS geobarometry part 1 - quartz - 2-feldspar saturated rhyolites" ] }, { "cell_type": "markdown", "id": "c13695be", "metadata": {}, "source": [ "- The position of the quartz - 2-feldspar eutectic in high-silca rhyolitic magmas is sensitive to pressure (and possibly other variables; fO$_2$, H$_2$O, CO$_2$).\n", "- If MELTS accurately recreates phase stability (and the sensitivity to the relevant parameters), it could be used as a barometer in igneous systems by searching for the pressure at which the mineral saturation curves intersect.\n", "\n", "**Before any calculations can be run** users need to download the alphaMELTS for MATLAB files. Please see the installation guide on ReadTheDocs." ] }, { "cell_type": "code", "execution_count": 1, "id": "a6872970", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "alphaMELTS for Python files successfully located.\n" ] } ], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", "import petthermotools as ptt\n", "\n", "# If the alphaMELTS for Python files have not been added to your Python path (see installation guide) then use the two lines below to add\n", "# the location of the alphaMELTS files here.\n", "# import sys\n", "# sys.path.append(r'MELTS')" ] }, { "cell_type": "code", "execution_count": 3, "id": "7ddae183", "metadata": {}, "outputs": [], "source": [ "# used to suppress MELTS outputs in MacOS systems (run twice)\n", "import platform\n", "if platform.system() == \"Darwin\":\n", " import sys\n", " import os\n", " sys.stdout = open(os.devnull, 'w')\n", " sys.stderr = open(os.devnull, 'w')" ] }, { "cell_type": "markdown", "id": "b924116d", "metadata": {}, "source": [ "To demonstrate how PetThermoTools can be used to evaluate the pressure of magma storage we will use the composition of a quartz-hosted melt inclusion from Anderson et al. (2000) to evaluate the method:" ] }, { "cell_type": "code", "execution_count": 4, "id": "40b1fa04", "metadata": {}, "outputs": [], "source": [ "bulk = {'SiO2_Liq': 77.6,\n", " 'TiO2_Liq': 0.09,\n", " 'Al2O3_Liq': 12.3,\n", " 'FeOt_Liq': 0.65,\n", " 'MgO_Liq': 0.02,\n", " 'CaO_Liq': 0.41,\n", " 'Na2O_Liq': 4.49,\n", " 'K2O_Liq': 4.69}" ] }, { "cell_type": "markdown", "id": "ce9c052b", "metadata": {}, "source": [ "In this case, we evaluate the saturation temperature of quartz, plagioclase, and k-feldspar at 32 pressures between 250 and 5000 bars. The model runs an equilibrium crystallisation calculation at each pressure (these calculations are run in parallel),with the calculations starting at the liquidus and continuing until either: (i) all three phases are saturated; or (ii) the temperature is more than 25$^o$C below the liquidus (T_maxdrop_C).\n", "\n", "The function will then calculate the maximum temperature separating the saturation of the 3 phases and use a spline fit to determine the pressure of the minimum offset. This pressure is then taken forward as the pressure of storage/extraction." ] }, { "cell_type": "code", "execution_count": 5, "id": "5f99ebb4", "metadata": { "scrolled": true }, "outputs": [], "source": [ "P_bar = np.linspace(250, 5000, 64)\n", "phases = ['quartz1', 'plagioclase1', 'alkali-feldspar1']\n", "minimum, xstal = ptt.mineral_cosaturation(\n", " Model = \"MELTSv1.0.2\", bulk= bulk,\n", " P_bar = np.linspace(250, 5000, 64),\n", " T_initial_C= 900.0,\n", " find_min=True, H2O_Sat=True, T_maxdrop_C=25.0,\n", " dt_C=1.0, fO2_buffer = \"NNO\", T_cut_C = 5,\n", " phases = ['quartz1', 'plagioclase1', 'alkali-feldspar1'])" ] }, { "cell_type": "markdown", "id": "e152dac0", "metadata": {}, "source": [ "To evaluate these results we can do a few different things.\n", "\n", "First we can examine the two outputs. Here `minimum` is a dictionary containing two variables, one (a DataFrame called `Output`) contains the saturation temperature of the three phases of interest and the temperature offsets between the different mineral pairs." ] }, { "cell_type": "code", "execution_count": 6, "id": "21e31fe3", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | P_bar | \n", "quartz1 | \n", "plagioclase1 | \n", "alkali-feldspar1 | \n", "quartz1 - plagioclase1 | \n", "quartz1 - alkali-feldspar1 | \n", "plagioclase1 - alkali-feldspar1 | \n", "3 Phase Saturation | \n", "
|---|---|---|---|---|---|---|---|---|
| 0 | \n", "250.000000 | \n", "NaN | \n", "903.7 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
| 1 | \n", "325.396825 | \n", "NaN | \n", "888.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
| 2 | \n", "400.793651 | \n", "NaN | \n", "874.9 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
| 3 | \n", "476.190476 | \n", "NaN | \n", "863.0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
| 4 | \n", "551.587302 | \n", "NaN | \n", "852.3 | \n", "830.3 | \n", "NaN | \n", "NaN | \n", "22.0 | \n", "NaN | \n", "
| \n", " | T_C | \n", "P_bar | \n", "mass_g | \n", "H_J | \n", "S_J/K | \n", "V_cm^3 | \n", "rho_kg/m^3 | \n", "log10(fO2) | \n", "dVdP_cm^3/bar | \n", "H2O_Fl | \n", "... | \n", "H_J_Plag | \n", "S_J/K_Plag | \n", "Cp_J/(kg.K^2)_Plag | \n", "dCpdT_J/(kg.K^2)_Plag | \n", "dVdT_cm^3/K_Plag | \n", "dPdT_bar/K_Plag | \n", "d2VdT2_cm^3/K^2_Plag | \n", "d2VdTdP_cm^3/(bar.K)_Plag | \n", "d2VdP2_cm^3/bar^2_Plag | \n", "molwt_Plag | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "904.7 | \n", "250.0 | \n", "100.015640 | \n", "-1.329559e+06 | \n", "373.782312 | \n", "361.478627 | \n", "276.684796 | \n", "-11.805683 | \n", "-1.325382 | \n", "100.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
| 1 | \n", "903.7 | \n", "250.0 | \n", "100.015651 | \n", "-1.329767e+06 | \n", "373.605310 | \n", "361.252958 | \n", "276.857666 | \n", "-11.823668 | \n", "-1.324726 | \n", "100.0 | \n", "... | \n", "-4057.577301 | \n", "0.664751 | \n", "1221.686553 | \n", "0.000029 | \n", "0.000004 | \n", "NaN | \n", "4.255283e-10 | \n", "9.477135e-13 | \n", "1.065071e-12 | \n", "264.964408 | \n", "
| 2 | \n", "902.7 | \n", "250.0 | \n", "100.015662 | \n", "-1.329977e+06 | \n", "373.426732 | \n", "361.030413 | \n", "277.028355 | \n", "-11.841684 | \n", "-1.324086 | \n", "100.0 | \n", "... | \n", "-8245.402384 | \n", "1.350171 | \n", "1221.597218 | \n", "0.000059 | \n", "0.000007 | \n", "NaN | \n", "8.552248e-10 | \n", "1.955436e-12 | \n", "2.164643e-12 | \n", "264.958944 | \n", "
| 3 | \n", "901.7 | \n", "250.0 | \n", "100.015672 | \n", "-1.330187e+06 | \n", "373.248579 | \n", "360.806568 | \n", "277.200254 | \n", "-11.859730 | \n", "-1.323440 | \n", "100.0 | \n", "... | \n", "-12395.610216 | \n", "2.028751 | \n", "1221.507895 | \n", "0.000089 | \n", "0.000011 | \n", "NaN | \n", "1.271205e-09 | \n", "2.984838e-12 | \n", "3.254631e-12 | \n", "264.953646 | \n", "
| 4 | \n", "900.7 | \n", "250.0 | \n", "100.015683 | \n", "-1.330396e+06 | \n", "373.070849 | \n", "360.581424 | \n", "277.373365 | \n", "-11.877807 | \n", "-1.322789 | \n", "100.0 | \n", "... | \n", "-16508.162110 | \n", "2.700490 | \n", "1221.418605 | \n", "0.000118 | \n", "0.000014 | \n", "NaN | \n", "1.673374e-09 | \n", "4.036203e-12 | \n", "4.334996e-12 | \n", "264.948509 | \n", "
5 rows × 87 columns
\n", "