Contrib/multiSolver

From OpenFOAMWiki
< Contrib
Revision as of 20:24, 30 November 2011 by Marupio (Talk | contribs)

multiSolver allows you to run more than one solver on the same dataset in sequence.
Valid versions: OF version 15.png OF Version 15dev.png OF version 16.png OF Version 16ext.png OF Version 170.png OF Version 171.png OF Version 17x.png OF Version 200.png OF Version 201.png OF Version 20x.png
Subpage contents (alphabetical)
> glossary
> installation
> multiControlDict
> parallel
> post processing
> programming
> using multiSolver

Major upgrade - multiSolver now fully supports parallel runs.

1 What is it?

multiSolver is a master control class that allows you to create a superSolver composed of multiple solvers within a superLoop. All solvers operate on the same dataset in sequence. For example:

  1. icoFoam - runs to completion;
  2. data is handed over to scalarTransportFoam;
  3. scalarTransportFoam - runs to completion;
  4. data is handed back to icoFoam, and the superLoop repeats.

2 Features

  • Multiple solvers - multiple solvers can be used in sequence on the same data set.
  • Changing boundary conditions - the boundary conditions can change at distinct time intervals.
  • Independent time - each solver can operate with an independent time value, although universal time can still be used.
  • Single case directory - the settings for all solvers are stored within a single case directory using a "multiDict" dictionary format.
  • Easy data management - All the data output is sorted into subdirectories corresponding to the solver, and can be loaded / unloaded using the post processing utility.
  • Store fields - To save memory and hard drive space, not all solvers have to use all the fields. Rather, they can "store" any unneeded fields, leaving more memory and disk space. The next solver retrieves all stored fields, and no data is lost.

3 Why would you need this?

A fundamental assumption in the design of OpenFOAM is the existence of a universal time. Therefore the time object is the top-level objectRegistry (i.e. runTime hosts the database for your simulation). This design works for nearly all simulations imaginable, except for those that require more than one time frame. For these situations, multiSolver will come in handy.

4 When would you need this?

The capabilities of multiSolver are useful for:

  • multi-step processes to be modelled within a single application, e.g. fluid injection, followed by settling;
  • modelling of a flow problem characterized by two different timescales, e.g. stirring with biochemical reactions; and
  • changing boundary conditions mid-run.

Basically, if you find yourself:

  • frequently copying data between case directories;
  • frequently stopping and changing the simulation details, then restarting; or
  • using runTime++ more than once in your solver,

then multiSolver might help you.

5 Learn more

6 Mesh motion not fully supported yet

NOTE: At this time, multiSolver allows for mesh motion, provided the mesh returns to its original position between solvers. This functionality is planned for the future. I plan to do this in the late summer or fall (2011).

7 Update info

  • 2010-07-23: Initial import
  • 2011-03-29: Minor bug fix for 1.6-ext and 1.7.1
  • 2011-04-05: Major upgrade - now works for parallel simulations
  • 2011-06-03: Minor bug fix - decompose nolonger omits the initial directories
  • 2011-07-01: Overhauled the documentation on the wiki page (no change to the code)