Calculation of approximate distance to nearest patch for all cells and boundary by solving Poisson's equation. More...
#include <PoissonPatchDistMethod.H>


Public Member Functions | |
| TypeName ("Poisson") | |
| Runtime type information. | |
| Poisson (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs) | |
| Construct from coefficients dictionary, mesh. | |
| Poisson (const fvMesh &mesh, const labelHashSet &patchIDs) | |
| Construct from mesh and fixed-value patch set. | |
| virtual bool | correct (volScalarField &y) |
| Correct the given distance-to-patch field. | |
| virtual bool | correct (volScalarField &y, volVectorField &n) |
| Correct the given distance-to-patch and normal-to-patch fields. | |
| Public Member Functions inherited from patchDistMethod | |
| TypeName ("patchDistMethod") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, patchDistMethod, dictionary,(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs),(dict, mesh, patchIDs)) | |
| patchDistMethod (const fvMesh &mesh, const labelHashSet &patchIDs) | |
| Construct from mesh and patch ID set. | |
| virtual | ~patchDistMethod () |
| Destructor. | |
| const labelHashSet & | patchIDs () const |
| Return the patchIDs. | |
| virtual bool | movePoints () |
| Update cached geometry when the mesh moves. | |
| virtual void | updateMesh (const mapPolyMesh &) |
| Update cached topology and geometry when the mesh changes. | |
| template<class Type> | |
| Foam::wordList | patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs) |
Additional Inherited Members | |
| Static Public Member Functions inherited from patchDistMethod | |
| static autoPtr< patchDistMethod > | New (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs, const word &defaultPatchDistMethod=word::null) |
| template<class Type> | |
| static wordList | patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs) |
| Return the patch types for y and n. | |
| Protected Member Functions inherited from patchDistMethod | |
| patchDistMethod (const patchDistMethod &)=delete | |
| No copy construct. | |
| void | operator= (const patchDistMethod &)=delete |
| No copy assignment. | |
| Protected Attributes inherited from patchDistMethod | |
| const fvMesh & | mesh_ |
| Reference to the mesh. | |
| const labelHashSet | patchIDs_ |
| Set of patch IDs. | |
Calculation of approximate distance to nearest patch for all cells and boundary by solving Poisson's equation.
References:
D.B. Spalding,
"Calculation of turbulent heat transfer in cluttered spaces",
Proc. 10th Int. Heat Transfer Conference, Brighton, UK, (1994).
E. Fares and W. Schroder,
"Differential Equation for Approximate Wall Distance",
Int.J.Numer.Meth., 39:743-762, (2002).
P.G. Tucker,
"Differential equation based wall distance computation for DES and
RANS",
J.Comp.Phys., Vol. 190, Issue 1, 1 st September, pp. 229-248 (2003)
Example of the wallDist specification in fvSchemes:
laplacianSchemes
{
.
.
laplacian(yPsi) Gauss linear corrected;
.
.
}
wallDist
{
method Poisson;
// Optional entry enabling the calculation
// of the normal-to-wall field
nRequired false;
}
Also the solver specification for yPsi is required in fvSolution, e.g. for simple cases:
yPsi
{
solver PCG;
preconditioner DIC;
tolerance 1e-5;
relTol 0;
}
or for more complex cases:
yPsi
{
solver GAMG;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
tolerance 1e-5;
relTol 0;
}
Definition at line 115 of file PoissonPatchDistMethod.H.
| Poisson | ( | const dictionary & | dict, |
| const fvMesh & | mesh, | ||
| const labelHashSet & | patchIDs ) |
Construct from coefficients dictionary, mesh.
and fixed-value patch set
Definition at line 40 of file PoissonPatchDistMethod.C.
References dict, mesh, patchDistMethod::patchDistMethod(), and patchDistMethod::patchIDs().

| Poisson | ( | const fvMesh & | mesh, |
| const labelHashSet & | patchIDs ) |
Construct from mesh and fixed-value patch set.
Definition at line 51 of file PoissonPatchDistMethod.C.
References mesh, patchDistMethod::patchDistMethod(), and patchDistMethod::patchIDs().

| TypeName | ( | "Poisson" | ) |
Runtime type information.
References dict, mesh, n, patchDistMethod::patchIDs(), and y.

|
virtual |
Correct the given distance-to-patch field.
Implements patchDistMethod.
Definition at line 63 of file PoissonPatchDistMethod.C.
References correct(), GeometricField< vector, fvPatchField, volMesh >::null(), and y.

|
virtual |
Correct the given distance-to-patch and normal-to-patch fields.
Implements patchDistMethod.
Definition at line 69 of file PoissonPatchDistMethod.C.
References Foam::dimLength, Foam::dimless, Foam::fvc::grad(), Foam::fvm::laplacian(), Foam::mag(), Foam::magSqr(), Foam::max(), patchDistMethod::mesh_, n, GeometricField< scalar, fvPatchField, volMesh >::New(), IOobjectOption::NO_REGISTER, Foam::notNull(), solve(), Foam::sqr(), Foam::sqrt(), y, and Foam::Zero.
