51 if (!cyclicACMIPolyPatch_.
owner())
56 if (updated || !cyclicACMIPolyPatch_.
upToDate(areaTime_))
60 Pout<<
"cyclicACMIFvPatch::updateAreas() : updating fv areas for " 67 const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
85 const_cast<vectorField&
>(fvp.Sf()) = fvp.patch().faceAreas();
86 const_cast<vectorField&
>(fvp.Cf()) = fvp.patch().faceCentres();
90 << fvp.patch().name() <<
" area:" <<
sum(fvp.magSf()) <<
endl;
107 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta()
116 scalar di =
mag(deltas[facei]);
117 scalar dni =
mag(nbrDeltas[facei]);
128 w[facei] = dni/(di + dni);
144 const polyPatch&
patch,
145 const fvBoundaryMesh& bm
148 coupledFvPatch(
patch, bm),
149 cyclicACMILduInterface(),
150 cyclicACMIPolyPatch_(
refCast<const cyclicACMIPolyPatch>(
patch)),
156 boundaryMesh().
mesh().pointsInstance(),
157 boundaryMesh().
mesh(),
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);
315 const bool updated = updateAreas();
318 if (cyclicACMIPolyPatch_.owner() && updated)
322 Pout<<
"cyclicACMIFvPatch::movePoints() : areas updated for " 323 <<
name() <<
"; updating mesh flux now" 329 const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
330 const cyclicACMIFvPatch& nbrACMI = neighbPatch();
331 const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
336 const fvMesh&
mesh = boundaryMesh().mesh();
342 scalarField& phip = meshPhiBf[cyclicACMIPolyPatch_.index()];
344 meshPhiBf[nonOverlapPatch.patch().index()];
350 if (newSrcAddr[facei].empty())
358 const face& fAMI = cyclicACMIPolyPatch_[facei];
363 const scalar geomArea = fAMI.mag(
points);
364 phip[facei] *= magSf()[facei]/geomArea;
368 forAll(phiNonOverlapp, facei)
370 const scalar w = 1.0 - cyclicACMIPolyPatch_.srcMask()[facei];
371 phiNonOverlapp[facei] *= w;
375 scalarField& nbrPhip = meshPhiBf[nbrPatch.index()];
377 meshPhiBf[nbrNonOverlapPatch.patch().index()];
381 if (newTgtAddr[facei].empty())
383 nbrPhip[facei] = 0.0;
387 const face& fAMI = nbrPatch[facei];
392 const scalar geomArea = fAMI.mag(
points);
393 nbrPhip[facei] *= nbrACMI.magSf()[facei]/geomArea;
397 forAll(nbrPhiNonOverlapp, facei)
399 const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
400 nbrPhiNonOverlapp[facei] *= w;
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything updated.
List< labelList > labelListList
A List of labelList.
void makeWeights(scalarField &) const
Make patch weighting factors.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything.
commsTypes
Types of communications.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
tmp< vectorField > nf() const
Return face normals.
label eventNo() const noexcept
Event number at last update.
cyclicACMIFvPatch(const polyPatch &patch, const fvBoundaryMesh &bm)
Construct from polyPatch.
Type & refCast(U &obj)
A dynamic_cast (for references) that generates FatalError on failed casts, uses the virtual type() me...
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static bool & parRun() noexcept
Test if this a parallel run.
void setUpToDate(regIOobject &) const
Set object up to date with *this.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
Smooth ATC in cells next to a set of patches supplied by type.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void resetPatchAreas(const fvPatch &fvp) const
Helper function to reset the FV patch areas from the primitive patch.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const cyclicACMIFvPatch & neighbPatch() const
Return neighbour fvPatch.
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
virtual void movePoints()
Correct patches after moving points.
virtual bool coupled() const
Return true if this patch is coupled.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
virtual const fvPatch & nonOverlapPatch() const
Return non-overlapping fvPatch.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
bool upToDate(const regIOobject &) const
Return true if given object is up to date with *this.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return local reference cast into the cyclic patch.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool owner() const
Does this side own the patch?
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
const std::string patch
OpenFOAM patch number as a std::string.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
#define DebugPout
Report an information message using Foam::Pout.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual const word & name() const
Return name.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
A patch is a list of labels that address the faces in the global face list.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to the interface as a field.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
fvPatch(const polyPatch &, const fvBoundaryMesh &)
Construct from polyPatch and fvBoundaryMesh.
static scalar tolerance()
Overlap tolerance.