Loading...
Searching...
No Matches
limitHeight Class Reference

Limits the film height to a specified max value. More...

#include <limitHeight.H>

Inheritance diagram for limitHeight:
Collaboration diagram for limitHeight:

Public Member Functions

 TypeName ("limitHeight")
 Runtime type information.
 limitHeight (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
 Construct from components.
 limitHeight (const limitHeight &)=delete
 No copy construct.
void operator= (const limitHeight &)=delete
 No copy assignment.
virtual ~limitHeight ()=default
 Destructor.
virtual bool read (const dictionary &dict)
 Read dictionary.
virtual void correct (areaScalarField &h)
 Correct the height field.
Public Member Functions inherited from faceSetOption
 TypeName ("faceSetOption")
 Runtime type information.
 faceSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
 Construct from components.
virtual ~faceSetOption ()=default
 Destructor.
scalar timeStart () const noexcept
 Return const access to the time start.
scalar duration () const noexcept
 Return const access to the duration.
bool inTimeLimits (const scalar timeValue) const
 Return true if within time limits.
bool useSubMesh () const noexcept
 True if sub-selection should be used.
selectionModeType selectionMode () const noexcept
 Return the face selection mode.
const wordResselectionNames () const noexcept
 Return const access to the selection names (set, zone or patch selection).
const wordRezoneName () const
 Return const access to the first set/zone/patch name.
scalar A () const noexcept
 Return const access to the total face area.
const labelListfaces () const noexcept
 Return const access to the local finite-area face selection.
scalar timeStart (scalar val) noexcept
 Adjust the time start, return the old value.
scalar duration (scalar val) noexcept
 Adjust the duration, return the old value.
virtual bool isActive ()
 Is the source active?
Public Member Functions inherited from option
 TypeName ("option")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &areaName),(name, modelType, dict, mesh, areaName))
 option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
 Construct from components.
autoPtr< optionclone () const
 Return clone.
virtual ~option ()=default
 Destructor.
const wordname () const noexcept
 The source name.
const fvMeshmesh () const noexcept
 Return const access to the volume mesh.
const dictionarycoeffs () const noexcept
 Return dictionary.
bool active () const noexcept
 True if source is active.
void setApplied (const label fieldi)
 Set the applied flag to true for field index fieldi.
const wordareaName () const noexcept
 The finite-area mesh name.
const wordregionName () const noexcept
 The model region name.
const faMeshregionMesh () const
 Return the region mesh database (demand-driven).
const volSurfaceMappingvsm () const
 Return volSurfaceMapping (demand-driven).
bool active (bool on) noexcept
 Change source active flag, return previous value.
const wordsuffixHint () const noexcept
 The suffix hint when generating variable names.
word suffixed (const char *base) const
 Return the concatenation of base and the suffix hint.
word suffixed (const std::string &base) const
 Return the concatenation of base and the suffix hint.
virtual label applyToField (const word &fieldName) const
 Return index of field name if found in fieldNames list.
virtual void checkApplied () const
 Check that the source has been applied.
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 (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.
virtual void writeFooter (Ostream &) const
 Write the source footer information.
virtual void writeData (Ostream &) const
 Write the source properties.

Protected Attributes

word hName_
 Name of operand height field.
scalar max_
 Maximum height [m].
Protected Attributes inherited from faceSetOption
scalar timeStart_
 Time start.
scalar duration_
 Duration.
selectionModeType selectionMode_
 Face selection mode.
wordRes selectionNames_
 Face selection names (for set, zone or patch selections).
labelList faces_
 Set of faces to apply source to.
scalar A_
 Sum of face area.
Protected Attributes inherited from option
const word name_
 Source name.
const word modelType_
 Model type.
const fvMeshmesh_
 Reference to the mesh database.
dictionary dict_
 Top level source dictionary.
dictionary coeffs_
 Dictionary containing source coefficients.
wordList fieldNames_
 Field names to apply source to - populated by derived models.
List< bool > applied_
 Applied flag list - corresponds to each fieldNames_ entry.
word areaName_
 The finite-area mesh name.
word regionName_
 The model region name (finite-area).
word suffixHint_
 Suffix hint for variable names (default: "").

Additional Inherited Members

Public Types inherited from faceSetOption
enum  selectionModeType { smAll , smFaceSet , smFaceZone , smPatch }
 Enumeration for selection mode types. More...
Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh, const word &defaultAreaName=word())
 Return a reference to the selected faOption model.
