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;
195 const vector& ddi = patchD[facei];
196 const vector& dni = nbrPatchD[facei];
198 pdv[facei] = ddi - dni;
205 const vector& ddi = patchD[facei];
206 const vector& dni = nbrPatchD[facei];
208 pdv[facei] = ddi -
transform(forwardT()[0], dni);
226 return patchInternalField(internalData);
236 return neighbFvPatch().patchInternalField(iF);
242 if (!cyclicACMIPolyPatch_.owner())
248 if (!cyclicACMIPolyPatch_.upToDate(areaTime_))
252 Pout<<
"cyclicACMIFvPatch::movePoints() : updating fv areas for "
253 <<
name() <<
" and " << this->nonOverlapPatch().name()
261 const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
265 resetPatchAreas(*
this);
266 resetPatchAreas(nonOverlapPatch);
267 resetPatchAreas(nbrACMI);
268 resetPatchAreas(nbrNonOverlapPatch);
277 surfaceScalarField::Boundary& meshPhiBf =
meshPhi.boundaryFieldRef();
281 scalarField& phip = meshPhiBf[cyclicACMIPolyPatch_.index()];
289 if (newSrcAddr[facei].empty())
297 const face& fAMI = cyclicACMIPolyPatch_[facei];
302 const scalar geomArea = fAMI.
mag(
points);
303 phip[facei] *= magSf()[facei]/geomArea;
307 forAll(phiNonOverlapp, facei)
309 const scalar w = 1.0 - cyclicACMIPolyPatch_.srcMask()[facei];
310 phiNonOverlapp[facei] *= w;
316 meshPhiBf[nbrNonOverlapPatch.
patch().
index()];
320 if (newTgtAddr[facei].empty())
322 nbrPhip[facei] = 0.0;
326 const face& fAMI = nbrPatch[facei];
331 const scalar geomArea = fAMI.
mag(
points);
332 nbrPhip[facei] *= nbrACMI.
magSf()[facei]/geomArea;
336 forAll(nbrPhiNonOverlapp, facei)
338 const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
339 nbrPhiNonOverlapp[facei] *= w;
343 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 bool & parRun()
Test if this a parallel run, or allow modify access.
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
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.
word name(const complex &c)
Return string representation of complex.
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.
#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.
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.
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.
An abstract base class for patches that couple regions of the computational domain e....
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)
const word & name() const
The patch name.
label index() const
The index of this patch in the boundaryMesh.
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)