Cantera / enhancements

Repository for proposed and ongoing enhancements to Cantera
11 stars 5 forks source link

Improved Reaction Path Analysis Documentation #95

Open ischoegl opened 3 years ago

ischoegl commented 3 years ago

Abstract

While a short example for the creation of a reaction pathway diagram exists, a recent UG post by "Rosa" unearthed a very detailed tutorial posted by another community member on a personal blog.

Possible Solution

Converting (parts of) the tutorial to a Jupyter notebook for Cantera/cantera-jupyter would be straight-forward. Displaying the resulting graphs within the Jupyter environment is also straight-forward, e.g.

...

element = 'O'
diagram = ct.ReactionPathDiagram(gas, element)
diagram.title = 'Reaction path diagram following {}'.format(element)
diagram.flow_type = 'OneWayFlow'

dot_file = 'rxnpath.dot'
diagram.write_dot(dot_file)

with open(dot_file) as f:
    dot_graph = f.read()
display(graphviz.Source(dot_graph))

Relevant links