faceSetOption Class Reference

Intermediate abstract class for handling face-set options for the derived faOptions. More...

Inheritance diagram for faceSetOption:
[legend]
Collaboration diagram for faceSetOption:
[legend]

Public Types

enum  selectionModeType { smAll, smVolFaceZone }
 Enumeration for selection mode types. More...
 

Public Member Functions

 TypeName ("faceSetOption")
 Runtime type information. More...
 
 faceSetOption (const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch)
 Construct from components. More...
 
virtual ~faceSetOption ()=default
 Destructor. More...
 
scalar timeStart () const
 Return const access to the time start. More...
 
scalar duration () const
 Return const access to the duration. More...
 
bool inTimeLimits (const scalar time) const
 Return true if within time limits. More...
 
const selectionModeTypeselectionMode () const
 Return const access to the face selection mode. More...
 
const wordfaceSetName () const
 
scalar A () const
 Return const access to the total face area. More...
 
const labelListfaces () const
 Return const access to the face set. More...
 
scalar & timeStart ()
 Return access to the time start. More...
 
scalar & duration ()
 Return access to the duration. More...
 
virtual bool isActive ()
 Is the source active? More...
 
virtual bool read (const dictionary &dict)
 Read source dictionary. More...
 
- Public Member Functions inherited from option
 TypeName ("option")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch),(name, modelType, dict, patch))
 
 option (const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch)
 Construct from components. More...
 
autoPtr< optionclone () const
 Return clone. More...
 
virtual ~option ()=default
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const fvPatchpatch () const
 Return const access to fvPatch. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
bool active () const
 Return const access to the source active flag. More...
 
void setApplied (const label fieldi)
 Set the applied flag to true for field index fieldi. More...
 
const faMeshregionMesh () const
 Return the region mesh database. More...
 
const volSurfaceMappingvsm () const
 Return volSurfaceMapping. More...
 
const wordregionName () const
 Region name. More...
 
Switchactive ()
 Return access to the source active flag. More...
 
virtual label applyToField (const word &fieldName) const
 Return index of field name if found in fieldNames list. More...
 
virtual void checkApplied () const
 Check that the source has been applied. More...
 
virtual void addSup (const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, faMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, faMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, faMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, faMatrix< tensor > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< vector > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< tensor > &eqn, const label fieldi)
 
virtual void constrain (faMatrix< scalar > &eqn, const label fieldi)
 
virtual void constrain (faMatrix< vector > &eqn, const label fieldi)
 
virtual void constrain (faMatrix< sphericalTensor > &eqn, const label fieldi)
 
virtual void constrain (faMatrix< symmTensor > &eqn, const label fieldi)
 
virtual void constrain (faMatrix< tensor > &eqn, const label fieldi)
 
virtual void correct (areaScalarField &field)
 
virtual void correct (areaVectorField &field)
 
virtual void correct (areaSphericalTensorField &field)
 
virtual void correct (areaSymmTensorField &field)
 
virtual void correct (areaTensorField &field)
 
virtual void writeHeader (Ostream &) const
 Write the source header information. More...
 
virtual void writeFooter (Ostream &) const
 Write the source footer information. More...
 
virtual void writeData (Ostream &) const
 Write the source properties. More...
 

Static Public Attributes

static const Enum< selectionModeTypeselectionModeTypeNames_
 List of selection mode type names. More...
 

Protected Member Functions

void setSelection (const dictionary &dict)
 Set the face selection. More...
 
void setFaceSet ()
 Set the face set based on the user input selection mode. More...
 
void setArea ()
 Recalculate the area. More...
 

Protected Attributes

scalar timeStart_
 Time start. More...
 
scalar duration_
 Duration. More...
 
selectionModeType selectionMode_
 Face selection mode. More...
 
word faceSetName_
 Name of zone for "faceZone" selectionMode. More...
 
labelList faces_
 Set of faces to apply source to. More...
 
scalar A_
 Sum of face area. More...
 
- Protected Attributes inherited from option
const word name_
 Source name. More...
 
const word modelType_
 Model type. More...
 
const fvMeshmesh_
 Reference to the mesh database. More...
 
const fvPatchpatch_
 Reference to the patch. More...
 
dictionary dict_
 Top level source dictionary. More...
 
dictionary coeffs_
 Dictionary containing source coefficients. More...
 
Switch active_
 Source active flag. More...
 
wordList fieldNames_
 Field names to apply source to - populated by derived models. More...
 
List< boolapplied_
 Applied flag list - corresponds to each fieldNames_ entry. More...
 
word regionName_
 Region name. More...
 
autoPtr< faMeshregionMeshPtr_
 Pointer to the region mesh database. More...
 
autoPtr< volSurfaceMappingvsmPtr_
 Volume-to surface mapping. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvPatch &patch)
 Return a reference to the selected faOption model. More...
 

Detailed Description

Intermediate abstract class for handling face-set options for the derived faOptions.

Usage
Minimal example by using constant/faOptions:
<userDefinedName1>
{
    // Mandatory/Optional (inherited) entries
    ...

    // Mandatory entries (unmodifiable)
    selectionMode     all;

    // Optional entries (runtime modifiable)
    timeStart         1.0;

    // Conditional mandatory entries (runtime modifiable)

        // when timeStart entry is present
        duration          1.4;

        // when selectionMode=volFaceZone
        faceZone          <faceZoneName>;
}

