Skip to content

Python-based solution for complex reaction systems. Solve differential equations, visualize concentrations with RK4 method.

License

Notifications You must be signed in to change notification settings

luksaiterugile/Reaction-Diff-Eq-RK4-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reaction-Diff-Eq-RK4-Solver

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.

Introduction

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.

Requirements

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

Running the program

python src.py

Reactions Used

You can find the list of chemical reactions used for this project in the image 'Reactions.PNG'.

Solved Reactions

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'.

About

Python-based solution for complex reaction systems. Solve differential equations, visualize concentrations with RK4 method.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages