This shows you the differences between two versions of the page.
gtspring2009:howto:poincare [2009/03/20 08:59] gibson |
gtspring2009:howto:poincare [2010/02/02 07:55] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to produce a Poincare section of plane Couette flow ====== | ||
- | |||
- | around the Nagata EQ2 upper branch. This is procedure is too special-case and | ||
- | kludgy to put in channelflow documentation. | ||
- | |||
- | ===== Integrate perturbations ===== | ||
- | |||
- | I'll assume you have the Nagata upper-branch eqb EQ2.ff and the eigenfunctions of the complex instability, | ||
- | ef2.ff and ef3.ff. These fields are actually real and imaginary parts of the complex eigenfunctions, and | ||
- | the evolution of perturbations goes like | ||
- | |||
- | <latex> | ||
- | u(t) = \text{EQ}_2 + e^{\text{Re} \lambda t} [\text{ef}_2 \cos (\text{Im } \lambda t) - \text{ef}_3 \sin (\text{Im } \lambda t)] | ||
- | </latex> | ||
- | |||
- | The eigenfunctions are non-orthogonal so the first thing to do is to make an orthogonal basis from them. Throw in | ||
- | the next leading S-symmetric eigenfunctions for good measure. | ||
- | |||
- | makebasis ef2 ef3 ef11 ef12 | ||
- | |||
- | The produces e0, e1, e2, e3. The first two will span ef2, ef3. | ||
- | |||
- | Construct perturbations of the form | ||
- | |||
- | <latex> | ||
- | u(0) = \text{EQ}_2 + \epsilon \; \Lambda^{n/N} e_0 | ||
- | </latex> | ||
- | |||
- | where Λ = exp(Re λ * 2 π / Im λ) = 6.7549 is the expansion multiplier for one period of oscillation. This will produce trajectories | ||
- | uniformly distributed under the iterated unstable oscillation. | ||
- | |||
- | I set ε = 1e-05 and started with N=16, and named my initial condition fields after the digits in Λ^(n/N) (using digits rather | ||
- | than integer labels will scale if I later increase N to 32 or 64). E.g Λ^(n/N) for n/N = 1/16 is 1.1268, and for 2/16 is 12696. | ||
- | |||
- | addfields 1 EQ2.ff 1.1267e-05 e0.ff eq2_11268e0.ff | ||
- | addfields 1 EQ2.ff 1.2696e-05 e0.ff eq2_12696e0.ff | ||
- | ... | ||
- | |||
- | Integrate these 16 fields for a few hundred time units and save. | ||
- | |||
- | couette -T0 0 -T1 400 -o data-11268 eq2_11268e0.ff | ||
- | couette -T0 0 -T1 400 -o data-12696 eq2_11268e0.ff | ||
- | ... | ||
- | |||
- | 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 | ||
- | |||
- | The ${...} stuff is bash string manipulation syntax to extract the numerical part of the input file names. | ||
- | This produces data directories data-12696, etc. I made symbolic links to these directories with simpler | ||
- | labels to make some future processing simpler. | ||
- | |||
- | ln -s data-11268 data-a | ||
- | ln -s data-12696 data-b | ||
- | |||
- | ===== Compute the Poincare crossings ===== | ||
- | |||
- | [[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 | ||
- | |||
- | where e(θ) = e0 cos θ + e1 sin θ, and where u(t) is always mapped into a canonical 1st quadrant defined by | ||
- | (u(t), etx) ≥ 0 and (u(t), etz) ≥ 0. Here etx and etz are τx and τz antisymmetric basis vectors. In my calculations | ||
- | I chose these to be the τx and τz antisymmetric basis vectors of the EQ2 translation basis described in our 2008 | ||
- | JFM paper. | ||
- | |||
- | To compile eq2poincare.cpp, use this [[gtspring2009:howto:poincare:Makefile]]. Edit the Makefile to so that CHANNELDIR | ||
- | is set to you channelflow installation | ||
- | |||
- | CHANNELDIR = /home/gibson/channelflow-1.3.5 | ||
- | |||
- | then run "make eq2poincare.x". Then execute | ||
- | |||
- | eq2poincare.x -d data-a -o section-pi4 --theta 0.7854 -tag a -T0 0 -T1 400 etx etz e0 e1 EQ2.ff | ||
- | |||
- | That will produce files uM0a.ff, uP0a.ff, uM1a.ff, uP1a.ff in directory section-pi4/. The P/M indicates | ||
- | whether (u(t) - EQ2, e(θ)) is increasing (P) or decreasing (M) at the crossing. The following integer | ||
- | indicates the number of the crossing (incremented once per M,P pair), and the 'a' is a label indicating | ||
- | which trajectory the crossing came from. | ||
- | |||
- | The point of this crazy labeling scheme is that it gives the right lexical ordering to the filenames of | ||
- | multiple crossings of multiple trajectories. For example, after computing the crossings of all trajectories | ||
- | using the bash-for loop | ||
- | |||
- | 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 | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | | ||