User Tools

Site Tools


Utility options

The channelflow utilities are stand-alone command-line programs that are run from the Unix shell. You can get brief built-in help information on each utility by running it with a -h or –help option. For example, running “couette –help” produces

gibson@akbar$ couette --help
couette :
      integrate an initial condition and save velocity fields to disk.
options :
  -T0       --T0           <real>   default == 0       start time
  -T1       --T1           <real>   default == 100     end time
  -vdt      --variabledt                               adjust dt for CFL
  -dt       --dt           <real>   default == 0.03125 timestep
  -dtmin    --dtmin        <real>   default == 0.001   minimum time step
  -dtmax    --dtmax        <real>   default == 0.05    maximum time step
  -dT       --dT           <real>   default == 1       save interval
  -CFLmin   --CFLmin       <real>   default == 0.4     minimum CFL number
  -CFLmax   --CFLmax       <real>   default == 0.6     maximum CFL number
  -ts       --timestepping <string> default == sbdf3   timestepping algorithm
   -p        --pressure                                print pressure grad
  <flowfield>      (trailing arg 1)                    initial condition

The built-in help gives a brief description of each utility's purpose

and a list of its command-line options and arguments. Channelflow utilities are invoked at the command line with syntax like

 utility -opt1 value -opt2 value -flag1 arg3 arg2 arg1

or concretely

 couette -T0 0 -T1 -vdt -dt 0.02 -ts sbdf4 u0.ff

“Options” (e.g. -opt1 value) are used to reset default values of parameters. For options, the first two columns in the built-in help give the short and long form of the option (e.g. -ts and –timestepping), the third column indicates the type of parameter expected (e.g. real, int, bool, string), and the fourth gives the the default value. For example, couette -dt 0.02 -ts cnab2 sets the time stepping method to 2nd order Crank-Nicolson Adams-Bashforth with dt=0.02.

“Flags” simply turn on boolean options that would otherwise be set to false. For example, calling couette -vdt turns on variable-dt timestepping, which adjusts dt at fixed intervals to keep the CFL number within bounds. For flags the third and fourth columns of built-in help are left blank.

“Arguments” always come after all options and flags. Arguments usually specify the filenames of binary velocity fields that the utility will load and operate on. Most channelflow programs have one required argument (e.g. couette u0.ff) some two (e.g. L2Dist u0.ff u2.ff). Others take a variable number of arguments (e.g. makebasis u0 u1 u). Unfortunately it's difficult to document variable-number arguments properly in the four-column option system, so variable-number arguments are usually documented with a “usage:” line right after the description of the utility's purpose.

So, as you read work through the Example Calculations, you can run the suggested command with a -h or –help option to clarify what the options are doing and what other options are possible.

docs/utils/options.txt · Last modified: 2010/02/02 07:55 (external edit)