Reaction Path Analysis

514 views
Skip to first unread message

Alan Kong

unread,
Apr 27, 2015, 6:09:25 AM4/27/15
to canter...@googlegroups.com
Hi All.

I have read about the units represented by the reaction path analysis are in kmol/m^3 and that this value is the overall net elemental flux from the species. For example, if I am interested in the conserved quantity of 'C' atom, then the diagram generated shows the values of the 'C' net elemental flux from each species containing 'C'.


I was just wondering how this value is calculated from the reaction rates supplied by the input mechanism files in the reaction path codes : reaction_path.py, particularly this module from cantera: ct.ReactionPathDiagram(gas, element)


Secondly, what are the possible setting in the ct.ReactionPathDiagram(gas, element) module and also its output files. I know we can set the tolerance threshold for the flux to be should as well as setting the name of the diagram but I would like to know if there are other settings included.
I have read the description over here: http://cantera.github.io/dev-docs/sphinx/html/cython/kinetics.html, but I am still not very sure what I can manipulate using this model so if anyone here had used this before, it will be great if u can give some explanation.

Furthermore, I will also like to know how to set the colour of the arrows for different values range. 

Cheers

Alan

Ray Speth

unread,
Apr 27, 2015, 12:41:32 PM4/27/15
to canter...@googlegroups.com
Alan,

If you want to understand the details of the how the reaction path diagrams are calculated, the ultimate resource is the code itself: ReactionPath.h and ReactionPath.cpp. I don't know that there is a higher-level write-up of how this works, unfortunately.

You've already found the documentation for the Python ReactionPathDiagram class. The properties of this class are the things that you can control -- e.g. if you have a ReactionPathDiagram called 'rpath' then you can use commands like:

rpath.normal_color = "green"
rpath
.arrow_width = 10

To set these properties. If you want more control over what's displayed, I would suggest using ReactionPathDiagram to generate the directed graph in the ".dot" format, and using that with a tool/library that can read GraphViz files (such as the Python NetworkX library) to present the data in the way you desire.

Regards,
Ray

Alan Kong

unread,
Apr 28, 2015, 4:56:13 AM4/28/15
to canter...@googlegroups.com
This looks awesome! Didnt know there is NetworkX  that can read .dot files
just one quick question, can I specify the position of the nodes in the reaction path diagrams in NetworkX? At the moment I am having a mess of arrows and nodes in an unstructure manner and it will be good to organized the the diagram in a more readable way.

Anyway thanks for the help!

Cheers

Alan

Alan Kong

unread,
May 28, 2015, 8:59:37 AM5/28/15
to canter...@googlegroups.com
Hi Ray,

Just wondering how do I reference the code I use on this these page: http://cantera.github.io/dev-docs/sphinx/html/cython/examples.html

Cheers

Alan 

Ray Speth

unread,
May 28, 2015, 10:55:38 AM5/28/15
to canter...@googlegroups.com
Alan,

If you're looking for a way to cite Cantera, there is a preferred format in the FAQ. If that's not what you meant, can you please clarify your question?

Regards,
Ray

Alan Kong

unread,
May 28, 2015, 5:45:01 PM5/28/15
to canter...@googlegroups.com
Hi Ray,

I am using part of the code from the examples and extending it for my task so I was wondering if there are any author for these codes. Thomas Fiala has provided some excellent batch diffusion flame calculation code which I am using and referencing.

Thus I was wondering if I have to reference the codes from the list of examples.

Cheers
Alan

Ray Speth

unread,
May 28, 2015, 9:00:04 PM5/28/15
to canter...@googlegroups.com
Alan,

If you're using any of the examples, then you you should reference Cantera as a whole, using the recommended citation I linked to before. If you are using the scaling rules in the examples contributed by Thomas Fiala, then you should reference the paper he recommends as well.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages