43 Foam::
fv::faceMDLimitedGrad<
Foam::scalar>::calcGrad
49 const fvMesh&
mesh = vsf.mesh();
51 tmp<volVectorField> tGrad = basicGradScheme_().calcGrad(vsf, name);
61 const labelUList& neighbour = mesh.neighbour();
66 scalar rk = (1.0/k_ - 1.0);
70 label own = owner[facei];
71 label nei = neighbour[facei];
73 scalar vsfOwn = vsf[own];
74 scalar vsfNei = vsf[nei];
76 scalar maxFace =
max(vsfOwn, vsfNei);
77 scalar minFace =
min(vsfOwn, vsfNei);
81 scalar maxMinFace = rk*(maxFace - minFace);
82 maxFace += maxMinFace;
83 minFace -= maxMinFace;
87 cellMDLimitedGrad<scalar>::limitFace
96 cellMDLimitedGrad<scalar>::limitFace
105 const volScalarField::GeometricBoundaryField& bsf = vsf.boundaryField();
116 const scalarField psfNei(psf.patchNeighbourField());
120 label own = pOwner[pFacei];
122 scalar vsfOwn = vsf[own];
123 scalar vsfNei = psfNei[pFacei];
125 scalar maxFace =
max(vsfOwn, vsfNei);
126 scalar minFace =
min(vsfOwn, vsfNei);
130 scalar maxMinFace = rk*(maxFace - minFace);
131 maxFace += maxMinFace;
132 minFace -= maxMinFace;
135 cellMDLimitedGrad<scalar>::limitFace
144 else if (psf.fixesValue())
148 label own = pOwner[pFacei];
150 scalar vsfOwn = vsf[own];
151 scalar vsfNei = psf[pFacei];
153 scalar maxFace =
max(vsfOwn, vsfNei);
154 scalar minFace =
min(vsfOwn, vsfNei);
158 scalar maxMinFace = rk*(maxFace - minFace);
159 maxFace += maxMinFace;
160 minFace -= maxMinFace;
163 cellMDLimitedGrad<scalar>::limitFace
174 g.correctBoundaryConditions();
206 scalar rk = (1.0/k_ - 1.0);
210 label own = owner[facei];
211 label nei = neighbour[facei];
221 vector maxMinFace = rk*(maxFace - minFace);
222 maxFace += maxMinFace;
223 minFace -= maxMinFace;
247 const volVectorField::GeometricBoundaryField& bvf = vvf.
boundaryField();
262 label own = pOwner[pFacei];
265 vector vvfNei = psfNei[pFacei];
272 vector maxMinFace = rk*(maxFace - minFace);
273 maxFace += maxMinFace;
274 minFace -= maxMinFace;
280 maxFace - vvfOwn, minFace - vvfOwn,
289 label own = pOwner[pFacei];
292 vector vvfNei = psf[pFacei];
299 vector maxMinFace = rk*(maxFace - minFace);
300 maxFace += maxMinFace;
301 minFace -= maxMinFace;
UList< label > labelUList
Mesh data needed to do the Finite Volume discretisation.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
A class for handling words, derived from string.
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 labelUList & owner() const
Internal face owner.
Graphite solid properties.
const Mesh & mesh() const
Return mesh.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
virtual bool coupled() const
Return true if this patch field is coupled.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
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.
const volVectorField & C() const
Return cell centres as volVectorField.
volVectorField vectorField(fieldObject, mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual bool fixesValue() const
Return true if this patch field fixes a value.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
fvPatchField< scalar > fvPatchScalarField
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionedVector & g
void correctBoundaryConditions()
Correct boundary field.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const labelUList & neighbour() const
Internal face neighbour.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
U correctBoundaryConditions()
makeFvGradScheme(faceMDLimitedGrad)
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
volScalarField scalarField(fieldObject, mesh)
A class for managing temporary objects.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.