Go to the documentation of this file.
103 if (applyLowWeightCorrection())
108 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta(),
115 interpolate(nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta());
123 scalar di =
mag(deltas[facei]);
124 scalar dni =
mag(nbrDeltas[facei]);
126 w[facei] = dni/(di + dni);
166 if (applyLowWeightCorrection())
171 nbrPatch.coupledFvPatch::delta(),
177 tnbrPatchD =
interpolate(nbrPatch.coupledFvPatch::delta());
190 const vector& ddi = patchD[facei];
191 const vector& dni = nbrPatchD[facei];
193 pdv[facei] = ddi - dni;
200 const vector& ddi = patchD[facei];
201 const vector& dni = nbrPatchD[facei];
203 pdv[facei] = ddi -
transform(forwardT()[0], dni);
221 return patchInternalField(internalData);
231 return patchInternalField(internalData,
faceCells);
241 return neighbFvPatch().patchInternalField(iF);
247 if (!owner() || !cyclicAMIPolyPatch_.createAMIFaces())
255 const_cast<vectorField&
>(Sf()) = cyclicAMIPolyPatch_.faceAreas();
256 const_cast<vectorField&
>(Cf()) = cyclicAMIPolyPatch_.faceCentres();
271 surfaceScalarField::Boundary& meshPhiBf =
meshPhi.boundaryFieldRef();
273 if (cyclicAMIPolyPatch_.owner())
278 const face&
f = cyclicAMIPolyPatch_.localFaces()[facei];
283 const scalar geomArea =
f.mag(cyclicAMIPolyPatch_.localPoints());
285 const scalar scaledArea = magSf()[facei];
286 phip[facei] *= scaledArea/geomArea;
290 if (AMI().distributed())
292 AMI().srcMap().distribute(srcMeshPhi);
298 forAll(tgtToSrcAddr, tgtFacei)
301 const label srcFacei = tgtToSrcAddr[tgtFacei][0];
302 nbrPhip[tgtFacei] = -srcMeshPhi[srcFacei];
306 <<
"patch:" <<
patch().name()
307 <<
" sum(area):" <<
gSum(magSf())
308 <<
" min(mag(faceAreas):" <<
gMin(magSf())
309 <<
" sum(meshPhi):" <<
gSum(phip) <<
nl
310 <<
" 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.
bool processorCase() const noexcept
Return true if this is a processor case.
virtual void makeNonOrthoDeltaCoeffs(scalarField &) const
Correct patch non-ortho deltaCoeffs.
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 noexcept
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.
commsTypes
Types of communications.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
#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.
static bool & parRun() noexcept
Test if this a parallel run.
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)
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Type gMin(const FieldField< Field, Type > &f)
const scalarField & magSf() const
Return face area magnitudes.
defineTypeNameAndDebug(combustionModel, 0)
Smooth ATC in cells next to a set of patches supplied by type.
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
virtual void movePoints()
Correct patches after moving points.