27 #include "surfaceInterpolate.H"
42 namespace patchDistMethods
59 coeffs_(
dict.optionalSubDict(
type() +
"Coeffs")),
69 epsilon_(coeffs_.lookupOrDefault<scalar>(
"epsilon", 0.1)),
70 tolerance_(coeffs_.lookupOrDefault<scalar>(
"tolerance", 1
e-3)),
71 maxIter_(coeffs_.lookupOrDefault<int>(
"maxIter", 10)),
92 pdmPredictor_->correct(
y);
109 patchTypes<vector>(mesh_, patchIndices_)
122 scalar initialResidual = 0;
127 ny /= (
mag(ny) + small);
130 nf /= (
mag(nf) + small);
144 initialResidual = yEqn.
solve().initialResidual();
146 }
while (initialResidual > tolerance_ && ++iter < maxIter_);
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
Generic GeometricBoundaryField class.
Generic GeometricField class.
static const GeometricField< Type, PatchField, GeoMesh > & null()
Return a null geometric field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list of keyword definitions, which are a keyword followed by any number of values (e....
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
Mesh data needed to do the Finite Volume discretisation.
Specialisation of patchDist for wall distance calculation.
Calculation of approximate distance to nearest patch for all cells and boundary by solving the Eikona...
virtual bool correct(volScalarField &y)
Correct the given distance-to-patch field.
advectionDiffusion(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
Construct from coefficients dictionary, mesh.
Calculate the divergence of the given field.
Calculate the gradient of the given field.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for the laplacian of the field.
Calculate the matrix for implicit and explicit sources.
const fvPatchList & patches
void correct(const RdeltaTType &rDeltaT, const RhoType &rho, volScalarField &psi, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar e
Elementary charge.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > laplacian(const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
defineTypeNameAndDebug(advectionDiffusion, 0)
addToRunTimeSelectionTable(patchDistMethod, advectionDiffusion, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimless
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.