Go to the documentation of this file.
71 if (applyLowWeightCorrection())
76 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta(),
83 interpolate(nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta());
91 scalar di =
mag(deltas[facei]);
92 scalar dni =
mag(nbrDeltas[facei]);
94 w[facei] = dni/(di + dni);
134 if (applyLowWeightCorrection())
139 nbrPatch.coupledFvPatch::delta(),
145 tnbrPatchD =
interpolate(nbrPatch.coupledFvPatch::delta());
158 const vector& ddi = patchD[facei];
159 const vector& dni = nbrPatchD[facei];
161 pdv[facei] = ddi - dni;
168 const vector& ddi = patchD[facei];
169 const vector& dni = nbrPatchD[facei];
171 pdv[facei] = ddi -
transform(forwardT()[0], dni);
189 return patchInternalField(internalData);
199 return neighbFvPatch().patchInternalField(iF);
205 if (!owner() || !cyclicAMIPolyPatch_.createAMIFaces())
213 const_cast<vectorField&
>(Sf()) = cyclicAMIPolyPatch_.faceAreas();
214 const_cast<vectorField&
>(Cf()) = cyclicAMIPolyPatch_.faceCentres();
229 surfaceScalarField::Boundary& meshPhiBf =
meshPhi.boundaryFieldRef();
231 if (cyclicAMIPolyPatch_.owner())
236 const face&
f = cyclicAMIPolyPatch_.localFaces()[facei];
241 const scalar geomArea =
f.mag(cyclicAMIPolyPatch_.localPoints());
243 const scalar scaledArea = magSf()[facei];
244 phip[facei] *= scaledArea/geomArea;
250 AMI().srcMap().distribute(srcMeshPhi);
256 forAll(tgtToSrcAddr, tgtFacei)
259 const label srcFacei = tgtToSrcAddr[tgtFacei][0];
260 nbrPhip[tgtFacei] = -srcMeshPhi[srcFacei];
264 <<
"patch:" <<
patch().name()
265 <<
" sum(area):" <<
gSum(magSf())
266 <<
" min(mag(faceAreas):" <<
gMin(magSf())
267 <<
" sum(meshPhi):" <<
gSum(phip) <<
nl
268 <<
" sum(nbrMeshPhi):" <<
gSum(nbrPhip) <<
nl
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const bMesh & mesh() const
const vectorField & Sf() const
Return face area vectors.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
virtual void makeNonOrthoDeltaCoeffs(scalarField &) const
Correct patch non-ortho deltaCoeffs.
static bool & parRun()
Test if this a parallel run, or allow modify access.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gSum(const FieldField< Field, Type > &f)
virtual void makeDeltaCoeffs(scalarField &) const
Correct patch deltaCoeffs.
const fvMesh & mesh() const
Return the mesh reference.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual void makeNonOrthoCorrVectors(vectorField &) const
Correct patch non-ortho correction vectors.
#define forAll(list, i)
Loop across all elements in list.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
tmp< vectorField > nf() const
Return face normals.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
const vectorField & Cf() const
Return face centres.
virtual bool coupled() const
label index() const
Return the index of this patch in the fvBoundaryMesh.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
commsTypes
Types of communications.
#define DebugInfo
Report an information message using Foam::Info.
const vectorField::subField faceCentres() const
Return face centres.
const std::string patch
OpenFOAM patch number as a std::string.
void makeWeights(scalarField &) const
Make patch weighting factors.
const vectorField::subField faceAreas() const
Return face normals.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
const Time & time() const
Return the top-level database.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return local reference cast into the cyclic patch.
A face is a list of labels corresponding to mesh vertices.
Cyclic patch for Arbitrary Mesh Interface (AMI)
Type gMin(const FieldField< Field, Type > &f)
bool processorCase() const
Return true if this is a processor case.
const scalarField & magSf() const
Return face area magnitudes.
defineTypeNameAndDebug(combustionModel, 0)
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
virtual void movePoints()
Correct patches after moving points.