bloc.plotting.reaction_path_diagram#
Reaction path diagrams for homogeneous gas-phase pyrolysis.
A constant-pressure adiabatic reactor is integrated from the current state of a
cantera.Solution. Reaction path diagrams (Cantera
cantera.ReactionPathDiagram) are then drawn for a given element at
selected residence times.
Inspired by https://cantera.org/3.1/examples/python/kinetics/interactive_path_diagram.html.
Requires the Graphviz dot executable to render diagrams.
Functions#
|
Integrate an adiabatic constant-pressure reactor from the current |
|
Plot temperature and species mole fractions versus residence time (log axes). |
|
Return the Graphviz |
|
Render |
Module Contents#
- bloc.plotting.reaction_path_diagram.run_constant_pressure_reactor(gas, t_start, t_end, n_steps)#
Integrate an adiabatic constant-pressure reactor from the current
gasstate.States are stored at
n_stepslog-spaced times betweent_startandt_end[s], preceded by the initial state at t = 0.Returns a
cantera.SolutionArraywith an extratcolumn [s].gasis left at the final reactor state.
- bloc.plotting.reaction_path_diagram.plot_reactor_evolution(states, species, title='')#
Plot temperature and species mole fractions versus residence time (log axes).
Returns the matplotlib figure.
- bloc.plotting.reaction_path_diagram.reaction_path_dot(gas, states, time, element, threshold=0.1, details=False, title='')#
Return the Graphviz
dotsource of the reaction path diagram attime[s].The stored state closest to
time(in log space) is used.gasis set to that state.thresholdis the relative flux below which paths are hidden.
- bloc.plotting.reaction_path_diagram.save_reaction_path_diagram(dot, output_path)#
Render
dotsource tooutput_path; the format is taken from its suffix.Returns the path of the rendered file.