-
Notifications
You must be signed in to change notification settings - Fork 12
Documentation
The Reaction Network Viewer (ReNView) generates a graphic representation of the reaction fluxes within the system essential for identifying dominant reaction pathways and mechanism reduction.
The visualizer requires the following two files from the user.
- species_comp.out - A species composition file specifying species name, phase, and the elemental composition of the molecule. In the case of heterogeneous systems, surface coverages can also be provided for node coloring.
Species_name | Phase | Surf_cov | N | H | RU |
---|---|---|---|---|---|
H2 | Gas | 0 | 0 | 2 | 0 |
N2 | Gas | 0 | 2 | 0 | 0 |
NH3 | Gas | 0 | 1 | 3 | 0 |
RU(B) | Surface | 0 | 0 | 0 | 1 |
RU(S1) | Surface | 0.666031 | 0 | 0 | 1 |
N2(S1) | Surface | 7.48304e-05 | 2 | 0 | 0 |
N(S1) | Surface | 0.308883 | 1 | 0 | 0 |
H(S1) | Surface | 0.0246488 | 0 | 1 | 0 |
NH3(S1) | Surface | 6.35412e-07 | 1 | 3 | 0 |
NH2(S1) | Surface | 1.23301e-06 | 1 | 2 | 0 |
NH(S1) | Surface | 0.000360718 | 1 | 1 | 0 |
- reaction_rates.out - A reactions file specifying the forward, reverse, net rate, partial equilibrium index, and reaction string. The reaction string should contain species names as mentioned in the species_comp.out file. To keep reaction strings consistent, add space between stoichiometric coefficient, species formula, reaction arrow.
Fwd_Rate | Rev_Rate | Net_Rate | PEI | Reaction_String |
---|---|---|---|---|
4.99E-01 | 4.99E-01 | -3.51E-08 | 5.00E-01 | H2 + 2 RU(S1) <=> 2 H(S1) + 2 RU(B) |
8.07E-02 | 8.07E-02 | -1.17E-08 | 5.00E-01 | N2 + RU(S1) <=> N2(S1) + RU(B) |
5.49E-01 | 5.49E-01 | 2.34E-08 | 5.00E-01 | NH3 + RU(S1) <=> NH3(S1) + RU(B) |
2.50E-08 | 1.57E-09 | 2.34E-08 | 9.41E-01 | NH3(S1) + RU(S1) <=> H(S1) + NH2(S1) + RU(B) |
6.11E-06 | 6.09E-06 | 2.34E-08 | 5.01E-01 | NH2(S1) + RU(S1) <=> H(S1) + NH(S1) + RU(B) |
3.15E-04 | 3.15E-04 | 2.34E-08 | 5.00E-01 | NH(S1) + RU(S1) <=> H(S1) + N(S1) + RU(B) |
6.93E-14 | 1.17E-08 | -1.17E-08 | 5.92E-06 | N2(S1) + RU(S1) <=> 2 N(S1) + RU(B) |
The visualizer can be run using the following functions in the run.py file. The ammonia consumption is used as a sample case to demonstrate the execution steps.
-
input_species_file('/data/example_ammonia/species_comp.out') - This function is used to specify the path to the species_comp file. The species_comp.out file contains information regarding the species in the reaction network. The file should contain the following headers - Species_name, Phase, Surf_cov, Element symbols. An example has been listed in the previous section.
-
input_reactions_file('/data/example_ammonia/reaction_rates.out') - This function is used to specify the path to the reaction_rates file. The reaction_rates.out contains information regarding the reactions in the reaction network. The file should contain the following headers - forward rate (Fwd_Rate), reverse rate (Rev_Rate), net rate (Net_Rate), partial equilibrium index (PEI), and reaction string (Reaction_string). An example has been listed in the previous section.
-
input_initial_reactant('NH3') - This function is used to specify the inlet reactant used for the simulation of the microkinetic model. This should be same as the name specified in the species list.
-
input_reaction_cutoffrate(1.0E-09) - This function is used to refine the edges in the reaction network visualization and helps in removing edges that have a net reaction rate lower than the specified value.
-
input_elements_desired(['N', 'H']) - This function is used to refine the nodes in the reaction network visualization and helps in removing nodes that do not contain any of the specified elements in the list.
-
input_normalization(2) - This function specifies the desired normalization desired by the user.
1 - Normalization using Maximum reaction rate in the network 2 - Normalization using Net rate of the inlet reactant 3 - Visualization using local consumption of species
-
input_output_directory('/results/example_ammonia/') - This specifies the output directory desired where all the visualizations generated are stored.
-
generate_visualizations() - This executes the primary function generating visualizations for the reaction network.
-
erase_data() - This function is used to reset all the data structures in the run if using multiple case studies at a time.
- Network Visualization
- Species Visualization
- Legend generation
The code generates visualization and legend files in the specified output directory. These are:
-
Normalization_MaxReactionRate.svg
- Splines and rates normalized by the net rate of inlet reactant.The reaction rates of each edge are normalized by the net generation rate of the inlet reactant. The thickness of each edge is also set based on the normalized reaction rate.
-
Normalization_NetReactionRate.svg
- Splines and rates normalized by the maximum reaction rate in the network.The reaction rates of each edge are normalized by the maximum reaction rate in the reaction network. The thickness of each edge is also set based on the normalized reaction rate.
-
Normalization_LocalConsumption.svg
- Splines and reactions show the % consumption of a species to other intermediate species. A sum over all the reactions consuming a species will be 100. The thickness of each edge is also set based on the % consumption of a species.
To view the visualization, one needs to download the results of the run and open the desired visualization file in any internet browser (Google Chrome) or SVG editors (Inkscape or Photoshop).
The output for Normalization_NetReactionRate (with elements N and H) for ammonia consumption case study would look like the following:
The species are represented as nodes with their respective strings. The edges represent a reaction between two species and the net rate of the reaction defines the direction of the arrow. The edges are divided into three classes:
- Equilibrated reactions – Represented in green color
- Gas-Phase reactions – Represented in red color
- Surface reactions – Represented in black color
Each node in the above overall reaction network can be clicked to see the reactions that the species participates in. For example, if you click on “H(S1)” shown below, you will see species that generate the selected species on the left and species that are generated by the selected species on the right.
For non-equilibrium reactions, we specify the following details:
- Reaction Number
- % Prod/Cons for the specific reaction
- Net-rate of the reaction
- Partial Equilibrium Index (PEI)
For equilibrated reactions, we specify the following details:
- Reaction Number
- % Prod/Cons for the specific reaction
- The equilibrium constant for the specific reaction (with units) - if specified
- Partial Equilibrium Index (PEI)
ReNView is free software with the GNU LGPL License. Instructions on how to install ReNView and its source code can be found on the Vlachos group’s GitHub page and the most up-to-date documentation and examples can be found on the ReNView webpage. We invite interested users to participate in development. Discussion of enhancements, bugs, and help can be found on the GitHub Issues page.
Udit Gupta (ugupta@udel.edu)
This project is licensed under the GNU LGPL License - see the LICENSE.md file for details
- Gupta, U. and D. G. Vlachos, Reaction Network Viewer (ReNView): An open-source framework for reaction path visualization of chemical reaction systems. SoftwareX, 2020. 11: p. 100442 https://www.sciencedirect.com/science/article/pii/S2352711019302432.
If you have a suggestion or find a bug, please post to our Issues page with the enhancement or bug tag respectively.
Finally, if you would like to add to the body of code, please:
- fork the development branch
- make the desired changes
- write the appropriate unit tests
- submit a pull request.
If you are having issues, please post to our Issues page with the help wanted or question tag. We will do our best to assist.
This material is based upon work supported by the Department of Energy's Office of Energy Efficient and Renewable Energy's Advanced Manufacturing Office under Award Number DE-EE0007888-9.5.
- Dr. Jeffrey Frey (capsule compatibility)
- Gerhard Wittreich (testing)
- Hilal Ezgi Toraman (testing)
- Jonathan Lym (testing)
- Jaynell Keely (Logo design)