Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
layerParameters Class Reference

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

Collaboration diagram for layerParameters:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 layerParameters (const dictionary &dict, const polyBoundaryMesh &)
 Construct from dictionary. More...
 
const dictionarydict () const
 
const labelListnumLayers () const
 How many layers to add. More...
 
bool relativeSizes () const
 Are size parameters relative to inner cell size or. 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 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...
 
const SwitchadditionalReporting () const
 
const wordmeshShrinker () const
 Type of mesh shrinker. More...
 
scalar layerThickness (const label nLayers, const scalar firstLayerThickess, const scalar finalLayerThickess, const scalar totalThickness, const scalar expansionRatio) const
 Determine overall thickness. Uses two of the four parameters. More...
 
scalar layerExpansionRatio (const label nLayers, const scalar firstLayerThickess, const scalar finalLayerThickess, const scalar totalThickness, const scalar expansionRatio) const
 Determine expansion ratio. Uses two of the four parameters. More...
 
scalar firstLayerThickness (const label nLayers, const scalar firstLayerThickess, const scalar finalLayerThickess, const scalar totalThickness, const scalar expansionRatio) const
 Determine first layer (near-wall) thickness. Uses two of the. More...
 
scalar finalLayerThicknessRatio (const label nLayers, const scalar expansionRatio) const
 Determine ratio of final layer thickness to. More...
 

Private Member Functions

scalar layerExpansionRatio (const label n, const scalar totalOverFirst) const
 Calculate expansion ratio from overall size v.s. thickness of. More...
 
 layerParameters (const layerParameters &)
 Disallow default bitwise copy construct. More...
 
void operator= (const layerParameters &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const dictionary dict_
 
labelList numLayers_
 How many layers to add. More...
 
Switch relativeSizes_
 Are sizes relative to local cell size. More...
 
layerSpecification layerSpec_
 How thickness is specified. More...
 
scalarField firstLayerThickness_
 
scalarField finalLayerThickness_
 
scalarField thickness_
 
scalarField expansionRatio_
 
scalarField minThickness_
 Minimum total thickness. More...
 
scalar featureAngle_
 
scalar mergePatchFacesAngle_
 
scalar concaveAngle_
 
label nGrow_
 
scalar maxFaceThicknessRatio_
 
label nBufferCellsNoExtrude_
 
label nLayerIter_
 
label nRelaxedIter_
 
Switch additionalReporting_
 
word meshShrinker_
 

Static Private Attributes

static const scalar defaultConcaveAngle = 90
 Default angle for faces to be convcave. More...
 

Detailed Description

Simple container to keep together layer specific information.

Source files

Definition at line 55 of file layerParameters.H.

Member Enumeration Documentation

◆ layerSpecification

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
ILLEGAL 
FIRST_AND_TOTAL 
FIRST_AND_EXPANSION 
FINAL_AND_TOTAL 
FINAL_AND_EXPANSION 
TOTAL_AND_EXPANSION 

Definition at line 67 of file layerParameters.H.

Constructor & Destructor Documentation

◆ layerParameters() [1/2]

layerParameters ( const layerParameters )
private

Disallow default bitwise copy construct.

◆ layerParameters() [2/2]

layerParameters ( const dictionary dict,
const polyBoundaryMesh boundaryMesh 
)

Member Function Documentation

◆ layerExpansionRatio() [1/2]

Foam::scalar layerExpansionRatio ( const label  n,
const scalar  totalOverFirst 
) const
private

Calculate expansion ratio from overall size v.s. thickness of.

first layer.

Definition at line 41 of file layerParameters.C.

References Foam::constant::electromagnetic::e, Foam::mag(), n, and Foam::pow().

Referenced by autoLayerDriver::calculateLayerThickness().

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

◆ operator=()

void operator= ( const layerParameters )
private

Disallow default bitwise assignment.

◆ dict()

const dictionary& dict ( ) const
inline

Definition at line 162 of file layerParameters.H.

References layerParameters::dict_.

Referenced by autoLayerDriver::addLayers().

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 175 of file layerParameters.H.

Referenced by autoLayerDriver::addLayers(), autoLayerDriver::calculateLayerThickness(), and autoLayerDriver::doLayers().

Here is the caller graph for this function:

◆ relativeSizes()

bool relativeSizes ( ) const
inline

Are size parameters relative to inner cell size or.

absolute distances.

Definition at line 182 of file layerParameters.H.

Referenced by autoLayerDriver::addLayers(), and autoLayerDriver::calculateLayerThickness().

Here is the caller graph for this function:

◆ expansionRatio()

const scalarField& expansionRatio ( ) const
inline

Definition at line 188 of file layerParameters.H.

References layerParameters::expansionRatio_.

Referenced by autoLayerDriver::calculateLayerThickness().

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 197 of file layerParameters.H.

Referenced by autoLayerDriver::calculateLayerThickness().

Here is the caller graph for this function:

◆ 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 205 of file layerParameters.H.

Referenced by autoLayerDriver::calculateLayerThickness().

Here is the caller graph for this function:

◆ 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 213 of file layerParameters.H.

Referenced by autoLayerDriver::calculateLayerThickness().

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 222 of file layerParameters.H.

Referenced by autoLayerDriver::calculateLayerThickness().

Here is the caller graph for this function:

◆ nLayerIter()

label nLayerIter ( ) const
inline

Number of overall layer addition iterations.

Definition at line 231 of file layerParameters.H.

References layerParameters::nLayerIter_.

Referenced by autoLayerDriver::addLayers().

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 238 of file layerParameters.H.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ featureAngle()

scalar featureAngle ( ) const
inline

Definition at line 246 of file layerParameters.H.

References layerParameters::featureAngle_.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ mergePatchFacesAngle()

scalar mergePatchFacesAngle ( ) const
inline

Definition at line 251 of file layerParameters.H.

References layerParameters::mergePatchFacesAngle_.

Referenced by autoLayerDriver::mergePatchFacesUndo().

Here is the caller graph for this function:

◆ concaveAngle()

scalar concaveAngle ( ) const
inline

Definition at line 256 of file layerParameters.H.

References layerParameters::concaveAngle_.

Referenced by autoLayerDriver::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 264 of file layerParameters.H.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ maxFaceThicknessRatio()

scalar maxFaceThicknessRatio ( ) const
inline

Stop layer growth on highly warped cells.

Definition at line 270 of file layerParameters.H.

References layerParameters::maxFaceThicknessRatio_.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ nBufferCellsNoExtrude()

label nBufferCellsNoExtrude ( ) const
inline

Create buffer region for new layer terminations.

Definition at line 276 of file layerParameters.H.

References layerParameters::nBufferCellsNoExtrude_.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ additionalReporting()

const Switch& additionalReporting ( ) const
inline

Definition at line 281 of file layerParameters.H.

References layerParameters::additionalReporting_.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ meshShrinker()

const word& meshShrinker ( ) const
inline

Type of mesh shrinker.

Definition at line 287 of file layerParameters.H.

References layerParameters::meshShrinker_.

Referenced by autoLayerDriver::addLayers().

Here is the caller graph for this function:

◆ layerThickness()

Foam::scalar layerThickness ( const label  nLayers,
const scalar  firstLayerThickess,
const scalar  finalLayerThickess,
const scalar  totalThickness,
const scalar  expansionRatio 
) const

Determine overall thickness. Uses two of the four parameters.

according to the layerSpecification

Definition at line 380 of file layerParameters.C.

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

Referenced by autoLayerDriver::calculateLayerThickness().

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

◆ layerExpansionRatio() [2/2]

Foam::scalar layerExpansionRatio ( const label  nLayers,
const scalar  firstLayerThickess,
const scalar  finalLayerThickess,
const scalar  totalThickness,
const scalar  expansionRatio 
) const

Determine expansion ratio. Uses two of the four parameters.

according to the layerSpecification

Definition at line 440 of file layerParameters.C.

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

Here is the call graph for this function:

◆ firstLayerThickness() [2/2]

Foam::scalar firstLayerThickness ( const label  nLayers,
const scalar  firstLayerThickess,
const scalar  finalLayerThickess,
const scalar  totalThickness,
const scalar  expansionRatio 
) const

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

four parameters according to the layerSpecification

Definition at line 491 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 
) const

