Append the latest posts at the bottom of this page
Having problems getting cygwin to work - John G, remember that long path that needed to be specified to get commands to work? I can't figure out what that was supposed to be, and pressing the up arrow didn't bring it back when I first started cygwin. I've spent almost an hour not being able to get commands to work - I'm going to keep trying, but if anyone has any idea what I need to do please let me know.
I'm also not sure I'm adding to this blog properly - am I supposed to be using the “Edit” function, or is there a better way? — John Hyatt 2009-01-31 05:05
Yes, click on [Edit this page], then [Preview]; when satisfied, enter the edit summary, and then [Save] — Predrag Cvitanovic 2009-02-01 05:08
You might need to run
export PATH=$PATH:~/channelflow-1.3.3/bin in your shell and perhaps
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/channelflow-1.3.3/lib as well. See INSTALL.
Please post the exact test of the commands you are trying to run and the error messages you get. That
will help me diagnose the trouble. John G 2009-02-03 9:49
When running through the tutorial, where do you download the LB.ff file and how do you access it once it's there? Thanks - John Hyatt 2009-02-03 15:18
I can't answer this exactly but I can provide some clues. The issue is to understand how the cygwin shell presents the Windows filesystem, that is, what is the cygwin unixy textual representation of the Windows filesystem, which (perhaps) you are more used to thinking of as a series of nested folders that you click through. At the cygwin prompt, run 'pwd' (print working directory). That will tell you where the cywin shell starts up within the Windows filesystem. The directory (folder) names between the slashes should be familiar to you. If you know where you downloaded the LB.ff in terms of Windows folders, try to extrapolate from the folder names to a unixy textual path, so that you can copy LB.ff to the cygwin working directory. Then in cygwin you would type something like
cp /Users/John_Hyatt/Desktop/LB.ff .
(in unix “.” stands for the current directory). I will try to find a good basic intro to unix shell usage on the web and provide a link. John Gibson 2009-02-05 9:43
OK, I'll give it a shot when I can, and let you know how it goes. -John Hyatt 2009-02-10 12:59
to John G (or whoever): can you help me get set up on the campus Linux machines sometime? Do they work the same as the Cygwin program on my laptop? Where are they? Etc. John Hyatt 2009-02-10 13:04
I can open an account for you on the CNS network - students of 5th floor Howey can show you how to use it. Perhaps best to talk about this on skype? — Predrag Cvitanovic 2009-02-10 23:12
You probably want an account on the PACE cluster. The user interface is much like Cygwin (typing into a Unix shell) but there are a few hoops to jump through to get it set up. More documentation coming … John Gibson 2009-02-11 9:50 EST
Append the latest posts at the bottom of this page
In complex analysis you can map different-geometry systems onto one another, so you can solve a problem with an easy geometry and then map the solution onto the same problem with more complex geometry. (A straight temperature gradient on a square heat conductor with opposite hot and cold edges is easy to solve for; if you solve it you can map the answer onto rectangles, semicircles, etc. as long as they have similar boundary conditions.) Is it possible to do something similar with the plane couette flow? Say, map one cell of it onto a cylinder with opposite velocity fields at the edge and at the center? Like fluid flowing through a pipe with a stream flowing through the middle in the opposite direction - intuitively it seems like it ought to behave the same as plane couette flow, since it has one b.c. for each direction of flow, and fluid in between.
1) Is something like that meaningful as far as “research” goes? 2) I'm completely ignorant as far as computer knowledge I would need for this.
PS: I don't know how much time I will have to work on this right away - I have been doing homework in this building until 9PM 7 days a week for the past few weeks and still haven't figured out how to use the Linux environment yet. I'm asking John Gibson to help me figure out how to use the Linux machines on campus next time he's here. -John Hyatt 2009-02-10 12:47
Way too ambitious, methinks - best to do something narrowly within the study group goals. Finding a new periodic orbit, plotting it in states space would be already great, for example. — Predrag Cvitanovic 2009-02-12 15:46
OK, I'll try to figure something out on Tuesday, then. -John Hyatt 2009-02-23 09:54
Steps of the nite fishin' project: — Predrag Cvitanovic 2009-03-20
findorbit, see whether it accepts it as an equilibrium
findorbitstill find it
I just finished running findorbit on the upper and lower branches. It takes about 2-3 minutes for the program to run with starting guesses at the equilibria. I don't know how to interpret the output, though - it gives a convergence.asc file, a findorbit.args file, and ubest.ff and unewt0.ff. I couldn't find documentation on what this means on the website, but I'm guessing that unewt0.ff is the first of many steps that would be done starting farther from the equilibrium, and ubest.ff is the final equilibrium? JohnG, could you confirm this and tell me what the easiest way to compare these with the actual solutions to make sure they are the same? 17:26
Update: Have been trying to figure this out for an hour now, with no success, so I'm giving up for the time being. I'd also like to know how to make small changes to the equilibrium .ff files, to get a feel for how long it can take the program to find an equilibrium it is “close to.” For now I'm going to try the command on a random field and see what happens.
Also, what is the command to rename a file or directory? 18:39
Update: findorbit just finished running on my first try at a random field, saying “GMRES failed to converge,” and quit. I'm going to try again for the same field, increasing the number of iterations (I think that's why it didn't work). 20:52
Update: input command “findorbit -eqb -Nn 50 random1.ff” seems to have still used the default 20 number of Newton steps, same as “findorbit -eqb random1.ff.” I was trying to get it to use 50 instead of 20 since the sequence does seem to be slowly converging, but this didn't seem to work. That's it for tonight. 23:51
-2009-03-21 John Hyatt
1. Searching for new solutions from random data will sometimes work and sometimes fail, and it's not always easy to determine when to stop trying. I generally give up if the residual L2Norm(G(x)) is not decreasing at least a few percent each Newton-hookstep iteration. The nth line of the file convergence.asc shows the residual of the nth Newton step. (from here on I'm using Newton as shorthand for Newton-hookstep).
2. Note that there are two distinct iterative algorithms in findorbit's Newton-GMRES-hookstep algorithm: Newton-hookstep iteration, which takes small steps x' = x + dx towards a better solution, and GMRES iteration, which is an iterative solution method to solve for the dx of the Newton equation DG dx = -G(x) (where G(x) = 0 is the equation to be solved). Each step in the Newton iteration requires computing a new dx, so there is a complete iterative GMRES solution nested inside each single Newton step. Please read over mathematics to learn the essentials of the algorithm.
3. I believe from your notes that it's the GMRES iteration that is failing to converge rather than the Newton iteration. There are two options. (a) You can increase the number of GMRES iterations with findorbit's -Ng or --Ngmres option. Try 60 instead of the default 40. (b) You can increase the integration time from the default 10.0 to 15.0 or 20.0, using the -T option. The convergence rate of GMRES iteration is governed by the eigenvalues of the linearized finite-time Navier-Stokes map Df^T(u). A larger integration time T will enhance the separation between the contracting and expanding eigenvalues (at the cost of making f^T more nonlinear and expensive to compute). I recommend (b).
4. The easiest way to compare the results of your search to previous solutions is with the fieldprops utility. Running fieldprops -e -n will print out some basic norms and energetic measures of the field, which you can then compare to the same measures of known solutions. You might have to download the known solutions from the database and compute the measures of those, since I don't have a table of them on the website anywhere. If you would like to create and post such a table, I'd appreciate it!
5. The Unix command to move or rename a file or directory is mv. Here's a good intro to basic Unix shell commands. It's written for tcsh, a 80s era Unix shell, instead of bash, a more modern shell which you are almost certainly using on a modern Linux box or Mac. But the basic commands are the same: ls, mv, cp, grep, find,.... Once you start getting into more complex shell usage (file redirection, job control, shell programming, …) you should refer to bash-specific documentation.
6. I agree with Predrag that complex-analysis style mapping of domains for Navier-Stokes is way too ambitious for this project. These maps are great for things like 2D Euler flow or the heat equation because the dynamics are governed by the Laplacian, which is preserved under conformal 2D maps, essentially because local orthogonality and area are preserved. However Navier-Stokes has additional terms that will not map nicely under the same maps. The pressure gradient and nonlinear term and the incompressibility constraint are going to be problematic. (I think this is right, but it's been a while since I did conformal mapping.) I don't know if anyone's had success with this kind of effort.
OK, I will give those things a shot this evening and see how they go. I will also look at the documentation stuff you put here sometime in the next few days. Thanks!
Once I'm done trying out all the options for findorbit I'm going to try to move things into Mathematica - or Matlab, if that doesn't work. (I'm already familiar with Mathematica, but have never made videos with data from another program.) I may need help with file conversion but I'll cross that bridge when I come to it.
Also, the conformal mapping thing was just a thought - now that I know how much trouble computer stuff is, I will hold off on that until later. — 2009-03-21 John Hyatt
After a couple unsuccessful attempts to put a thumbnail in front of my posts I have uploaded 2 too-big pics onto gtspring2009 and don't know how to get rid of them. -John Hyatt 2009-03-21 15:30
I've been running more findorbits today with the original, troublesome randomfield I made the other day, with no success so far. I'm trying it one more time with higher T integration and steps before I give it up and try another randomfield. I have 3 questions:
1) I'm sure there's an answer to this somewhere else (like that BASH command thing you posted here) but can't find it…how do I make a program list its own runtime when it completes or terminates? When I run these I leave them alone for an hour or so and come back later, but I'm curious just how long they take. 2) Is there a way to make a randomfield that is “far away” from another one? That is, if a particular randomfield doesn't work and I want to try one that is not near it, can I set that up? I know that “near” and “far” are not easily-defined concepts here, and I'm at some point I guess going to start making those time charts to get my initial guesses, but since right now I'm just trying to familiarize myself with the possible equilibria and how likely they are to show up, it'd be nice to know. 3) Is there a good way to port output tables from cygwin into a .txt format or something? I think this is another thing I should be able to look up but can't seem to find. I specifically want the tables of GMRES numbers that output from findorbit without having to manually type them in, without all the other junk. I'd like to be able to see how they converge (or don't) from multiple tries.
Answers to any of these questions (particularly #2) would be greatly appreciated!
-John Hyatt 2009-03-26 23:01
Update - After 2 successful Newton iterations (taking all night), GMRes for the 3rd iteration mysteriously failed. This is the first time that even one iteration for this field worked, though - but I will try a new random field today and during the wedding I'm going to this weekend.
-John Hyatt 2009-03-27 12:32
-John Hyatt 2009-03-30 10:13
1. The Unix “time” command will tell you how much CPU time a process consumes. Usage: “time findorbit ….”. For more run “man time” at the Unix prompt.
2. You can determine the distance between two fields with L2Dist. Are you starting your searches using output from randomfield? It would be better to use initial guesses randomly distributed within the invariant measure of the flow, by taking samples of turbulent simulations.
3. findorbit.cpp stores convergence data in the file convergence.asc. This is an ASCII file (same as .txt). Should be readable in Windows as well as cygwin. The first line in the file tells you what the columns are; for more on the meaning of those columns you can look in the source code and particularly the comments that explain the algorithm.
John Gibson 2009-04-01
1. Thanks, 2. Yes I am (at least this time) - Dr Cvitanovic suggested I do in order to get a feel for what can go wrong with findorbit, and that kind of thing. I was going to ask you about that more sophisticated stuff as soon as this one is done running…unfortunately, my computer blue-screened on me for completely un-Channelflow-related reasons and killed my findorbit run. But (and here I feel like I've learned something useful) I figured out that I can just start the run again from the most recent output from the findorbit command (unewtN.ff, N being the most recent run). I can also try now with a smaller GMRes - I upped it some because I was still having trouble with it not converging, but it took forever. Now maybe that it has run some I can try with smaller T? 3. OK, will look at this tomorrow.
John Hyatt 2009-04-03 2:50
1) I have an exam on Monday so I'll be pretty busy until then, but I'd like to start looking for equilibria now/soon. I think that means I need to talk to John G about how to find a good starting point, but maybe other people can help? I also need to get a PACE account, which I think Predrag told me he could help with.
2) When Channelflow gives output for the findorbit command it produces a bunch of .ff files from the original field (one for each Newton step). I wanted to make sure I understand this right: each of these is the previous field plus the adjustment from the Newton step, right? i.e. it isn't just a .ff file containing the adjustment. This means that if it hasn't converged by the time the program terminates, you can just take the latest output and use it as a new input to keep going, right? John Hyatt 2009-04-09 13:47
I am at your disposal: johnfgibson on skype, 617 441-3609 by phone. If you want to talk during the day and I'm not on skype, send me an email and I'll turn it on. Yes, the unewt3.ff file is the previous field plus the adjustment. It's the current best approximation to the solution. John Gibson 2009-04-09 15:21 EST