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] =
Zero;
123 else if (sfCorrs > maxCorrs)
125 sfCorr[facei] *= maxCorrs/(sfCorrs + VSMALL);
132 Boundary& bSfCorr = sfCorr.boundaryFieldRef();
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] =
Zero;
190 else if (pSfCorrs > maxCorrs)
192 pSfCorr[facei] *= maxCorrs/(pSfCorrs + VSMALL);
Graphite solid properties.
#define forAll(list, i)
Loop across all elements in list.
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 word & name() const
Return name.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Generic GeometricField class.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Generic dimensioned Type class.
const Time & time() const
Return the top-level database.
const labelUList & neighbour() const
Internal face neighbour.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the face-interpolate.
const dimensionSet & dimensions() const
Return dimensions.
Mesh data needed to do the Finite Volume discretisation.
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
virtual bool coupled() const
Return true if this patch field is coupled.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const labelUList & owner() const
Internal face owner.
Internal & ref()
Return a reference to the dimensioned internal field.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres as volVectorField.
A class for managing temporary objects.
#define makelimitedSurfaceInterpolationTypeScheme(SS, Type)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
linearUpwindV interpolation scheme class derived from upwind and returns upwind weighting factors but...
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.