layerParameters Class Reference

Simple container to keep together layer specific information. More...

Public Types

enum  thicknessModelType {
  FIRST_AND_TOTAL , FIRST_AND_EXPANSION , FINAL_AND_TOTAL , FINAL_AND_EXPANSION ,
  TOTAL_AND_EXPANSION , FIRST_AND_RELATIVE_FINAL
}
 Enumeration defining the layer specification: More...
 

Public Member Functions

 layerParameters (const dictionary &dict, const polyBoundaryMesh &, const bool dryRun=false)
 Construct from dictionary. More...
 
const dictionarydict () const
 
const labelListnumLayers () const
 How many layers to add. More...
 
const boolListrelativeSizes () const
 Are size parameters relative to inner cell size or. More...
 
const List< thicknessModelType > & layerModels () const
 Specification of layer thickness. More...
 
const scalarFieldexpansionRatio () const
 
const scalarFieldfinalLayerThickness () const
 Wanted thickness of the layer furthest away. More...
 
const scalarFieldfirstLayerThickness () const
 Wanted thickness of the layer nearest to the wall. More...
 
const scalarFieldthickness () const
 Wanted overall thickness of all layers. More...
 
const scalarFieldminThickness () const
 Minimum overall thickness of cell layer. If for any reason layer. More...
 
label nLayerIter () const
 Number of overall layer addition iterations. More...
 
label nOuterIter () const
 Outer loop to add layer by layer. Can be set to >= max layers. More...
 
label nRelaxedIter () const
 Number of iterations after which relaxed motion rules. More...
 
scalar featureAngle () const
 
scalar mergePatchFacesAngle () const
 
scalar concaveAngle () const
 
label nGrow () const
 If points get not extruded do nGrow layers of connected faces. More...
 
scalar maxFaceThicknessRatio () const
 Stop layer growth on highly warped cells. More...
 
label nBufferCellsNoExtrude () const
 Create buffer region for new layer terminations. More...
 
bool additionalReporting () const
 Any additional reporting requested? More...
 
const wordmeshShrinker () const
 Type of mesh shrinker. More...
 

Static Public Member Functions

static scalar layerThickness (const thicknessModelType, const label nLayers, const scalar firstLayerThickness, const scalar finalLayerThickness, const scalar totalThickness, const scalar expansionRatio)
 Determine overall thickness. Uses two of the four parameters. More...
 
static scalar layerExpansionRatio (const thicknessModelType, const label nLayers, const scalar firstLayerThickness, const scalar finalLayerThickness, const scalar totalThickness, const scalar expansionRatio)
 Determine expansion ratio. Uses two of the four parameters. More...
 
static scalar firstLayerThickness (const thicknessModelType, const label nLayers, const scalar firstLayerThickness, const scalar finalLayerThickness, const scalar totalThickness, const scalar expansionRatio)
 Determine first layer (near-wall) thickness. Uses two of the. More...
 
static scalar finalLayerThicknessRatio (const label nLayers, const scalar expansionRatio)
 Determine ratio of final layer thickness to. More...
 
static scalar layerThickness (const label nLayers, const scalar layerThickness, const scalar expansionRatio, const label layerStart, const label layerSize)
 Determine overall thickness of a slice (usually 1 layer) More...
 

Detailed Description

Simple container to keep together layer specific information.

Source files

Definition at line 58 of file layerParameters.H.

Member Enumeration Documentation

◆ thicknessModelType

Enumeration defining the layer specification:

  • first and total thickness specified

first and expansion ratio specified

  • final and total thickness specified
  • final and expansion ratio specified
  • total thickness and expansion ratio specified
Enumerator
FIRST_AND_TOTAL 
FIRST_AND_EXPANSION 
FINAL_AND_TOTAL 
FINAL_AND_EXPANSION 
TOTAL_AND_EXPANSION 
FIRST_AND_RELATIVE_FINAL 

Definition at line 70 of file layerParameters.H.

Constructor & Destructor Documentation

◆ layerParameters()

Member Function Documentation

◆ dict()

const dictionary & dict ( ) const
inline

Definition at line 201 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers(), and layerParameters::layerParameters().

Here is the caller graph for this function:

◆ numLayers()

const labelList & numLayers ( ) const
inline

How many layers to add.

-1 : no specification. Assume 0 layers but allow sliding to make layers 0 : specified to have 0 layers. No sliding allowed. >0 : number of layers

Definition at line 214 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers(), snappyLayerDriver::addLayersSinglePass(), and snappyLayerDriver::doLayers().

Here is the caller graph for this function:

◆ relativeSizes()

const boolList & relativeSizes ( ) const
inline

Are size parameters relative to inner cell size or.

absolute distances.

Definition at line 221 of file layerParameters.H.

◆ layerModels()

const List< thicknessModelType > & layerModels ( ) const
inline

Specification of layer thickness.

Definition at line 227 of file layerParameters.H.

◆ expansionRatio()

const scalarField & expansionRatio ( ) const
inline

Definition at line 233 of file layerParameters.H.

Referenced by layerParameters::layerParameters().

Here is the caller graph for this function:

◆ finalLayerThickness()

const scalarField & finalLayerThickness ( ) const
inline

Wanted thickness of the layer furthest away.

from the wall (i.e. nearest the original mesh). If relativeSize() this number is relative to undistorted size of the cell outside layer.

Definition at line 242 of file layerParameters.H.

◆ firstLayerThickness() [1/2]

