46 "linearUpwindV::correction(" + vf.
name() +
')',
76 > tgradVf = gradScheme_().grad(vf, gradSchemeName_);
80 typename outerProduct<vector, Type>::type,
83 >& gradVf = tgradVf();
89 if (faceFlux[facei] > 0.0)
92 (1.0 - w[facei])*(vf[nei[facei]] - vf[own[facei]]);
95 (Cf[facei] - C[own[facei]]) & gradVf[own[facei]];
100 w[facei]*(vf[own[facei]] - vf[nei[facei]]);
103 (Cf[facei] - C[nei[facei]]) & gradVf[nei[facei]];
106 scalar sfCorrs =
magSqr(sfCorr[facei]);
107 scalar maxCorrs = sfCorr[facei] & maxCorr;
113 sfCorr[facei] =
Zero;
115 else if (sfCorrs > maxCorrs)
117 sfCorr[facei] *= maxCorrs/(sfCorrs + vSmall);
124 Boundary& bSfCorr = sfCorr.boundaryFieldRef();
142 gradVf.boundaryField()[
patchi].patchNeighbourField()
155 label own = pOwner[facei];
159 if (pFaceFlux[facei] > 0)
161 pSfCorr[facei] = (pCf[facei] - C[own]) & gradVf[own];
163 maxCorr = (1.0 - pW[facei])*(pVfNei[facei] - vf[own]);
168 (pCf[facei] - pd[facei] - C[own]) & pGradVfNei[facei];
170 maxCorr = pW[facei]*(vf[own] - pVfNei[facei]);
173 scalar pSfCorrs =
magSqr(pSfCorr[facei]);
174 scalar maxCorrs = pSfCorr[facei] & maxCorr;
180 pSfCorr[facei] =
Zero;
182 else if (pSfCorrs > maxCorrs)
184 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.
Generic dimensioned Type class.
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)
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.