From 3c0ccc6b303233fd166f47dcb7c1797776a6567a Mon Sep 17 00:00:00 2001
From: titusquah <46580668+titusquah@users.noreply.github.com>
Date: Fri, 29 May 2020 16:10:41 -0600
Subject: [PATCH] added idea xml and iml files
---
.idea/dictionaries/Titus.xml | 7 +
.../inspectionProfiles/profiles_settings.xml | 6 +
.idea/workspace.xml | 171 ++++++++++++
data/xmls/twophase.xml | 256 ++++++++++++++++++
methods.py | 25 ++
tests/test1.py | 0
6 files changed, 465 insertions(+)
create mode 100644 .idea/dictionaries/Titus.xml
create mode 100644 .idea/inspectionProfiles/profiles_settings.xml
create mode 100644 .idea/workspace.xml
create mode 100644 data/xmls/twophase.xml
create mode 100644 methods.py
create mode 100644 tests/test1.py
diff --git a/.idea/dictionaries/Titus.xml b/.idea/dictionaries/Titus.xml
new file mode 100644
index 0000000..2a0a69c
--- /dev/null
+++ b/.idea/dictionaries/Titus.xml
@@ -0,0 +1,7 @@
+
+
+
+ kmol
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..4bc89dc
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1590784044993
+
+
+ 1590784044993
+
+
+ 1590789450060
+
+
+
+ 1590789450060
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/data/xmls/twophase.xml b/data/xmls/twophase.xml
new file mode 100644
index 0000000..c93c1ba
--- /dev/null
+++ b/data/xmls/twophase.xml
@@ -0,0 +1,256 @@
+
+
+
+
+
+
+ Cl O H C P Nd dummy
+
+
+ (HA)2(org) dodecane Nd(H(A)2)3(org)
+
+
+ 298.15
+ 100000.0
+
+ (HA)2(org): 0.25
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:16 H:35 O:3 P:1
+
+
+ 298.14999999999998
+ -1302518.58
+ 558.9824
+ 0.0
+
+
+
+ 0.3214
+
+
+
+
+
+ C:48 H:102 O:9 P:3 Nd:1
+
+
+ 298.14999999999998
+
+ -4704700.167611002
+ 1117.965
+ 0.0
+
+
+
+ 1.0073
+
+
+
+
+
+
+ dummy:1
+
+
+
+ 298.14999999999998
+ 0.0
+ 0.0
+ 0.0
+
+
+
+ 0.227113
+
+
+
+
+
+
+
+
+
+ H2O(L) H+ OH- Cl- Nd+++
+
+
+
+ 298.15
+ 100000.0
+
+ Cl-: 1.0E-7
+ H+: 1.0E-7
+
+
+
+
+
+
+
+
+
+
+
+ 0.177000779, 0.000125778, 0.0, -33.4777082, -0.262214535
+ 0.292922504, -0.027938838, 0.0, 3402.47027, 19.7936248
+ 0.0, 0.0, 0.0, 0.0, 0.0
+ 0.000362, -0.00003036, 0.0, -2.91038E-11, 0.0
+ 2
+ 12
+
+ refit of Holmes, H.F., Busey, J.M., Simonson, J.M., Mesmer, R.E.,
+ Archer, D.G., and Wood, R.H., 1987, The enthalpy of dilution of HCl(aq)
+ to 648 K and 4p MPa. Thermodynamic properties, Journal of Chemical
+ Thermodynamics, v. 19, p. 863-890.
+
+
+
+
+
+
+ H2O(L)
+
+ O H Nd Cl P E
+
+
+
+
+
+
+
+
+ H:2 O:1
+
+
+
+ 7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
+ 2.781789810E-09, -4.188654990E+04, -2.882801370E+02
+
+
+
+
+
+ 0.018068
+
+
+
+
+
+ OH-
+ O:1 H:1
+ -1
+
+
+ -37595
+ -54977
+ -2.56
+
+
+
+ 0.12527
+ 7.38
+ 1.8423
+ -27821
+ 4.15
+ -103460
+ 172460
+
+
+ ref:G9
+
+
+
+
+
+
+ Cl-
+ Cl:1
+ -1
+
+
+ -31379
+ -39933
+ 13.56
+
+
+
+ 0.4032
+ 480.1
+ 5.563
+ -28470
+ -4.4
+ -57140
+ 145600
+ 17.79
+
+ ref:G9
+
+
+
+ H+
+ H:1
+ +1
+
+
+ 0
+ 0
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+ ref:G9
+
+
+
+
+ Nd+++
+ Nd:1
+ +3
+
+
+ -160600
+ -166500
+ -49.5
+
+
+
+ -0.33707
+ -1454.52
+ 8.3211
+ -21777
+ 1.6236
+ -118344
+ 225500
+
+
+ ref:G9
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/methods.py b/methods.py
new file mode 100644
index 0000000..6ecde7e
--- /dev/null
+++ b/methods.py
@@ -0,0 +1,25 @@
+import cantera as ct
+import pandas as pd
+
+
+class REEGEMParamFit:
+ """Takes in experimental data
+ Returns parameters for GEM
+ :param exp_csv_file: (str) csv file containing experimental data
+ :param param_xml_file: (str) xml file with parameters for equilibrium calc
+ :param x_guess: (float) guess for multiplier variable
+ :param h_guess: (float) initial guess standard enthalpy (J/kmol)
+ :param phase_names: (list) names of phases in xml file
+ """
+
+ def __init__(self,
+ exp_csv_file,
+ param_xml_file,
+ x_guess=1,
+ h_guess=-4856609.0E3,
+ phase_names=['HCl_electrolyte', 'PC88A_liquid']
+ ):
+ self.x_guess = x_guess
+ self.h_guess = h_guess
+ exp_df = pd.read_csv(exp_csv_file)
+ phases = ct.import_phases(param_xml_file, phase_names)
diff --git a/tests/test1.py b/tests/test1.py
new file mode 100644
index 0000000..e69de29