const scalarField & firstLayerThickness ( ) const
inline

Wanted thickness of the layer nearest to the wall.

If relativeSize() this number is relative to undistorted size of the cell outside layer.

Definition at line 250 of file layerParameters.H.

◆ thickness()

const scalarField & thickness ( ) const
inline

Wanted overall thickness of all layers.

If relativeSize() this number is relative to undistorted size of the cell outside layer.

Definition at line 258 of file layerParameters.H.

Referenced by layerParameters::layerParameters().

Here is the caller graph for this function:

◆ minThickness()

const scalarField & minThickness ( ) const
inline

Minimum overall thickness of cell layer. If for any reason layer.

cannot be above minThickness do not add layer. If relativeSize() this number is relative to undistorted size of the cell outside layer.

Definition at line 267 of file layerParameters.H.

◆ nLayerIter()

label nLayerIter ( ) const
inline

Number of overall layer addition iterations.

Definition at line 276 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers(), and snappyLayerDriver::addLayersSinglePass().

Here is the caller graph for this function:

◆ nOuterIter()

label nOuterIter ( ) const
inline

Outer loop to add layer by layer. Can be set to >= max layers.

in which case layers get added one at a time. This can help layer insertion since the newly added layers get included in the shrinking. Default is 1 -> add all layers in one go.

Definition at line 285 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers(), and snappyLayerDriver::doLayers().

Here is the caller graph for this function:

◆ nRelaxedIter()

label nRelaxedIter ( ) const
inline

Number of iterations after which relaxed motion rules.

are to be used.

Definition at line 292 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers(), and snappyLayerDriver::addLayersSinglePass().

Here is the caller graph for this function:

◆ featureAngle()

scalar featureAngle ( ) const
inline

Definition at line 300 of file layerParameters.H.

◆ mergePatchFacesAngle()

scalar mergePatchFacesAngle ( ) const
inline

Definition at line 305 of file layerParameters.H.

Referenced by snappyLayerDriver::mergePatchFacesUndo().

Here is the caller graph for this function:

◆ concaveAngle()

scalar concaveAngle ( ) const
inline

Definition at line 310 of file layerParameters.H.

Referenced by snappyLayerDriver::mergePatchFacesUndo().

Here is the caller graph for this function:

◆ nGrow()

label nGrow ( ) const
inline

If points get not extruded do nGrow layers of connected faces.

that are not grown. Is used to not do layers at all close to features.

Definition at line 318 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers().

Here is the caller graph for this function:

◆ maxFaceThicknessRatio()

scalar maxFaceThicknessRatio ( ) const
inline

Stop layer growth on highly warped cells.

Definition at line 324 of file layerParameters.H.

◆ nBufferCellsNoExtrude()

label nBufferCellsNoExtrude ( ) const
inline

Create buffer region for new layer terminations.

Definition at line 330 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers().

Here is the caller graph for this function:

◆ additionalReporting()

bool additionalReporting ( ) const
inline

Any additional reporting requested?

Definition at line 336 of file layerParameters.H.

Referenced by snappyLayerDriver::addLayers().

Here is the caller graph for this function:

◆ meshShrinker()

const word & meshShrinker ( ) const
inline

Type of mesh shrinker.

Definition at line 342 of file layerParameters.H.

◆ layerThickness() [1/2]

Foam::scalar layerThickness ( const thicknessModelType  layerSpec,
const label  nLayers,
const scalar  firstLayerThickness,
const scalar  finalLayerThickness,
const scalar  totalThickness,
const scalar  expansionRatio 
)
static

Determine overall thickness. Uses two of the four parameters.

according to the thicknessModel

Definition at line 747 of file layerParameters.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and Foam::pow().

Referenced by snappyLayerDriver::addLayers().

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

◆ layerExpansionRatio()

Foam::scalar layerExpansionRatio ( const thicknessModelType  layerSpec,
const label  nLayers,
const scalar  firstLayerThickness,
const scalar  finalLayerThickness,
const scalar  totalThickness,
const scalar  expansionRatio 
)
static

Determine expansion ratio. Uses two of the four parameters.

according to the thicknessModel

Definition at line 840 of file layerParameters.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::pow().

Here is the call graph for this function:

◆ firstLayerThickness() [2/2]

Foam::scalar firstLayerThickness ( const thicknessModelType  layerSpec,
const label  nLayers,
const scalar  firstLayerThickness,
const scalar  finalLayerThickness,
const scalar  totalThickness,
const scalar  expansionRatio 
)
static

Determine first layer (near-wall) thickness. Uses two of the.

four parameters according to the thicknessModel

Definition at line 927 of file layerParameters.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::pow().

Here is the call graph for this function:

◆ finalLayerThicknessRatio()

Foam::scalar finalLayerThicknessRatio ( const label  nLayers,
const scalar  expansionRatio 
)
static

Determine ratio of final layer thickness to.

overall layer thickness

Definition at line 997 of file layerParameters.C.

References Foam::mag(), and Foam::pow().

Referenced by snappyLayerDriver::addLayers().

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

◆ layerThickness() [2/2]

Foam::scalar layerThickness ( const label  nLayers,
const scalar  layerThickness,
const scalar  expansionRatio,
const label  layerStart,
const label  layerSize 
)
static

Determine overall thickness of a slice (usually 1 layer)

Definition at line 697 of file layerParameters.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and Foam::pow().

Here is the call graph for this function:

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