{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# REEPS Tutorial - Getting started\n",
"## Introduction\n",
"In this notebook, you will learn how to use REEPS to fit thermodynamic parameters to experimental data and explore how well the parameters fit.\n",
"## Installation\n",
"In your terminal run
\n",
"```$ git clone https://xgitlab.cels.anl.gov/summer-2020/parameter-estimation.git```
\n",
"Navigate into the folder with
\n",
"```$ cd parameter-estimation```
\n",
"And run
\n",
"```pip install -e.```
\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Import and instantiate REEPS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, you will need to import the package and instantiate REEPS with a few parameters."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys # Navigating to reeps.py since not a package yet\n",
"sys.path.append('../../')\n",
"from reeps import REEPS\n",
"searcher_parameters = {'exp_csv_filename': '../../data/csvs/exp_data.csv',\n",
" 'phases_xml_filename': '../../data/xmls/twophase.xml',\n",
" 'opt_dict': {'Nd(H(A)2)3(org)': {'h0': -4662344.64}},\n",
" 'phase_names': ['HCl_electrolyte', 'PC88A_liquid'],\n",
" 'aq_solvent_name': 'H2O(L)',\n",
" 'extractant_name': '(HA)2(org)',\n",
" 'diluant_name': 'dodecane',\n",
" 'complex_name': 'Nd(H(A)2)3(org)',\n",
" 'rare_earth_ion_name': 'Nd+++',\n",
" 'aq_solvent_rho': 1000.0,\n",
" 'extractant_rho': 960.0,\n",
" 'diluant_rho': 750.0}\n",
"searcher = REEPS(**searcher_parameters)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Parameters explanation "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### exp_csv_filename"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"exp_csv_filename is the file name for the csv containing experimental data.
\n",
"Let us explore the format of this file with pandas"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n", " | HI(m) | \n", "REeq(m) | \n", "D(m) | \n", "ZI(m) | \n", "Zeq | \n", "Heq | \n", "REI | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "0.01 | \n", "0.0239 | \n", "1.0921 | \n", "1 | \n", "0.921696 | \n", "0.088304 | \n", "0.050001 | \n", "
1 | \n", "0.01 | \n", "0.0683 | \n", "0.4641 | \n", "1 | \n", "0.904906 | \n", "0.105094 | \n", "0.099998 | \n", "
2 | \n", "0.01 | \n", "0.1170 | \n", "0.2821 | \n", "1 | \n", "0.900983 | \n", "0.109017 | \n", "0.150006 | \n", "
3 | \n", "0.01 | \n", "0.1680 | \n", "0.1905 | \n", "1 | \n", "0.903988 | \n", "0.106012 | \n", "0.200004 | \n", "
4 | \n", "0.01 | \n", "0.2637 | \n", "0.1377 | \n", "1 | \n", "0.891066 | \n", "0.118934 | \n", "0.300011 | \n", "