static bool sameRegionNames (const word &name1, const word &name2)
 Compare the region names.
Public Attributes inherited from option
bool log
 Switch write log to Info.
Static Public Attributes inherited from faceSetOption
static const Enum< selectionModeTypeselectionModeTypeNames_
 List of selection mode type names.
Protected Member Functions inherited from faceSetOption
void setSelection (const dictionary &dict)
 Set face selection name from dictionary input.
void setFaceSelection ()
 Set face selection based on user input selection mode.
void setArea ()
 Recalculate the area.
template<class Type>
void subsetFilter (List< Type > &field) const
 Zero all non-selected locations within field.
Protected Member Functions inherited from option
void resetApplied ()
 Resize/reset applied flag list for all fieldNames_ entries.

Detailed Description

Limits the film height to a specified max value.

The limitHeight applies an explicit correction to limit the max film height to the user-specified value. This will ensure that the max value is adhered to, but may become unstable if the limiting instigates an oscillatory/destabilising effect into neighbouring faces that then spreads.

Usage
Minimal example by using constant/faOptions:
<faOption>
{
    // Mandatory entries
    type            limitHeight;
    active          yes;
    selectionMode   all;
    max             <scalar>;

    // Optional entries
    h               <word>;

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: limitHeight word yes -
max Maximum height limit [m] scalar yes -
h Name of operand height field word no h

The inherited entries are elaborated in:

Source files

Definition at line 107 of file limitHeight.H.

Constructor & Destructor Documentation

◆ limitHeight() [1/2]

limitHeight ( const word & name,
const word & modelType,
const dictionary & dict,
const fvMesh & mesh,
const word & defaultAreaName = word() )

Construct from components.

Parameters
defaultAreaNameThe expected finite-area mesh name

Definition at line 44 of file limitHeight.C.

References dict, faceSetOption::faceSetOption(), hName_, max_, option::mesh(), option::name(), and read().

Referenced by limitHeight(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ limitHeight() [2/2]

limitHeight ( const limitHeight & )
delete

No copy construct.

References limitHeight().

Here is the call graph for this function:

◆ ~limitHeight()

virtual ~limitHeight ( )
virtualdefault

Destructor.

References dict, and h.

Member Function Documentation

◆ TypeName()

TypeName ( "limitHeight" )

Runtime type information.

References dict, option::mesh(), and option::name().

Here is the call graph for this function:

◆ operator=()

void operator= ( const limitHeight & )
delete

No copy assignment.

References limitHeight().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary & dict)
virtual

Read dictionary.

Reimplemented from faceSetOption.

Definition at line 63 of file limitHeight.C.

References option::applied_, option::coeffs_, dict, option::fieldNames_, hName_, max_, and faceSetOption::read().

Referenced by limitHeight().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correct()

void correct ( areaScalarField & h)
virtual

Correct the height field.

Reimplemented from option.

Definition at line 81 of file limitHeight.C.

References e, Foam::endl(), faceSetOption::faces_, h, Foam::Info, Foam::max(), max_, option::name_, Foam::reduce(), Foam::returnReduce(), Foam::type(), and faceSetOption::useSubMesh().

Here is the call graph for this function:

Member Data Documentation

◆ hName_

word hName_
protected

Name of operand height field.

Definition at line 118 of file limitHeight.H.

Referenced by limitHeight(), and read().

◆ max_

scalar max_
protected

Maximum height [m].

Definition at line 123 of file limitHeight.H.

Referenced by correct(), limitHeight(), and read().


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