48 "linearUpwindV::correction(" + vf.
name() +
')',
84 > tgradVf = gradScheme_().grad(vf, gradSchemeName_);
88 typename outerProduct<vector, Type>::type,
91 >& gradVf = tgradVf();
97 if (faceFlux[facei] > 0.0)
100 (1.0 - w[facei])*(vf[nei[facei]] - vf[own[facei]]);
103 (Cf[facei] - C[own[facei]]) & gradVf[own[facei]];
108 w[facei]*(vf[own[facei]] - vf[nei[facei]]);
111 (Cf[facei] - C[nei[facei]]) & gradVf[nei[facei]];
114 scalar sfCorrs =
magSqr(sfCorr[facei]);
115 scalar maxCorrs = sfCorr[facei] & maxCorr;
121 sfCorr[facei] = vector::zero;
123 else if (sfCorrs > maxCorrs)
125 sfCorr[facei] *= maxCorrs/(sfCorrs + VSMALL);
132 GeometricBoundaryField& bSfCorr = sfCorr.boundaryField();
150 gradVf.boundaryField()[
patchi].patchNeighbourField()
163 label own = pOwner[facei];
167 if (pFaceFlux[facei] > 0)
169 pSfCorr[facei] = (pCf[facei] - C[own]) & gradVf[own];
171 maxCorr = (1.0 - pW[facei])*(pVfNei[facei] - vf[own]);
176 (pCf[facei] - pd[facei] - C[own]) & pGradVfNei[facei];
178 maxCorr = pW[facei]*(vf[own] - pVfNei[facei]);
181 scalar pSfCorrs =
magSqr(pSfCorr[facei]);
182 scalar maxCorrs = pSfCorr[facei] & maxCorr;
188 pSfCorr[facei] = vector::zero;
190 else if (pSfCorrs > maxCorrs)
192 pSfCorr[facei] *= maxCorrs/(pSfCorrs + VSMALL);
Mesh data needed to do the Finite Volume discretisation.
virtual bool coupled() const
Return true if this patch field is coupled.
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
Mesh data needed to do the Finite Volume discretisation.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
#define makelimitedSurfaceInterpolationTypeScheme(SS, Type)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const labelUList & owner() const
Internal face owner.
Graphite solid properties.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
const Time & time() const
Return the top-level database.
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
Generic dimensioned Type class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const volVectorField & C() const
Return cell centres as volVectorField.
const dimensionSet & dimensions() const
Return dimensions.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const word & name() const
Return name.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the face-interpolate.
Generic GeometricField class.
Traits class for primitives.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
linearUpwindV interpolation scheme class derived from upwind and returns upwind weighting factors but...
const labelUList & neighbour() const
Internal face neighbour.
A class for managing temporary objects.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.