mirror of
https://github.com/ANL-CEEESA/LLEPE.git
synced 2025-12-06 01:48:53 -06:00
Changed iterative fit to only fit to multicomponent data.
This commit is contained in:
@@ -22,7 +22,7 @@ ext_h0_filename = "../../data/jsons/min_h0_guess_ext_h0.txt"
|
||||
with open(ext_h0_filename) as file:
|
||||
ext_h0_dict = json.load(file)
|
||||
labeled_data = pd.read_csv("../../data/csvs/"
|
||||
"zeroes_removed_PC88A_HCL_NdPrCeLaDySmY.csv")
|
||||
"multicomponent_PC88A_HCL_NdPrCeLaDySmY.csv")
|
||||
exp_data = labeled_data.drop(labeled_data.columns[0], axis=1)
|
||||
xml_file = "PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml"
|
||||
lin_param_df = pd.read_csv("../../data/csvs"
|
||||
@@ -237,8 +237,7 @@ while obj_diff1 > eps or obj_diff2 > eps:
|
||||
del(output_dict['rel_diff'][-1])
|
||||
output_dict['rel_diff'].append(rel_diff)
|
||||
output_df = pd.DataFrame(output_dict)
|
||||
output_df.to_csv('outputs/iterative_fitter_output4.csv')
|
||||
obj_diff1 = np.abs(output_dict['best_obj'][-1]-output_dict['best_obj'][-2])
|
||||
output_df.to_csv('outputs/iterative_fitter_output_multicomponent.csv')
|
||||
obj_diff1 = output_dict['best_obj'][-2]-output_dict['best_obj'][-1]
|
||||
if i > 2:
|
||||
obj_diff2 = np.abs(
|
||||
output_dict['best_obj'][-1] - output_dict['best_obj'][-3])
|
||||
obj_diff2 = output_dict['best_obj'][-3] - output_dict['best_obj'][-1]
|
||||
|
||||
@@ -2,15 +2,30 @@ import llepe
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import json
|
||||
import matplotlib as plt
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib
|
||||
import re
|
||||
|
||||
|
||||
def set_size(w, h, ax=None):
|
||||
""" w, h: width, height in inches """
|
||||
if not ax:
|
||||
ax = plt.gca()
|
||||
left = ax.figure.subplotpars.left
|
||||
right = ax.figure.subplotpars.right
|
||||
top = ax.figure.subplotpars.top
|
||||
bottom = ax.figure.subplotpars.bottom
|
||||
fig_width = float(w) / (right - left)
|
||||
fig_height = float(h) / (top - bottom)
|
||||
ax.figure.set_size_inches(fig_width, fig_height)
|
||||
|
||||
|
||||
font = {'family': 'sans serif',
|
||||
'size': 24}
|
||||
matplotlib.rc('font', **font)
|
||||
plt.rc('xtick', labelsize=18)
|
||||
plt.rc('ytick', labelsize=18)
|
||||
plt.rcParams['lines.linewidth'] = 4
|
||||
matplotlib.rc('xtick', labelsize=18)
|
||||
matplotlib.rc('ytick', labelsize=18)
|
||||
matplotlib.rcParams['lines.linewidth'] = 4
|
||||
matplotlib.rcParams['lines.markersize'] = 10
|
||||
|
||||
|
||||
@@ -27,8 +42,8 @@ def mod_lin_param_df(lp_df, input_val, mini_species, mini_lin_param):
|
||||
return new_lp_df
|
||||
|
||||
|
||||
info_df = pd.read_csv('outputs/iterative_fitter_w_mse_output.csv')
|
||||
test_row = 3
|
||||
info_df = pd.read_csv('outputs/iterative_fitter_output4.csv')
|
||||
test_row = -1
|
||||
pitzer_params_filename = "../../data/jsons/min_h0_pitzer_params.txt"
|
||||
with open(pitzer_params_filename) as file:
|
||||
pitzer_params_dict = json.load(file)
|
||||
@@ -112,57 +127,146 @@ estimator.set_custom_objects_dict({'lin_param_df': lin_param_df})
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(info_dict,
|
||||
dependant_params_dict=dependant_params_dict)
|
||||
exp_data = estimator.get_exp_df()
|
||||
feed_cols = []
|
||||
for col in exp_data.columns:
|
||||
if 'aq_i' in col:
|
||||
feed_cols.append(col)
|
||||
exp_data['total_re'] = exp_data[feed_cols].sum(axis=1)
|
||||
label_list = []
|
||||
for index, row in exp_data[feed_cols].iterrows():
|
||||
bool_list = list((row > 0).values)
|
||||
label = ''
|
||||
for species, el in zip(species_list, bool_list):
|
||||
if el:
|
||||
label = '{0}-{1}'.format(label, species)
|
||||
label = label[1:]
|
||||
label_list.append(label)
|
||||
r2s = ""
|
||||
for species in species_list:
|
||||
# if species=='La':
|
||||
# save_name = 'outputs' \
|
||||
# '/parity_iterative_fitter_{0}_org_eq'.format(species)
|
||||
save_name = None
|
||||
# fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
# c_data='z_i',
|
||||
# c_label='Feed total RE '
|
||||
# 'molarity (mol/L)',
|
||||
# print_r_squared=True,
|
||||
# save_path=save_name)
|
||||
r2s += str(estimator.r_squared('{0}_org_eq'.format(species))) + ','
|
||||
compared_value = 'La_org_eq'
|
||||
plot_title = None
|
||||
legend = True
|
||||
predicted_dict = estimator.get_predicted_dict()
|
||||
exp_df = estimator.get_exp_df()
|
||||
pred = pd.DataFrame(predicted_dict)[compared_value].fillna(0).values
|
||||
meas = exp_df[compared_value].fillna(0).values
|
||||
name_breakdown = re.findall('[^_\W]+', compared_value)
|
||||
compared_species = name_breakdown[0]
|
||||
data_labels = list(labeled_data['label'])
|
||||
if compared_species == 'h':
|
||||
feed_molarity = exp_df['h_i'].fillna(0).values
|
||||
elif compared_species == 'z':
|
||||
feed_molarity = exp_df['z_i'].fillna(0).values
|
||||
else:
|
||||
feed_molarity = exp_df[
|
||||
'{0}_aq_i'.format(compared_species)].fillna(0).values
|
||||
combined_df = pd.DataFrame({'pred': pred,
|
||||
'meas': meas,
|
||||
'label': data_labels,
|
||||
'feed_molarity': feed_molarity})
|
||||
combined_df = combined_df[(combined_df['feed_molarity'] != 0)]
|
||||
meas = combined_df['meas'].values
|
||||
pred = combined_df['pred'].values
|
||||
|
||||
fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
data_labels=label_list,
|
||||
print_r_squared=True,
|
||||
save_path=save_name)
|
||||
ax.legend(loc=4)
|
||||
pred_df = pd.DataFrame(estimator.get_predicted_dict())
|
||||
new_cols = []
|
||||
for col in pred_df.columns:
|
||||
new_cols.append("pred_{0}".format(col))
|
||||
pred_df.columns = new_cols
|
||||
new_cols = ['label',
|
||||
'h_i',
|
||||
'h_eq',
|
||||
'z_i',
|
||||
'z_eq'
|
||||
]
|
||||
for species in species_list:
|
||||
new_cols.append("{0}_aq_i".format(species))
|
||||
new_cols.append("{0}_aq_eq".format(species))
|
||||
new_cols.append("{0}_d_eq".format(species))
|
||||
labeled_data.columns = new_cols
|
||||
total_df = labeled_data.join(pred_df)
|
||||
min_data = np.min([pred, meas])
|
||||
max_data = np.max([pred, meas])
|
||||
min_max_data = np.array([min_data, max_data])
|
||||
|
||||
if compared_species == 'h':
|
||||
default_title = '$H^+$ eq. conc. (mol/L)'
|
||||
elif compared_species == 'z':
|
||||
default_title = '{0} eq. conc. (mol/L)'.format(extractant_name)
|
||||
else:
|
||||
phase = name_breakdown[1]
|
||||
if phase == 'aq':
|
||||
extracted_species_charge = extracted_species_charges[
|
||||
extracted_species_list.index(
|
||||
compared_species)]
|
||||
default_title = '$%s^{%d+}$ eq. conc. (mol/L)' \
|
||||
% (compared_species, extracted_species_charge)
|
||||
elif phase == 'd':
|
||||
default_title = '{0} distribution ratio'.format(
|
||||
compared_species)
|
||||
else:
|
||||
default_title = '{0} complex eq. conc. (mol/L)'.format(
|
||||
compared_species)
|
||||
fig, ax = plt.subplots(figsize=(8, 6))
|
||||
|
||||
if isinstance(data_labels, list):
|
||||
# unique_labels = list(set(data_labels))
|
||||
unique_labels = ['Li (1987)',
|
||||
'Kim (2012)',
|
||||
'Formiga (2016)',
|
||||
'Banda (2014)',
|
||||
]
|
||||
color_list = ['r', 'g', 'b', 'm']
|
||||
marker_list = ['o', 's', 'P', 'X', ]
|
||||
for ind, label in enumerate(unique_labels):
|
||||
filtered_data = combined_df[combined_df['label'] == label]
|
||||
filtered_meas = filtered_data['meas']
|
||||
filtered_pred = filtered_data['pred']
|
||||
if len(filtered_pred) != 0:
|
||||
ax.scatter(filtered_meas,
|
||||
filtered_pred,
|
||||
label=label,
|
||||
color=color_list[ind],
|
||||
marker=marker_list[ind])
|
||||
if legend:
|
||||
ax.legend(loc=4)
|
||||
ax.plot(min_max_data, min_max_data, color="b", label="")
|
||||
|
||||
ax.text(min_max_data[0],
|
||||
min_max_data[1] * 0.9,
|
||||
'$R^2$={0:.2f}'.format(estimator.r_squared(compared_value)))
|
||||
|
||||
ax.set(xlabel='Measured', ylabel='Predicted')
|
||||
if plot_title is None:
|
||||
ax.set_title(default_title)
|
||||
set_size(8, 6)
|
||||
plt.tight_layout()
|
||||
plt.show()
|
||||
# exp_data = estimator.get_exp_df()
|
||||
# feed_cols = []
|
||||
# for col in exp_data.columns:
|
||||
# if 'aq_i' in col:
|
||||
# feed_cols.append(col)
|
||||
# exp_data['total_re'] = exp_data[feed_cols].sum(axis=1)
|
||||
# label_list = []
|
||||
# for index, row in exp_data[feed_cols].iterrows():
|
||||
# bool_list = list((row > 0).values)
|
||||
# label = ''
|
||||
# for species, el in zip(species_list, bool_list):
|
||||
# if el:
|
||||
# label = '{0}-{1}'.format(label, species)
|
||||
# label = label[1:]
|
||||
# label_list.append(label)
|
||||
# r2s = ""
|
||||
# for species in species_list:
|
||||
# # if species=='La':
|
||||
# # save_name = 'outputs' \
|
||||
# # '/parity_iterative_fitter_{0}_org_eq'.format(species)
|
||||
# save_name = None
|
||||
# fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
# c_data=
|
||||
# exp_data['total_re'].values,
|
||||
# c_label='Feed total RE '
|
||||
# 'molarity (mol/L)',
|
||||
# print_r_squared=False,
|
||||
# plot_title='')
|
||||
# ax.plot([0, 0.05], [0, 0.05], c='b')
|
||||
# ax.text(0.01, 0.04,
|
||||
# '$R^2$={0:.2f}'.format(estimator.r_squared(
|
||||
# '{0}_org_eq'.format(species))))
|
||||
# ax.set_xlim((0, 0.05))
|
||||
# ax.set_ylim((0, 0.05))
|
||||
# r2s += str(estimator.r_squared('{0}_org_eq'.format(species))) + ','
|
||||
#
|
||||
# # fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
# # data_labels=list(labeled_data['label']),
|
||||
# # print_r_squared=True,
|
||||
# # save_path=save_name)
|
||||
# # ax.legend(loc=4)
|
||||
# pred_df = pd.DataFrame(estimator.get_predicted_dict())
|
||||
# new_cols = []
|
||||
# for col in pred_df.columns:
|
||||
# new_cols.append("pred_{0}".format(col))
|
||||
# pred_df.columns = new_cols
|
||||
# new_cols = ['label',
|
||||
# 'h_i',
|
||||
# 'h_eq',
|
||||
# 'z_i',
|
||||
# 'z_eq'
|
||||
# ]
|
||||
# for species in species_list:
|
||||
# new_cols.append("{0}_aq_i".format(species))
|
||||
# new_cols.append("{0}_aq_eq".format(species))
|
||||
# new_cols.append("{0}_d_eq".format(species))
|
||||
# labeled_data.columns = new_cols
|
||||
# total_df = labeled_data.join(pred_df)
|
||||
# total_df.to_csv('if_mse_total_df.csv')
|
||||
# short_info_dict = {}
|
||||
# for key, value in info_dict.items():
|
||||
|
||||
@@ -8,7 +8,7 @@ parameters = 'slope,intercept,beta0,beta1'.split(',')
|
||||
# if go != 'y':
|
||||
# break
|
||||
# plt.close('all')
|
||||
df = pd.read_csv('outputs/iterative_fitter_output.csv')
|
||||
df = pd.read_csv('outputs/iterative_fitter_output4.csv')
|
||||
info_cols = {parameter: [] for parameter in parameters}
|
||||
for col in df.columns:
|
||||
for parameter in parameters:
|
||||
@@ -48,4 +48,4 @@ ax.plot(df['iter'].values[1:],
|
||||
ax.set_xlabel('iteration')
|
||||
ax.set_ylabel('Value')
|
||||
plt.tight_layout()
|
||||
plt.savefig('outputs/rel_diff.png')
|
||||
# plt.savefig('outputs/rel_diff.png')
|
||||
|
||||
BIN
docs/Examples/outputs/best_obj.png
Normal file
BIN
docs/Examples/outputs/best_obj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/Examples/outputs/beta0.png
Normal file
BIN
docs/Examples/outputs/beta0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
docs/Examples/outputs/beta1.png
Normal file
BIN
docs/Examples/outputs/beta1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/Examples/outputs/intercept.png
Normal file
BIN
docs/Examples/outputs/intercept.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
13
docs/Examples/outputs/iterative_fitter_output4.csv
Normal file
13
docs/Examples/outputs/iterative_fitter_output4.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
,iter,best_obj,rel_diff,best_ext_h0,Nd_intercept,Nd_beta0,Nd_beta1,Pr_intercept,Pr_beta0,Pr_beta1,Ce_intercept,Ce_beta0,Ce_beta1,La_intercept,La_beta0,La_beta1,Dy_intercept,Dy_beta0,Dy_beta1,Sm_intercept,Sm_beta0,Sm_beta1,Y_intercept,Y_beta0,Y_beta1
|
||||
0,0,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20
|
||||
1,1,0.033647778113830525,21.000000000000057,-1376877.1491014853,-796630.7472372957,0.7459820315595859,7.683962525237933,-808126.331804689,0.05879108393945308,0.5448323469435739,-798601.759258479,0.6005010041816041,4.910031852331482,-802384.4792986697,0.5930046452497859,5.277120552778203,-805107.4528195162,0.6129648575972374,5.360202430370018,-795364.2081485003,0.5978078971541942,5.279174082617606,-814654.8936071004,0.9657036817294907,8.515030539951253
|
||||
2,2,0.011371891310485667,1.7809885286134581,-1377917.5261387695,-796507.2063621008,1.282838759795358,6.902804792440243,-808735.3933837808,0.05879108229837919,0.5448322898792433,-798307.3201515124,0.6005010298214011,4.910022284826427,-801912.301008032,0.5930045609171245,5.277127676968026,-801913.8255634321,0.7646294828913005,7.848342595191327,-795363.041378655,0.5978084651250514,5.279183026035014,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
3,3,0.008641080472189547,0.7095542768622557,-1377917.5261387695,-796048.7760914894,1.0825298224626023,6.211283570154922,-807884.6838503737,0.05879107717406858,0.5448320238819658,-799326.8310861788,0.6005020116531858,4.91004437191519,-801737.4462156398,0.5930048961782302,5.277144735292778,-801426.9157177466,0.5532849580804902,9.206773080251143,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
4,4,0.0077116880626842774,0.001045483581763083,-1377917.5261387695,-796123.8048527003,1.082532056501894,6.21126666931227,-807682.864923159,0.05879107717406858,0.5448320238819658,-798906.4762851987,0.6005020116531858,4.91004437191519,-801602.4497529072,0.5930048961782302,5.277144735292778,-801426.3864333024,0.5532852226657412,9.206784416704208,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
5,5,0.007654988377412918,0.0004889223754199215,-1377917.5269444608,-795978.009332054,1.0825315776813356,6.211262701179254,-807775.0879128327,0.05879107717406858,0.5448320238819658,-798839.9836325685,0.6005020116531858,4.91004437191519,-801517.285745487,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
6,6,0.007610209179550956,0.0003179015187814805,-1377917.5269997541,-795889.1188724772,1.0825315776813356,6.211262701179254,-807684.2192836072,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801483.3687901833,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
7,7,0.007598843960371909,0.00011070832700715566,-1377917.5269100612,-795897.0467890751,1.0825315776813356,6.211262701179254,-807644.9779835651,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801441.5615806901,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
8,8,0.007598581095870595,3.145446182414225e-05,-1377917.5269485628,-795872.4794372824,1.0825315776813356,6.211262701179254,-807644.5039264921,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801441.5615806901,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
9,9,0.0075985812451889985,0.0,-1377917.5269485628,-795872.4794372824,1.0825315776813356,6.211262701179254,-807644.5039264921,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801441.5615806901,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
10,10,0.0075985812451889985,0.0,-1377917.5269485628,-795872.4794372824,1.0825315776813356,6.211262701179254,-807644.5039264921,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801441.5615806901,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
11,11,0.0075985812451889985,0.0,-1377917.5269485628,-795872.4794372824,1.0825315776813356,6.211262701179254,-807644.5039264921,0.05879107717406858,0.5448320238819658,-798798.9084175534,0.6005020116531858,4.91004437191519,-801441.5615806901,0.5930048961782302,5.277144735292778,-801426.9000381464,0.5532852863195881,9.206787175138803,-795364.1985261647,0.5978087860273482,5.279188095059933,-813457.4899543246,0.8866269789489127,9.867663759220948
|
||||
|
10
docs/Examples/outputs/iterative_fitter_w_mse_output.csv
Normal file
10
docs/Examples/outputs/iterative_fitter_w_mse_output.csv
Normal file
@@ -0,0 +1,10 @@
|
||||
,iter,best_obj,rel_diff,best_ext_h0,Nd_intercept,Nd_beta0,Nd_beta1,Pr_intercept,Pr_beta0,Pr_beta1,Ce_intercept,Ce_beta0,Ce_beta1,La_intercept,La_beta0,La_beta1,Dy_intercept,Dy_beta0,Dy_beta1,Sm_intercept,Sm_beta0,Sm_beta1,Y_intercept,Y_beta0,Y_beta1
|
||||
0,0,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20
|
||||
1,1,7.243881311122883e-06,21.000000000000057,-1376882.0784583509,-793959.2365328791,1.213718406400912,7.748153622541222,-805092.317983506,0.05879109101834264,0.5448322349963308,-789740.8658638337,0.2035235053232368,21.120426174002823,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794033.3277785552,0.6989082242196476,6.877882016105836,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
2,2,5.235683016217101e-06,5.0826146693579895e-05,-1376882.0784583509,-793959.2365328791,1.213718406400912,7.748153622541222,-805061.9201482645,0.05879109126451901,0.5448322298014207,-789740.8658638337,0.2035235053232368,21.120426174002823,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
3,3,5.234379962639123e-06,0.0004431912247434154,-1376882.0784583509,-793651.8526619686,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
4,4,1.0136650760054431e-05,3.4483260160044286e-05,-1376882.0786722435,-793679.2203652804,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
5,5,1.0461762551892658e-05,1.3733029030223567e-05,-1376882.079002063,-793690.1199850544,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
6,6,1.0461847595183674e-05,0.0,-1376882.079002063,-793690.1199850544,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
7,7,1.0568726787700163e-05,0.0,-1376882.079002063,-793690.1199850544,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
8,8,1.1654800306565983e-05,0.0,-1376882.079002063,-793690.1199850544,1.213717095858249,7.748129467548838,-805038.8843481757,0.058791091500561485,0.5448322248125199,-789722.8075867157,0.20352350320923904,21.120419048363047,-797993.3842652582,1.0223168335791357,0.5296306654103653,-801345.4872245657,0.7646372240575223,7.849276225207628,-794023.0863911208,0.6989083059080712,6.877881736471866,-814036.0292108656,0.8852797060008407,9.334636294454038
|
||||
|
27
docs/Examples/outputs/multi_only_iterative_fitter_output.csv
Normal file
27
docs/Examples/outputs/multi_only_iterative_fitter_output.csv
Normal file
@@ -0,0 +1,27 @@
|
||||
,iter,best_obj,rel_diff,best_ext_h0,Nd_intercept,Nd_beta0,Nd_beta1,Pr_intercept,Pr_beta0,Pr_beta1,Ce_intercept,Ce_beta0,Ce_beta1,La_intercept,La_beta0,La_beta1,Dy_intercept,Dy_beta0,Dy_beta1,Sm_intercept,Sm_beta0,Sm_beta1,Y_intercept,Y_beta0,Y_beta1
|
||||
0,0,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20,1e+20
|
||||
1,1,0.03589758768077916,21.000000000000057,-1376877.1578525545,-796630.7472372957,0.7459820315595859,7.683962525237933,-804949.676541606,0.5878722433097117,5.446965040891874,-799671.8535977869,0.5683138771769763,4.330159786749355,-798281.080974753,0.05929999713109059,14.235546390790574,-805107.4528322341,0.6129648560200409,5.360202416896411,-795364.2084167162,0.5978078969216549,5.279174081605432,-814654.8936058494,0.9657036817607582,8.515030540098573
|
||||
2,2,0.020523566039320422,2.5585440673715034,-1377356.1260593878,-797059.9776562914,0.7459837782866834,7.683963804574712,-807474.5742908432,0.412119358146579,0.5446965040891875,-798541.1385153377,0.5683086183011624,4.3301017748512365,-793826.8317553926,0.059179052561110786,19.77323694076803,-801913.8726103224,0.7646416177518945,7.84824568473698,-795363.0419325187,0.59780846432948,5.279183016139414,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
3,3,0.019477920445525317,7.677982352652354,-1375588.6756908477,-793163.8973856996,0.3209195035432397,13.123168416291694,-808683.1537883538,0.412118699519776,0.5446960424554511,-790111.3963314675,0.05683086183011624,23.89686703927439,-791050.7992598361,0.05905360634622211,29.84340866533762,-801427.30300279,0.5534942813794564,9.205560588460095,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
4,4,0.010207128776218969,0.42455280980920035,-1375610.9624283572,-794262.8311628923,0.3216915257810643,13.804909552933434,-808435.0647171926,0.41211840588454257,0.5446957279361009,-790207.5472086382,0.056830829357604154,23.89689998523618,-795480.9739022574,0.05878743947127101,19.151367921508545,-801426.8680903579,0.5534944284911872,9.205566903683641,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
5,5,0.014641607256599173,1.6866445651799755,-1375538.6750637838,-798938.0765541978,0.3566318051278,2.900470205622694,-805875.0643270919,0.41211840588454257,0.5446957279361009,-793436.7925485797,0.056742997228693914,13.80172079259027,-796954.8557059788,0.05868227362010503,12.498956039602165,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
6,6,0.009364477922161399,0.5171670324839205,-1375506.0331521921,-798500.5981007863,0.35663166857868867,2.9004640415749985,-807020.2949058269,0.41211840588454257,0.5446957279361009,-793926.4769803158,0.056743019042837614,13.801790803325336,-794407.3237807738,0.059071074021005275,18.80781812800432,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
7,7,0.008587420254580813,1.059528868598552,-1375505.5181543154,-798685.9967218107,0.35663172954569944,2.900465970474833,-807454.2257048099,0.41211840588454257,0.5446957279361009,-789725.2952172983,0.05719014118011185,22.726516278088134,-791396.077682103,0.05903562942413778,26.228646183949166,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
8,8,0.010436904878903537,0.29420985511692826,-1375548.1106216116,-799519.3918074799,0.35663172954569944,2.900465970474833,-808023.7799223613,0.41211840588454257,0.5446957279361009,-786951.389362888,0.05708292450340597,28.34019679365209,-791002.4212304557,0.05887049745806909,27.19304858223857,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
9,9,0.008122441324296938,0.5056025050774561,-1375532.8964810933,-799252.2437781714,0.35663172954569944,2.900465970474833,-807837.3724848758,0.41211840588454257,0.5446957279361009,-790021.4446221002,0.05689505465396167,23.449630511144804,-795447.5533695783,0.058631276343575414,18.611038118056705,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
10,10,0.012928748169505148,0.8333232355853131,-1375557.2637008368,-798461.2222513977,0.35663172954569944,2.900465970474833,-806951.4949354676,0.41211840588454257,0.5446957279361009,-795969.4556880995,0.056793906518569214,11.277961619380736,-797714.8073241808,0.05842557708316379,13.092573662989777,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
11,11,0.007800190819962697,0.36349221067564863,-1375530.569913902,-798291.6222911178,0.35663172954569944,2.900465970474833,-806824.7532982712,0.41211840588454257,0.5446957279361009,-795638.7226937105,0.0567939201459683,11.27792734701911,-795125.0133593426,0.058611088348722154,17.75722543814867,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
12,12,0.00921314263132423,1.6582390417163946,-1375352.6611008795,-799018.4755125245,0.35663172954569944,2.900465970474833,-807547.1998794067,0.41211840588454257,0.5446957279361009,-789593.3324594139,0.057780238237745564,22.7526002647588,-790289.6353698338,0.05869157014173162,28.5282029237168,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
13,13,0.0164949043385192,0.5442127617504667,-1375330.196734157,-799860.8096262615,0.35663172954569944,2.900465970474833,-808560.5669803121,0.41211840588454257,0.5446957279361009,-784843.309147467,0.05766909907971607,32.27291103838875,-788888.7517598639,0.058542471191840494,31.701224910845188,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
14,14,0.010623495713475158,0.602757119120526,-1375351.9855972743,-799632.2232496517,0.35663172954569944,2.900465970474833,-808321.7283717714,0.41211840588454257,0.5446957279361009,-788451.2944893743,0.057453027762948625,26.992114973264634,-795921.9019280333,0.058276332684925714,18.490011381032488,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
15,15,0.020076787588486848,1.0484920101715856,-1375285.2763873788,-798333.4293311803,0.35663172954569944,2.900465970474833,-806908.9647236438,0.41211840588454257,0.5446957279361009,-799190.3142882502,0.05726405467005661,2.6992114973264636,-795227.311995532,0.05860570542646566,16.240039078247854,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
16,16,0.007946994350521493,0.0013058079059853106,-1375281.5761035422,-798434.7113981954,0.35663172954569944,2.900465970474833,-806825.5999826461,0.41211840588454257,0.5446957279361009,-799709.74809272,0.05726405662551625,2.6992166442291183,-795558.7828092766,0.05860569942350758,16.24014965075902,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
17,17,0.00786340427833731,0.06642675860532837,-1375281.5757328654,-798645.9616186575,0.35663172954569944,2.900465970474833,-807277.1206417971,0.41211840588454257,0.5446957279361009,-799564.0986061025,0.05726405599313575,2.6992201079308553,-795074.773177479,0.058327655804418455,17.215637464507253,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
18,18,0.007639301074559701,0.03358010063393503,-1375274.53927792,-798757.6626722564,0.35663172954569944,2.900465970474833,-807442.731414953,0.41211840588454257,0.5446957279361009,-799932.191263451,0.05726405599313575,2.6992201079308553,-795454.173437478,0.05797530586210222,16.76361227782182,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
19,19,0.007567810584575274,0.00032734971823157984,-1375274.5400305095,-798776.6132373732,0.35663172954569944,2.900465970474833,-807407.5175994666,0.41211840588454257,0.5446957279361009,-799839.5141766575,0.05726405599313575,2.6992201079308553,-795567.5444104999,0.05797527817732809,16.763631654115574,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
20,20,0.007559522636647893,0.0003284988853867459,-1375274.539920735,-798878.7031945293,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799918.231712956,0.05726405599313575,2.6992201079308553,-795552.3072518674,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
21,21,0.007557017666936972,0.00011741201128258779,-1375274.5398505423,-798875.2254308723,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799969.9761753903,0.05726405599313575,2.6992201079308553,-795590.7893224553,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
22,22,0.007557912174965889,4.953375811471988e-06,-1375274.5395942358,-798879.1825600903,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799969.9761753903,0.05726405599313575,2.6992201079308553,-795590.7893224553,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
23,23,0.007557925434292841,0.0,-1375274.5395942358,-798879.1825600903,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799969.9761753903,0.05726405599313575,2.6992201079308553,-795590.7893224553,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
24,24,0.007557925434292841,0.0,-1375274.5395942358,-798879.1825600903,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799969.9761753903,0.05726405599313575,2.6992201079308553,-795590.7893224553,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
25,25,0.007557925434292841,0.0,-1375274.5395942358,-798879.1825600903,0.35663172954569944,2.900465970474833,-807474.2323978223,0.41211840588454257,0.5446957279361009,-799969.9761753903,0.05726405599313575,2.6992201079308553,-795590.7893224553,0.05797526981415537,16.763625801929546,-801427.2924061618,0.5534945060571388,9.205570263716002,-795364.198868676,0.5978087854283536,5.279188087719687,-813457.2158804197,0.8866130626375315,9.867928019371377
|
||||
|
BIN
docs/Examples/outputs/slope.png
Normal file
BIN
docs/Examples/outputs/slope.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -33,7 +33,7 @@
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-1376882.0784583509</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-1377917.5269485628</h0>
|
||||
<s0 units="J/mol/K"> 558.9824 </s0>
|
||||
<cp0 units="J/mol/K"> 0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -50,7 +50,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4924298.0880370205</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4929625.060282971</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -67,7 +67,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4935685.119723228</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4941397.084772181</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -85,7 +85,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4920369.042961768</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4932551.489263242</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -103,7 +103,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4928639.61964031</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4935194.142426379</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -120,7 +120,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4931991.722599618</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4935179.480883835</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -138,7 +138,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4944682.264585918</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4947210.070800013</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -157,7 +157,7 @@
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 18:30 7-26-2020">-4924669.3217661735</h0>
|
||||
<h0 units="J/mol" updated="Updated at 19:20 7-29-2020">-4929116.779371853</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
@@ -245,10 +245,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Pr+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 0.058791091500561485, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 0.5448322248125199, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.058791077174068576, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 0.5448320238819658, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -261,10 +261,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Nd+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 1.213717095858249, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 7.7481294675488375, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 1.0825315776813356, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 6.211262701179254, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -277,10 +277,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="La+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 1.0223168335791355, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 0.5296306654103653, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.5930048961782302, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 5.2771447352927785, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -293,10 +293,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Dy+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 0.7646372240575223, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 7.849276225207628, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.5532852863195881, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 9.206787175138805, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -309,10 +309,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Ce+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 0.20352350320923904, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 21.120419048363047, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.6005020116531858, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 4.91004437191519, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -325,10 +325,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Y+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 0.8852797060008407, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 9.334636294454038, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.8866269789489127, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 9.867663759220948, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
@@ -341,10 +341,10 @@
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Sm+++">
|
||||
<beta0 updated="Updated at 18:30 7-26-2020"> 0.6989083059080712, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 18:30 7-26-2020"> 6.877881736471866, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta0 updated="Updated at 19:20 7-29-2020"> 0.5978087860273482, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 19:20 7-29-2020"> 5.279188095059934, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 18:30 7-26-2020"> -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Cphi updated="Updated at 19:20 7-29-2020"> -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
|
||||
716
docs/Examples/outputs/temp1.xml
Normal file
716
docs/Examples/outputs/temp1.xml
Normal file
@@ -0,0 +1,716 @@
|
||||
<ctml>
|
||||
<validate reactions="yes" species="yes" />
|
||||
|
||||
|
||||
<phase dim="3" id="PC88A_liquid">
|
||||
<elementArray datasrc="elementz.xml">
|
||||
Cl O H C P Nd Pr Ce La Dy Y Sm dummy
|
||||
</elementArray>
|
||||
<speciesArray datasrc="#species_PC88A_liquid">
|
||||
(HA)2(org) dodecane Nd(H(A)2)3(org) Pr(H(A)2)3(org) Ce(H(A)2)3(org) La(H(A)2)3(org) Dy(H(A)2)3(org) Sm(H(A)2)3(org) Y(H(A)2)3(org)
|
||||
</speciesArray>
|
||||
<state>
|
||||
<temperature units="K"> 298.15 </temperature>
|
||||
<pressure units="Pa"> 100000.0 </pressure>
|
||||
<soluteMolalities>
|
||||
(HA)2(org): 0.25
|
||||
</soluteMolalities>
|
||||
</state>
|
||||
<thermo model="IdealSolidSolution">
|
||||
<standardConc model="molar_volume" />
|
||||
</thermo>
|
||||
<standardConc model="molar_volume" />
|
||||
<transport model="None" />
|
||||
<kinetics model="none" />
|
||||
</phase>
|
||||
|
||||
|
||||
<speciesData id="species_PC88A_liquid">
|
||||
|
||||
|
||||
<species name="(HA)2(org)">
|
||||
<atomArray> C:16 H:35 O:3 P:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-1376882.3191117246</h0>
|
||||
<s0 units="J/mol/K"> 558.9824 </s0>
|
||||
<cp0 units="J/mol/K"> 0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.320974226079</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Nd(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Nd:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4925566.309854757</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.973500071223</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Pr(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Pr:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4938249.845712334</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.979936421078</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Ce(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Ce:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4920387.823199008</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">1.0060487218</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="La(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 La:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4933548.865580005</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.981485801577</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Dy(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Dy:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4932560.171447597</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.961666360676</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Y(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Y:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4944840.781582316</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume updated="Updated at 21:02:32">0.958888814485</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
|
||||
<species name="Sm(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Sm:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="Updated at 11:58 7-17-2020">-4924696.189921901</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 0.9642 </molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Gd(H(A)2)3(org)">
|
||||
<atomArray> C:48 H:102 O:9 P:3 Gd:1 </atomArray>
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol" updated="yep">-4829446.858</h0>
|
||||
<s0 units="J/mol/K"> 1117.965 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume>0.9642</molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="dodecane">
|
||||
<atomArray> dummy:1 </atomArray>
|
||||
|
||||
<thermo>
|
||||
<const_cp Tmax="300.0" Tmin="298.0">
|
||||
<t0 units="K">298.14999999999998</t0>
|
||||
|
||||
<h0 units="J/mol"> 0.0 </h0>
|
||||
<s0 units="J/mol/K"> 0.0 </s0>
|
||||
<cp0 units="J/mol/K">0.0</cp0>
|
||||
</const_cp>
|
||||
</thermo>
|
||||
<standardState model="constant_incompressible">
|
||||
<molarVolume> 0.227113 </molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
</speciesData>
|
||||
|
||||
|
||||
|
||||
<phase dim="3" id="HCl_electrolyte">
|
||||
<speciesArray datasrc="#species_waterSolution">
|
||||
H2O(L) H+ OH- Cl- Nd+++ Pr+++ Ce+++ La+++ Dy+++ Sm+++ Y+++
|
||||
</speciesArray>
|
||||
|
||||
<state>
|
||||
<temperature units="K"> 298.15 </temperature>
|
||||
<pressure units="Pa"> 100000.0 </pressure>
|
||||
<soluteMolalities>
|
||||
Cl-: 1.0E-7
|
||||
H+: 1.0E-7
|
||||
</soluteMolalities>
|
||||
</state>
|
||||
|
||||
<thermo model="HMW">
|
||||
<standardConc model="solvent_volume" />
|
||||
<activityCoefficients TempModel="complex1" model="Pitzer">
|
||||
|
||||
<A_Debye model="water" />
|
||||
<ionicRadius default="3.042843" units="Angstroms">
|
||||
</ionicRadius>
|
||||
<binarySaltParameters anion="Cl-" cation="H+">
|
||||
<beta0> 0.177000779, 0.000125778, 0.0, -33.4777082, -0.262214535 </beta0>
|
||||
<beta1> 0.292922504, -0.027938838, 0.0, 3402.47027, 19.7936248 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi> 0.000362, -0.00003036, 0.0, -2.91038E-11, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 12 </Alpha2>
|
||||
<source>
|
||||
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.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Pr+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 0.05879108748614492, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 0.5448324180244323, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Nd+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 1.2137222016802447, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 7.748226963005033, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="La+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 1.022316535866388, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 0.5296311209773129, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Dy+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 0.7646397332938777, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 7.849320590516409, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Ce+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 0.2035235053232368, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 21.120426174002823, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Y+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 0.8852802073165494, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 9.334653075341238, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
<binarySaltParameters anion="Cl-" cation="Sm+++">
|
||||
<beta0 updated="Updated at 11:58 7-17-2020"> 0.6989081585234721, 0.0, 0.0, 0.0, 0.0 </beta0>
|
||||
<beta1 updated="Updated at 11:58 7-17-2020"> 6.877882600430561, 0.0, 0.0, 0.0, 0.0 </beta1>
|
||||
<beta2> 0.0, 0.0, 0.0, 0.0, 0.0 </beta2>
|
||||
<Cphi updated="Updated at 10:47 7-17-2020"> -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 </Cphi>
|
||||
<Alpha1> 2 </Alpha1>
|
||||
<Alpha2> 0 </Alpha2>
|
||||
<source>
|
||||
Table S1: Pitzer parameters for osmotic and activity coeff Supp Info.
|
||||
May, P. M.; Rowland, D.; Hefter, G.; Konigsberger, E.
|
||||
A generic and updatable Pitzer characterization of aqueous binary electrolyte
|
||||
solutions at 1 bar and 25 C.
|
||||
Journal of Chemical and Engineering Data 2011,56, 5066–5077.
|
||||
</source>
|
||||
</binarySaltParameters>
|
||||
|
||||
|
||||
|
||||
</activityCoefficients>
|
||||
<solvent> H2O(L) </solvent>
|
||||
</thermo>
|
||||
|
||||
<elementArray datasrc="elementz.xml"> O H Nd Pr Ce La Dy Y Sm C N Cl P E </elementArray>
|
||||
<kinetics model="none">
|
||||
</kinetics>
|
||||
</phase>
|
||||
|
||||
<speciesData id="species_waterSolution">
|
||||
|
||||
<species name="H2O(L)">
|
||||
|
||||
<atomArray>H:2 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA P0="100000.0" Tmax="600.0" Tmin="273.14999999999998">
|
||||
<floatArray name="coeffs" size="7">
|
||||
7.255750050E+01, -6.624454020E-01, 2.561987460E-03, -4.365919230E-06,
|
||||
2.781789810E-09, -4.188654990E+04, -2.882801370E+02
|
||||
</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<standardState model="waterPDSS">
|
||||
|
||||
<molarVolume> 0.018068 </molarVolume>
|
||||
</standardState>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="OH-">
|
||||
<speciesChemFormula> OH- </speciesChemFormula>
|
||||
<atomArray> O:1 H:1 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -37595 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -54977 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -2.56 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> 0.12527 </a1>
|
||||
<a2 units="cal/gmol"> 7.38 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 1.8423 </a3>
|
||||
<a4 units="cal-K/gmol"> -27821 </a4>
|
||||
<c1 units="cal/gmol/K"> 4.15 </c1>
|
||||
<c2 units="cal-K/gmol"> -103460 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 172460 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -4.18 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
<species name="NO3-">
|
||||
<speciesChemFormula> NO3- </speciesChemFormula>
|
||||
<atomArray> N:1 O:3 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -26507 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -49429 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> 35.12 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> 0.73161 </a1>
|
||||
<a2 units="cal/gmol"> 678.24 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> -4.6838 </a3>
|
||||
<a4 units="cal-K/gmol"> -30594 </a4>
|
||||
<c1 units="cal/gmol/K"> 7.7 </c1>
|
||||
<c2 units="cal-K/gmol"> -67250 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 109770 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> 29.0 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<species name="Cl-">
|
||||
<speciesChemFormula> Cl- </speciesChemFormula>
|
||||
<atomArray> Cl:1 </atomArray>
|
||||
<charge> -1 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -31379 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_TR units="cal/gmol"> -39933 </DH0_f_Pr_TR>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> 13.56 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/mol/bar"> 0.4032 </a1>
|
||||
<a2 units="cal/mol"> 480.1 </a2>
|
||||
<a3 units="cal-K/mol/bar"> 5.563 </a3>
|
||||
<a4 units="cal-K/mol"> -28470 </a4>
|
||||
<c1 units="cal/mol/K"> -4.4 </c1>
|
||||
<c2 units="cal-K/mol"> -57140 </c2>
|
||||
<omega_Pr_Tr units="cal/mol"> 145600 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> 17.79 </molarVolume>
|
||||
</standardState>
|
||||
<source> ref:G9 </source>
|
||||
</species>
|
||||
|
||||
<species name="H+">
|
||||
<speciesChemFormula> H+ </speciesChemFormula>
|
||||
<atomArray> H:1 </atomArray>
|
||||
<charge> +1 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="273.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> 0 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_TR units="cal/gmol"> 0 </DH0_f_Pr_TR>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> 0 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/mol/bar"> 0 </a1>
|
||||
<a2 units="cal/mol"> 0 </a2>
|
||||
<a3 units="cal-K/mol/bar"> 0 </a3>
|
||||
<a4 units="cal-K/mol"> 0 </a4>
|
||||
<c1 units="cal/mol/K"> 0 </c1>
|
||||
<c2 units="cal-K/mol"> 0 </c2>
|
||||
<omega_Pr_Tr units="cal/mol"> 0 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> 0 </molarVolume>
|
||||
</standardState>
|
||||
<source> ref:G9 </source>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Nd+++">
|
||||
<speciesChemFormula> Nd+++ </speciesChemFormula>
|
||||
<atomArray> Nd:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -160600 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -166500 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -49.5 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.33707 </a1>
|
||||
<a2 units="cal/gmol"> -1454.52 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 8.3211 </a3>
|
||||
<a4 units="cal-K/gmol"> -21777 </a4>
|
||||
<c1 units="cal/gmol/K"> 1.6236 </c1>
|
||||
<c2 units="cal-K/gmol"> -118344 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 225500 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -43.1 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
<species name="Pr+++">
|
||||
<speciesChemFormula> Pr+++ </speciesChemFormula>
|
||||
<atomArray> Pr:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -162600 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -168800 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -50 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.32406 </a1>
|
||||
<a2 units="cal/gmol"> -1419.98 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 8.1257 </a3>
|
||||
<a4 units="cal-K/gmol"> -21920 </a4>
|
||||
<c1 units="cal/gmol/K"> -1.1975 </c1>
|
||||
<c2 units="cal-K/gmol"> -127511 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 223500 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -42.1 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Ce+++">
|
||||
<speciesChemFormula> Ce+++ </speciesChemFormula>
|
||||
<atomArray> Ce:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -161600 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -167400 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -49 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.29292 </a1>
|
||||
<a2 units="cal/gmol"> -1493.38 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 11.6196 </a3>
|
||||
<a4 units="cal-K/gmol"> -21616 </a4>
|
||||
<c1 units="cal/gmol/K"> 4.0445 </c1>
|
||||
<c2 units="cal-K/gmol"> -108974 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 222510 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -39.8 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="La+++">
|
||||
<speciesChemFormula> La+++ </speciesChemFormula>
|
||||
<atomArray> La:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -164000 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -169600 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -52 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.2788 </a1>
|
||||
<a2 units="cal/gmol"> -1438.24 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 10.9602 </a3>
|
||||
<a4 units="cal-K/gmol"> -21844 </a4>
|
||||
<c1 units="cal/gmol/K"> 4.2394 </c1>
|
||||
<c2 units="cal-K/gmol"> -106122 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 215720 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -38.6 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Dy+++">
|
||||
<speciesChemFormula> Dy+++ </speciesChemFormula>
|
||||
<atomArray> Dy:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -158700 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -166500 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -55.2 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.30003 </a1>
|
||||
<a2 units="cal/gmol"> -1510.74 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 11.6879 </a3>
|
||||
<a4 units="cal-K/gmol"> -21545 </a4>
|
||||
<c1 units="cal/gmol/K"> 9.5076 </c1>
|
||||
<c2 units="cal-K/gmol"> -94919 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 237920 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -40.7 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
<species name="Y+++">
|
||||
<speciesChemFormula> Y+++ </speciesChemFormula>
|
||||
<atomArray> Y:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -163800 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -170900 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -60 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.30140 </a1>
|
||||
<a2 units="cal/gmol"> -1514.08 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 11.7010 </a3>
|
||||
<a4 units="cal-K/gmol"> -21531 </a4>
|
||||
<c1 units="cal/gmol/K"> 7.1634 </c1>
|
||||
<c2 units="cal-K/gmol"> -103067 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 237920 </omega_Pr_Tr>
|
||||
<molarVolume units="cm3/mol"> -40.8 </molarVolume>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Sm+++">
|
||||
<speciesChemFormula> Sm+++ </speciesChemFormula>
|
||||
<atomArray> Sm:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -159100 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -165200 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -50.7 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.32065 </a1>
|
||||
<a2 units="cal/gmol"> -1561.08 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 11.8857 </a3>
|
||||
<a4 units="cal-K/gmol"> -21337 </a4>
|
||||
<c1 units="cal/gmol/K"> 1.9385 </c1>
|
||||
<c2 units="cal-K/gmol"> -118548 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 229550 </omega_Pr_Tr>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
<species name="Gd+++">
|
||||
<speciesChemFormula> Gd+++ </speciesChemFormula>
|
||||
<atomArray> Gd:1 </atomArray>
|
||||
<charge> +3 </charge>
|
||||
<thermo model="HKFT">
|
||||
<HKFT Pref="1 atm" Tmax="625.15" Tmin="298.15">
|
||||
<DG0_f_Pr_Tr units="cal/gmol"> -158600 </DG0_f_Pr_Tr>
|
||||
<DH0_f_Pr_Tr units="cal/gmol"> -164200 </DH0_f_Pr_Tr>
|
||||
<S0_Pr_Tr units="cal/gmol/K"> -49.2 </S0_Pr_Tr>
|
||||
</HKFT>
|
||||
</thermo>
|
||||
<standardState model="HKFT">
|
||||
<a1 units="cal/gmol/bar"> -0.29771 </a1>
|
||||
<a2 units="cal/gmol"> -1505.06 </a2>
|
||||
<a3 units="cal-K/gmol/bar"> 11.6656 </a3>
|
||||
<a4 units="cal-K/gmol"> -21568 </a4>
|
||||
<c1 units="cal/gmol/K"> 6.5606 </c1>
|
||||
<c2 units="cal-K/gmol"> -103474 </c2>
|
||||
<omega_Pr_Tr units="cal/gmol"> 232650 </omega_Pr_Tr>
|
||||
</standardState>
|
||||
<source>
|
||||
ref:G9
|
||||
</source>
|
||||
</species>
|
||||
|
||||
|
||||
|
||||
|
||||
</speciesData>
|
||||
|
||||
</ctml>
|
||||
330
docs/Examples/test_eval.py
Normal file
330
docs/Examples/test_eval.py
Normal file
@@ -0,0 +1,330 @@
|
||||
# This file tests adding 0.1 M NaCl to the feed.
|
||||
import llepe
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import json
|
||||
import matplotlib as plt
|
||||
import matplotlib
|
||||
import cantera as ct
|
||||
|
||||
|
||||
class ModLLEPE(llepe.LLEPE):
|
||||
def __init__(self,
|
||||
exp_data,
|
||||
phases_xml_filename,
|
||||
phase_names,
|
||||
aq_solvent_name,
|
||||
extractant_name,
|
||||
diluant_name,
|
||||
complex_names,
|
||||
extracted_species_ion_names,
|
||||
extracted_species_list=None,
|
||||
aq_solvent_rho=None,
|
||||
extractant_rho=None,
|
||||
diluant_rho=None,
|
||||
opt_dict=None,
|
||||
objective_function='Log-MSE',
|
||||
optimizer='scipy_minimize',
|
||||
temp_xml_file_path=None,
|
||||
dependant_params_dict=None,
|
||||
custom_objects_dict=None,
|
||||
nacl_molarity=0):
|
||||
self.nacl_molarity = nacl_molarity
|
||||
super().__init__(exp_data,
|
||||
phases_xml_filename,
|
||||
phase_names,
|
||||
aq_solvent_name,
|
||||
extractant_name,
|
||||
diluant_name,
|
||||
complex_names,
|
||||
extracted_species_ion_names,
|
||||
extracted_species_list,
|
||||
aq_solvent_rho,
|
||||
extractant_rho,
|
||||
diluant_rho,
|
||||
opt_dict,
|
||||
objective_function,
|
||||
optimizer,
|
||||
temp_xml_file_path,
|
||||
dependant_params_dict,
|
||||
custom_objects_dict)
|
||||
|
||||
|
||||
def set_in_moles(self, feed_vol):
|
||||
"""Function that initializes mole fractions to input feed_vol
|
||||
|
||||
This function is called at initialization
|
||||
|
||||
Sets in_moles to a pd.DataFrame containing initial mole fractions
|
||||
|
||||
Columns for species and rows for different experiments
|
||||
|
||||
This function also calls update_predicted_dict
|
||||
|
||||
:param feed_vol: (float) feed volume of mixture (L)
|
||||
"""
|
||||
phases_copy = self._phases.copy()
|
||||
exp_df = self._exp_df.copy()
|
||||
solvent_name = self._aq_solvent_name
|
||||
extractant_name = self._extractant_name
|
||||
diluant_name = self._diluant_name
|
||||
solvent_rho = self._aq_solvent_rho
|
||||
extractant_rho = self._extractant_rho
|
||||
diluant_rho = self._diluant_rho
|
||||
extracted_species_names = self._extracted_species_ion_names
|
||||
extracted_species_list = self._extracted_species_list
|
||||
|
||||
mixed = ct.Mixture(phases_copy)
|
||||
aq_ind = None
|
||||
solvent_ind = None
|
||||
for ind, phase in enumerate(phases_copy):
|
||||
if solvent_name in phase.species_names:
|
||||
aq_ind = ind
|
||||
solvent_ind = phase.species_names.index(solvent_name)
|
||||
if aq_ind is None:
|
||||
raise Exception('Solvent "{0}" not found \
|
||||
in xml file'.format(solvent_name))
|
||||
|
||||
if aq_ind == 0:
|
||||
org_ind = 1
|
||||
else:
|
||||
org_ind = 0
|
||||
self._aq_ind = aq_ind
|
||||
self._org_ind = org_ind
|
||||
extractant_ind = phases_copy[org_ind].species_names.index(
|
||||
extractant_name)
|
||||
diluant_ind = phases_copy[org_ind].species_names.index(
|
||||
diluant_name)
|
||||
|
||||
extracted_species_ind_list = [
|
||||
phases_copy[aq_ind].species_names.index(
|
||||
extracted_species_name)
|
||||
for extracted_species_name in extracted_species_names]
|
||||
extracted_species_charges = np.array(
|
||||
[phases_copy[aq_ind].species(
|
||||
extracted_species_ind).charge
|
||||
for extracted_species_ind in extracted_species_ind_list])
|
||||
self._extracted_species_charges = extracted_species_charges
|
||||
|
||||
mix_aq = mixed.phase(aq_ind)
|
||||
mix_org = mixed.phase(org_ind)
|
||||
solvent_mw = mix_aq.molecular_weights[solvent_ind] # g/mol
|
||||
extractant_mw = mix_org.molecular_weights[extractant_ind]
|
||||
diluant_mw = mix_org.molecular_weights[diluant_ind]
|
||||
if solvent_rho is None:
|
||||
solvent_rho = mix_aq(aq_ind).partial_molar_volumes[
|
||||
solvent_ind] / solvent_mw * 1e6 # g/L
|
||||
self._aq_solvent_rho = solvent_rho
|
||||
if extractant_rho is None:
|
||||
extractant_rho = mix_org(org_ind).partial_molar_volumes[
|
||||
extractant_ind] / extractant_mw * 1e6
|
||||
self._extractant_rho = extractant_rho
|
||||
if diluant_rho is None:
|
||||
diluant_rho = mix_org(org_ind).partial_molar_volumes[
|
||||
extractant_ind] / extractant_mw * 1e6
|
||||
self._diluant_rho = diluant_rho
|
||||
|
||||
in_moles_data = []
|
||||
aq_phase_solvent_moles = feed_vol * solvent_rho / solvent_mw
|
||||
for index, row in exp_df.iterrows():
|
||||
h_plus_moles = feed_vol * row['h_i']
|
||||
hydroxide_ions = 0
|
||||
extracted_species_moles = np.array(
|
||||
[feed_vol * row['{0}_aq_i'.format(
|
||||
extracted_species)]
|
||||
for extracted_species in extracted_species_list])
|
||||
extracted_species_charge_sum = np.sum(
|
||||
extracted_species_charges * extracted_species_moles)
|
||||
chlorine_moles = extracted_species_charge_sum + h_plus_moles
|
||||
extractant_moles = feed_vol * row['z_i']
|
||||
extractant_vol = extractant_moles * extractant_mw / extractant_rho
|
||||
diluant_vol = feed_vol - extractant_vol
|
||||
diluant_moles = diluant_vol * diluant_rho / diluant_mw
|
||||
complex_moles = np.zeros(len(extracted_species_list))
|
||||
|
||||
species_moles_aq = [aq_phase_solvent_moles,
|
||||
h_plus_moles,
|
||||
hydroxide_ions,
|
||||
chlorine_moles]
|
||||
species_moles_aq.extend(list(extracted_species_moles))
|
||||
species_moles_aq.append(self.nacl_molarity * feed_vol)
|
||||
species_moles_aq[3] += self.nacl_molarity * feed_vol
|
||||
species_moles_org = [extractant_moles, diluant_moles]
|
||||
species_moles_org.extend(list(complex_moles))
|
||||
if aq_ind == 0:
|
||||
species_moles = species_moles_aq + species_moles_org
|
||||
else:
|
||||
species_moles = species_moles_org + species_moles_aq
|
||||
in_moles_data.append(species_moles)
|
||||
|
||||
self._in_moles = pd.DataFrame(
|
||||
in_moles_data, columns=mixed.species_names)
|
||||
self.update_predicted_dict()
|
||||
return None
|
||||
|
||||
|
||||
font = {'family': 'sans serif',
|
||||
'size': 24}
|
||||
matplotlib.rc('font', **font)
|
||||
plt.rc('xtick', labelsize=18)
|
||||
plt.rc('ytick', labelsize=18)
|
||||
plt.rcParams['lines.linewidth'] = 4
|
||||
matplotlib.rcParams['lines.markersize'] = 10
|
||||
|
||||
|
||||
def ext_to_complex(h0, custom_obj_dict, mini_species):
|
||||
linear_params = custom_obj_dict['lin_param_df']
|
||||
row = linear_params[linear_params['species'] == mini_species]
|
||||
return row['slope'].values[0] * h0[0] + row['intercept'].values[0]
|
||||
|
||||
|
||||
def mod_lin_param_df(lp_df, input_val, mini_species, mini_lin_param):
|
||||
new_lp_df = lp_df.copy()
|
||||
index = new_lp_df.index[new_lp_df['species'] == mini_species].tolist()[0]
|
||||
new_lp_df.at[index, mini_lin_param] = input_val
|
||||
return new_lp_df
|
||||
|
||||
|
||||
info_df = pd.read_csv('outputs/multi_only_iterative_fitter_output.csv')
|
||||
test_row = -1
|
||||
pitzer_params_filename = "../../data/jsons/min_h0_pitzer_params.txt"
|
||||
with open(pitzer_params_filename) as file:
|
||||
pitzer_params_dict = json.load(file)
|
||||
pitzer_params_df = pd.DataFrame(pitzer_params_dict)
|
||||
species_list = 'Nd,Pr,Ce,La,Dy,Sm,Y'.split(',')
|
||||
pitzer_param_list = ['beta0', 'beta1']
|
||||
labeled_data = pd.read_csv("../../data/csvs/"
|
||||
"no_formiga_or_5_oa_PC88A_HCL_NdPrCeLaDySmY.csv")
|
||||
labeled_data = labeled_data.sort_values(['Feed Pr[M]', 'Feed Ce[M]'],
|
||||
ascending=True)
|
||||
exp_data = labeled_data.drop(labeled_data.columns[0], axis=1)
|
||||
xml_file = "test_PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml"
|
||||
lin_param_df = pd.read_csv("../../data/csvs"
|
||||
"/zeroes_removed_min_h0_pitzer_lin_params.csv")
|
||||
estimator_params = {'exp_data': exp_data,
|
||||
'phases_xml_filename': xml_file,
|
||||
'phase_names': ['HCl_electrolyte', 'PC88A_liquid'],
|
||||
'aq_solvent_name': 'H2O(L)',
|
||||
'extractant_name': '(HA)2(org)',
|
||||
'diluant_name': 'dodecane',
|
||||
'complex_names': ['{0}(H(A)2)3(org)'.format(species)
|
||||
for species in species_list],
|
||||
'extracted_species_ion_names': ['{0}+++'.format(species)
|
||||
for species in
|
||||
species_list],
|
||||
'aq_solvent_rho': 1000.0,
|
||||
'extractant_rho': 960.0,
|
||||
'diluant_rho': 750.0,
|
||||
'temp_xml_file_path': 'outputs/temp.xml',
|
||||
'objective_function': llepe.lmse_perturbed_obj,
|
||||
'nacl_molarity': 0
|
||||
}
|
||||
dependant_params_dict = {}
|
||||
for species, complex_name in zip(species_list,
|
||||
estimator_params['complex_names']):
|
||||
inner_dict = {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': complex_name,
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'function': ext_to_complex,
|
||||
'kwargs': {"mini_species": species},
|
||||
'independent_params': '(HA)2(org)_h0'}
|
||||
dependant_params_dict['{0}_h0'.format(complex_name)] = inner_dict
|
||||
info_dict = {'(HA)2(org)_h0': {'upper_element_name': 'species',
|
||||
'upper_attrib_name': 'name',
|
||||
'upper_attrib_value': '(HA)2(org)',
|
||||
'lower_element_name': 'h0',
|
||||
'lower_attrib_name': None,
|
||||
'lower_attrib_value': None,
|
||||
'input_format': '{0}',
|
||||
'input_value':
|
||||
info_df.iloc[test_row, :]['best_ext_h0']}}
|
||||
for species in species_list:
|
||||
for pitzer_param in pitzer_param_list:
|
||||
pitzer_str = "{0}_{1}".format(species, pitzer_param)
|
||||
value = info_df.iloc[test_row, :][pitzer_str]
|
||||
pitzer_params_dict[pitzer_str]['input_value'] = value
|
||||
lin_str = "{0}_slope".format(species)
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': 'slope'},
|
||||
'input_value': 3
|
||||
}
|
||||
info_dict[lin_str] = inner_dict
|
||||
lin_str = "{0}_intercept".format(species)
|
||||
value = info_df.iloc[test_row, :][lin_str]
|
||||
inner_dict = {'custom_object_name': 'lin_param_df',
|
||||
'function': mod_lin_param_df,
|
||||
'kwargs': {'mini_species': species,
|
||||
'mini_lin_param': 'intercept'},
|
||||
'input_value': value
|
||||
}
|
||||
info_dict[lin_str] = inner_dict
|
||||
|
||||
info_dict.update(pitzer_params_dict)
|
||||
estimator = ModLLEPE(**estimator_params)
|
||||
estimator.set_custom_objects_dict({'lin_param_df': lin_param_df})
|
||||
estimator.update_custom_objects_dict(info_dict)
|
||||
estimator.update_xml(info_dict,
|
||||
dependant_params_dict=dependant_params_dict)
|
||||
exp_data = estimator.get_exp_df()
|
||||
feed_cols = []
|
||||
for col in exp_data.columns:
|
||||
if 'aq_i' in col:
|
||||
feed_cols.append(col)
|
||||
exp_data['total_re'] = exp_data[feed_cols].sum(axis=1)
|
||||
label_list = []
|
||||
for index, row in exp_data[feed_cols].iterrows():
|
||||
bool_list = list((row > 0).values)
|
||||
label = ''
|
||||
for species, el in zip(species_list, bool_list):
|
||||
if el:
|
||||
label = '{0}-{1}'.format(label, species)
|
||||
label = label[1:]
|
||||
label_list.append(label)
|
||||
r2s = ""
|
||||
for species in species_list:
|
||||
# if species=='La':
|
||||
# save_name = 'outputs' \
|
||||
# '/parity_iterative_fitter_{0}_org_eq'.format(species)
|
||||
save_name = None
|
||||
# fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
# c_data='z_i',
|
||||
# c_label='Feed total RE '
|
||||
# 'molarity (mol/L)',
|
||||
# print_r_squared=True,
|
||||
# save_path=save_name)
|
||||
r2s += str(estimator.r_squared('{0}_org_eq'.format(species))) + ','
|
||||
|
||||
fig, ax = estimator.parity_plot('{0}_org_eq'.format(species),
|
||||
data_labels=list(labeled_data['label']),
|
||||
print_r_squared=True,
|
||||
save_path=save_name)
|
||||
ax.legend(loc=4)
|
||||
pred_df = pd.DataFrame(estimator.get_predicted_dict())
|
||||
new_cols = []
|
||||
for col in pred_df.columns:
|
||||
new_cols.append("pred_{0}".format(col))
|
||||
pred_df.columns = new_cols
|
||||
new_cols = ['label',
|
||||
'h_i',
|
||||
'h_eq',
|
||||
'z_i',
|
||||
'z_eq'
|
||||
]
|
||||
for species in species_list:
|
||||
new_cols.append("{0}_aq_i".format(species))
|
||||
new_cols.append("{0}_aq_eq".format(species))
|
||||
new_cols.append("{0}_d_eq".format(species))
|
||||
labeled_data.columns = new_cols
|
||||
total_df = labeled_data.join(pred_df)
|
||||
# total_df.to_csv('if_mse_total_df.csv')
|
||||
# short_info_dict = {}
|
||||
# for key, value in info_dict.items():
|
||||
# short_info_dict[key] = value['input_value']
|
||||
# with open("outputs/iterative_fitter_short_info_dict.txt", 'w') as file:
|
||||
# json.dump(short_info_dict, file)
|
||||
Reference in New Issue
Block a user