48 const fvMesh&
mesh = vsf.mesh();
50 tmp<volVectorField> tGrad = basicGradScheme_().calcGrad(vsf, name);
60 const labelUList& neighbour = mesh.neighbour();
70 label own = owner[facei];
71 label nei = neighbour[facei];
73 scalar vsfOwn = vsf[own];
74 scalar vsfNei = vsf[nei];
76 maxVsf[own] =
max(maxVsf[own], vsfNei);
77 minVsf[own] =
min(minVsf[own], vsfNei);
79 maxVsf[nei] =
max(maxVsf[nei], vsfOwn);
80 minVsf[nei] =
min(minVsf[nei], vsfOwn);
84 const volScalarField::Boundary& bsf = vsf.boundaryField();
94 const scalarField psfNei(psf.patchNeighbourField());
98 label own = pOwner[pFacei];
99 scalar vsfNei = psfNei[pFacei];
101 maxVsf[own] =
max(maxVsf[own], vsfNei);
102 minVsf[own] =
min(minVsf[own], vsfNei);
109 label own = pOwner[pFacei];
110 scalar vsfNei = psf[pFacei];
112 maxVsf[own] =
max(maxVsf[own], vsfNei);
113 minVsf[own] =
min(minVsf[own], vsfNei);
123 const scalarField maxMinVsf((1.0/k_ - 1.0)*(maxVsf - minVsf));
137 label own = owner[facei];
138 label nei = neighbour[facei];
146 (Cf[facei] - C[own]) & g[own]
155 (Cf[facei] - C[nei]) & g[nei]
166 label own = pOwner[pFacei];
173 (pCf[pFacei] - C[own]) & g[own]
180 Info<<
"gradient limiter for: " << vsf.name()
181 <<
" max = " <<
gMax(limiter)
182 <<
" min = " <<
gMin(limiter)
186 g.primitiveFieldRef() *=
limiter;
187 g.correctBoundaryConditions();
224 label own = owner[facei];
225 label nei = neighbour[facei];
227 const vector& vsfOwn = vsf[own];
228 const vector& vsfNei = vsf[nei];
230 maxVsf[own] =
max(maxVsf[own], vsfNei);
231 minVsf[own] =
min(minVsf[own], vsfNei);
233 maxVsf[nei] =
max(maxVsf[nei], vsfOwn);
234 minVsf[nei] =
min(minVsf[nei], vsfOwn);
251 label own = pOwner[pFacei];
252 const vector& vsfNei = psfNei[pFacei];
254 maxVsf[own] =
max(maxVsf[own], vsfNei);
255 minVsf[own] =
min(minVsf[own], vsfNei);
262 label own = pOwner[pFacei];
263 const vector& vsfNei = psf[pFacei];
265 maxVsf[own] =
max(maxVsf[own], vsfNei);
266 minVsf[own] =
min(minVsf[own], vsfNei);
276 const vectorField maxMinVsf((1.0/k_ - 1.0)*(maxVsf - minVsf));
290 label own = owner[facei];
291 label nei = neighbour[facei];
299 (Cf[facei] - C[own]) & g[own]
308 (Cf[facei] - C[nei]) & g[nei]
319 label own = pOwner[pFacei];
326 ((pCf[pFacei] - C[own]) & g[own])
333 Info<<
"gradient limiter for: " << vsf.
name()
Graphite solid properties.
void limiter(scalarField &allLambda, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phiBD, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su, const scalar psiMax, const scalar psiMin)
#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.
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad(const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
makeFvGradScheme(cellLimitedGrad)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
Type gMin(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField vectorField(fieldObject, mesh)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
GeometricField< vector, fvPatchField, volMesh > volVectorField
UList< label > labelUList
const labelUList & neighbour() const
Internal face neighbour.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from string.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
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< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
volScalarField scalarField(fieldObject, mesh)
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
const dimensionedVector & g
const Mesh & mesh() const
Return mesh.
Type gMax(const FieldField< Field, Type > &f)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const labelUList & owner() const
Internal face owner.
Type gAverage(const FieldField< Field, Type > &f)
U correctBoundaryConditions()
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
const volVectorField & C() const
Return cell centres as volVectorField.
A class for managing temporary objects.
Tensor< scalar > tensor
Tensor of scalars.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.