mirror of https://github.com/ANL-CEEESA/LLEPE
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1108 lines
64 KiB
1108 lines
64 KiB
|
|
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="python" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="python" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>LLEPE — LLEPE 1.0.0 documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|
<script src="../_static/jquery.js"></script>
|
|
<script src="../_static/underscore.js"></script>
|
|
<script src="../_static/doctools.js"></script>
|
|
<script src="../_static/language_data.js"></script>
|
|
|
|
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav">
|
|
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search" >
|
|
|
|
|
|
|
|
<a href="../index.html" class="icon icon-home"> LLEPE
|
|
|
|
|
|
|
|
|
|
<img src="../_static/logo.png" class="logo" alt="Logo"/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="caption"><span class="caption-text">User Guide</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../guide/install.html">Installation</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../guide/quickstart.html">Getting Started</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" aria-label="top navigation">
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="../index.html">LLEPE</a>
|
|
|
|
</nav>
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
<li><a href="../index.html">Docs</a> »</li>
|
|
|
|
<li>LLEPE</li>
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
<a href="../_sources/modules/reeps.rst.txt" rel="nofollow"> View page source</a>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<span class="target" id="module-llepe"><span id="llepe"></span></span><div class="section" id="id1">
|
|
<h1>LLEPE<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="parameters">
|
|
<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="py class">
|
|
<dt id="llepe.LLEPE">
|
|
<em class="property">class </em><code class="sig-prename descclassname">llepe.</code><code class="sig-name descname">LLEPE</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exp_data</span></em>, <em class="sig-param"><span class="n">phases_xml_filename</span></em>, <em class="sig-param"><span class="n">phase_names</span></em>, <em class="sig-param"><span class="n">aq_solvent_name</span></em>, <em class="sig-param"><span class="n">extractant_name</span></em>, <em class="sig-param"><span class="n">diluant_name</span></em>, <em class="sig-param"><span class="n">complex_names</span></em>, <em class="sig-param"><span class="n">extracted_species_ion_names</span></em>, <em class="sig-param"><span class="n">extracted_species_list</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">aq_solvent_rho</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">extractant_rho</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">diluant_rho</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">opt_dict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">objective_function</span><span class="o">=</span><span class="default_value">'Log-MSE'</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="o">=</span><span class="default_value">'scipy_minimize'</span></em>, <em class="sig-param"><span class="n">temp_xml_file_path</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">dependant_params_dict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">custom_objects_dict</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Liquid-Liquid Extraction Parameter estimator</p>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>The order in which the extracted species (ES) appear in the csv file
|
|
must be the same order as they appear in the xml, complex_names and
|
|
extracted_species_ion_names.</p>
|
|
<p>For example, say in exp_data, ES_1 is Nd ES_2 is Pr,
|
|
and</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">aq_solvent_name</span> <span class="o">=</span> <span class="s1">'H2O(L)'</span>
|
|
<span class="n">extractant_name</span> <span class="o">=</span> <span class="s1">'(HA)2(org)'</span>
|
|
<span class="n">diluent_name</span> <span class="o">=</span> <span class="s1">'dodecane'</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Then:</p>
|
|
<p>The exp_data column ordering must be (names do not matter):</p>
|
|
<p>[h_i, h_eq, z_i, z_eq, Nd_aq_i, Nd_aq_eq, Nd_d_eq,
|
|
Pr_aq_i, Pr_aq_eq, Pr_d_eq]</p>
|
|
<p>The aqueous speciesArray must be
|
|
"H2O(L) H+ OH- Cl- Nd+++ Pr+++"</p>
|
|
<p>The organic speciesArray must be
|
|
"(HA)2(org) dodecane Nd(H(A)2)3(org) Pr(H(A)2)3(org)"</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">complex_names</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'Nd(H(A)2)3(org)'</span><span class="p">,</span> <span class="s1">'Pr(H(A)2)3(org)'</span><span class="p">]</span>
|
|
<span class="n">extracted_species_ion_names</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'Nd+++'</span><span class="p">,</span> <span class="s1">'Pr+++'</span><span class="p">]</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>exp_data</strong> -- <p>(str or pd.DataFrame) csv file name
|
|
or DataFrame with experimental data</p>
|
|
<p>In the .csv file, the rows are different experiments and
|
|
columns are the measured quantities.</p>
|
|
<p>The ordering of the columns needs to be:</p>
|
|
<p>[h_i, h_eq, z_i, z_eq,
|
|
{ES_1}_aq_i, {ES_1}_aq_eq, {ES_1}_d_eq,
|
|
{ES_2}_aq_i, {ES_2}_aq_eq, {ES_2}_d_eq,...
|
|
{ES_N}_aq_i, {ES_N}_aq_eq, {ES_N}_d_eq]</p>
|
|
<p>Naming does not matter, just the order.</p>
|
|
<p>Where {ES_1}-{ES_N} are the extracted species names of interest
|
|
i.e. Nd, Pr, La, etc.</p>
|
|
<p>Below is an explanation of the columns.</p>
|
|
<table class="docutils align-default">
|
|
<colgroup>
|
|
<col style="width: 11%" />
|
|
<col style="width: 20%" />
|
|
<col style="width: 69%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Index</p></th>
|
|
<th class="head"><p>Column</p></th>
|
|
<th class="head"><p>Meaning</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p>0</p></td>
|
|
<td><p>h_i</p></td>
|
|
<td><p>Initial Concentration of
|
|
H+ ions (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>1</p></td>
|
|
<td><p>h_eq</p></td>
|
|
<td><p>Equilibrium concentration of
|
|
H+ ions (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>2</p></td>
|
|
<td><p>z_i</p></td>
|
|
<td><p>Initial concentration of
|
|
extractant (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>3</p></td>
|
|
<td><p>z_eq</p></td>
|
|
<td><p>Equilibrium concentration of
|
|
extractant (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>4</p></td>
|
|
<td><p>{ES}_aq_i</p></td>
|
|
<td><p>Initial concentration of ES ions (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>5</p></td>
|
|
<td><p>{ES}_aq_eq</p></td>
|
|
<td><p>Equilibrium concentration of ES ions
|
|
in aqueous phase (mol/L)</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>6</p></td>
|
|
<td><p>{ES}_d_eq</p></td>
|
|
<td><p>Equilibrium Ratio between amount of
|
|
ES atoms in organic to aqueous</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</p></li>
|
|
<li><p><strong>phases_xml_filename</strong> -- <p>(str) xml file with parameters
|
|
for equilibrium calc</p>
|
|
<p>Would recommend copying and modifying xmls located in data/xmls
|
|
or in Cantera's "data" folder</p>
|
|
<p>speciesArray fields need specific ordering.</p>
|
|
<p>In aqueous phase: aq_solvent_name, H+, OH-, Cl-, ES_1, ES_2, ..., ES_N</p>
|
|
<p>(ES_1-ES_N) represent ES ion names i.e. Nd+++, Pr+++</p>
|
|
<p>In organic phase : extractant_name, diluant_name, ES_1, ES_2, ..., ES_N</p>
|
|
<p>(ES_1-ES_N) represent ES complex names
|
|
i.e. Nd(H(A)2)3(org), Pr(H(A)2)3(org)</p>
|
|
</p></li>
|
|
<li><p><strong>phase_names</strong> -- <p>(list) names of phases in xml file</p>
|
|
<p>Found in the xml file under <phase ... id={phase_name}></p>
|
|
</p></li>
|
|
<li><p><strong>aq_solvent_name</strong> -- (str) name of aqueous solvent in xml file</p></li>
|
|
<li><p><strong>extractant_name</strong> -- (str) name of extractant in xml file</p></li>
|
|
<li><p><strong>diluant_name</strong> -- (str) name of diluant in xml file</p></li>
|
|
<li><p><strong>complex_names</strong> -- (list) names of complexes in xml file.</p></li>
|
|
<li><p><strong>extracted_species_ion_names</strong> -- (list) names of extracted species ions
|
|
in xml file</p></li>
|
|
<li><p><strong>extracted_species_list</strong> -- <p>(list) names of extracted species elements.</p>
|
|
<p>If <code class="docutils literal notranslate"><span class="pre">None</span></code>, extracted_species_list will be extracted_species_ion_names
|
|
without '+' i.e. 'Nd+++'->'Nd'</p>
|
|
</p></li>
|
|
<li><p><strong>aq_solvent_rho</strong> -- <p>(float) density of solvent (g/L)</p>
|
|
<p>If <code class="docutils literal notranslate"><span class="pre">None</span></code>, molar volume/molecular weight is used from xml</p>
|
|
</p></li>
|
|
<li><p><strong>extractant_rho</strong> -- <p>(float) density of extractant (g/L)</p>
|
|
<p>If <code class="docutils literal notranslate"><span class="pre">None</span></code>, molar volume/molecular weight is used from xml</p>
|
|
</p></li>
|
|
<li><p><strong>diluant_rho</strong> -- <p>(float) density of diluant (g/L)</p>
|
|
<p>If <code class="docutils literal notranslate"><span class="pre">None</span></code>, molar volume/molecular weight is used from xml</p>
|
|
</p></li>
|
|
<li><p><strong>opt_dict</strong> -- <p>(dict) dictionary containing info about which
|
|
species parameters are updated to fit model to experimental data</p>
|
|
<p>Should have the format as below. Dictionary keys under user defined
|
|
parameter name must be named as shown below ('upper_element_name',
|
|
'upper_attrib_name', etc.). 'attrib_name's and 'attrib_value's can
|
|
be None. {} denotes areas for user to fill in.</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">opt_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"</span><span class="si">{user_defined_name_for_parameter_1}</span><span class="s2">"</span><span class="p">:</span>
|
|
<span class="p">{</span><span class="s1">'upper_element_name'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_upper_element</span><span class="p">},</span>
|
|
<span class="s1">'upper_attrib_name'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_upper_attrib_name</span><span class="p">},</span>
|
|
<span class="s1">'upper_attrib_value'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_upper_attrib_value</span><span class="p">},</span>
|
|
<span class="s1">'lower_element_name'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_lower_element</span><span class="p">},</span>
|
|
<span class="s1">'lower_attrib_name'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_lower_attrib_name</span><span class="p">},</span>
|
|
<span class="s1">'lower_attrib_value'</span><span class="p">:</span> <span class="p">{</span><span class="n">param_lower_attrib_value</span><span class="p">},</span>
|
|
<span class="s1">'input_format'</span><span class="p">:</span> <span class="p">{</span><span class="nb">str</span> <span class="nb">format</span> <span class="n">to</span> <span class="nb">input</span> <span class="n">input_value</span><span class="p">}</span>
|
|
<span class="s1">'input_value'</span><span class="p">:</span> <span class="p">{</span><span class="n">guess_value</span><span class="p">}},</span>
|
|
<span class="s2">"</span><span class="si">{user_defined_name_for_parameter_2}</span><span class="s2">"</span><span class="p">:</span>
|
|
<span class="o">...</span>
|
|
<span class="o">...</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>See example files for more examples.</p>
|
|
</p></li>
|
|
<li><p><strong>objective_function</strong> -- <p>(function or str) function to compute objective</p>
|
|
<p>By default, the objective function is log mean squared error
|
|
of distribution ratio</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">((</span><span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">d_pred</span><span class="p">)</span><span class="o">-</span><span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">d_meas</span><span class="p">))</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Function needs to take inputs:</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">objective_function</span><span class="p">(</span><span class="n">predicted_dict</span><span class="p">,</span> <span class="n">measured_df</span><span class="p">,</span> <span class="n">kwargs</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p><code class="docutils literal notranslate"><span class="pre">kwargs</span></code> is optional</p>
|
|
<p>Function needs to return: (float) value computed by objective function</p>
|
|
<p>Below is the guide for referencing predicted values</p>
|
|
<table class="docutils align-default">
|
|
<colgroup>
|
|
<col style="width: 46%" />
|
|
<col style="width: 54%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>To access</p></th>
|
|
<th class="head"><p>Use</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p>hydrogen ion conc in aq</p></td>
|
|
<td><p>predicted_dict['h_eq']</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>extractant conc in org</p></td>
|
|
<td><p>predicted_dict['z_eq']</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>ES ion eq conc in aq</p></td>
|
|
<td><p>predicted_dict['{ES}_aq_eq']</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>ES complex eq conc in org</p></td>
|
|
<td><p>predicted_dict['{ES}_org_eq']</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>ES distribution ratio</p></td>
|
|
<td><p>predicted_dict['{ES}_d_eq']</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Replace "{ES}" with extracted species element i.e. Nd, La, etc.</p>
|
|
<p>For measured values, use the same names, but
|
|
replace <code class="docutils literal notranslate"><span class="pre">predicted_dict</span></code> with <code class="docutils literal notranslate"><span class="pre">measured_df</span></code></p>
|
|
</p></li>
|
|
<li><p><strong>optimizer</strong> -- <p>(function or str) function to perform optimization</p>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>The optimized variables are not directly the species parameters,
|
|
but instead are first multiplied by the initial guess before
|
|
sending becoming the species parameters.</p>
|
|
<p>For example, say</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">opt_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'Nd(H(A)2)3(org):'</span><span class="n">h0</span><span class="s1">':-4.7e6}</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>If the bounds on h0 need to be [-4.7e7,-4.7e5], then
|
|
divide the bounds by the guess and get</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">"bounds"</span><span class="p">:</span> <span class="p">[(</span><span class="mf">1e-1</span><span class="p">,</span> <span class="mf">1e1</span><span class="p">)]</span>
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<p>By default, the optimizer is scipy's optimize function with</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">default_kwargs</span><span class="o">=</span> <span class="p">{</span><span class="s2">"method"</span><span class="p">:</span> <span class="s1">'SLSQP'</span><span class="p">,</span>
|
|
<span class="s2">"bounds"</span><span class="p">:</span> <span class="p">[(</span><span class="mf">1e-1</span><span class="p">,</span> <span class="mf">1e1</span><span class="p">)]</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">x_guess</span><span class="p">),</span>
|
|
<span class="s2">"constraints"</span><span class="p">:</span> <span class="p">(),</span>
|
|
<span class="s2">"options"</span><span class="p">:</span> <span class="p">{</span><span class="s1">'disp'</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
|
<span class="s1">'maxiter'</span><span class="p">:</span> <span class="mi">1000</span><span class="p">,</span>
|
|
<span class="s1">'ftol'</span><span class="p">:</span> <span class="mf">1e-6</span><span class="p">}}</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Function needs to take inputs:
|
|
<code class="docutils literal notranslate"><span class="pre">optimizer(objective_function,</span> <span class="pre">x_guess,</span> <span class="pre">kwargs)</span></code></p>
|
|
<p><code class="docutils literal notranslate"><span class="pre">kwargs</span></code> is optional</p>
|
|
<dl class="simple">
|
|
<dt>Function needs to return: ((np.ndarray, float)) Optimized parameters,</dt><dd><p>objective_function value</p>
|
|
</dd>
|
|
</dl>
|
|
</p></li>
|
|
<li><p><strong>temp_xml_file_path</strong> -- <p>(str) path to temporary xml file.</p>
|
|
<p>This xml file is a duplicate of the phases_xml_file name and is
|
|
modified during the optimization process to avoid changing the original
|
|
xml file</p>
|
|
<p>default is local temp folder</p>
|
|
</p></li>
|
|
<li><p><strong>dependant_params_dict</strong> -- <p>(dict) dictionary containing information
|
|
about parameters dependant on opt_dict. Has a similar structure to
|
|
opt_dict except instead of input values, it has 3 other fields:
|
|
'function', 'kwargs', and 'independent_params.</p>
|
|
<p>'function' is a function of the form</p>
|
|
<p><code class="docutils literal notranslate"><span class="pre">function(independent_param__value_list,</span> <span class="pre">custom_objects_dict,</span>
|
|
<span class="pre">**kwargs)</span></code></p>
|
|
<p>'kwargs' are the extra arguments to pass to function</p>
|
|
<p>'independent_params' is a list of parameter names in opt_dict that the
|
|
dependent_param is a function of.</p>
|
|
<p>'custom_objects_dict' is for accessing the estimator's internal
|
|
custom_objects_dict and must be included in the arguments, even if the
|
|
custom_objects_dict is not set and is None.</p>
|
|
<p>See example code for usage.</p>
|
|
</p></li>
|
|
<li><p><strong>custom_objects_dict</strong> -- (dict) dictionary containing custom objects
|
|
format: {<object_name_string>: <object>,...}</p></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.fit">
|
|
<code class="sig-name descname">fit</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">objective_function</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">optimizer</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">objective_kwargs</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">optimizer_kwargs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span> → tuple<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.fit" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Fits experimental to modeled data by minimizing objective function
|
|
with optimizer. Returns dictionary with opt_dict structure</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>objective_function</strong> -- (function) function to compute objective
|
|
If 'None', last set objective or default function is used</p></li>
|
|
<li><p><strong>optimizer</strong> -- (function) function to perform optimization
|
|
If 'None', last set optimizer or default is used</p></li>
|
|
<li><p><strong>optimizer_kwargs</strong> -- (dict) optional arguments for optimizer</p></li>
|
|
<li><p><strong>objective_kwargs</strong> -- (dict) optional arguments
|
|
for objective function</p></li>
|
|
</ul>
|
|
</dd>
|
|
<dt class="field-even">Returns tuple</dt>
|
|
<dd class="field-even"><p>(opt_dict (dict), opt_value (float))
|
|
optimized opt_dict: Has identical structure as opt_dict</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_aq_solvent_name">
|
|
<code class="sig-name descname">get_aq_solvent_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_aq_solvent_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_aq_solvent_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns aq_solvent_name</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>aq_solvent_name: (str) name of aqueous solvent in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_aq_solvent_rho">
|
|
<code class="sig-name descname">get_aq_solvent_rho</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_aq_solvent_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_aq_solvent_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns aqueous solvent density (g/L)</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>aq_solvent_rho: (float) density of aqueous solvent</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_complex_names">
|
|
<code class="sig-name descname">get_complex_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → list<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_complex_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_complex_names" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns list of complex names</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>complex_names: (list) names of complexes in xml file.</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_custom_objects_dict">
|
|
<code class="sig-name descname">get_custom_objects_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_custom_objects_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_custom_objects_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the custom_objects_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>custom_objects_dict: (dict) dictionary containing
|
|
information about custom objects from user</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_dependant_params_dict">
|
|
<code class="sig-name descname">get_dependant_params_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_dependant_params_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_dependant_params_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the dependant_params_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>dependant_params_dict: (dict) dictionary containing
|
|
information about parameters dependant on opt_dict</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_diluant_name">
|
|
<code class="sig-name descname">get_diluant_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_diluant_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_diluant_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns diluant name
|
|
:return: diluant_name: (str) name of diluant in xml file</p>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_diluant_rho">
|
|
<code class="sig-name descname">get_diluant_rho</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_diluant_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_diluant_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns diluant density (g/L)</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>diluant_rho: (float) density of diluant</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_exp_df">
|
|
<code class="sig-name descname">get_exp_df</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → pandas.core.frame.DataFrame<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_exp_df"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_exp_df" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the experimental DataFrame</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>(pd.DataFrame) Experimental data</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_extractant_name">
|
|
<code class="sig-name descname">get_extractant_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_extractant_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_extractant_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns extractant name</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>extractant_name: (str) name of extractant in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_extractant_rho">
|
|
<code class="sig-name descname">get_extractant_rho</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_extractant_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_extractant_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns extractant density (g/L)</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>extractant_rho: (float) density of extractant</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_extracted_species_ion_names">
|
|
<code class="sig-name descname">get_extracted_species_ion_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → list<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_extracted_species_ion_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_extracted_species_ion_names" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns list of extracted species ion names</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>extracted_species_ion_names: (list) names of
|
|
extracted species ions in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_extracted_species_list">
|
|
<code class="sig-name descname">get_extracted_species_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → list<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_extracted_species_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_extracted_species_list" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns list of extracted species names</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>extracted_species_list: (list) names of extracted species in
|
|
xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_in_moles">
|
|
<code class="sig-name descname">get_in_moles</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → pandas.core.frame.DataFrame<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_in_moles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_in_moles" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the in_moles DataFrame which contains the initial mole
|
|
fractions of each species for each experiment</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>in_moles: (pd.DataFrame) DataFrame with initial mole fractions</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_objective_function">
|
|
<code class="sig-name descname">get_objective_function</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_objective_function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_objective_function" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns objective function</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>objective_function: (func) Objective function to quantify
|
|
error between model and experimental data</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_opt_dict">
|
|
<code class="sig-name descname">get_opt_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → dict<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_opt_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_opt_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the dictionary containing optimization information</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>(dict) dictionary containing info about which
|
|
species parameters are updated to fit model to experimental data</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_optimizer">
|
|
<code class="sig-name descname">get_optimizer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_optimizer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_optimizer" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns objective function</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>optimizer: (func) Optimizer function to minimize objective
|
|
function</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_phases">
|
|
<code class="sig-name descname">get_phases</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → list<a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_phases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_phases" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns the list of Cantera solutions</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>(list) list of Cantera solutions/phases</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_predicted_dict">
|
|
<code class="sig-name descname">get_predicted_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_predicted_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_predicted_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns predicted dictionary of species concentrations
|
|
that xml parameters predicts given current in_moles</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>predicted_dict: (dict) dictionary of species concentrations</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.get_temp_xml_file_path">
|
|
<code class="sig-name descname">get_temp_xml_file_path</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.get_temp_xml_file_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.get_temp_xml_file_path" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Returns path to temporary xml file.</p>
|
|
<p>This xml file is a duplicate of the phases_xml_file name and is
|
|
modified during the optimization process to avoid changing the original
|
|
xml file.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Returns</dt>
|
|
<dd class="field-odd"><p>temp_xml_file_path: (str) path to temporary xml file.</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.log_mean_squared_error">
|
|
<code class="sig-name descname">log_mean_squared_error</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">predicted_dict</span></em>, <em class="sig-param"><span class="n">meas_df</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.log_mean_squared_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.log_mean_squared_error" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Default objective function for LLEPE</p>
|
|
<p>Returns the log mean squared error of
|
|
predicted distribution ratios (d=n_org/n_aq)
|
|
to measured d.</p>
|
|
<p>np.sum((np.log10(d_pred)-np.log10(d_meas))**2)</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>predicted_dict</strong> -- (dict) contains predicted data</p></li>
|
|
<li><p><strong>meas_df</strong> -- (pd.DataFrame) contains experimental data</p></li>
|
|
</ul>
|
|
</dd>
|
|
<dt class="field-even">Returns</dt>
|
|
<dd class="field-even"><p>(float) log mean squared error between predicted and measured</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.parity_plot">
|
|
<code class="sig-name descname">parity_plot</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">compared_value</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">c_data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">c_label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">plot_title</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">save_path</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">print_r_squared</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">data_labels</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">legend</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.parity_plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.parity_plot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Parity plot between measured and predicted compared_value.
|
|
Default compared value is {ES_1}_aq_eq</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>compared_value</strong> -- (str) Quantity to compare predicted and
|
|
experimental data. Can be any column containing "eq" in exp_df i.e.
|
|
h_eq, z_eq, {ES}_d_eq, etc.</p></li>
|
|
<li><p><strong>plot_title</strong> -- <p>(str or boolean)</p>
|
|
<dl class="simple">
|
|
<dt>If None (default): Plot title will be generated from compared_value</dt><dd><p>Recommend to just explore. If h_eq, plot_title is
|
|
"H^+ eq conc".</p>
|
|
</dd>
|
|
</dl>
|
|
<p>If str: Plot title will be plot_title string</p>
|
|
<p>If "False": No plot title</p>
|
|
</p></li>
|
|
<li><p><strong>c_data</strong> -- (list or np.ndarray) data for color axis</p></li>
|
|
<li><p><strong>c_label</strong> -- (str) label for color axis</p></li>
|
|
<li><p><strong>save_path</strong> -- (str) save path for parity plot</p></li>
|
|
<li><p><strong>print_r_squared</strong> -- (boolean) To plot or not to plot r-squared
|
|
value. Prints 2 places past decimal</p></li>
|
|
<li><p><strong>data_labels</strong> -- labels for the data such as paper's name where
|
|
experiment is pulled from.</p></li>
|
|
<li><p><strong>legend</strong> -- whether to display legend for data_labels. Has no
|
|
effect if data_labels is None</p></li>
|
|
</ul>
|
|
</dd>
|
|
<dt class="field-even">Return fig, ax</dt>
|
|
<dd class="field-even"><p>returns the figure and axes objects</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.plot_3d_data">
|
|
<em class="property">static </em><code class="sig-name descname">plot_3d_data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x_data</span></em>, <em class="sig-param"><span class="n">y_data</span></em>, <em class="sig-param"><span class="n">z_data</span></em>, <em class="sig-param"><span class="n">c_data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">x_label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">y_label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">z_label</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">c_label</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.plot_3d_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.plot_3d_data" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>THis is for plotting 3d scatter plots.
|
|
We suggest use matplotlib's ax.scatter to make 3d plots.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>x_data</strong> -- (list) list of data for x axis</p></li>
|
|
<li><p><strong>y_data</strong> -- (list) list of data for y axis</p></li>
|
|
<li><p><strong>z_data</strong> -- (list) list of data for z axis</p></li>
|
|
<li><p><strong>c_data</strong> -- (list) list of data for color axis</p></li>
|
|
<li><p><strong>x_label</strong> -- (str) label for x axis</p></li>
|
|
<li><p><strong>y_label</strong> -- (str) label for y axis</p></li>
|
|
<li><p><strong>z_label</strong> -- (str) label for z axis</p></li>
|
|
<li><p><strong>c_label</strong> -- (str) label for color axis</p></li>
|
|
</ul>
|
|
</dd>
|
|
<dt class="field-even">Returns</dt>
|
|
<dd class="field-even"><p></p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.r_squared">
|
|
<code class="sig-name descname">r_squared</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">compared_value</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.r_squared"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.r_squared" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>r-squared value comparing measured and predicted compared value</p>
|
|
<p>Closer to 1, the better the model's predictions.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>compared_value</strong> -- (str) Quantity to compare predicted and
|
|
experimental data. Can be any column containing "eq" in exp_df i.e.
|
|
h_eq, z_eq, {ES}_d_eq, etc. default is {ES}_aq_eq</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.scipy_minimize">
|
|
<em class="property">static </em><code class="sig-name descname">scipy_minimize</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">objective</span></em>, <em class="sig-param"><span class="n">x_guess</span></em>, <em class="sig-param"><span class="n">optimizer_kwargs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.scipy_minimize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.scipy_minimize" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>The default optimizer for LLEPE</p>
|
|
<p>Uses scipy.minimize</p>
|
|
<p>By default, options are</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">default_kwargs</span><span class="o">=</span> <span class="p">{</span><span class="s2">"method"</span><span class="p">:</span> <span class="s1">'SLSQP'</span><span class="p">,</span>
|
|
<span class="s2">"bounds"</span><span class="p">:</span> <span class="p">[(</span><span class="mf">1e-1</span><span class="p">,</span> <span class="mf">1e1</span><span class="p">)]</span><span class="o">*</span><span class="nb">len</span><span class="p">(</span><span class="n">x_guess</span><span class="p">),</span>
|
|
<span class="s2">"constraints"</span><span class="p">:</span> <span class="p">(),</span>
|
|
<span class="s2">"options"</span><span class="p">:</span> <span class="p">{</span><span class="s1">'disp'</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
|
<span class="s1">'maxiter'</span><span class="p">:</span> <span class="mi">1000</span><span class="p">,</span>
|
|
<span class="s1">'ftol'</span><span class="p">:</span> <span class="mf">1e-6</span><span class="p">}}</span>
|
|
</pre></div>
|
|
</div>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>objective</strong> -- (func) the objective function</p></li>
|
|
<li><p><strong>x_guess</strong> -- (np.ndarray) the initial guess (always 1)</p></li>
|
|
<li><p><strong>optimizer_kwargs</strong> -- (dict) dictionary of options for minimize</p></li>
|
|
</ul>
|
|
</dd>
|
|
<dt class="field-even">Returns</dt>
|
|
<dd class="field-even"><p>((np.ndarray, float)) Optimized parameters,
|
|
objective_function value</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_aq_solvent_name">
|
|
<code class="sig-name descname">set_aq_solvent_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">aq_solvent_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_aq_solvent_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_aq_solvent_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change aq_solvent_name to input aq_solvent_name</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>aq_solvent_name</strong> -- (str) name of aqueous solvent in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_aq_solvent_rho">
|
|
<code class="sig-name descname">set_aq_solvent_rho</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">aq_solvent_rho</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_aq_solvent_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_aq_solvent_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Changes aqueous solvent density (g/L) to input aq_solvent_rho</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>aq_solvent_rho</strong> -- (float) density of aqueous solvent</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_complex_names">
|
|
<code class="sig-name descname">set_complex_names</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">complex_names</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_complex_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_complex_names" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change complex names list to input complex_names</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>complex_names</strong> -- (list) names of complexes in xml file.</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_custom_objects_dict">
|
|
<code class="sig-name descname">set_custom_objects_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">custom_objects_dict</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_custom_objects_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_custom_objects_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Sets the custom_objects_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>custom_objects_dict</strong> -- (dict) dictionary containing information
|
|
about about custom objects from user</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_dependant_params_dict">
|
|
<code class="sig-name descname">set_dependant_params_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dependant_params_dict</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_dependant_params_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_dependant_params_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Sets the dependant_params_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>dependant_params_dict</strong> -- (dict) dictionary containing information
|
|
about parameters dependant on opt_dict</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_diluant_name">
|
|
<code class="sig-name descname">set_diluant_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">diluant_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_diluant_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_diluant_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change diluant_name to input diluant_name</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>diluant_name</strong> -- (str) name of diluant in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_diluant_rho">
|
|
<code class="sig-name descname">set_diluant_rho</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">diluant_rho</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_diluant_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_diluant_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Changes diluant density (g/L) to input diluant_rho</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>diluant_rho</strong> -- (float) density of diluant</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_exp_df">
|
|
<code class="sig-name descname">set_exp_df</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">exp_data</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_exp_df"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_exp_df" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Changes the experimental DataFrame to input exp_csv_filename data
|
|
and renames columns to internal LLEPE names</p>
|
|
<p>h_i, h_eq, z_i, z_eq, {ES}_aq_i, {ES}_aq_eq, {ES}_d</p>
|
|
<p>See class docstring on "exp_csv_filename" for further explanations.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>exp_data</strong> -- (str or pd.DataFrame)
|
|
file name/path or DataFrame for experimental data csv</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_extractant_name">
|
|
<code class="sig-name descname">set_extractant_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extractant_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_extractant_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_extractant_name" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change extractant_name to input extractant_name
|
|
:param extractant_name: (str) name of extractant in xml file</p>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_extractant_rho">
|
|
<code class="sig-name descname">set_extractant_rho</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extractant_rho</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_extractant_rho"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_extractant_rho" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Changes extractant density (g/L) to input extractant_rho</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>extractant_rho</strong> -- (float) density of extractant</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_extracted_species_ion_names">
|
|
<code class="sig-name descname">set_extracted_species_ion_names</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extracted_species_ion_names</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_extracted_species_ion_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_extracted_species_ion_names" title="Permalink to this definition">¶</a></dt>
|
|
<dd><dl class="simple">
|
|
<dt>Change list of extracted species ion names to input</dt><dd><p>extracted_species_ion_names</p>
|
|
</dd>
|
|
</dl>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>extracted_species_ion_names</strong> -- (list) names of extracted species
|
|
ions in xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_extracted_species_list">
|
|
<code class="sig-name descname">set_extracted_species_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">extracted_species_list</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_extracted_species_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_extracted_species_list" title="Permalink to this definition">¶</a></dt>
|
|
<dd><dl class="simple">
|
|
<dt>Change list of extracted species ion names to input</dt><dd><p>extracted_species_ion_names</p>
|
|
</dd>
|
|
</dl>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>extracted_species_list</strong> -- (list) names of extracted species in
|
|
xml file</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_in_moles">
|
|
<code class="sig-name descname">set_in_moles</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">feed_vol</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_in_moles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_in_moles" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Function that initializes mole fractions to input feed_vol</p>
|
|
<p>This function is called at initialization</p>
|
|
<p>Sets in_moles to a pd.DataFrame containing initial mole fractions</p>
|
|
<p>Columns for species and rows for different experiments</p>
|
|
<p>This function also calls update_predicted_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>feed_vol</strong> -- (float) feed volume of mixture (L)</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_objective_function">
|
|
<code class="sig-name descname">set_objective_function</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">objective_function</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_objective_function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_objective_function" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change objective function to input objective_function.</p>
|
|
<blockquote>
|
|
<div><p>See class docstring on "objective_function" for instructions</p>
|
|
</div></blockquote>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>objective_function</strong> -- (func) Objective function to quantify
|
|
error between model and experimental data</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_opt_dict">
|
|
<code class="sig-name descname">set_opt_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opt_dict</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_opt_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_opt_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change the dictionary to input opt_dict.</p>
|
|
<p>opt_dict specifies species parameters to be updated to
|
|
fit model to data</p>
|
|
<p>See class docstring on "opt_dict" for more information.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>opt_dict</strong> -- (dict) dictionary containing info about which
|
|
species parameters are updated to fit model to experimental data</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_optimizer">
|
|
<code class="sig-name descname">set_optimizer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">optimizer</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_optimizer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_optimizer" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change optimizer function to input optimizer.</p>
|
|
<blockquote>
|
|
<div><p>See class docstring on "optimizer" for instructions</p>
|
|
</div></blockquote>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>optimizer</strong> -- (func) Optimizer function to minimize objective
|
|
function</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_phases">
|
|
<code class="sig-name descname">set_phases</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">phases_xml_filename</span></em>, <em class="sig-param"><span class="n">phase_names</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_phases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_phases" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Change list of Cantera solutions by inputting
|
|
new xml file name and phase names</p>
|
|
<p>Also runs set_in_moles to set feed volume to 1 L</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>phases_xml_filename</strong> -- (str) xml file with parameters
|
|
for equilibrium calc</p></li>
|
|
<li><p><strong>phase_names</strong> -- (list) names of phases in xml file</p></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.set_temp_xml_file_path">
|
|
<code class="sig-name descname">set_temp_xml_file_path</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">temp_xml_file_path</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.set_temp_xml_file_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.set_temp_xml_file_path" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Changes temporary xml file path to input temp_xml_file_path.</p>
|
|
<p>This xml file is a duplicate of the phases_xml_file name and is
|
|
modified during the optimization process to avoid changing the original
|
|
xml file.</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>temp_xml_file_path</strong> -- (str) path to temporary xml file.</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.update_custom_objects_dict">
|
|
<code class="sig-name descname">update_custom_objects_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">info_dict</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.update_custom_objects_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.update_custom_objects_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>updates internal custom_objects_dict with info_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><p><strong>info_dict</strong> -- Requires an identical structure to opt_dict
|
|
Ignores items with keys containing "custom_object_name"</p>
|
|
</dd>
|
|
<dt class="field-even">Returns</dt>
|
|
<dd class="field-even"><p>None</p>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.update_predicted_dict">
|
|
<code class="sig-name descname">update_predicted_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">phases_xml_filename</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">phase_names</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.update_predicted_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.update_predicted_dict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Function that computes the predicted equilibrium concentrations
|
|
the fed phases_xml_filename parameters predicts given the initial
|
|
mole fractions set by in_moles()</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>phases_xml_filename</strong> -- (str)xml file with parameters
|
|
for equilibrium calc. If <code class="docutils literal notranslate"><span class="pre">None</span></code>, the
|
|
current phases_xml_filename is used.</p></li>
|
|
<li><p><strong>phase_names</strong> -- (list) names of phases in xml file.
|
|
If <code class="docutils literal notranslate"><span class="pre">None</span></code>, the current phases_names is used.</p></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
<dl class="py method">
|
|
<dt id="llepe.LLEPE.update_xml">
|
|
<code class="sig-name descname">update_xml</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">info_dict</span></em>, <em class="sig-param"><span class="n">phases_xml_filename</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">dependant_params_dict</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/llepe/llepe.html#LLEPE.update_xml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#llepe.LLEPE.update_xml" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>updates xml file with info_dict</p>
|
|
<dl class="field-list simple">
|
|
<dt class="field-odd">Parameters</dt>
|
|
<dd class="field-odd"><ul class="simple">
|
|
<li><p><strong>info_dict</strong> -- (dict) Requires an identical structure to opt_dict
|
|
Ignores items with keys containing "custom_object_name"</p></li>
|
|
<li><p><strong>phases_xml_filename</strong> -- (str) xml filename if editing other xml
|
|
If <code class="docutils literal notranslate"><span class="pre">None</span></code>, the current xml will be modified and the internal
|
|
Cantera phases will be refreshed to the new values.</p></li>
|
|
<li><p><strong>dependant_params_dict</strong> -- (dict) dictionary containing information
|
|
about parameters dependant on info_dict</p></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<footer>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
© Copyright 2020, UChicago Argonne, LLC.
|
|
|
|
</p>
|
|
</div>
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |