User Tools

Site Tools


gtspring2009:howto:poincare

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
gtspring2009:howto:poincare [2009/03/20 08:59]
gibson
gtspring2009:howto:poincare [2009/03/22 10:33]
gibson
Line 2: Line 2:
  
 around the Nagata EQ2 upper branch. This is procedure is too special-case and  around the Nagata EQ2 upper branch. This is procedure is too special-case and 
-kludgy to put in channelflow documentation. +kludgy to put in channelflow documentation. ​It is a horrific mixture of general-purpose ​ 
 +channnnelflow utilities, specialized channelflow programs, Unix utilities, and bash  
 +shell programming. ​
 ===== Integrate perturbations ​ ===== ===== Integrate perturbations ​ =====
  
Line 40: Line 41:
  
    ​couette -T0 0 -T1 400 -o data-11268 eq2_11268e0.ff    ​couette -T0 0 -T1 400 -o data-11268 eq2_11268e0.ff
-   ​couette -T0 0 -T1 400 -o data-12696 ​eq2_11268e0.ff+   ​couette -T0 0 -T1 400 -o data-12696 ​eq2_12696e0.ff
    ...    ...
  
Line 56: Line 57:
 ===== Compute the Poincare crossings ===== ===== Compute the Poincare crossings =====
  
-[[gtspring2009:​howto:​poincare:​eq2poincare.cpp]] is a special program I wrote to compute crossings of a Poincare section defined by+{{gtspring2009:​howto:​poincare:​eq2poincare.cpp}} is a special program I wrote to compute crossings of a Poincare section defined by
  
   (u(t) - EQ2, e(θ)) == 0   (u(t) - EQ2, e(θ)) == 0
Line 65: Line 66:
 JFM paper. ​ JFM paper. ​
  
-To compile eq2poincare.cpp,​ use this [[gtspring2009:​howto:​poincare:​Makefile]]. Edit the Makefile to so that CHANNELDIR+To compile eq2poincare.cpp,​ use this {{gtspring2009:​howto:​poincare:​makefile.txt}}. Edit the Makefile to so that CHANNELDIR
 is set to you channelflow installation is set to you channelflow installation
  
Line 85: Line 86:
    for i in data-[a-p] ; do tag=${i#​data-} ; eq2poincare.x -d data-$tag -o section-pi4 --theta 0.7854 -tag ${tag} -T0 0 -T1 400 etx etz e0 e1 EQ2.ff; ​ done    for i in data-[a-p] ; do tag=${i#​data-} ; eq2poincare.x -d data-$tag -o section-pi4 --theta 0.7854 -tag ${tag} -T0 0 -T1 400 etx etz e0 e1 EQ2.ff; ​ done
  
 +The files in directory section-pi4 will be ordered in increasing distance along the unstable manifold. ​
  
 +   ​gibson@tansen$ ls section-foo-pi4/​
 +   ​crossingtimes-a.asc ​ uM0d.ff ​ uM1g.ff ​ uM3a.ff ​ uM4d.ff ​ uP0h.ff ​ uP2b.ff ​ uP3e.ff
 +   ​crossingtimes-b.asc ​ uM0e.ff ​ uM1h.ff ​ uM3b.ff ​ uM4e.ff ​ uP0i.ff ​ uP2c.ff ​ uP3f.ff
 +   ​crossingtimes-c.asc ​ uM0f.ff ​ uM1i.ff ​ uM3c.ff ​ uM4f.ff ​ uP1a.ff ​ uP2d.ff ​ uP3g.ff
 +   ​crossingtimes-d.asc ​ uM0g.ff ​ uM2a.ff ​ uM3d.ff ​ uM4g.ff ​ uP1b.ff ​ uP2e.ff ​ uP3h.ff
 +   ​crossingtimes-e.asc ​ uM0h.ff ​ uM2b.ff ​ uM3e.ff ​ uM4h.ff ​ uP1c.ff ​ uP2f.ff ​ uP4a.ff
 +   ​crossingtimes-f.asc ​ uM0i.ff ​ uM2c.ff ​ uM3f.ff ​ uP0a.ff ​ uP1d.ff ​ uP2g.ff ​ uP4b.ff
 +   ​crossingtimes-g.asc ​ uM1a.ff ​ uM2d.ff ​ uM3g.ff ​ uP0b.ff ​ uP1e.ff ​ uP2h.ff ​ uP4c.ff
 +   ​crossingtimes-h.asc ​ uM1b.ff ​ uM2e.ff ​ uM3h.ff ​ uP0c.ff ​ uP1f.ff ​ uP2i.ff ​ uP4d.ff
 +   ​crossingtimes-i.asc ​ uM1c.ff ​ uM2f.ff ​ uM3i.ff ​ uP0d.ff ​ uP1g.ff ​ uP3a.ff ​ uP4e.ff
 +   ​uM0a.ff ​             uM1d.ff ​ uM2g.ff ​ uM4a.ff ​ uP0e.ff ​ uP1h.ff ​ uP3b.ff ​ uP4f.ff
 +   ​uM0b.ff ​             uM1e.ff ​ uM2h.ff ​ uM4b.ff ​ uP0f.ff ​ uP1i.ff ​ uP3c.ff ​ uP4g.ff
 +   ​uM0c.ff ​             uM1f.ff ​ uM2i.ff ​ uM4c.ff ​ uP0g.ff ​ uP2a.ff ​ uP3d.ff ​ uP4h.ff
  
 +etc.
  
  
   ​   ​
  
 +===== Project the crossing points =====
 +
 +Next we project the crossing points of the Poincare section using the channelflow ''​projectfields''​ utility. ​
 +
 +  projectfields -b basis-EQ2ef/​ -Nb 4 -or EQ2.ff -o portrait-pi4 section-pi4/​*.ff
 +
 +The above command assumes you have put the basis vectors e0,e1,e2,e3 into a directory named basis-EQ2ef/;​
 +if not you might use '-b .' instead. ​
 +
 +This creates a new directory '​portrait-pi4'​ containing ASCII files uM0a.asc, uM0b.asc, ..., each of which 
 +contains four numbers corresponding to the projection of the fields in uM0a.ff, etc onto the four basis vectors
 +e0,​e1,​e2,​e3. E.g. 
 +
 +  ​
 +  gibson@tansen$ cat portrait-pi4/​uM0a.asc
 +  % e0 e1 e2 e3
 +  -9.6755005579877134e-06 9.6754650183359171e-06 3.8296888337351566e-10 -2.5429703558485441e-08
 +
 +It's easier to plot this data if it's in one file and in the right order. To do that, we strip out the
 +comments with ''​grep''​ and save the results to two files. ​
 +
 +  gibson@tansen$ grep -v -h ^% portrait-foo-pi4/​uM*.asc > uM.asc
 +  gibson@tansen$ grep -v -h ^% portrait-foo-pi4/​uP*.asc > uP.asc
 +
 +That produces two files of incoming/​outgoing crossings that can be plotted with matlab or whatever.
 +
 +
 +  ​
gtspring2009/howto/poincare.txt · Last modified: 2010/02/02 07:55 (external edit)