averageNeighbourFvGeometryScheme Class Reference

Geometry calculation scheme to minimise non-orthogonality/. More...

Inheritance diagram for averageNeighbourFvGeometryScheme:
Collaboration diagram for averageNeighbourFvGeometryScheme:

Public Member Functions

 TypeName ("averageNeighbour")
 Runtime type information. More...
 
 averageNeighbourFvGeometryScheme (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh. More...
 
virtual ~averageNeighbourFvGeometryScheme ()=default
 Destructor. More...
 
virtual void movePoints ()
 Do what is necessary if the mesh has moved. More...
 
- Public Member Functions inherited from highAspectRatioFvGeometryScheme
 TypeName ("highAspectRatio")
 Runtime type information. More...
 
 highAspectRatioFvGeometryScheme (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh. More...
 
virtual ~highAspectRatioFvGeometryScheme ()=default
 Destructor. More...
 
- Public Member Functions inherited from basicFvGeometryScheme
 TypeName ("basic")
 Runtime type information. More...
 
 basicFvGeometryScheme (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh. More...
 
virtual ~basicFvGeometryScheme ()=default
 Destructor. More...
 
virtual tmp< surfaceScalarFieldweights () const
 Return linear difference weighting factors. More...
 
virtual tmp< surfaceScalarFielddeltaCoeffs () const
 Return cell-centre difference coefficients. More...
 
virtual tmp< surfaceScalarFieldnonOrthDeltaCoeffs () const
 Return non-orthogonal cell-centre difference coefficients. More...
 
virtual tmp< surfaceVectorFieldnonOrthCorrectionVectors () const
 Return non-orthogonality correction vectors. More...
 
- Public Member Functions inherited from fvGeometryScheme
 TypeName ("fvGeometryScheme")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (tmp, fvGeometryScheme, dict,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
 
 fvGeometryScheme (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh. More...
 
virtual ~fvGeometryScheme ()=default
 Destructor. More...
 
const fvMeshmesh () const
 Return mesh reference. More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update mesh for topology changes. More...
 
- Public Member Functions inherited from refCount
constexpr refCount () noexcept
 Default construct, initializing count to 0. More...
 
int use_count () const noexcept
 Return the current reference count. More...
 
bool unique () const noexcept
 Return true if the reference count is zero. More...
 
void operator++ () noexcept
 Increment the reference count. More...
 
void operator++ (int) noexcept
 Increment the reference count. More...
 
void operator-- () noexcept
 Decrement the reference count. More...
 
void operator-- (int) noexcept
 Decrement the reference count. More...
 

Protected Member Functions

label clipFaceTet (const scalar minRatio, const vectorField &faceCentres, const vectorField &faceNormals, vectorField &faceCorrection) const
 Clip face-centre correction vector if new triangle area would get below min. Return number of clipped faces. More...
 
void makePyrHeights (const pointField &cellCentres, const vectorField &faceCentres, const vectorField &faceNormals, scalarField &ownHeight, scalarField &neiHeight) const
 Calculate pyramid heights. More...
 
label clipPyramids (const pointField &cellCentres, const vectorField &faceCentres, const vectorField &faceNormals, const scalarField &minOwnHeight, const scalarField &minNeiHeight, vectorField &correction) const
 Clip correction vector if new pyramid height would get below min. Return number of clipped cells. More...
 
tmp< pointFieldaverageNeighbourCentres (const pointField &cellCentres, const vectorField &faceNormals, const scalarField &faceWeights) const
 Average neighbouring cell centres to minimise non-ortho. More...
 
tmp< pointFieldaverageCentres (const pointField &cellCentres, const pointField &faceCentres, const vectorField &faceNormals) const
 
void makeNonOrthoWeights (const pointField &cellCentres, const vectorField &faceNormals, scalarField &cosAngles, scalarField &faceWeights) const
 Make weights based on non-orthogonality. More...
 
- Protected Member Functions inherited from highAspectRatioFvGeometryScheme
void calcAspectRatioWeights (scalarField &cellWeight, scalarField &faceWeight) const
 Calculate cell and face weight. Is 0 for cell < minAspect, 1 for. More...
 
- Protected Member Functions inherited from fvGeometryScheme
bool setMeshPhi () const
 Set the mesh motion flux. More...
 

Protected Attributes

const label nIters_
 Number of averaging iterations. More...
 
const scalar relax_
 Blending between old-iteration cell centres and current average. More...
 
const scalar minRatio_
 Clipping for pyramid heights - allowable shrinkage as fraction. More...
 
- Protected Attributes inherited from highAspectRatioFvGeometryScheme
const scalar minAspect_
 
const scalar maxAspect_
 
- Protected Attributes inherited from fvGeometryScheme
const fvMeshmesh_
 Hold reference to mesh. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fvGeometryScheme
static tmp< fvGeometrySchemeNew (const fvMesh &mesh, const dictionary &dict, const word &defaultScheme)
 Return new tmp interpolation scheme. More...
 
- Static Protected Member Functions inherited from highAspectRatioFvGeometryScheme
static void makeAverageCentres (const polyMesh &mesh, const pointField &points, const pointField &faceAreas, const scalarField &magFaceAreas, pointField &faceCentres, pointField &cellCentres)
 Helper : calculate (weighted) average face and cell centres. More...
 

Detailed Description

Geometry calculation scheme to minimise non-orthogonality/.

Source files

Definition at line 48 of file averageNeighbourFvGeometryScheme.H.

Constructor & Destructor Documentation

◆ averageNeighbourFvGeometryScheme()

averageNeighbourFvGeometryScheme ( const fvMesh mesh,
const dictionary dict 
)

Construct from mesh.

Definition at line 545 of file averageNeighbourFvGeometryScheme.C.

References Foam::ensightOutput::debug, Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ ~averageNeighbourFvGeometryScheme()

virtual ~averageNeighbourFvGeometryScheme ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clipFaceTet()

Foam::label clipFaceTet ( const scalar  minRatio,
const vectorField faceCentres,
const vectorField faceNormals,
vectorField faceCorrection 
) const
protected

Clip face-centre correction vector if new triangle area would get below min. Return number of clipped faces.

Definition at line 48 of file averageNeighbourFvGeometryScheme.C.

References f(), forAll, Foam::mag(), n, nCorr, p, and Foam::returnReduce().

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ makePyrHeights()

void makePyrHeights ( const pointField cellCentres,
const vectorField faceCentres,
const vectorField faceNormals,
scalarField ownHeight,
scalarField neiHeight 
) const
protected

Calculate pyramid heights.

Definition at line 124 of file averageNeighbourFvGeometryScheme.C.

References n, and List< T >::setSize().

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ clipPyramids()

Foam::label clipPyramids ( const pointField cellCentres,
const vectorField faceCentres,
const vectorField faceNormals,
const scalarField minOwnHeight,
const scalarField minNeiHeight,
vectorField correction 
) const
protected

Clip correction vector if new pyramid height would get below min. Return number of clipped cells.

Definition at line 162 of file averageNeighbourFvGeometryScheme.C.

References Foam::correction(), n, and Foam::returnReduce().

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ averageNeighbourCentres()

Foam::tmp< Foam::pointField > averageNeighbourCentres ( const pointField cellCentres,
const vectorField faceNormals,
const scalarField faceWeights 
) const
protected

Average neighbouring cell centres to minimise non-ortho.

Definition at line 258 of file averageNeighbourFvGeometryScheme.C.

References forAll, n, pbm, pp(), tmp< T >::ref(), and Foam::Zero.

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ averageCentres()

Foam::tmp< Foam::pointField > averageCentres ( const pointField cellCentres,
const pointField faceCentres,
const vectorField faceNormals 
) const
protected

Definition at line 367 of file averageNeighbourFvGeometryScheme.C.

References f(), forAll, n, pbm, pp(), and tmp< T >::ref().

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ makeNonOrthoWeights()

void makeNonOrthoWeights ( const pointField cellCentres,
const vectorField faceNormals,
scalarField cosAngles,
scalarField faceWeights 
) const
protected

Make weights based on non-orthogonality.

Definition at line 500 of file averageNeighbourFvGeometryScheme.C.

References Foam::clamp(), Foam::cos(), Foam::degToRad(), forAll, List< T >::setSize(), and UList< T >::size().

Referenced by averageNeighbourFvGeometryScheme::movePoints().

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

◆ TypeName()

TypeName ( "averageNeighbour"  )

Runtime type information.

◆ movePoints()

void movePoints ( )
virtual

Member Data Documentation

◆ nIters_

const label nIters_
protected

Number of averaging iterations.

Definition at line 73 of file averageNeighbourFvGeometryScheme.H.

Referenced by averageNeighbourFvGeometryScheme::movePoints().

◆ relax_

const scalar relax_
protected

Blending between old-iteration cell centres and current average.

Definition at line 78 of file averageNeighbourFvGeometryScheme.H.

Referenced by averageNeighbourFvGeometryScheme::movePoints().

◆ minRatio_

const scalar minRatio_
protected

Clipping for pyramid heights - allowable shrinkage as fraction.

of original

Definition at line 85 of file averageNeighbourFvGeometryScheme.H.

Referenced by averageNeighbourFvGeometryScheme::movePoints().


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