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;
static const Foam::dimensionedScalar C("C", Foam::dimTemperature, 234.5)
#define forAll(list, i)
Loop across all elements in list.
Graphite solid properties.
const Mesh & 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.
makeFvGradScheme(faceMDLimitedGrad)
volScalarField scalarField(fieldObject, mesh)
volVectorField vectorField(fieldObject, mesh)
U correctBoundaryConditions()
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.
word name(const bool)
Return a word representation of a bool.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
SurfaceField< vector > surfaceVectorField
UList< label > labelUList
fvPatchField< scalar > fvPatchScalarField