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::Boundary& 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;
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;
Graphite solid properties.
#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.
rDeltaT correctBoundaryConditions()
virtual bool fixesValue() const
Return true if this patch field fixes a value.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField vectorField(fieldObject, mesh)
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.
makeFvGradScheme(faceMDLimitedGrad)
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...
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
volScalarField scalarField(fieldObject, mesh)
const Mesh & mesh() const
Return mesh.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const labelUList & owner() const
Internal face owner.
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
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.
A class for managing temporary objects.
const dimensionedVector & g
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.