selectionMode of fvOptions in OpenFOAM

When specifying a source term using fvOptions in OpenFOAM, we can select the selectionMode (how to set the source region) from the following four options:

  • points
  • cellSet
  • cellZone
  • all

These options are defined in the cellSetOption class along with the other common parameters among the fvOptions such as timeStart and duration. Let’s check out the meaning of each option along with its source code.

selectionMode 1: points

In this case, we specify some points as shown in the following example. The source region consists of the individual cells that contain the specified points.

  • Example of description

  • Source code

selectionMode 2: cellSet

In this case, we preliminarily create a cellSet corresponding to the source region using OpenFOAM’s utilities such as setSet and specify the created cellSet name.

  • Example of description

  • Source code

selectionMode 3: cellZone

In this case, we preliminarily create a cellZone corresponding to the source region using OpenFOAM’s utilities such as setSet and specify the created cellZone name.

  • Example of description

  • Source code

selectionMode 4: all

The source region is the entire computational domain.

  • Example of description

  • Source code

Author: fumiya

CFD engineer in Japan

2 thoughts on “selectionMode of fvOptions in OpenFOAM”

  1. Can you please guide where to put this fvoption file, and toposet file in the case directory? Because I am using toposet to make cellset.

    1. fvOptions typically goes in the folder for the region you want to apply the constraints. topoSetDict goes in the System.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.