Determine ratio of final layer thickness to.

overall layer thickness

Definition at line 550 of file layerParameters.C.

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

Referenced by autoLayerDriver::addLayers().

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

Field Documentation

◆ defaultConcaveAngle

const Foam::scalar defaultConcaveAngle = 90
staticprivate

Default angle for faces to be convcave.

Definition at line 83 of file layerParameters.H.

◆ dict_

const dictionary dict_
private

Definition at line 88 of file layerParameters.H.

Referenced by layerParameters::dict().

◆ numLayers_

labelList numLayers_
private

How many layers to add.

Definition at line 94 of file layerParameters.H.

◆ relativeSizes_

Switch relativeSizes_
private

Are sizes relative to local cell size.

Definition at line 97 of file layerParameters.H.

◆ layerSpec_

layerSpecification layerSpec_
private

How thickness is specified.

Definition at line 100 of file layerParameters.H.

◆ firstLayerThickness_

scalarField firstLayerThickness_
private

Definition at line 102 of file layerParameters.H.

◆ finalLayerThickness_

scalarField finalLayerThickness_
private

Definition at line 104 of file layerParameters.H.

◆ thickness_

scalarField thickness_
private

Definition at line 106 of file layerParameters.H.

◆ expansionRatio_

scalarField expansionRatio_
private

Definition at line 108 of file layerParameters.H.

Referenced by layerParameters::expansionRatio().

◆ minThickness_

scalarField minThickness_
private

Minimum total thickness.

Definition at line 111 of file layerParameters.H.

◆ featureAngle_

scalar featureAngle_
private

Definition at line 114 of file layerParameters.H.

Referenced by layerParameters::featureAngle().

◆ mergePatchFacesAngle_

scalar mergePatchFacesAngle_
private

Definition at line 116 of file layerParameters.H.

Referenced by layerParameters::mergePatchFacesAngle().

◆ concaveAngle_

scalar concaveAngle_
private

Definition at line 118 of file layerParameters.H.

Referenced by layerParameters::concaveAngle().

◆ nGrow_

label nGrow_
private

Definition at line 120 of file layerParameters.H.

◆ maxFaceThicknessRatio_

scalar maxFaceThicknessRatio_
private

Definition at line 122 of file layerParameters.H.

Referenced by layerParameters::maxFaceThicknessRatio().

◆ nBufferCellsNoExtrude_

label nBufferCellsNoExtrude_
private

Definition at line 124 of file layerParameters.H.

Referenced by layerParameters::nBufferCellsNoExtrude().

◆ nLayerIter_

label nLayerIter_
private

Definition at line 126 of file layerParameters.H.

Referenced by layerParameters::nLayerIter().

◆ nRelaxedIter_

label nRelaxedIter_
private

Definition at line 128 of file layerParameters.H.

◆ additionalReporting_

Switch additionalReporting_
private

Definition at line 130 of file layerParameters.H.

Referenced by layerParameters::additionalReporting().

◆ meshShrinker_

word meshShrinker_
private

Definition at line 132 of file layerParameters.H.

Referenced by layerParameters::meshShrinker().


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