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... | |
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< 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... | |
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 fvMesh & | mesh () 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< 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... | |
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 fvMesh & | mesh_ |
Hold reference to mesh. More... | |
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. 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... | |
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 545 of file averageNeighbourFvGeometryScheme.C.
References Foam::ensightOutput::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 48 of file averageNeighbourFvGeometryScheme.C.
References f(), forAll, Foam::mag(), n, nCorr, p, and returnReduce().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Calculate pyramid heights.
Definition at line 124 of file averageNeighbourFvGeometryScheme.C.
References n, and List< T >::setSize().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
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 returnReduce().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Average neighbouring cell centres to minimise non-ortho.
Definition at line 258 of file averageNeighbourFvGeometryScheme.C.
References forAll, n, Foam::New(), pbm, pp(), and Foam::Zero.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Definition at line 367 of file averageNeighbourFvGeometryScheme.C.
References f(), forAll, n, Foam::New(), pbm, and pp().
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
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().
TypeName | ( | "averageNeighbour" | ) |
Runtime type information.
|
virtual |
Do what is necessary if the mesh has moved.
Reimplemented from highAspectRatioFvGeometryScheme.
Definition at line 593 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::ensightOutput::debug, Foam::degToRad(), Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), polyMeshTools::faceOrthogonality(), polyMesh::faces(), forAll, Foam::gAverage(), Time::globalPath(), Foam::gMax(), Foam::gMin(), Foam::mag(), averageNeighbourFvGeometryScheme::makeNonOrthoWeights(), averageNeighbourFvGeometryScheme::makePyrHeights(), fvGeometryScheme::mesh_, Foam::min(), averageNeighbourFvGeometryScheme::minRatio_, Foam::mkDir(), highAspectRatioFvGeometryScheme::movePoints(), OSstream::name(), OFstream::name(), surfaceWriter::New(), averageNeighbourFvGeometryScheme::nIters_, functionObject::outputPrefix, polyMesh::points(), polyMesh::pointsInstance(), Foam::Pout, Foam::radToDeg(), averageNeighbourFvGeometryScheme::relax_, autoPtr< T >::reset(), primitiveMesh::resetGeometry(), fvMesh::time(), Time::timePath(), and OBJstream::writeLine().
|
protected |
Number of averaging iterations.
Definition at line 73 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Blending between old-iteration cell centres and current average.
Definition at line 78 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().
|
protected |
Clipping for pyramid heights - allowable shrinkage as fraction.
of original
Definition at line 85 of file averageNeighbourFvGeometryScheme.H.
Referenced by averageNeighbourFvGeometryScheme::movePoints().