Geometry calculation scheme to minimise non-orthogonality/. More...
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... | |
![]() | |
TypeName ("highAspectRatio") | |
Runtime type information. More... | |
highAspectRatioFvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
Construct from mesh. More... | |
virtual | ~highAspectRatioFvGeometryScheme ()=default |
Destructor. More... | |
![]() | |
TypeName ("basic") | |
Runtime type information. More... | |
basicFvGeometryScheme (const fvMesh &mesh, const dictionary &dict) | |
Construct from mesh. More... | |
virtual | ~basicFvGeometryScheme ()=default |
Destructor. More... | |
virtual tmp< surfaceScalarField > | weights () const |
Return linear difference weighting factors. More... | |
virtual tmp< surfaceScalarField > | deltaCoeffs () const |
Return cell-centre difference coefficients. More... | |
virtual tmp< surfaceScalarField > | nonOrthDeltaCoeffs () const |
Return non-orthogonal cell-centre difference coefficients. More... | |
virtual tmp< surfaceVectorField > | nonOrthCorrectionVectors () const |
Return non-orthogonality correction vectors. More... | |
![]() | |
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 fvMesh & | mesh () const |
Return mesh reference. More... | |
![]() | |
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< pointField > | averageNeighbourCentres (const pointField &cellCentres, const vectorField &faceNormals, const scalarField &faceWeights) const |
Average neighbouring cell centres to minimise non-ortho. More... | |
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. More... | |
![]() | |
void | calcAspectRatioWeights (scalarField &cellWeight, scalarField &faceWeight) const |
Calculate cell and face weight. Is 0 for cell < minAspect, 1 for. 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... | |
![]() | |
const scalar | minAspect_ |
const scalar | maxAspect_ |
![]() | |
const fvMesh & | mesh_ |
Hold reference to mesh. More... | |
Additional Inherited Members | |
![]() | |
static tmp< fvGeometryScheme > | New (const fvMesh &mesh, const dictionary &dict, const word &defaultScheme) |
Return new tmp interpolation scheme. More... | |
![]() | |
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... | |
Geometry calculation scheme to minimise non-orthogonality/.
Definition at line 52 of file averageNeighbourFvGeometryScheme.H.
averageNeighbourFvGeometryScheme | ( | const fvMesh & | mesh, |
const dictionary & | dict | ||
) |
Construct from mesh.
Definition at line 573 of file averageNeighbourFvGeometryScheme.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
|
virtualdefault |
Destructor.
|
protected |
Clip face-centre correction vector if new triangle area would get below min. Return number of clipped faces.
Definition at line 55 of file averageNeighbourFvGeometryScheme.C.
References f(), faceNormals(), forAll, Foam::mag(), n, nCorr, p, and Foam::returnReduce().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Calculate pyramid heights.
Definition at line 133 of file averageNeighbourFvGeometryScheme.C.
References faceNormals(), and n.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Clip correction vector if new pyramid height would get below min. Return number of clipped cells.
Definition at line 173 of file averageNeighbourFvGeometryScheme.C.
References Foam::correction(), faceNormals(), n, and Foam::returnReduce().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Average neighbouring cell centres to minimise non-ortho.
Definition at line 271 of file averageNeighbourFvGeometryScheme.C.
References faceNormals(), forAll, n, tmp< T >::ref(), and Foam::Zero.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Definition at line 382 of file averageNeighbourFvGeometryScheme.C.
References f(), faceNormals(), forAll, n, and tmp< T >::ref().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Make weights based on non-orthogonality.
Definition at line 517 of file averageNeighbourFvGeometryScheme.C.
References Foam::cos(), Foam::degToRad(), faceNormals(), forAll, Foam::max(), and Foam::min().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
TypeName | ( | "averageNeighbour" | ) |
Runtime type information.
|
virtual |
Do what is necessary if the mesh has moved.
Reimplemented from highAspectRatioFvGeometryScheme.
Definition at line 630 of file averageNeighbourFvGeometryScheme.C.
References Foam::acos(), averageNeighbourFvGeometryScheme::averageCentres(), averageNeighbourFvGeometryScheme::averageNeighbourCentres(), highAspectRatioFvGeometryScheme::calcAspectRatioWeights(), primitiveMesh::cellCentres(), primitiveMesh::cellVolumes(), fileName::clean(), averageNeighbourFvGeometryScheme::clipFaceTet(), averageNeighbourFvGeometryScheme::clipPyramids(), Foam::correction(), Foam::cos(), Foam::expressions::patchExpr::debug, Foam::degToRad(), Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), faceNormals(), polyMeshTools::faceOrthogonality(), polyMesh::faces(), forAll, Foam::gAverage(), TimePaths::globalPath(), Foam::gMax(), Foam::gMin(), Foam::mag(), averageNeighbourFvGeometryScheme::makeNonOrthoWeights(), averageNeighbourFvGeometryScheme::makePyrHeights(), fvGeometryScheme::mesh_, Foam::min(), averageNeighbourFvGeometryScheme::minRatio_, Foam::mkDir(), highAspectRatioFvGeometryScheme::movePoints(), OFstream::name(), OSstream::name(), surfaceWriter::New(), averageNeighbourFvGeometryScheme::nIters_, functionObject::outputPrefix, polyMesh::points(), polyMesh::pointsInstance(), Foam::Pout, Foam::radToDeg(), averageNeighbourFvGeometryScheme::relax_, primitiveMesh::resetGeometry(), autoPtr< T >::set(), fvMesh::time(), Time::timePath(), and OBJstream::write().
|
protected |
Number of averaging iterations.
Definition at line 71 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Blending between old-iteration cell centres and current average.
Definition at line 74 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Clipping for pyramid heights - allowable shrinkage as fraction.
of original
Definition at line 78 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().