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
gtspring2009:howto:poincare [2009/03/20 09:15]
gibson
gtspring2009:howto:poincare [2010/02/02 07:55] (current)
Line 5: Line 5:
 channnnelflow utilities, specialized channelflow programs, Unix utilities, and bash  channnnelflow utilities, specialized channelflow programs, Unix utilities, and bash 
 shell programming. ​ shell programming. ​
- 
 ===== Integrate perturbations ​ ===== ===== Integrate perturbations ​ =====
  
Line 42: 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
    ...    ...
  
 Instead of typing each of these out, you can use a bash for-loop, ​ Instead of typing each of these out, you can use a bash for-loop, ​
  
-   for i in eq2_*eo.ff ; do tag=${i#​eq2_} ; couette -T0 0 -T1 400 -o data-${tag%.e0.ff} $i ; done+   for i in eq2_*e0.ff ; do tag=${i#​eq2_} ; couette -T0 0 -T1 400 -o data-${tag%.e0.ff} $i ; done
  
 The ${...} stuff is bash string manipulation syntax to extract the numerical part of the input file names. The ${...} stuff is bash string manipulation syntax to extract the numerical part of the input file names.
Line 115: Line 114:
  
 The above command assumes you have put the basis vectors e0,e1,e2,e3 into a directory named basis-EQ2ef/;​ 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 .'​. ​+if not you might use '-b .' ​instead
  
-This creates a new directory '​portrait-pi4' ​+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.1237565740.txt.gz · Last modified: 2009/03/20 09:15 by gibson