-
Notifications
You must be signed in to change notification settings - Fork 0
How to add new definitions
For most ionic solutions, E-Aim model 3 is a good source of the density and activity calculations needed to create their respective fits.
Within the tools folder is a notebook called "E-Aim accessor". This notebook can be used to interact with the E-Aim model 3 batch interface from within code. In the notebook this is used to get solution conditions under a number of solution activity values.
To use this notebook, scroll down to "REQUIRED INPUT: Filling in the form" and edit the optional ion composition arguments within the model_three_RH_prompt() function. Also type any solids you don't want the program to form. For salts containing water, use a space to represent the dot.
Just above "Applying fits to data" edit the argument of merge_tables() to the name you want for your data csv then repeat this name in the read_csv() function just below. Underneath that, change solute_mass for the molecular weight of the solute in kg/mol.
Now run the entire notebook, it should now work and produce 2 graphs of the activity and density fitting. Make sure that the dotted and solid lines on both curves lie together, otherwise change the degree used in the np.polyfit() functions until the error is minimal.
At the very bottom, copy the polynomial coefficients into your new solution definition for both the density and activity fit functions. Note that for legacy code reasons, the program wants these values in reverse order, achieved using np.flipud() on the entire list. See other definitions for this usage.
You will still need to google the remaining solid parameters such as density, refractive index and solubility limit.