37 upwind<Type>(mesh, faceFlux),
38 gradSchemeName_(
"grad"),
41 new
fv::gaussGrad<Type>(mesh)
53 upwind<Type>(mesh, schemeData),
54 gradSchemeName_(schemeData),
57 fv::gradScheme<Type>::
New
60 mesh.schemes().
grad(gradSchemeName_)
74 upwind<Type>(mesh, faceFlux, schemeData),
75 gradSchemeName_(schemeData),
78 fv::gradScheme<Type>::
New
81 mesh.schemes().
grad(gradSchemeName_)
96 const fvMesh& mesh = this->mesh();
102 "linearUpwindV::correction(" + vf.
name() +
')',
126 gradScheme_().
grad(vf, gradSchemeName_)
136 if (faceFlux[facei] > 0.0)
139 (1.0 - w[facei])*(vf[nei[facei]] - vf[own[facei]]);
142 (Cf[facei] -
C[own[facei]]) & gradVf[own[facei]];
147 w[facei]*(vf[own[facei]] - vf[nei[facei]]);
150 (Cf[facei] -
C[nei[facei]]) & gradVf[nei[facei]];
153 scalar sfCorrs =
magSqr(sfCorr[facei]);
154 scalar maxCorrs = sfCorr[facei] & maxCorr;
160 sfCorr[facei] =
Zero;
162 else if (sfCorrs > maxCorrs)
164 sfCorr[facei] *= maxCorrs/(sfCorrs + vSmall);
202 label own = pOwner[facei];
206 if (pFaceFlux[facei] > 0)
208 pSfCorr[facei] = (pCf[facei] -
C[own]) & gradVf[own];
210 maxCorr = (1.0 - pW[facei])*(pVfNei[facei] - vf[own]);
215 (pCf[facei] - pd[facei] -
C[own]) & pGradVfNei[facei];
217 maxCorr = pW[facei]*(vf[own] - pVfNei[facei]);
220 scalar pSfCorrs =
magSqr(pSfCorr[facei]);
221 scalar maxCorrs = pSfCorr[facei] & maxCorr;
227 pSfCorr[facei] =
Zero;
229 else if (pSfCorrs > maxCorrs)
231 pSfCorr[facei] *= maxCorrs/(pSfCorrs + vSmall);
#define forAll(list, i)
Loop across all elements in list.
Graphite solid properties.
const dimensionSet & dimensions() const
Return dimensions.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const word & name() const
Return name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
const labelUList & owner() const
Internal face owner.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Cf() const
Return face centres.
const labelUList & neighbour() const
Internal face neighbour.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual bool coupled() const
Return true if this patch field is coupled.
linearUpwindV(const fvMesh &mesh, const surfaceScalarField &faceFlux)
Construct from faceFlux.
virtual tmp< SurfaceField< Type > > correction(const VolField< Type > &) const
Return the explicit correction to the face-interpolate.
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Upwind interpolation scheme class.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensioned< scalar > magSqr(const dimensioned< Type > &)