50 "linearUpwindV::correction(" + vf.
name() +
')',
51 mesh.time().timeName(),
81 > tgradVf = gradScheme_().grad(vf, gradSchemeName_);
88 >& gradVf = tgradVf();
94 if (faceFlux[facei] > 0.0)
97 (1.0 - w[facei])*(vf[nei[facei]] - vf[own[facei]]);
100 (Cf[facei] -
C[own[facei]]) & gradVf[own[facei]];
105 w[facei]*(vf[own[facei]] - vf[nei[facei]]);
108 (Cf[facei] -
C[nei[facei]]) & gradVf[nei[facei]];
111 scalar sfCorrs =
magSqr(sfCorr[facei]);
112 scalar maxCorrs = sfCorr[facei] & maxCorr;
118 sfCorr[facei] =
Zero;
120 else if (sfCorrs > maxCorrs)
122 sfCorr[facei] *= maxCorrs/(sfCorrs + VSMALL);
129 Boundary& bSfCorr = sfCorr.boundaryFieldRef();
138 mesh.boundary()[patchi].faceCells();
147 gradVf.boundaryField()[patchi].patchNeighbourField()
160 label own = pOwner[facei];
164 if (pFaceFlux[facei] > 0)
166 pSfCorr[facei] = (pCf[facei] -
C[own]) & gradVf[own];
168 maxCorr = (1.0 - pW[facei])*(pVfNei[facei] - vf[own]);
173 (pCf[facei] - pd[facei] -
C[own]) & pGradVfNei[facei];
175 maxCorr = pW[facei]*(vf[own] - pVfNei[facei]);
178 scalar pSfCorrs =
magSqr(pSfCorr[facei]);
179 scalar maxCorrs = pSfCorr[facei] & maxCorr;
185 pSfCorr[facei] =
Zero;
187 else if (pSfCorrs > maxCorrs)
189 pSfCorr[facei] *= maxCorrs/(pSfCorrs + VSMALL);
Graphite solid properties.
const word & name() const noexcept
Return the object name.
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.
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the face-interpolate.
Mesh data needed to do the Finite Volume discretisation.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual bool coupled() const
True if the patch field is coupled.
Mesh data needed to do the Finite Volume discretisation.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
A class for managing temporary objects.
#define makelimitedSurfaceInterpolationTypeScheme(SS, Type)
Defines the attributes of an object for which implicit objectRegistry management is supported...
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 Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)