====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gtspring2009:howto:poincare [2009/03/20 09:12] gibson |
gtspring2009:howto:poincare [2010/02/02 07:55] (current) |
||
---|---|---|---|
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 |
... | ... | ||
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 113: | 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. | ||
+ | |||
+ | |||
+ | |