PyCSP
A collection of tools based on Computational Singular Perturbation for the analysis of chemically reacting systems.
Requires cantera >= 3.0, numpy, matplotlib, pandas. Tested with the latest Cantera release (3.2.0) and with Cantera 3.0. (for older versions of Cantera, i.e. Cantera>=2.5, download release v1.2.1)
Installation in a new environment called "pycsp" with Anaconda (suggested, otherwise skip to #3): From PyCSP folder
- conda create --name pycsp anaconda --file requirements.txt --channel default --channel anaconda --channel cantera
- conda activate pycsp
- pip install PyCSP-lib
Testing (requires pytest):
- from the PyCSP folder, run the command "pytest"
- single test files can also be run as scripts from the tests/ folder (e.g. "python test_kernel.py") to plot their results
Several examples are available in the Examples folder to test the functionalities related to:
- exhausted modes (M)
- tangential stretching rate (TSR)
- CSP and TSR indices (importance indices, amplitude and timescale participation indices, TSR amplitude/timescale participation indices)
Cantera chem-input files in .yaml format are required. Cantera offers a utility to convert chemkin-format files into cantera-format (ck2yaml): https://cantera.org/stable/userguide/ck2yaml-tutorial.html Reduced (skeletal) mechanisms can be written with Cantera's own Solution.write_yaml() and Solution.write_chemkin().
FluidFoam (https://github.com/fluiddyn/fluidfoam) is suggested as a direct interface with openFOAM data.
Warning
Datasets in the tsrAnalysis example folder are quite heavy. Due to limited github bandwidth, it may happen that "flamelet_state.dat" and "flamelet_rhsDiff.dat" are not correctly checked out. In that case, please write me an e-mail (riccardo.malpicagalassi [at] uniroma1.it). I will send you the files.
Documentation
The documentation is available at https://rmalpica.github.io/PyCSP/ (sources in the docs/ folder, built with MkDocs).
License
PyCSP is released under the Prosperity Public License 3.0.0 (noncommercial use). See the LICENSE file. For commercial use, please contact the author.
How to cite?
This code has an associated publication. In addition to mentioning this GitHub repository (see below), I would be grateful if you could cite the publication:
- Malpica Galassi, R., PyCSP: a Python package for the analysis and simplification of chemically reacting systems based on Computational Singular Perturbation, Computer Physics Communications, 2022, https://doi.org/10.1016/j.cpc.2022.108364. (https://www.sciencedirect.com/science/article/pii/S0010465522000832)
BibTex citation of this publication:
@article{MALPICAGALASSI2022108364,
title = {PyCSP: a Python package for the analysis and simplification of chemically reacting systems based on Computational Singular Perturbation},
journal = {Computer Physics Communications},
pages = {108364},
year = {2022},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2022.108364},
url = {https://www.sciencedirect.com/science/article/pii/S0010465522000832},
author = {Riccardo {Malpica Galassi}}
}
Metadata
Release files for PyCSP-lib 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycsp_lib-1.5.0.tar.gz | 852.7 kB | Without provenance | Details for pycsp_lib-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycsp_lib-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for pycsp_lib-1.5.0-py3-none-any.whl |
Total release size: 884.9 kB
Release files / pycsp_lib-1.5.0.tar.gz
| Download URL | pycsp_lib-1.5.0.tar.gz |
|---|---|
| Size | 852.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edaeb760bc08b077fc73fdb7c4dd83e0d43eb2a30a4f2178de26e7f530dff451
|
|
BLAKE2b-256 checksum How to use checksums |
0a5a5e4bbeb85fd8ba241c34fe2e7a9c03ad2a6f91bed41dd00ba7678c70440c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / pycsp_lib-1.5.0-py3-none-any.whl
| Download URL | pycsp_lib-1.5.0-py3-none-any.whl |
|---|---|
| Size | 32.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
943bce2be40ee4c1e5acd14e75e0dd15e80ba91c55d9fb8d5e44856b80beab2b
|
|
BLAKE2b-256 checksum How to use checksums |
fa17293521c934297fb85994aef5cf3fc29c8817b7fdc4733ee886809db3b753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for PyCSP-lib 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.