Go to the documentation of this file.
46 skewCorrectionVectors_
50 "skewCorrectionVectors",
51 mesh_.pointsInstance(),
61 calcSkewCorrectionVectors();
69 void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
79 const labelUList& neighbour = mesh_.neighbour();
83 label own = owner[facei];
84 label nei = neighbour[facei];
87 vector Cpf = Cf[facei] -
C[own];
89 skewCorrectionVectors_[facei] =
90 Cpf - ((Sf[facei] & Cpf)/(Sf[facei] & d))*d;
93 surfaceVectorField::Boundary& skewCorrVecsBf =
94 skewCorrectionVectors_.boundaryFieldRef();
96 forAll(skewCorrVecsBf, patchi)
100 if (!patchSkewCorrVecs.coupled())
102 patchSkewCorrVecs =
Zero;
106 const fvPatch&
p = patchSkewCorrVecs.patch();
115 patchFaceCentres[patchFacei] -
C[faceCells[patchFacei]];
117 patchSkewCorrVecs[patchFacei] =
120 (patchSf[patchFacei] & Cpf)/
121 (patchSf[patchFacei] & patchD[patchFacei])
122 )*patchD[patchFacei];
127 scalar skewCoeff = 0.0;
132 max(
mag(skewCorrectionVectors_)*mesh_.deltaCoeffs()).value();
137 if (skewCoeff < 1
e-5)
148 Info<<
" Finished constructing skew correction vectors" <<
endl;
155 calcSkewCorrectionVectors();
int debug
Static debugging option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual ~skewCorrectionVectors()
Destructor.
static constexpr const zero Zero
Global zero (0)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
skewCorrectionVectors(const fvMesh &mesh)
Field< vector > vectorField
Specialisation of Field<T> for vector.
fvsPatchField< vector > fvsPatchVectorField
messageStream Info
Information stream (stdout output on master, null elsewhere)
#define DebugInFunction
Report an information message using Foam::Info.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Mesh data needed to do the Finite Volume discretisation.
Skew-correction vectors for the skewness-corrected interpolation scheme.
Vector< scalar > vector
A scalar version of the templated Vector.
virtual bool movePoints()
Update the correction vectors when the mesh moves.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
UList< label > labelUList
A UList of labels.
Graphite solid properties.
defineTypeNameAndDebug(combustionModel, 0)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const dimensionSet dimless
Dimensionless.