averageNeighbourFvGeometryScheme Class Reference

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

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

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...
 
virtual void movePoints ()
 Do what is necessary if the mesh has moved. 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 void movePoints ()
 Do what is necessary if the mesh has moved. 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 movePoints ()
 Update basic geometric properties from provided points. More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update mesh for topology changes. More...
 
virtual tmp< surfaceScalarFieldweights () const =0
 Return linear difference weighting factors. More...
 
virtual tmp< surfaceScalarFielddeltaCoeffs () const =0
 Return cell-centre difference coefficients. More...
 
virtual tmp< surfaceScalarFieldnonOrthDeltaCoeffs () const =0
 Return non-orthogonal cell-centre difference coefficients. More...
 
virtual tmp< surfaceVectorFieldnonOrthCorrectionVectors () const =0
 Return non-orthogonality correction vectors. More...
 
- Public Member Functions inherited from refCount
constexpr refCount () noexcept
 Default construct, initializing count to 0. More...
 
int 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
 
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
 
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 52 of file averageNeighbourFvGeometryScheme.H.

Constructor & Destructor Documentation

◆ averageNeighbourFvGeometryScheme()

averageNeighbourFvGeometryScheme ( const fvMesh mesh,
const dictionary dict 
)

Construct from mesh.

Definition at line 562 of file averageNeighbourFvGeometryScheme.C.

◆ ~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 54 of file averageNeighbourFvGeometryScheme.C.

References f(), faceNormals(), polyMesh::faces(), UList< T >::fcValue(), forAll, Foam::mag(), fvGeometryScheme::mesh_, n, nCorr, primitiveMesh::nFaces(), p, polyMesh::points(), and Foam::returnReduce().

Here is the call 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 130 of file averageNeighbourFvGeometryScheme.C.

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

Here is the call 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 168 of file averageNeighbourFvGeometryScheme.C.

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

Here is the call 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 264 of file averageNeighbourFvGeometryScheme.C.

References faceNormals(), forAll, n, tmp< T >::ref(), syncTools::swapBoundaryCellPositions(), and Foam::Zero.

Here is the call graph for this function:

◆ averageCentres()

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

Definition at line 373 of file averageNeighbourFvGeometryScheme.C.

References f(), faceNormals(), forAll, n, tmp< T >::ref(), and syncTools::swapBoundaryCellPositions().

Here is the call 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 506 of file averageNeighbourFvGeometryScheme.C.

References Foam::cos(), Foam::degToRad(), faceNormals(), polyMeshTools::faceOrthogonality(), forAll, Foam::max(), Foam::min(), List< T >::setSize(), and UList< T >::size().

Here is the call 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 71 of file averageNeighbourFvGeometryScheme.H.

◆ relax_

const scalar relax_
protected

Blending between old-iteration cell centres and current average.

Definition at line 74 of file averageNeighbourFvGeometryScheme.H.

◆ minRatio_

const scalar minRatio_
protected

Clipping for pyramid heights - allowable shrinkage as fraction.

of original

Definition at line 78 of file averageNeighbourFvGeometryScheme.H.


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