1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# the famous Lorenz equation set up for 3d view
init x=-7.5 y=-3.6 z=30
par r=27 s=10 b=2.66666
par a=0 ,c1=1,c2=0,c3=0
x'=s*(-x+y)
y'=r*x-y-x*z
z'=-b*z+x*y
xl'=s*(-xl+yl)+a*c1*xl
yl'=r*xl-yl-xl*z-x*zl+a*c2*yl
zl'=-b*zl+xl*y+yl*x+a*c3*zl
init xl=1,yl=0,zl=0
par dtout=1.1
init tt=0
global 1 tt-dtout {tt=0;norm=sqrt(xl^2+yl^2+zl^2);acc=acc+log(norm);xl=xl/norm;yl=yl/norm;zl=zl/norm}
tt'=1
norm'=0
acc'=0
aux liap=acc/max(1,t)
aux mya=a
@ bound=100000000
@ dt=.025001, total=1000,nout=100,transient=999.99
@ runnow=1
done
|