88 Type dDotGradDelta = 0.5*
90 (
C[nei[facei]] -
C[own[facei]])
91 & (secondfGrad[nei[facei]] - secondfGrad[own[facei]])
94 fGrad[own[facei]] -=
lambda[facei]*ownLs[facei]*dDotGradDelta;
95 fGrad[nei[facei]] -= (1.0 -
lambda[facei])*neiLs[facei]*dDotGradDelta;
101 if (secondfGrad.boundaryField()[patchi].coupled())
117 secondfGrad.boundaryField()[patchi].patchNeighbourField()
123 0.5*lambdap[patchFacei]*patchOwnLs[patchFacei]
127 neighbourSecondfGrad[patchFacei]
135 fGrad.correctBoundaryConditions();
172 "leastSquaresGrad(" + vsf.
name() +
")"
174 const GradFieldType& secondfGrad = tsecondfGrad();
228 "leastSquaresGrad(" + vsf.
name() +
")"
231 calcGrad(fGrad, vsf, tsecondfGrad());
Graphite solid properties.
const Mesh & mesh() const noexcept
Return const reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic GeometricField class.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const fileName & instance() const noexcept
Read access to instance path component.
static FOAM_NO_DANGLING_REFERENCE const leastSquaresVectors & New(const fvMesh &mesh, Args &&... args)
Smooth ATC in cells next to a set of patches supplied by type.
Mesh data needed to do the Finite Volume discretisation.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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 for optional caching.
static void correctBoundaryConditions(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > &)
Correct the boundary values of the gradient using the patchField snGrad functions.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvPatchField, volMesh > &, const word &name) const
Calculate and return the grad of the given field which may have been cached.
const fvMesh & mesh() const
Return const reference to mesh.
Second-order gradient scheme using least-squares.
Least-squares gradient scheme vectors.
const surfaceVectorField & pVectors() const
Return const reference to owner least square vectors.
const surfaceVectorField & nVectors() const
Return const reference to neighbour least square vectors.
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from Foam::string.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
UList< label > labelUList
A UList of labels.
fvsPatchField< vector > fvsPatchVectorField
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
#define forAll(list, i)
Loop across all elements in list.