Go to the documentation of this file.
51 if (!cyclicACMIPolyPatch_.
owner())
56 if (updated || !cyclicACMIPolyPatch_.
upToDate(areaTime_))
60 Pout<<
"cyclicACMIFvPatch::updateAreas() : updating fv areas for "
107 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta()
116 scalar di =
mag(deltas[facei]);
117 scalar dni =
mag(nbrDeltas[facei]);
128 w[facei] = dni/(di + dni);
150 cyclicACMIPolyPatch_(refCast<const cyclicACMIPolyPatch>(
patch)),
165 areaTime_.eventNo() = -1;
257 const vector& ddi = patchD[facei];
258 const vector& dni = nbrPatchD[facei];
260 pdv[facei] = ddi - dni;
267 const vector& ddi = patchD[facei];
268 const vector& dni = nbrPatchD[facei];
270 pdv[facei] = ddi -
transform(forwardT()[0], dni);
288 return patchInternalField(internalData);
298 return patchInternalField(internalData,
faceCells);
308 return neighbFvPatch().patchInternalField(iF);
314 if (!cyclicACMIPolyPatch_.owner())
320 if (!cyclicACMIPolyPatch_.upToDate(areaTime_))
324 Pout<<
"cyclicACMIFvPatch::movePoints() : updating fv areas for "
325 <<
name() <<
" and " << this->nonOverlapPatch().name()
333 const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
337 resetPatchAreas(*
this);
338 resetPatchAreas(nonOverlapPatch);
339 resetPatchAreas(nbrACMI);
340 resetPatchAreas(nbrNonOverlapPatch);
349 surfaceScalarField::Boundary& meshPhiBf =
meshPhi.boundaryFieldRef();
353 scalarField& phip = meshPhiBf[cyclicACMIPolyPatch_.index()];
361 if (newSrcAddr[facei].empty())
369 const face& fAMI = cyclicACMIPolyPatch_[facei];
374 const scalar geomArea = fAMI.
mag(
points);
375 phip[facei] *= magSf()[facei]/geomArea;
379 forAll(phiNonOverlapp, facei)
381 const scalar w = 1.0 - cyclicACMIPolyPatch_.srcMask()[facei];
382 phiNonOverlapp[facei] *= w;
388 meshPhiBf[nbrNonOverlapPatch.
patch().
index()];
392 if (newTgtAddr[facei].empty())
394 nbrPhip[facei] = 0.0;
398 const face& fAMI = nbrPatch[facei];
403 const scalar geomArea = fAMI.
mag(
points);
404 nbrPhip[facei] *= nbrACMI.
magSf()[facei]/geomArea;
408 forAll(nbrPhiNonOverlapp, facei)
410 const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
411 nbrPhiNonOverlapp[facei] *= w;
415 cyclicACMIPolyPatch_.setUpToDate(areaTime_);
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const bMesh & mesh() const
const vectorField & Sf() const
Return face area vectors.
virtual const pointField & points() const
Return raw points.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool owner() const
Does this side own the patch?
A class for managing temporary objects.
scalar mag(const UList< point > &p) const
Magnitude of face area.
bool upToDate(const regIOobject &) const
Return true if given object is up to date with *this.
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
An abstract base class for cyclic ACMI coupled interfaces.
static scalar tolerance()
Overlap tolerance.
void setUpToDate(regIOobject &) const
Set object up to date with *this.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const word & name() const
Return name.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
virtual bool coupled() const
Return true if this patch is coupled.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
#define forAll(list, i)
Loop across all elements in list.
tmp< vectorField > nf() const
Return face normals.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
A patch is a list of labels that address the faces in the global face list.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const cyclicACMIFvPatch & neighbPatch() const
Return neighbour fvPatch.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const vectorField & Cf() const
Return face centres.
virtual void movePoints()
Correct patches after moving points.
virtual const fvPatch & nonOverlapPatch() const
Return non-overlapping fvPatch.
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything updated.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
label index() const noexcept
The index of this patch in the boundaryMesh.
#define DebugPout
Report an information message using Foam::Pout.
cyclicACMIFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
commsTypes
Types of communications.
const vectorField::subField faceCentres() const
Return face centres.
const std::string patch
OpenFOAM patch number as a std::string.
void resetPatchAreas(const fvPatch &fvp) const
Helper function to reset the FV patch areas from the primitive patch.
static bool & parRun() noexcept
Test if this a parallel run.
const vectorField::subField faceAreas() const
Return face normals.
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return local reference cast into the cyclic patch.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
const polyPatch & patch() const
Return the polyPatch.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A face is a list of labels corresponding to mesh vertices.
const word & name() const noexcept
The patch name.
An abstract base class for patches that couple regions of the computational domain e....
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI).
const scalarField & magSf() const
Return face area magnitudes.
void makeWeights(scalarField &) const
Make patch weighting factors.
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.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)