| 1 |
|
| 2 |
#============== |
| 3 |
# AUTO Demo ops |
| 4 |
#============== |
| 5 |
|
| 6 |
pgm = "ops" |
| 7 |
print "\nDemo %s is started"%pgm |
| 8 |
print "\n%s : first run : locate a Hopf bifurcation"%pgm |
| 9 |
r1 = run(e=pgm,c=pgm) |
| 10 |
|
| 11 |
print "\n%s : second run : compute a branch of periodic solutions"%pgm |
| 12 |
uzr = {3: [0.92, 0.93]} |
| 13 |
r2 = run(r1("HB1"),IPS=2,ICP=[3,11],NMX=150,RL0=0.9,UZR=uzr,UZSTOP={}) |
| 14 |
save(r1+r2,'0') |
| 15 |
|
| 16 |
print "\n%s : third run : locate a 1-parameter extremum as a bifurcation"%pgm |
| 17 |
icp=[3,11,12,22,-22,-23,-31] |
| 18 |
r3 = run(r2("UZ1"),IPS=15,ILP=0,ICP=icp,ISP=2,NMX=25,ITNW=7,DS=-0.05) |
| 19 |
|
| 20 |
print "\n%s : fourth run : switch branches to generate adjoint variables"%pgm |
| 21 |
r4 = run(r3("BP1"),ISW=-1,ISP=0,NMX=5) |
| 22 |
save(r3+r4,'1') |
| 23 |
|
| 24 |
print "\n%s : fifth run : a 2-parameter branch of 1-parameter extrema"%pgm |
| 25 |
icp[1:3]=[2,11] |
| 26 |
uzr[22]=0.0 |
| 27 |
r5 = run(r4,ICP=icp,ISW=1,NMX=150,RL0=0.8,RL1=1.9,DS='-',UZR=uzr) |
| 28 |
save(r5,'2') |
| 29 |
|
| 30 |
print "\n%s : sixth run : a 3-parameter branch of 2-parameter extrema"%pgm |
| 31 |
icp[2:4]=[1,11] |
| 32 |
r6 = run(r5("UZ4"),IRS=15,ICP=icp,NTST=50,UZR={1:[0.1,0.05,0.01,0.005,0.001]}) |
| 33 |
save(r6,'3') |
| 34 |
|
| 35 |
print "\n***Clean the directory***" |
| 36 |
cl() |
| 37 |
|