Curve fitting of ternary Redlich-Kister (RK) equation.
@TODO: write a section about Redlich-Kister equation.
ternary-rk-fit depends on lmfit
python library. It performs Levenberg-Marquardt curve fitting algorithm and many more - take a look at their site and source code.
In order to install it type:
$ sudo apt-get install python-numpy python-scipy python-matplotlib ipython \
ipython-notebook python-pandas python-sympy python-nose python-pip
$ sudo pip install lmfit
There is an executable file called ternary-rk-fit
that can run the ternary-rk-fit program. To run it specify an input config file:
$ ./ternary-rk-fit <path_to_config_file>
There are 5 samples of how to config ternary-rk-fit:
config/water_meg.json
- calculates Water and MEG binary RK parameters at 298.15 K experimental data using density equationconfig/water_nacl.json
- calculates Water and NaCl binary RK parameters at 298.15 K experimental data using density equationconfig/meg_nacl.json
- calculates MEG and NaCl RK binary parameters at 298.15 K experimental data using density equationconfig/ternary.json
- calculates Water, MEG and NaCl ternary RK parameters at 298.15 K experimental data using density equationconfig/volume_ternary.json
- calculates Water, MEG and NaCl ternary RK parameters at 298.15 K experimental data using volume equation
To test one of them do the following:
$ ./ternary-rk-fit config/water_meg.json
In the above example, all output written to stdout
will be write to config/water_meg.out
file simultaneously.
To improve fitting algorithm output a verbose
flag can be used:
$ ./ternary-rk-fit --verbose config/water_meg.json
or
$ ./ternary-rk-fit -v config/water_meg.json
- Osvaldo Chiavone Filho (osvaldo@eq.ufrn.br) - site
- Ruben O. Chiavone (rubenochiavone@gmail.com) - GitHub
Enjoy!