
Development of a program for comparison of Runge-Kutta and Runge-Kutta-Fehlberg methods of various orders based on the analytical solution to nuclear decay problem.
The aim of this project was to compare the Runge-Kutta methods of orders 1, 2, 3, 4, 5, 6 and Runge-Kutta-Fehlberg methods of orders 5, 6, 7, 8. The comparison was based on the nuclear decay problem solved analytically. The chart presented solutions of the differential equation, the difference between the analytical solution and the numerical solution, and the minimal, maximal, and mean values of the comparison. All charts were created using the Matplotlib Python library. The user-friendly GUI was developed using PyQt6.
Self paced project, 06.2024 - 07.2024.
Gallery

Numerically and analytically counted function in large time scale. This chart prooves the correctivness of methods.
Project Results
- The most accurate results for this problem were acquired with the usage of FRK7 method. FRK6, FRK5 and RK4 methods had also had very accurate results.
- The delta, which is a step in the chosen period of time, is also very important while counting the accuracy. With high step, the differences beetween methods can be greater than the differences counted with small step value.
- For delta equal to 0.05 second, the FRK6 and FRK7 counted the exact same values as in the analytical solution. This occured only near the beggining of the time period, but it prooves high accuracy of these methods.
- The RK1 method has the worst accuracy from all. However, it's the fastest method, because it counts only one 'k' element per loop iteration. For comparison, the FRK8 method counts 17 'k' elements per loop iteration.
- The functionalities of the application allow user to count: the solution of nuclear decay, comparison of numerical solutions, which is difference beetween analytical solution and numerical solution and statistical data, which are minimal, maximal and mean values of that difference for each of the method used.
- User can choose the input data: time period start, end and delta, starting amout of nuclei, tau constant and the numerical methods to use.
- The .csv file allows user to save the calculated data in a clear form.
See the source code and documentation:

