c234567 c This is the function for the Kuromoto Sivashinsky problem, using c the Rounge-Kuta method. real Q,V,dt,temp real kQ0(17),kQ1(17),kQ2(17),kQ3(17),kQ4(17), & kQ(17),P(17),R(10000) integer i,j,k,s common /QV/ Q(17), V(17) c initializing: dt=1D-4 R(1)=1D0 s=0 do 100 i=1,17 Q(i)=-1D0 kQ0(i)=0D0 100 continue cccccccccccccccc c begin evolving Q(i), one of the Q(i)'s is saved in a file with the c variable array R(j) do 200 j=1,5000 temp=R(j) if(temp.LT.1E20) then call vel(kQ0) do 110 i=1,17 kQ1(i)=dt*V(i) 110 continue call vel(kQ1) do 120 i=1,17 kQ2(i)=dt*V(i) 120 continue call vel(kQ2) do 130 i=1,17 kQ3(i)=dt*V(i)*2 130 continue call vel(kQ3) do 140 i=1,17 kQ4(i)=dt*V(i) 140 continue do 160 i=1,17 Q(i)=Q(i)+kQ1(i)/6+kQ2(i)/3+kQ3(i)/3+kQ4(i)/6 160 continue R(j)=Q(7) s=j end if 200 continue do 210 i=1,s write(2,10)R(i) 10 format(E18.4) 210 continue end subroutine vel(kQ) common /QV/ Q(17),V(17) real P(17),sig,nu,kQ(17) integer i,k,kk nu=0.029910 do 220 i=1,17 P(i)=Q(i)+kQ(i)/2 220 continue do 230 k=1,17 sig=0D0 do 231 i=1,k sig=sig+P(i)*P(k+1-i) 231 continue if (k .NE. 17) then do 232 i=(k+1),17 sig=sig-2*P(i)*P(i-k+1) 232 continue end if kk=k-1 V(k)=(kk*kk-nu*kk*kk*kk*kk)*P(k)-kk*sig c write(*,'('' ''2E18.4,'' ''I2)')V(k),Q(k),k 230 continue return end