Calculation of approximate distance to nearest patch for all cells and boundary by solving Poisson's equation. More...
Public Member Functions | |
TypeName ("Poisson") | |
Runtime type information. More... | |
Poisson (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs) | |
Construct from coefficients dictionary, mesh. More... | |
Poisson (const fvMesh &mesh, const labelHashSet &patchIDs) | |
Construct from mesh and fixed-value patch set. More... | |
virtual bool | correct (volScalarField &y) |
Correct the given distance-to-patch field. More... | |
virtual bool | correct (volScalarField &y, volVectorField &n) |
Correct the given distance-to-patch and normal-to-patch fields. More... | |
Public Member Functions inherited from patchDistMethod | |
TypeName ("patchDistMethod") | |
Runtime type information. More... | |
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. More... | |
virtual | ~patchDistMethod () |
Destructor. More... | |
const labelHashSet & | patchIDs () const |
Return the patchIDs. More... | |
virtual bool | movePoints () |
Update cached geometry when the mesh moves. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update cached topology and geometry when the mesh changes. More... | |
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) |
template<class Type > | |
static wordList | patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs) |
Return the patch types for y and n. More... | |
Protected Attributes inherited from patchDistMethod | |
const fvMesh & | mesh_ |
Reference to the mesh. More... | |
const labelHashSet | patchIDs_ |
Set of patch IDs. More... | |
Calculation of approximate distance to nearest patch for all cells and boundary by solving Poisson's equation.
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 117 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 45 of file PoissonPatchDistMethod.C.
Poisson | ( | const fvMesh & | mesh, |
const labelHashSet & | patchIDs | ||
) |
Construct from mesh and fixed-value patch set.
Definition at line 56 of file PoissonPatchDistMethod.C.
TypeName | ( | "Poisson" | ) |
Runtime type information.
|
virtual |
Correct the given distance-to-patch field.
Implements patchDistMethod.
Definition at line 67 of file PoissonPatchDistMethod.C.
References correct, and GeometricField< vector, fvPatchField, volMesh >::null().
|
virtual |
Correct the given distance-to-patch and normal-to-patch fields.
Implements patchDistMethod.
Definition at line 74 of file PoissonPatchDistMethod.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), List< T >::clear(), Foam::dimLength, Foam::dimless, Foam::fvc::grad(), Foam::fvm::laplacian(), Foam::mag(), Foam::magSqr(), Foam::max(), Foam::notNull(), GeometricField< Type, PatchField, GeoMesh >::ref(), Foam::solve(), Foam::sqr(), and Foam::sqrt().