48 skewCorrectionVectors_
52 "skewCorrectionVectors",
53 mesh.pointsInstance(),
63 calcSkewCorrectionVectors();
71 void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
84 const labelUList& neighbour = mesh().neighbour();
88 label own = owner[facei];
89 label nei = neighbour[facei];
92 vector Cpf = Cf[facei] -
C[own];
94 skewCorrectionVectors_[facei] =
95 Cpf - ((Sf[facei] & Cpf)/(Sf[facei] & d))*d;
99 skewCorrectionVectors_.boundaryFieldRef();
105 if (!patchSkewCorrVecs.coupled())
107 patchSkewCorrVecs =
Zero;
111 const fvPatch&
p = patchSkewCorrVecs.patch();
120 patchFaceCentres[patchFacei] -
C[faceCells[patchFacei]];
122 patchSkewCorrVecs[patchFacei] =
125 (patchSf[patchFacei] & Cpf)/
126 (patchSf[patchFacei] & patchD[patchFacei])
127 )*patchD[patchFacei];
132 scalar skewCoeff = 0.0;
134 if (Sf.primitiveField().size())
137 max(
mag(skewCorrectionVectors_)*mesh().deltaCoeffs()).value();
145 if (skewCoeff < 1
e-5)
156 Info<<
" Finished constructing skew correction vectors" <<
endl;
163 calcSkewCorrectionVectors();
static const Foam::dimensionedScalar C("C", Foam::dimTemperature, 234.5)
#define forAll(list, i)
Loop across all elements in list.
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Mesh data needed to do the Finite Volume discretisation.
Skew-correction vectors for the skewness-corrected interpolation scheme.
virtual bool movePoints()
Update the correction vectors when the mesh moves.
virtual ~skewCorrectionVectors()
Destructor.
skewCorrectionVectors(const fvMesh &mesh)
#define InfoInFunction
Report an information message using Foam::Info.
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
Vector< scalar > vector
A scalar version of the templated Vector.
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Field< vector > vectorField
Specialisation of Field<T> for vector.
SurfaceField< vector > surfaceVectorField
UList< label > labelUList
fvsPatchField< vector > fvsPatchVectorField