47 const fvMesh&
mesh = vsf.mesh();
49 tmp<volVectorField> tGrad = basicGradScheme_().calcGrad(vsf,
name);
64 scalar rk = (1.0/k_ - 1.0);
68 label own = owner[facei];
69 label nei = neighbour[facei];
71 scalar vsfOwn = vsf[own];
72 scalar vsfNei = vsf[nei];
74 scalar maxFace =
max(vsfOwn, vsfNei);
75 scalar minFace =
min(vsfOwn, vsfNei);
79 scalar maxMinFace = rk*(maxFace - minFace);
80 maxFace += maxMinFace;
81 minFace -= maxMinFace;
85 cellMDLimitedGrad<scalar>::limitFace
94 cellMDLimitedGrad<scalar>::limitFace
103 const volScalarField::Boundary& bsf = vsf.boundaryField();
114 const scalarField psfNei(psf.patchNeighbourField());
118 label own = pOwner[pFacei];
120 scalar vsfOwn = vsf[own];
121 scalar vsfNei = psfNei[pFacei];
123 scalar maxFace =
max(vsfOwn, vsfNei);
124 scalar minFace =
min(vsfOwn, vsfNei);
128 scalar maxMinFace = rk*(maxFace - minFace);
129 maxFace += maxMinFace;
130 minFace -= maxMinFace;
133 cellMDLimitedGrad<scalar>::limitFace
142 else if (psf.fixesValue())
146 label own = pOwner[pFacei];
148 scalar vsfOwn = vsf[own];
149 scalar vsfNei = psf[pFacei];
151 scalar maxFace =
max(vsfOwn, vsfNei);
152 scalar minFace =
min(vsfOwn, vsfNei);
156 scalar maxMinFace = rk*(maxFace - minFace);
157 maxFace += maxMinFace;
158 minFace -= maxMinFace;
161 cellMDLimitedGrad<scalar>::limitFace
172 g.correctBoundaryConditions();
204 scalar rk = (1.0/k_ - 1.0);
208 label own = owner[facei];
209 label nei = neighbour[facei];
219 vector maxMinFace = rk*(maxFace - minFace);
220 maxFace += maxMinFace;
221 minFace -= maxMinFace;
260 label own = pOwner[pFacei];
263 vector vvfNei = psfNei[pFacei];
270 vector maxMinFace = rk*(maxFace - minFace);
271 maxFace += maxMinFace;
272 minFace -= maxMinFace;
278 maxFace - vvfOwn, minFace - vvfOwn,
287 label own = pOwner[pFacei];
290 vector vvfNei = psf[pFacei];
297 vector maxMinFace = rk*(maxFace - minFace);
298 maxFace += maxMinFace;
299 minFace -= maxMinFace;
#define forAll(list, i)
Loop across all elements in list.
Graphite solid properties.
const GeoMesh & mesh() const
Return mesh.
Generic GeometricBoundaryField class.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual bool fixesValue() const
Return true if this patch field fixes a value.
virtual bool coupled() const
Return true if this patch field is coupled.
virtual tmp< Field< Type > > patchNeighbourField(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking) const
Return patchField on the opposite patch of a coupled patch.
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
virtual tmp< VolField< typename outerProduct< vector, Type >::type > > calcGrad(const VolField< Type > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
makeFvGradScheme(faceMDLimitedGrad)
volScalarField scalarField(fieldObject, mesh)
volVectorField vectorField(fieldObject, mesh)
U correctBoundaryConditions()
static const coefficient C("C", dimTemperature, 234.5)
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
VolField< scalar > volScalarField
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
SurfaceField< vector > surfaceVectorField
UList< label > labelUList
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
fvPatchField< scalar > fvPatchScalarField