Difference between revisions of "Contrib multiSolver/Post processing"

From OpenFOAMWiki
(Created page with 'multiPost -command 'options' [-global] [-local] [-doNotPurge] [-doNotSet] == -command == Choose one of: * '''list''' - list data available * '''load''' - copy specified data to …')
 
Line 1: Line 1:
multiPost -command 'options' [-global] [-local] [-doNotPurge] [-doNotSet]
+
== Syntax ==
 +
<tt>multiPost -command 'options' [-global] [-local] [-doNotPurge] [-doNotSet]</tt>
  
 
== -command ==
 
== -command ==
Line 9: Line 10:
  
 
=== list ===
 
=== list ===
Takes no options.  Giving options will provide an error.
+
Takes no options.  Giving options will produce an error.
  
 
  multiPost -list
 
  multiPost -list
Line 37: Line 38:
 
Delete all the <tt>case/time</tt> directories.
 
Delete all the <tt>case/time</tt> directories.
  
  multiPost -purge 5:9
+
  multiPost -purge '5:9'
 
Delete superloops 5 through 9 in all solverDomains.
 
Delete superloops 5 through 9 in all solverDomains.
  
Line 78: Line 79:
 
  multiPost -load all
 
  multiPost -load all
 
  multiPost -purge root
 
  multiPost -purge root
 +
 +
== Examples ==
 +
Show all available data:
 +
 +
:<tt>multiPost -list</tt>
 +
 +
Load all available data:
 +
 +
:<tt>multiPost -load all</tt>
 +
 +
Load all data from solverDomain <tt>icoFoam</tt>:
 +
 +
:<tt>multiPost -load icoFoam</tt>
 +
 +
Load all data from superLoops 8 and 9 from all solverDomains:
 +
 +
:<tt>multiPost -load '8 9'</tt>
 +
 +
Load all data from superLoops 4, 6, 7, 8, and 9 from solverDomain <tt>scalarTransportFoam</tt>, but do not delete any existing <tt>case/time</tt> directories.
 +
 +
:<tt>multiPost -load 'scalarTransportFoam 4 6:9' -doNotPurge
 +
 +
Load all data from superLoops 4, 5, 7, 8 and 9 from solverDomains <tt>icoFoam</tt> and <tt>scalarTransportFoam</tt>, but force the directory names to globalTime:
 +
 +
:<tt>multiPost -load 'icoFoam scalarTransportFoam 4 5 7:9' -global
 +
 +
Delete all <tt>case/time</tt> directories:
 +
 +
:<tt>multiPost -purge root</tt>
 +
 +
Delete all <tt>time</tt> directories in <tt>case/multiSolver/allSolverDomains/allSuperLoops</tt>, but do not delete any <tt>initial</tt> directories:
 +
 +
:<tt>multiPost -purge all</tt>
 +
 +
Delete superLoops 5, 6, 7, 8, and 9 from all solverDomains:
 +
 +
:<tt>multiPost -purge '5:9'</tt>
 +
 +
This instruction says to delete the <tt>initial</tt> directory from solverDomain <tt>icoFoam</tt>, but the <tt>initial</tt> directory is never deleted, therefore nothing is done:
 +
 +
:<tt>multiPost -purge 'icoFoam -1'</tt>
 +
 +
Set the case directory to <tt>scalarTransportFoam</tt>'s settings:
 +
 +
:<tt>multiPost -set scalarTransportFoam</tt>

Revision as of 01:46, 5 July 2010

1 Syntax

multiPost -command 'options' [-global] [-local] [-doNotPurge] [-doNotSet]

2 -command

Choose one of:

  • list - list data available
  • load - copy specified data to case/time
  • purge - delete specified data
  • set - change case directory to match supplied solver domain

2.1 list

Takes no options. Giving options will produce an error.

multiPost -list

2.2 load

Loads the data specified in options. Additional options:

  • -global, -local - By default, load will copy by localTime, unless the times overlap, in which case it loads by globalTime. These options force it to load by the specified time.
  • -doNotPurge - By default, load will purge the case/time directories before copying the new data in. This option disables this behaviour.
  • -doNotSet - By default, if all the specified load data is from a single solverDomain, load will automatically set the case directory to this solverDomain. This option disables this behaviour.
multiPost -load all

Load all data.

multiPost -load icoFoam -global

Load all data from icoFoam solverDomain, using globalTime.

multiPost -load scalarTransportFoam 1 2 5:9 -doNotPurge

Load all data from scalarTransportFoam, superLoops 1, 2, and 5 through 9, but do not delete the case/time directories first.

2.3 purge

Purges the data specified in options.

multiPost -purge root

Delete all the case/time directories.

multiPost -purge '5:9'

Delete superloops 5 through 9 in all solverDomains.

multiPost -purge all

Delete all data in all solverDomains (except for initial directories).

2.4 set

Sets the case directory to a given solverDomain. That is, any dictionary that changes content is swapped to the correct solverDomain; and a controlDict is written. The controlDict doesn't have all the data for the given solverDomain, but it (importantly) points to the first case/time directory as its startFrom. paraFoam uses this to initialize.

Set can only take a single solverDomain in options. Any superLoop specifications, or additional solverDomain names will result in error.

3 'options'

The options to the command. If the options have whitespace characters (i.e. are more than 1 word), they must be enclosed in apostrophes. Options come in two parts: solverDomains, followed by superLoops. Each can have any number of entries, including zero, but options cannot be empty unless using -list.

3.1 solverDomainNames

A simple word list, space delimited. List any solverDomains you want to load data from. e.g.:

scalarTransportFoam icoFoam customSolver

or

icoFoam

Omitting solverDomainNames indicates that *all* solverDomains will be used.

3.2 superLoop numbers

A space delimited number list in any order. Can include ranges using a : character. A value of -1 indicates the initial directory. e.g.:

3 5 6 9:12

or

-1 5

Omitting superLoop numbers entirely indicates that *all* superLoops will be used.

3.3 Special words

There are two special words reserved for some of the commands:

  • all - indicates all solverDomains and all superLoops. Useable by -load and -purge.
  • root - indicates all case/time directories. Useable by -purge only.

e.g.:

multiPost -load all
multiPost -purge root

4 Examples

Show all available data:

multiPost -list

Load all available data:

multiPost -load all

Load all data from solverDomain icoFoam:

multiPost -load icoFoam

Load all data from superLoops 8 and 9 from all solverDomains:

multiPost -load '8 9'

Load all data from superLoops 4, 6, 7, 8, and 9 from solverDomain scalarTransportFoam, but do not delete any existing case/time directories.

multiPost -load 'scalarTransportFoam 4 6:9' -doNotPurge

Load all data from superLoops 4, 5, 7, 8 and 9 from solverDomains <tt>icoFoam and scalarTransportFoam, but force the directory names to globalTime:

multiPost -load 'icoFoam scalarTransportFoam 4 5 7:9' -global

Delete all <tt>case/time directories:

multiPost -purge root

Delete all time directories in case/multiSolver/allSolverDomains/allSuperLoops, but do not delete any initial directories:

multiPost -purge all

Delete superLoops 5, 6, 7, 8, and 9 from all solverDomains:

multiPost -purge '5:9'

This instruction says to delete the initial directory from solverDomain icoFoam, but the initial directory is never deleted, therefore nothing is done:

multiPost -purge 'icoFoam -1'

Set the case directory to scalarTransportFoam's settings:

multiPost -set scalarTransportFoam