38 gradSchemeName_(
"grad"),
54 gradSchemeName_(schemeData),
60 mesh.schemes().grad(gradSchemeName_)
75 gradSchemeName_(schemeData),
81 mesh.schemes().grad(gradSchemeName_)
102 "linearUpwindV::correction(" + vf.
name() +
')',
132 > tgradVf = gradScheme_().grad(vf, gradSchemeName_);
136 typename outerProduct<vector, Type>::type,
139 >& gradVf = tgradVf();
145 if (faceFlux[facei] > 0.0)
148 (1.0 - w[facei])*(vf[nei[facei]] - vf[own[facei]]);
151 (Cf[facei] - C[own[facei]]) & gradVf[own[facei]];
156 w[facei]*(vf[own[facei]] - vf[nei[facei]]);
159 (Cf[facei] - C[nei[facei]]) & gradVf[nei[facei]];
162 scalar sfCorrs =
magSqr(sfCorr[facei]);
163 scalar maxCorrs = sfCorr[facei] & maxCorr;
169 sfCorr[facei] =
Zero;
171 else if (sfCorrs > maxCorrs)
173 sfCorr[facei] *= maxCorrs/(sfCorrs + vSmall);
180 Boundary& bSfCorr = sfCorr.boundaryFieldRef();
198 gradVf.boundaryField()[
patchi].patchNeighbourField()
211 label own = pOwner[facei];
215 if (pFaceFlux[facei] > 0)
217 pSfCorr[facei] = (pCf[facei] - C[own]) & gradVf[own];
219 maxCorr = (1.0 - pW[facei])*(pVfNei[facei] - vf[own]);
224 (pCf[facei] - pd[facei] - C[own]) & pGradVfNei[facei];
226 maxCorr = pW[facei]*(vf[own] - pVfNei[facei]);
229 scalar pSfCorrs =
magSqr(pSfCorr[facei]);
230 scalar maxCorrs = pSfCorr[facei] & maxCorr;
236 pSfCorr[facei] =
Zero;
238 else if (pSfCorrs > maxCorrs)
240 pSfCorr[facei] *= maxCorrs/(pSfCorrs + vSmall);
Graphite solid properties.
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
const surfaceVectorField & Cf() const
Return face centres.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
linearUpwindV(const fvMesh &mesh, const surfaceScalarField &faceFlux)
Construct from faceFlux.
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
Basic second-order gradient scheme using face-interpolation and Gauss' theorem.
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.
Abstract base class for gradient schemes.
Upwind interpolation scheme class.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
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.