This repository contains a Python implementation for solving a system of differential equations for a given group of reactions. The task involves developing a system of differential equations, choosing initial conditions within the range (0,1), and solving it using the Runge-Kutta 4th order (RK4) method. The reaction rates are expected to be in the interval [0,2], and the results are visualized by plotting graphs of the variation of all concentrations on a single sheet of paper.
In this project, we have implemented a Python script (src.py
) that allows you to define a set of chemical reactions and solve the corresponding system of differential equations. You can choose your own initial conditions for concentrations (within the range 0 to 1) and visualize the results by plotting concentration variations.
To run the src.py
script, you will need:
- Python 3.x
- NumPy: A Python library for numerical computations
- Matplotlib: A Python library for creating visualizations
python src.py
You can find the list of chemical reactions used for this project in the image 'Reactions.PNG'.
You can view the graphs of the solved reactions used in the implementation in the following images 'solved_reaction_1.png' and 'solved_reaction_2.png'.