Go to the documentation of this file.
48 "linearUpwindV::correction(" + vf.name() +
')',
49 mesh.time().timeName(),
84 > tgradVf = gradScheme_().grad(vf, gradSchemeName_);
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);
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);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
#define makelimitedSurfaceInterpolationTypeScheme(SS, Type)
Mesh data needed to do the Finite Volume discretisation.
linearUpwindV interpolation scheme class derived from upwind and returns upwind weighting factors but...
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the explicit correction to the face-interpolate.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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...
Graphite solid properties.
Generic GeometricField class.
virtual bool coupled() const
Return true if this patch field is coupled.
dimensioned< scalar > magSqr(const dimensioned< Type > &)