60 deltaCoeffs_(nullptr),
61 nonOrthDeltaCoeffs_(nullptr),
62 nonOrthCorrectionVectors_(nullptr)
96 return (*deltaCoeffs_);
103 if (!nonOrthDeltaCoeffs_)
105 makeNonOrthDeltaCoeffs();
108 return (*nonOrthDeltaCoeffs_);
115 if (!nonOrthCorrectionVectors_)
117 makeNonOrthCorrectionVectors();
120 return (*nonOrthCorrectionVectors_);
135 void Foam::surfaceInterpolation::makeWeights()
const 139 Pout<<
"surfaceInterpolation::makeWeights() : " 140 <<
"Constructing weighting factors for face interpolation" 181 const scalar SfdOwn =
mag(Sf[facei]&(Cf[facei] - C[owner[facei]]));
182 const scalar SfdNei =
mag(Sf[facei]&(C[neighbour[facei]] - Cf[facei]));
183 const scalar SfdOwnNei = SfdOwn + SfdNei;
185 if (SfdNei/vGreat < SfdOwnNei)
187 w[facei] = SfdNei/SfdOwnNei;
191 const scalar dOwn =
mag(Cf[facei] - C[owner[facei]]);
192 const scalar dNei =
mag(C[neighbour[facei]] - Cf[facei]);
193 const scalar dOwnNei = dOwn + dNei;
195 w[facei] = dNei/dOwnNei;
209 Pout<<
"surfaceInterpolation::makeWeights() : " 210 <<
"Finished constructing weighting factors for face interpolation" 216 void Foam::surfaceInterpolation::makeDeltaCoeffs()
const 220 Pout<<
"surfaceInterpolation::makeDeltaCoeffs() : " 221 <<
"Constructing interpolation factors array for face gradient" 253 deltaCoeffs[facei] = 1.0/
mag(C[neighbour[facei]] - C[owner[facei]]);
266 void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs()
const 270 Pout<<
"surfaceInterpolation::makeNonOrthDeltaCoeffs() : " 271 <<
"Constructing interpolation factors array for face gradient" 283 "nonOrthDeltaCoeffs",
305 vector delta = C[neighbour[facei]] - C[owner[facei]];
306 vector unitArea = Sf[facei]/magSf[facei];
318 nonOrthDeltaCoeffs[facei] = 1.0/
max(unitArea & delta, 0.05*
mag(delta));
328 nonOrthDeltaCoeffsBf[
patchi] =
334 void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors()
const 338 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : " 339 <<
"Constructing non-orthogonal correction vectors" 347 "nonOrthCorrectionVectors",
369 vector unitArea = Sf[facei]/magSf[facei];
370 vector delta = C[neighbour[facei]] - C[owner[facei]];
372 corrVecs[facei] = unitArea - delta*NonOrthDeltaCoeffs[facei];
388 patchCorrVecs =
Zero;
407 patchCorrVecs[patchFacei] =
408 unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei];
415 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : " 416 <<
"Finished constructing non-orthogonal correction vectors"
Graphite solid properties.
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
bool movePoints()
Do what is necessary if the mesh has moved.
const dimensionSet dimless
const surfaceVectorField & nonOrthCorrectionVectors() const
Return reference to non-orthogonality correction vectors.
const dimensionSet dimLength
const labelUList & neighbour() const
Internal face neighbour.
const surfaceScalarField & nonOrthDeltaCoeffs() const
Return reference to non-orthogonal cell-centre difference.
const fileName & pointsInstance() const
Return the current instance directory for points.
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
virtual bool coupled() const
Return true if this patch field is coupled.
surfaceInterpolation(const fvMesh &)
Construct given an fvMesh.
const vectorField & cellCentres() const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
~surfaceInterpolation()
Destructor.
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
defineTypeNameAndDebug(combustionModel, 0)
const labelUList & owner() const
Internal face owner.
const fvPatch & patch() const
Return patch.
const vectorField & faceCentres() const
Template functions to aid in the implementation of demand driven data.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
void clearOut()
Clear all geometry and addressing.
prefixOSstream Pout(cout, "Pout")
Mesh data needed to do the Finite Volume discretisation.
const vectorField & faceAreas() const
dimensioned< scalar > mag(const dimensioned< Type > &)
const volVectorField & C() const
Return cell centres.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void deleteDemandDrivenData(DataPtr &dataPtr)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
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.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.