48 skewCorrectionVectors_
52 "skewCorrectionVectors",
53 mesh.pointsInstance(),
63 calcSkewCorrectionVectors();
71 void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
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();
#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, GeoMesh, PrimitiveField > 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.
const volVectorField & C() const
Return cell centres.
const labelUList & owner() const
Internal face owner.
const surfaceVectorField & Cf() const
Return face centres.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const labelUList & neighbour() const
Internal face neighbour.
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)
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define InfoInFunction
Report an information message using Foam::Info.
static const coefficient C("C", dimTemperature, 234.5)
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
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Vector< scalar > vector
A scalar version of the templated Vector.
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