A single process implementation of the Kuramoto model by the 4th-order Runge-Kutta method.
The famous Kuramoto model exhibits phase synchronization among coupled self-sustained oscillators. I here implemented the Kuramoto model by the 4th-order Runge-Kutta discretisation method. The mathematical formula for the time evolution of an oscillator's phase is presented
$$\dot{\varphi}i = \omega_i + \frac{ 1 }{ N_i } \sum^{ N_i }{ j=1 } \kappa_{ij} \sin( \varphi_j - \varphi_i ) , $$
where
$$ k_1 = f(t_n, \varphi(t_n) ) = \omega_i + \frac{ 1 }{ N_i } \sum^{ N_i }{ j=1 } \kappa{ij} \sin( \varphi_j(t_n) - \varphi_i(t_n) ), $$
$$ k_2 = f(t_n+\frac{h}{2}, \varphi(t_n) + h\frac{k_1}{2} ) = \omega_i + \frac{ 1 }{ N_i } \sum^{ N_i }{ j=1 } \kappa{ij} \sin( \varphi_j(t_n) - (\varphi_i(t_n) + h\frac{k_1}{2} )) $$
$$ k_3 = f(t_n+\frac{h}{2}, \varphi(t_n) + h\frac{k_2}{2} ) = \omega_i + \frac{ 1 }{ N_i } \sum^{ N_i }{ j=1 } \kappa{ij} \sin( \varphi_j(t_n) - (\varphi_i(t_n) + h\frac{k_2}{2} )) $$
$$ k_4 = f(t_n + h, \varphi(t_n) + hk_3 ) = \omega_i + \frac{ 1 }{ N_i } \sum^{ N_i }{ j=1 } \kappa{ij} \sin( \varphi_j(t_n) - (\varphi_i(t_n) + hk_3 )) $$
The time
We can couple the oscillators to each other by many diverse approaches one of them is all-to-all which means all oscillators are connected.
We also consider the value of the coupling
Let us consider a normal dist. as the frequency dits. and then the value of the critical coupling strength will be derived as