Parameter estimation of monocomponent-isotherms
Project description
pyMono: A Comprehensive Python Library for Adsorption Isotherm Parameter Estimation
Overview
The pyMono library is a powerful Python tool designed to facilitate the estimation of adsorption isotherm parameters using Particle Swarm Optimization (PSO). It supports seven isotherm models: Langmuir, Langmuir-Freundlich (Sips), Toth, BET, BET-Aranovich, GAB, and Langmuir Multisite. This library is ideal for researchers working on adsorption studies, offering a simple, fast, and free method to obtain fundamental parameters.
Features
- Support for Multiple Isotherm Models: Langmuir, Sips, Toth, BET, BET-Aranovich, GAB, and Langmuir Multisite.
- Particle Swarm Optimization (PSO): Efficient parameter estimation using PSO.
- Data Loading: Load experimental data from
.xlsxor.csvfiles. - Plotting Capabilities: Visualize experimental and simulated isotherms.
- Error Analysis: Comprehensive error analysis, including absolute, quadratic, mean, and standard deviation of errors.
- Kruskal-Wallis Test: Statistical test to compare medians of experimental and simulated data.
Installation
Install the pyMono library via pip:
pip install pyIsotherm
Usage
Loading Experimental Data
Load data from a .csv or .xlsx file:
from pyMono.Load import load
isotherm = load('data.xlsx')
Estimating Isotherm Parameters
Estimate parameters using the estimate function:
from pyMono.Estimation import estimate
result = estimate(p=[1, 2, 3], qe=[0.1, 0.2, 0.3], model='langmuir')
Plotting Isotherms
Plot the experimental and simulated isotherms:
result.plot()
Error Analysis
Print various error analyses:
result.error_all()
Isotherm Models
Classes and Methods
Isotherm
The Isotherm class represents the isotherm data:
class Isotherm:
def __init__(self, p, q):
# Initialize with pressure and quantity adsorbed lists.
def plot(self):
# Plot the isotherm data.
Particle
The Particle class is used in PSO for parameter estimation:
class Particle:
def __init__(self, param):
# Initialize with parameter ranges.
def update_velocity(self, swarm_best_position):
# Update particle velocity.
def update_position(self):
# Update particle position.
Result
The Result class encapsulates the estimation results:
class Result:
def __init__(self, parameters, fitness, exp_isotherm, sim_isotherm):
# Initialize with parameters, fitness, and isotherms.
def plot(self, export=False, extension='png', only_exp=False, only_sim=False, legend=False):
# Plot the isotherms.
def error_all(self):
# Print all error analyses.
def kruskal(self):
# Perform Kruskal-Wallis test.
Example
from pyMono.Load import load
from pyMono.Estimation import estimate
# Load experimental data
isotherm = load('data.xlsx')
# Estimate parameters
result = estimate(p=isotherm.p, qe=isotherm.q, model='langmuir')
# Plot the isotherms
result.plot()
# Print error analysis
result.error_all()
# Perform Kruskal-Wallis test
result.kruskal()
References
The theoretical background and model equations implemented in the pyMono library are based on the extensive research and publications in the field of adsorption, as detailed in the article "Artigo Adsorção - Novo.docx".
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.
With pyMono, streamline your adsorption isotherm studies with robust parameter estimation and comprehensive data analysis tools. Happy researching!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyisotherm-0.0.1.tar.gz.
File metadata
- Download URL: pyisotherm-0.0.1.tar.gz
- Upload date:
- Size: 36.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
614023117e5e42c0624147b111087f4b15eb9d07f4700652530035dff31be6eb
|
|
| MD5 |
24b0c444fe4e73bc87e81db002eae148
|
|
| BLAKE2b-256 |
3f25e200f158f15a69253108d21cdd3684e709c633d78c25a74b476d8a1a4b78
|
File details
Details for the file pyisotherm-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyisotherm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
039a70d9cdd76bd84793a5b825a506ea3bb57ade6e3a2b786b2649cd69ac09e3
|
|
| MD5 |
c63e285de9af1f0eddac13040d957244
|
|
| BLAKE2b-256 |
4dedad58bf57a9a14c179887ec46db25e1eec5ef263ff69dfe166650fe443b1d
|