where the entries mean:

Property Description Type Reqd Dflt
selectionMode Mode of face selection - see below word yes -
timeStart Start time of faOption scalar no -1
duration Duration of faOption execution starting from timeStart scalar cndtnl 0
faceZone Name of operand faceZone word cndtnl -

Options for the selectionMode entry:

      all       | Use all faces in the computational domain
      faceZone  | Use a given faceZone

The inherited entries are elaborated in:

Note
  • Source/sink options are to be added to the right-hand side of equations.
Source files

Definition at line 134 of file faceSetOption.H.

Member Enumeration Documentation

◆ selectionModeType

Enumeration for selection mode types.

Enumerator
smAll 
smVolFaceZone 

Definition at line 143 of file faceSetOption.H.

Constructor & Destructor Documentation

◆ faceSetOption()

faceSetOption ( const word name,
const word modelType,
const dictionary dict,
const fvPatch patch 
)

Construct from components.

Definition at line 177 of file faceSetOption.C.

References Foam::decrIndent(), dict, Foam::incrIndent(), Foam::Info, and Foam::read().

Here is the call graph for this function:

◆ ~faceSetOption()

virtual ~faceSetOption ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setSelection()

void setSelection ( const dictionary dict)
protected

Set the face selection.

Definition at line 55 of file faceSetOption.C.

References dict, Foam::exit(), faceSetOption::faceSetName_, Foam::FatalError, FatalErrorInFunction, faceSetOption::selectionMode_, faceSetOption::selectionModeTypeNames_, faceSetOption::smAll, and faceSetOption::smVolFaceZone.

Here is the call graph for this function:

◆ setFaceSet()

void setFaceSet ( )
protected

Set the face set based on the user input selection mode.

Definition at line 108 of file faceSetOption.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::identity(), Foam::indent(), Foam::Info, n, and zoneID.

Here is the call graph for this function:

◆ setArea()

void setArea ( )
protected

Recalculate the area.

Definition at line 81 of file faceSetOption.C.

References IOstream::defaultPrecision(), Foam::endl(), Foam::indent(), Foam::Info, Foam::reduce(), Foam::returnReduce(), and Time::timeName().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "faceSetOption"  )

Runtime type information.

◆ timeStart() [1/2]

Foam::scalar timeStart ( ) const
inline

Return const access to the time start.

Definition at line 30 of file faceSetOptionI.H.

References faceSetOption::timeStart_.

◆ duration() [1/2]

Foam::scalar duration ( ) const
inline

Return const access to the duration.

Definition at line 36 of file faceSetOptionI.H.

◆ inTimeLimits()

bool inTimeLimits ( const scalar  time) const
inline

Return true if within time limits.

Definition at line 42 of file faceSetOptionI.H.

◆ selectionMode()

const Foam::fa::faceSetOption::selectionModeType & selectionMode ( ) const
inline

Return const access to the face selection mode.

Definition at line 57 of file faceSetOptionI.H.

◆ faceSetName()

const Foam::word & faceSetName ( ) const
inline

Return const access to the name of face set for "faceZone" selectionMode

Definition at line 63 of file faceSetOptionI.H.

◆ A()

Foam::scalar A ( ) const
inline

Return const access to the total face area.

Definition at line 69 of file faceSetOptionI.H.

◆ faces()

const Foam::labelList & faces ( ) const
inline

Return const access to the face set.

Definition at line 75 of file faceSetOptionI.H.

◆ timeStart() [2/2]

Foam::scalar & timeStart ( )
inline

Return access to the time start.

Definition at line 81 of file faceSetOptionI.H.

◆ duration() [2/2]

Foam::scalar & duration ( )
inline

Return access to the duration.

Definition at line 87 of file faceSetOptionI.H.

◆ isActive()

bool isActive ( )
virtual

Is the source active?

Reimplemented from option.

Definition at line 205 of file faceSetOption.C.

References option::isActive().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Read source dictionary.

Reimplemented from option.

Reimplemented in externalHeatFluxSource, jouleHeatingSource, contactHeatFluxSource, and externalFileSource.

Definition at line 230 of file faceSetOption.C.

References dict, and option::read().

Here is the call graph for this function:

Member Data Documentation

◆ selectionModeTypeNames_

const Foam::Enum< Foam::fa::faceSetOption::selectionModeType > selectionModeTypeNames_
static

List of selection mode type names.

Definition at line 150 of file faceSetOption.H.

Referenced by faceSetOption::setSelection().

◆ timeStart_

scalar timeStart_
protected

Time start.

Definition at line 158 of file faceSetOption.H.

Referenced by faceSetOption::timeStart().

◆ duration_

scalar duration_
protected

Duration.

Definition at line 161 of file faceSetOption.H.

◆ selectionMode_

selectionModeType selectionMode_
protected

Face selection mode.

Definition at line 164 of file faceSetOption.H.

Referenced by faceSetOption::setSelection().

◆ faceSetName_

word faceSetName_
protected

Name of zone for "faceZone" selectionMode.

Definition at line 167 of file faceSetOption.H.

Referenced by faceSetOption::setSelection().

◆ faces_

labelList faces_
protected

Set of faces to apply source to.

Definition at line 170 of file faceSetOption.H.

◆ A_

scalar A_
protected

Sum of face area.

Definition at line 173 of file faceSetOption.H.


The documentation for this class was generated from the following files: