Observation and characterization of chimera states in coupled dynamical systems with nonlocal coupling
阅读
下载地址:
https://chinazhang-my.sharepoint.com/:b:/g/personal/rep_rebirth_zh_zhangwenhao_icu/EVlIiEtnuqRJl-oTUvhKroIB7IfLMO1NHsirK2C1T5uFWw?e=5gO5s2
复现
单振子
Mackey-Glass system
module FHN
implicit none
real,parameter :: h=0.02D0,PI=3.1415926D0
integer,parameter :: N=500,MaxT=100000
integer,allocatable :: neighbour_matrix(:,:)
real :: u(N),v(N)
contains
subroutine u0_v0()
implicit none
integer :: k
do k=1,N,1
call random_number(u(k))
call random_number(v(k))
write(10,*) u(k),v(k)
end do
end subroutine u0_v0
subroutine fnf(p,sigma)
implicit none
integer :: k,i,j,t,p,count_number(N)
real :: func_u(N),func_v(N),epsilon=0.05D0,gamma=0.7D0,beta=0.0001D0,sigma,a(N),effect_u,effect_v,&
&b_uu,b_uv,b_vu,b_vv,t_up(N),t_down(N),t_each(N),omega(N)
a=0.5
count_number=0
t_up=0.0
t_down=0.0
t_each=0.0
omega=0.0
b_uu=cos(PI/2.0-0.1)
b_uv=sin(PI/2.0-0.1)
b_vu=-b_uv
b_vv=b_uu
do t=1,MaxT,1
do k=1,N,1
effect_u=0.0D0
effect_v=0.0D0
do j=1,N,1
effect_u=effect_u+neighbour_matrix(k,j)*(b_uu*(u(j)-u(k))+b_uv*(v(j)-v(k)))
effect_v=effect_v+neighbour_matrix(k,j)*(b_vu*(u(j)-u(k))+b_vv*(v(j)-v(k)))
end do
func_u(k)=u(k)+h*((u(k)-(u(k)**3)/3.0-v(k)+sigma/(2.0*p)*effect_u)/epsilon)
func_v(k)=v(k)+h*(u(k)+a(k)+sigma/(2.0*p)*effect_v)
if(t==MaxT) then
write(20,*) k,u(k)
end if
if(t>50000) then
if(k==500) then
write(40,*) u(k),v(k)
end if
if(v(k)>0.5.and.func_v(k)<0.5) then
count_number(k)=count_number(k)+1
if(count_number(k)>1) then
t_each(k)=t_each(k)+t*h-t_down(K)
end if
t_down(k)=t*h
end if
end if
end do
u=func_u
v=func_v
if(t==MaxT) then
do i=1,N,1
omega(i)=2.0*PI*((count_number(i)-1)/t_each(i))
write(50,*) i,omega(i)
write(*,*) i,t_each(i),omega(i),count_number(i)
write(60,*) u(i),v(i)
end do
end if
end do
return
end subroutine fnf
subroutine neighbour(K)
implicit none
integer :: K
integer :: i,j,number
allocate(neighbour_matrix(N,N))
neighbour_matrix=0
do i=1,N-1,1
do j=i+1,N,1
if(abs(i-j)<=K/2.or.abs(i-j)>=N-K/2) then
neighbour_matrix(i,j)=1
neighbour_matrix(j,i)=1
end if
end do
end do
return
end subroutine neighbour
end module FHN
program main
use FHN
implicit none
integer :: p
real :: sigma,r
open(10,file="data_u0_v0.txt")
open(20,file="data_k_u.txt")
open(30,file="data_ak.txt")
open(40,file="data_t_u.txt")
open(50,file="data_k_omega.txt")
open(60,file="data.txt")
call random_seed()
call u0_v0()
write(*,*) "请输入耦合半径r和耦合强度σ:"
read(*,*) r,sigma
p=nint(r*N)
write(*,*) p,sigma,r
call neighbour(2*p)
call fnf(p,sigma)
deallocate(neighbour_matrix)
close(10)
close(20)
close(30)
close(40)
close(50)
close(60)
end program main