Contents

BD for Wirl2000 pollution

close all; clear classes;

FSS branch

p=[]; lx=1; nx=10; ly=sqrt(3)*lx/2; ny=round(nx*ly/lx)+1; % for 2D (later)
par=[0.5 1 0.4 0 300]; % del, pr, beta, a, ga
ndim=1; p=pollinit(p,lx,ly,nx,ny,ndim,par);
p=setfn(p,'FSS'); screenlayout(p);
p=initwn(p,2,1); p=initeig(p); p.nc.neig=[2 2]; p.sw.bifcheck=2; p.sw.verb=2;
p.nc.ilam=1; p.sol.ds=0.05; p.nc.dsmax=0.05; p.nc.nsteps=5;  p0=p;
inires=1.38778e-17
first res=1.38778e-17
Problem directory name: FSS
random
setting om(2)=0.184531

continue FSS branch

p=p0; p=cont(p,10);
step lambda      y-axis    residual iter meth   ds       
   0 got first point with lam=0.5, res=1.38778e-17 
   - now lam=0.505
   1 got second point with lam=0.505, res=1.20192e-11 
   - 1 possible bif between 0.505 and 0.554834, om=0.184531
 - checking lam=0.529917 ... - ok, ineg=1
 - checking lam=0.517458 ... - ok, ineg=0
 - checking lam=0.523688 ... - ok, ineg=1
 - checking lam=0.520573 ... - ok, ineg=1
 - checking lam=0.519016 ... - ok, ineg=1
 - checking lam=0.518237 ... - ok, ineg=1
 - checking lam=0.517848 ... - ok, ineg=0
 - checking lam=0.518042 ... - ok, ineg=1
 - checking lam=0.517945 ... - ok, ineg=0
 - checking lam=0.517994 ... - ok, ineg=1
 mu_r=-3.99193e-06, mu_i=0.183105 
   2  5.17994e-01 (HP, saved to FSS/hpt1.mat) bisection steps 10, last ds -2.44141e-05
   3    0.55483    0.55483 3.03e-09    1  nat    0.05000 
   4    0.60467    0.60467 2.05e-09    1  nat    0.05000 
   - 2 possible bif between 0.604667 and 0.6545, om=0,0.184531
...

Bif of Hopf branches, pick one

para=4; ds=0.5; dsmax=2; xi=1e-2; tol=1e-6; figure(2); clf; aux=[]; aux.tl=20;
for j=1:2
 switch j
     case 1; p=hoswibra('FSS','hpt1',ds,para,'h1',aux); nsteps=20;
     case 2; p=hoswibra('FSS','hpt2',ds,para,'h2',aux); nsteps=10;
 end
p.hopf.xi=xi; p.nc.tol=tol; p.hopf.jac=1; p.nc.dsmax=dsmax;
p.fuha.blss=@mbel; p.nc.mbw=2; p.hopf.ilss=0; % set to 0 if no ilupack
p.usrlam=[0.5 0.6 0.7]; tic; p=cont(p,nsteps);  toc
end
Problem directory name: h1
creating directory h1
real(mu)=-3.99193e-06, imag(mu)=0.183105
lam=0.517994, om=0.183105,  NF-coeffis: dlam=1, alpha=77.4914
arc.parametr, lambda-guess=0.520984
max|y-u0|=5.03322, res=0.636626
step  lambda      y-axis       res    iter  ds         T        nT   
   1    0.51863    0.51863  2.680e-07  8    0.50000   34.68885   20    0.15925    0.00179
   2    0.52118    0.52118  3.661e-07  5    0.50000   34.90771   20    0.45706    0.00554
   3    0.52469    0.52469  2.271e-07  4    1.00000   35.18574   20    0.64944    0.00846
   4    0.53639    0.53639  1.709e-07  5    1.00000   36.02653   20    0.98473    0.01435
   5    0.55284    0.55284  1.607e-07  5    1.00000   37.13279   20    1.18176    0.01767
   6    0.57111    0.57111  9.435e-08  5    1.00000   38.37175   20    1.27342    0.01839
   7    0.58933    0.58933  7.999e-07  4    1.00000   39.67096   20    1.31563    0.01788
   8    0.60000    0.60000 1.41e-07    4    -0.39953 4.05e+01 
   9    0.60678    0.60678  3.916e-07  4    1.00000   40.99920   20    1.33684    0.01698
  10    0.62331    0.62331  3.711e-07  4    1.00000   42.34295   20    1.34873    0.01606
  11    0.63894    0.63894  3.662e-07  4    1.00000   43.69591   20    1.35613    0.01523
  12    0.65380    0.65380  3.324e-07  4    1.00000   45.05493   20    1.36103    0.01450
  13    0.66800    0.66800  2.499e-07  4    1.00000   46.41832   20    1.36499    0.01389
...

plot the BD

par(1..5), T, min, max, u(.,.)_L^2, J_c(CSS) resp J_c(u_H), J_c(u_H(.+T/2)) 6 10 11

figure(3); clf; pcmp=10;
plotbraf('FSS',3,pcmp,'cl','k','lwst',2);
plotbraf('h1',3,pcmp,'cl','b', 'lab',20);
plotbraf('h1',3,11,'cl','b', 'lab',20,'tyun','--');
plotbraf('h2',3,pcmp,'cl','r', 'lab',10);
axis([0.5 0.75 -0.3 0.2]); xlabel('\rho'); ylabel('J');
hoplotf('h1','pt20',1,1);  pause
hoplotf('h2','pt10',1,1);
lam=0.743381
lam=0.729299

illustrate full spectrum!

p=loadp('FSS','pt0');
p.nc.neig=p.nu; r=resi(p,p.u); Gu=getGupde(p,p.u,r);
[ineg,muv]=spcalc(Gu,p);