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 scalar SfdOwn =
mag(Sf[facei] & (Cf[facei] - C[owner[facei]]));
182 scalar SfdNei =
mag(Sf[facei] & (C[neighbour[facei]] - Cf[facei]));
183 w[facei] = SfdNei/(SfdOwn + SfdNei);
186 surfaceScalarField::Boundary& wBf =
196 Pout<<
"surfaceInterpolation::makeWeights() : " 197 <<
"Finished constructing weighting factors for face interpolation" 203 void Foam::surfaceInterpolation::makeDeltaCoeffs()
const 207 Pout<<
"surfaceInterpolation::makeDeltaCoeffs() : " 208 <<
"Constructing differencing factors array for face gradient" 240 deltaCoeffs[facei] = 1.0/
mag(C[neighbour[facei]] - C[owner[facei]]);
243 surfaceScalarField::Boundary& deltaCoeffsBf =
253 void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs()
const 257 Pout<<
"surfaceInterpolation::makeNonOrthDeltaCoeffs() : " 258 <<
"Constructing differencing factors array for face gradient" 270 "nonOrthDeltaCoeffs",
292 vector delta = C[neighbour[facei]] - C[owner[facei]];
293 vector unitArea = Sf[facei]/magSf[facei];
305 nonOrthDeltaCoeffs[facei] = 1.0/
max(unitArea & delta, 0.05*
mag(delta));
308 surfaceScalarField::Boundary& nonOrthDeltaCoeffsBf =
315 nonOrthDeltaCoeffsBf[
patchi] =
321 void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors()
const 325 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : " 326 <<
"Constructing non-orthogonal correction vectors" 334 "nonOrthCorrectionVectors",
356 vector unitArea = Sf[facei]/magSf[facei];
357 vector delta = C[neighbour[facei]] - C[owner[facei]];
359 corrVecs[facei] = unitArea - delta*NonOrthDeltaCoeffs[facei];
366 surfaceVectorField::Boundary& corrVecsBf =
375 patchCorrVecs =
Zero;
394 patchCorrVecs[patchFacei] =
395 unitArea - delta*patchNonOrthDeltaCoeffs[patchFacei];
402 Pout<<
"surfaceInterpolation::makeNonOrthCorrectionVectors() : " 403 <<
"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.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
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 neccessary if the mesh has moved.
const surfaceVectorField & nonOrthCorrectionVectors() const
Return reference to non-orthogonality correction vectors.
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.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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 as volVectorField.
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.