Skip to main content

PyCSP

Screenshot A collection of tools based on Computational Singular Perturbation for the analysis of chemically reacting systems. Requires cantera >= 3.0, numpy, matplotlib. (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, oterwise skip to #3): From PyCSP folder

  1. conda create --name pycsp anaconda --file requirements.txt --channel default --channel anaconda --channel cantera
  2. conda activate pycsp
  3. pip install PyCSP-lib

Testing:

  1. enter the folder tests/
  2. run the command "python test_kernel.py"

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 participatio indices, TSR amplitude/timescale participation indices)

Cantera chem-input files are required (.cti or .yaml, depending on the installed Cantera version). Cantera offers a utility to convert chemkin-format files into cantera-format: https://cantera.org/tutorials/ck2cti-tutorial.html

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

Can be found in the /documentation folder

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:

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}}
}

Release files for PyCSP-lib 1.4.0.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyCSP-lib 1.4.0.post2
File Size Uploaded
pycsp_lib-1.4.0.post2.tar.gz 2.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyCSP-lib 1.4.0.post2
File Interpreter ABI Platform
pycsp_lib-1.4.0.post2-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / pycsp_lib-1.4.0.post2.tar.gz

Download URL pycsp_lib-1.4.0.post2.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
1f3fa3a67eff22f1d69d60a8a12a5cecb507c2fc82f75cceeb6d5cc98aa98d11
BLAKE2b-256 checksum
How to use checksums
ef1893d1fe503d60bee84079074b8ac1d1b33c78279d0be1449b7ad52165c218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release files / pycsp_lib-1.4.0.post2-py3-none-any.whl

Download URL pycsp_lib-1.4.0.post2-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e786fb88f250152829adec2ede8b5f6f005a00ef27f3e391e78decb34fbffeb
BLAKE2b-256 checksum
How to use checksums
38baa1facc7cd91c1c681f2cf8d63580492e559ac92098c39a475f6091fc182c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release history Release notifications | RSS feed

This release

1.4.0.post2 This release

2 release files

1.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page