started project

pull/1/head
titusquah 5 years ago
parent 3c0ccc6b30
commit ae6aa4291a

@ -1,7 +1,12 @@
<component name="ProjectDictionaryState">
<dictionary name="Titus">
<words>
<w>diluant</w>
<w>dodecane</w>
<w>extractant</w>
<w>kmol</w>
<w>ndarray</w>
<w>reeps</w>
</words>
</dictionary>
</component>

@ -2,10 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f4439dc0-6756-4612-8f7d-596d8949f300" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/data/csvs/exp_data.csv" afterDir="false" />
<change afterPath="$PROJECT_DIR$/data/xmls/twophase.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/methods.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/tests/test1.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dictionaries/Titus.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dictionaries/Titus.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/methods.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/tests/test1.py" beforeDir="false" afterPath="$PROJECT_DIR$/tests/test1.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -35,7 +35,25 @@
<property name="run.code.analysis.last.selected.profile" value="aDefault" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RunManager">
<component name="RunManager" selected="Python.fit">
<configuration name="fit" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="parameter-estimation" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/../../parameter estimation/parameter estimation" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/../../parameter estimation/parameter estimation/fit.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="methods" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="parameter-estimation" />
<option name="INTERPRETER_OPTIONS" value="" />
@ -59,6 +77,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.fit" />
<item itemvalue="Python.fit" />
<item itemvalue="Python.methods" />
</list>
</recent_temporary>
@ -96,7 +116,14 @@
<option name="project" value="LOCAL" />
<updated>1590789450060</updated>
</task>
<option name="localTasksCounter" value="2" />
<task id="LOCAL-00002" summary="started project">
<created>1590789938443</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1590789938443</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -104,7 +131,9 @@
<map>
<entry key="MAIN">
<value>
<State />
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
@ -119,6 +148,10 @@
<screen x="-1920" y="2" width="1920" height="1040" />
</state>
<state x="-1330" y="212" key="#Inspections/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590787654691" />
<state x="552" y="179" width="816" height="729" key="#Intentions" timestamp="1591030394128">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="552" y="179" width="816" height="729" key="#Intentions/0.0.1920.1040@0.0.1920.1040" timestamp="1591030394128" />
<state x="-1506" y="178" width="1092" height="706" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1590784453144">
<screen x="-1920" y="2" width="1920" height="1040" />
</state>
@ -139,22 +172,30 @@
<screen x="-1920" y="2" width="1920" height="1040" />
</state>
<state x="-1180" y="278" key="FileChooserDialogImpl/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590786964173" />
<state width="1897" height="281" key="GridCell.Tab.0.bottom" timestamp="1590784657740">
<screen x="-1920" y="2" width="1920" height="1040" />
<state width="1899" height="281" key="GridCell.Tab.0.bottom" timestamp="1591030130785">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1897" height="281" key="GridCell.Tab.0.bottom/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590784657740" />
<state width="1897" height="281" key="GridCell.Tab.0.center" timestamp="1590784657739">
<screen x="-1920" y="2" width="1920" height="1040" />
<state width="1897" height="281" key="GridCell.Tab.0.bottom/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590790790324" />
<state width="1897" height="281" key="GridCell.Tab.0.bottom/0.0.1536.824/-1920.2.1920.1040@0.0.1536.824" timestamp="1590795386435" />
<state width="1899" height="281" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1591030130785" />
<state width="1899" height="281" key="GridCell.Tab.0.center" timestamp="1591030130784">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1897" height="281" key="GridCell.Tab.0.center/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590784657739" />
<state width="1897" height="281" key="GridCell.Tab.0.left" timestamp="1590784657739">
<screen x="-1920" y="2" width="1920" height="1040" />
<state width="1897" height="281" key="GridCell.Tab.0.center/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590790790323" />
<state width="1897" height="281" key="GridCell.Tab.0.center/0.0.1536.824/-1920.2.1920.1040@0.0.1536.824" timestamp="1590795386434" />
<state width="1899" height="281" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1591030130784" />
<state width="1899" height="281" key="GridCell.Tab.0.left" timestamp="1591030130783">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1897" height="281" key="GridCell.Tab.0.left/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590784657739" />
<state width="1897" height="281" key="GridCell.Tab.0.right" timestamp="1590784657739">
<screen x="-1920" y="2" width="1920" height="1040" />
<state width="1897" height="281" key="GridCell.Tab.0.left/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590790790323" />
<state width="1897" height="281" key="GridCell.Tab.0.left/0.0.1536.824/-1920.2.1920.1040@0.0.1536.824" timestamp="1590795386433" />
<state width="1899" height="281" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1591030130783" />
<state width="1899" height="281" key="GridCell.Tab.0.right" timestamp="1591030130784">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1897" height="281" key="GridCell.Tab.0.right/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590784657739" />
<state width="1897" height="281" key="GridCell.Tab.0.right/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590790790324" />
<state width="1897" height="281" key="GridCell.Tab.0.right/0.0.1536.824/-1920.2.1920.1040@0.0.1536.824" timestamp="1590795386434" />
<state width="1899" height="281" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1591030130784" />
<state x="-1460" y="164" key="SettingsEditor" timestamp="1590784300386">
<screen x="-1920" y="2" width="1920" height="1040" />
</state>
@ -163,9 +204,14 @@
<screen x="-1920" y="2" width="1920" height="1040" />
</state>
<state x="-1368" y="256" key="Vcs.Push.Dialog.v2/0.0.1536.824/-1920.2.1920.1040@-1920.2.1920.1040" timestamp="1590789945157" />
<state x="463" y="236" key="com.intellij.ide.util.TipDialog" timestamp="1590784072879">
<screen x="0" y="0" width="1536" height="824" />
<state x="579" y="298" key="com.intellij.ide.util.TipDialog" timestamp="1591037480473">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="463" y="236" key="com.intellij.ide.util.TipDialog/0.0.1536.824/-1920.2.1920.1040@0.0.1536.824" timestamp="1590784072879" />
<state x="579" y="298" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1591037480473" />
<state x="769" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1591037545358">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="769" y="438" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1040@0.0.1920.1040" timestamp="1591037545358" />
</component>
</project>

@ -1,25 +0,0 @@
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)

@ -0,0 +1,5 @@
import sys
sys.path.append('../')
from reeps import REEPS
testing=
Loading…
Cancel
Save