Geometry calculation scheme to minimise non-orthogonality/. More...
#include <averageNeighbourFvGeometryScheme.H>


Public Member Functions | |
| TypeName ("averageNeighbour") | |
| Runtime type information. | |
| averageNeighbourFvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh. | |
| virtual | ~averageNeighbourFvGeometryScheme ()=default |
| Destructor. | |
| virtual void | movePoints () |
| Do what is necessary if the mesh has moved. | |
| virtual bool | updateGeom (const pointField &points, const refPtr< pointField > &oldPoints, pointField &faceCentres, vectorField &faceAreas, pointField &cellCentres, scalarField &cellVolumes) const |
| Calculate geometry quantities using mesh topology and provided points. If oldPoints provided only does local update. Returns true if anything changed, false otherwise. | |
| Public Member Functions inherited from highAspectRatioFvGeometryScheme | |
| TypeName ("highAspectRatio") | |
| Runtime type information. | |
| highAspectRatioFvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh. | |
| virtual | ~highAspectRatioFvGeometryScheme ()=default |
| Destructor. | |
| Public Member Functions inherited from basicFvGeometryScheme | |
| TypeName ("basic") | |
| Runtime type information. | |
| basicFvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh. | |
| virtual | ~basicFvGeometryScheme ()=default |
| Destructor. | |
| virtual tmp< surfaceScalarField > | weights () const |
| Return linear difference weighting factors. | |
| virtual tmp< surfaceScalarField > | deltaCoeffs () const |
| Return cell-centre difference coefficients. | |
| virtual tmp< surfaceScalarField > | nonOrthDeltaCoeffs () const |
| Return non-orthogonal cell-centre difference coefficients. | |
| virtual tmp< surfaceVectorField > | nonOrthCorrectionVectors () const |
| Return non-orthogonality correction vectors. | |
| Public Member Functions inherited from fvGeometryScheme | |
| TypeName ("fvGeometryScheme") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (tmp, fvGeometryScheme, dict,(const fvMesh &mesh, const dictionary &dict),(mesh, dict)) | |
| fvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
| Construct from mesh. | |
| virtual | ~fvGeometryScheme ()=default |
| Destructor. | |
| const fvMesh & | mesh () const |
| Return mesh reference. | |
| virtual void | updateMesh (const mapPolyMesh &mpm) |
| Update mesh for topology changes. | |
| Public Member Functions inherited from refCount | |
| constexpr | refCount () noexcept |
| Default construct, initializing count to 0. | |
| int | use_count () const noexcept |
| Return the current reference count. | |
| bool | unique () const noexcept |
| Return true if the reference count is zero. | |
| void | operator++ () noexcept |
| Increment the reference count. | |
| void | operator++ (int) noexcept |
| Increment the reference count. | |
| void | operator-- () noexcept |
| Decrement the reference count. | |
| void | operator-- (int) noexcept |
| Decrement the reference count. | |
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. | |
| void | makePyrHeights (const pointField &cellCentres, const vectorField &faceCentres, const vectorField &faceNormals, scalarField &ownHeight, scalarField &neiHeight) const |
| Calculate pyramid heights. | |
| 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. | |
| tmp< pointField > | averageNeighbourCentres (const pointField &cellCentres, const vectorField &faceNormals, const scalarField &faceWeights) const |
| Average neighbouring cell centres to minimise non-ortho. | |
| tmp< pointField > | averageCentres (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. | |
| 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. | |
| Protected Member Functions inherited from fvGeometryScheme | |
| bool | setMeshPhi () const |
| Set the mesh motion flux. | |
Protected Attributes | |
| const label | nIters_ |
| Number of averaging iterations. | |
| const scalar | relax_ |
| Blending between old-iteration cell centres and current average. | |
| const scalar | minRatio_ |
| Clipping for pyramid heights - allowable shrinkage as fraction. | |
| Protected Attributes inherited from highAspectRatioFvGeometryScheme | |
| const scalar | minAspect_ |
| const scalar | maxAspect_ |
| Protected Attributes inherited from fvGeometryScheme | |
| const fvMesh & | mesh_ |
| Hold reference to mesh. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from fvGeometryScheme | |
| static tmp< fvGeometryScheme > | New (const fvMesh &mesh, const dictionary &dict, const word &defaultScheme) |
| Return new tmp interpolation scheme. | |
| 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. | |
Geometry calculation scheme to minimise non-orthogonality/.
Definition at line 48 of file averageNeighbourFvGeometryScheme.H.
| averageNeighbourFvGeometryScheme | ( | const fvMesh & | mesh, |
| const dictionary & | dict ) |
Construct from mesh.
Definition at line 544 of file averageNeighbourFvGeometryScheme.C.
References dict, fvGeometryScheme::mesh(), and nIters_.

|
virtualdefault |
Destructor.
|
protected |
Clip face-centre correction vector if new triangle area would get below min. Return number of clipped faces.
Definition at line 47 of file averageNeighbourFvGeometryScheme.C.
References f(), forAll, Foam::mag(), fvGeometryScheme::mesh_, n, nCorr, p, Foam::returnReduce(), and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by movePoints().


|
protected |
Calculate pyramid heights.
Definition at line 123 of file averageNeighbourFvGeometryScheme.C.
References fvGeometryScheme::mesh_, n, and List< T >::setSize().
Referenced by movePoints().


|
protected |
Clip correction vector if new pyramid height would get below min. Return number of clipped cells.
Definition at line 161 of file averageNeighbourFvGeometryScheme.C.
References Foam::correction(), fvGeometryScheme::mesh_, n, Foam::returnReduce(), and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by movePoints().


|
protected |
Average neighbouring cell centres to minimise non-ortho.
Definition at line 257 of file averageNeighbourFvGeometryScheme.C.
References forAll, fvGeometryScheme::mesh_, n, tmp< T >::New(), pbm, pp(), syncTools::swapBoundaryCellPositions(), and Foam::Zero.
Referenced by movePoints().


|
protected |
Definition at line 366 of file averageNeighbourFvGeometryScheme.C.
References f(), forAll, fvGeometryScheme::mesh_, n, tmp< T >::New(), pbm, pp(), and syncTools::swapBoundaryCellPositions().
Referenced by movePoints().


|
protected |
Make weights based on non-orthogonality.
Definition at line 499 of file averageNeighbourFvGeometryScheme.C.
References Foam::clamp(), Foam::cos(), Foam::degToRad(), polyMeshTools::faceOrthogonality(), forAll, fvGeometryScheme::mesh_, List< T >::setSize(), and UList< T >::size().
Referenced by movePoints().


| TypeName | ( | "averageNeighbour" | ) |
Runtime type information.
References dict, and fvGeometryScheme::mesh().

|
virtual |
Do what is necessary if the mesh has moved.
Reimplemented from highAspectRatioFvGeometryScheme.
Definition at line 593 of file averageNeighbourFvGeometryScheme.C.
References Foam::acos(), averageCentres(), averageNeighbourCentres(), highAspectRatioFvGeometryScheme::calcAspectRatioWeights(), fileName::clean(), clipFaceTet(), clipPyramids(), Foam::correction(), Foam::cos(), Foam::degToRad(), Foam::endl(), polyMeshTools::faceOrthogonality(), forAll, Foam::gAverage(), Foam::gMax(), Foam::gMinMax(), limits, Foam::mag(), makeNonOrthoWeights(), makePyrHeights(), fvGeometryScheme::mesh_, Foam::min(), minRatio_, Foam::mkDir(), highAspectRatioFvGeometryScheme::movePoints(), OFstream::name(), surfaceWriter::New(), nIters_, functionObject::outputPrefix, Foam::Pout, Foam::radToDeg(), relax_, autoPtr< T >::reset(), primitiveMesh::resetGeometry(), and OBJstream::writeLine().

|
inlinevirtual |
Calculate geometry quantities using mesh topology and provided points. If oldPoints provided only does local update. Returns true if anything changed, false otherwise.
Reimplemented from highAspectRatioFvGeometryScheme.
Definition at line 197 of file averageNeighbourFvGeometryScheme.H.
References NotImplemented, and points.
|
protected |
Number of averaging iterations.
Definition at line 73 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme(), and movePoints().
|
protected |
Blending between old-iteration cell centres and current average.
Definition at line 78 of file averageNeighbourFvGeometryScheme.H.
Referenced by movePoints().
|
protected |
Clipping for pyramid heights - allowable shrinkage as fraction.
of original
Definition at line 85 of file averageNeighbourFvGeometryScheme.H.
Referenced by movePoints().