Chemical kinetics library for Python
Project description
[![Build Status](https://travis-ci.org/flamespeed/cs207-FinalProject.svg?branch=master)](https://travis-ci.org/flamespeed/cs207-FinalProject.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/flamespeed/cs207-FinalProject/badge.svg?branch=master&maxAge=0)](https://coveralls.io/github/flamespeed/cs207-FinalProject?branch=master&maxAge=0)
# Flamespeed
## What is Flamespeed?
Flamespeed is the measured rate of expansion of the flame front in a combustion reaction.
It is also an open-source Python library with object-orientated methods for chemical kinetics with the following core functionality:
API to import a database of elementary reactions in XML-format
Efficiently calculate reaction rates for systems of irreversible elementary chemical reactions
Output provided in format suitable for further analysis
Potential applications for Flamespeed includes:
Validation of chemical phase input files
Input for solving ODEs for system of reactions
Input for machine learning methods (e.g. neural networks) that predict reaction types
## Installation
There are two ways to install Flamespeed:
Install Flamespeed from PyPI (recommended)
`bash pip3 install flamespeed `
Alternatively: Install Flamespeed form Github source
First, clone Flamespeed using git:
`sh git clone https://github.com/flamespeed/cs207-FinalProject.git ` Then, cd to the root folder and run the install command: `sh python setup.py install `
The package test suite can be run as follows:
First, cd to the flamespeed folder and then run pytest: `sh cd flamespeed pytest `
Requirements: * Python (>= 3.3) * NumPy (>= 1.8.2) * SciPy (>= 0.13.3)
## Getting started
Import the chemkin module in flamespeed, which is the main module to evaluate chemical reaction rates.
`python from flamespeed import chemkin ` Instantiate the reaction rates class and import reaction database in XML format. Example reaction files can be found in the ./data directory within flamespeed.
`python a = chemkin.ReactionRate() a.read_XML('./flamespeed/data/rxns_reversible.xml') print(a) ` Next, set the initial concentrations for each of the species included in the reaction and the temperature.
`python a.set_temp(750) x = [2.0, 1.0, 0.5, 1.0, 1.0, 1.5, 0.5, 1] ` Now that all the input parameters have been specified the reaction rates for each of the species in the system can be determined as follows:
`python r = a.get_reaction_rate(x) print(r) `
## Documentation
Technical detail regarding the chemical theory underlying the reaction rate calculations and detailed documentation of the relevant classes and methods included in the Flamespeed package can be found in the docs directory:
https://github.com/flamespeed/cs207-FinalProject/tree/master/docs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file flamespeed-1.0.1.tar.gz
.
File metadata
- Download URL: flamespeed-1.0.1.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad991f976c61ef123c3b2b22bb7fe727fc82a4f251fe3f1932b37275e1514401 |
|
MD5 | b5f5b42db256c7578ee982bef48f1780 |
|
BLAKE2b-256 | 037bac14cdbbd6fe484cc7a87fcf345fcbb8de1e91a2e5bbde8b3ab1bc50962b |