[TOC]
KiThe
This is a package of structures, functions and databases useful for such areas as chemical thermodynamics, chemical kinetics, as well as modeling of chemical reactors, combustion, processes in shock tubes and rocket engines, propulsion.
PROJECT NEWS: Kinetics module rewritten in more idiomatic style, more features added
Content
Kinetics
- parse reaction equations into a list of substances
- parse reaction equations into a stoichiometric matrix, matrix of coefficients of direct reactions and matrix of coefficients of reverse reactions, matrix of degrees of concentration for the kinetic function,
- calculate of atomic composition, molar masses and matrix of atomic composition Let us observe the main structure realizing that features
usage
use StoichAnalyzer;
let mut StoichAnalyzer_instance = new;
let reactions_: = vec!;
let reaction = reactions_.iter.map.collect;
StoichAnalyzer_instance.reactions = reaction;
StoichAnalyzer_instance.search_substances;
StoichAnalyzer_instance.analyse_reactions;
let stecheo_matrx = StoichAnalyzer_instance.stecheo_matrx;
let result = ;
let result: = result.iter.map.collect;
assert_eq!;
println!;
println!;
- Calculation of atomic composition, molar masses and matrix of atomic composition. We can use struct StoichAnalyzer or just use the more low-level functions
use ;
let formula = "C6H8O6";
let = calculate_molar_mass;
println!;
println!;
let formula = "Na(NO3)2".to_string;
let atomic_composition = parse_formula;
println!;
let vec_of_formulae = vec!;
let expected_molar_masses = vec!;
let calculated_molar_masses = calculate_molar_mass_of_vector_of_subs;
for in expected_molar_masses.iter.enumerate
let vec_of_formulae = vec!; // 5 elements
let matrix = create_elem_composition_matrix;
println!;
- crate is equipped with a libraries of kinetic parameters of chemical reactions obtained as a result of parsing publicly available databases, so you can view all libraries and all reactions in every library of kinetic DB, search reactions by substances and so on. Most important methods below
use KineticData;
let mut kin_instance = new;
// collecting reaction data for library name lib
let lib = "NUIG";
kin_instance.open_json_files;
// veiew all reactions in library
kin_instance.print_all_reactions;
let reaction1 = kin_instance.search_reactdata_by_reaction_id;
println!;
// search reactions by substances
kin_instance.search_reaction_by_reagents_and_products;
println!;
println!;
Kinetic data (Arrhenius parameters, etc) are parsed into stuctures
where ReactionType is enum for concrete type of reaction (elementary, fall-off, etc)
- The module is automatic chemical mechanism constructor and takes as input the name of the library and the vector of substances and then produces the following data:
- all reactions of starting substances with each other, and all reactions of all their possible products with each other and with original substances.
- HashMap with kinetic data of all found reactions
use crateMechanism_search;
let mut mech_search = new;
let = mech_search.mechfinder_api;
println!;
println!;
println!;
println!;
The most general approach is to use stuct KinData whin aggregates the most features of Kinetics module: library parsing, mechanism construction, structures for different reaction types, stoichiometric calculations, saving and reading data
Testing
Our project is covered by tests and you can run them by standard command
Contributing
If you have any questions, comments or want to contribute, please feel free to contact us at https://github.com/
To do
- Add libraries of chemical reactions with appropriate methods for processing, searching, and retrieving data.
- Add libraries of chemical substances...
- Add numerical methods (may be cpp open source...)