27 #include "surfaceInterpolate.H"
44 template<
class Type,
class GType>
91 template<
class Type,
class GType>
99 const fvMesh& mesh = this->mesh();
105 "gammaSnGradCorr("+vf.
name()+
')',
112 for (
direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
114 tgammaSnGradCorr.ref().replace
121 return tgammaSnGradCorr;
127 template<
class Type,
class GType>
134 const fvMesh& mesh = this->mesh();
141 tLaplacian.
ref().rename(
"laplacian(" + vf.
name() +
')');
147 template<
class Type,
class GType>
155 const fvMesh& mesh = this->mesh();
169 this->tsnGradScheme_().deltaCoeffs(vf),
175 = gammaSnGradCorr(SfGammaCorr, vf);
177 if (this->tsnGradScheme_().corrected())
179 tfaceFluxCorrection.
ref() +=
180 SfGammaSn*this->tsnGradScheme_().correction(vf);
183 fvm.
source() -= mesh.
V()*
fvc::div(tfaceFluxCorrection())().primitiveField();
194 template<
class Type,
class GType>
202 const fvMesh& mesh = this->mesh();
216 SfGammaSn*this->tsnGradScheme_().
snGrad(vf)
217 + gammaSnGradCorr(SfGammaCorr, vf)
221 tLaplacian.
ref().rename
223 "laplacian(" + gamma.
name() +
',' + vf.
name() +
')'
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet & dimensions() const
Return dimensions.
Generic GeometricField class.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
const word & name() const
Return name.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SurfaceField< Type > *& faceFluxCorrectionPtr()
Return pointer to face-flux non-orthogonal correction field.
FieldField< Field, Type > & internalCoeffs()
fvBoundary scalar field containing pseudo-matrix coeffs
FieldField< Field, Type > & boundaryCoeffs()
fvBoundary scalar field containing pseudo-matrix coeffs
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const fvSchemes & schemes() const
Return the fvSchemes.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual bool coupled() const
Return true if this patch field is coupled.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
bool fluxRequired(const word &name) const
Basic second-order laplacian using face-gradients and Gauss' theorem.
tmp< fvMatrix< Type > > fvmLaplacian(const SurfaceField< GType > &, const VolField< Type > &)
static tmp< fvMatrix< Type > > fvmLaplacianUncorrected(const surfaceScalarField &gammaMagSf, const surfaceScalarField &deltaCoeffs, const VolField< Type > &)
tmp< VolField< Type > > fvcLaplacian(const VolField< Type > &)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
A class for managing temporary objects.
T * ptr() const
Return tmp pointer for reuse.
T & ref() const
Return non-const reference or generate a fatal error.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the divergence of the given field.
Calculate the gradient of the given field.
static tmp< SurfaceField< typename innerProduct< vector, Type >::type > > dotInterpolate(const surfaceVectorField &Sf, const VolField< Type > &tvf)
Interpolate field onto faces.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
static scalar Sn(const scalar a, const scalar x)