Package: pyequion
Aqueous equilibrium calculation.PyEquIonA pure python implementation for electrolytes chemical equilibrium.A simplified version is provided with a web based user interface:https://caiofcm.github.io/pyequion-onl/Repository:https://github.com/caiofcm/pyequionFeaturesPure python package: hence it is easy to install in any platformCalculation of equilibrium of inorganic salts in water solution with precipitationAutomatic determination of reactionsProvides information as: Ionic Strength, pH, Electric Conductivity and the concentrations of each species as well their activity coefficientA modular approach for the activity coefficient calculation allows the usage of new thermodynamic modelsJust in time compilation capabilities withnumbaAutomatic differentiation withsympyCode generation for exporting the residual function for a giving system to other environments: suitable for kinetic simulations (e.g python or C)Automatic determination of the mean activity coefficient (often used in comparison with experiments)InstallationThe package can be installed withpip install pyequionorpip install <folder>Basic Usageimportpyequionsol=pyequion.solve_solution({'NaHCO3':50,'CaCl2':10})pyequion.print_solution(sol)>>SolutionResults:>>pH=7.86640>>sc=6602.68061uS/cm>>I=73.74077mmol/L>>DIC=50.00000mmol/L>>SaturationIndex:>>Halite:-4.77905928064043>>Calcite:2.083610139715626>>Aragonite:1.9398402923233906>>Vaterite:1.5171786455013265Documentationhttps://pyequion.readthedocs.io/en/latest/Running TestsTo run unit tests:pytest ./testsTo create the test report:pytest --cov=pyequion ./tests/test_reactions_species_builder.py --cov-report=htmlContributingThe code is formatted with black following flack8 specifications. Runblack .to format the code.HelpersCode can be JIT compiled withnumbacalling the function:pyequion.jit_compile_functions()When using JIT, running the code injupyterbecomes unstable, prefer regular python script.ContributorsCaio Curitiba MarcellosGerson Francisco da Silva JuniorElvis do Amaral SoaresFabio RamosAmaro G. Barreto JrDanilo NaiffFolder Structure.
├── api # Application Programming Interface for web service
├── data # Parameters database file (was replaced by python dictionaries in pyequion/data)
├── docs # Documentation generation (sphinx)
├── LICENSE.md #License file
├── pyequion
│   ├── activity_coefficients.py # Built-in thermodynamic models
│   ├── conductivity.py # Conductivity function
│   ├── core.py # Core functionalities
│   ├── data # Parameters database as python files
│   │   ├── __init__.py
│   │   ├── reactions_solids.py
│   │   ├── reactions_solutions.py
│   │   └── species.py
│   ├── __init__.py # Auxiliary
│   ├── jit_helper.py # Auxiliary
│   ├── PengRobinson.py # EOS for pure gas
│   ├── pitzer.py # Pitzer model
│   ├── properties_utils.py # Auxiliary
│   ├── pyequion.py # Application Programming Interface for python call
│   ├── reactions_species_builder.py # Creation of equilibrium system
│   ├── read_from_phreeqc_db.py # Auxiliary
│   ├── symbolic_computations.py # Symbolic Computation with sympy
│   ├── utils_api.py # Auxiliary
│   ├── utils_for_numba.py # Auxiliary
│   ├── utils.py # Auxiliary
│   └── wateractivity.py # Auxiliary for water activity in pitzer
├── pyproject.toml #Linting configuration
├── README.md # General guide
├── requirements-dev.txt # Development Requirements
├── requirements.txt # Main Requirements
├── samples #Some samples using pyequion
├── setup.py #Installation file
└── tests # Automatic Unit tests folder (pytest based)