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(),
160 IOobject::NO_REGISTER
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);
299 patchInternalField(internalData,
faceCells, tpfld.ref());
310 return neighbFvPatch().patchInternalField(iF);
317 const bool updated = updateAreas();
320 if (cyclicACMIPolyPatch_.owner() && updated)
324 Pout<<
"cyclicACMIFvPatch::movePoints() : areas updated for " 325 <<
name() <<
"; updating mesh flux now" 331 const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
332 const cyclicACMIFvPatch& nbrACMI = neighbPatch();
333 const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
338 const fvMesh&
mesh = boundaryMesh().mesh();
344 scalarField& phip = meshPhiBf[cyclicACMIPolyPatch_.index()];
346 meshPhiBf[nonOverlapPatch.patch().index()];
352 if (newSrcAddr[facei].empty())
360 const face& fAMI = cyclicACMIPolyPatch_[facei];
365 const scalar geomArea = fAMI.mag(
points);
366 phip[facei] *= magSf()[facei]/geomArea;
370 forAll(phiNonOverlapp, facei)
372 const scalar w = 1.0 - cyclicACMIPolyPatch_.srcMask()[facei];
373 phiNonOverlapp[facei] *= w;
377 scalarField& nbrPhip = meshPhiBf[nbrPatch.index()];
379 meshPhiBf[nbrNonOverlapPatch.patch().index()];
383 if (newTgtAddr[facei].empty())
385 nbrPhip[facei] = 0.0;
389 const face& fAMI = nbrPatch[facei];
394 const scalar geomArea = fAMI.mag(
points);
395 nbrPhip[facei] *= nbrACMI.magSf()[facei]/geomArea;
399 forAll(nbrPhiNonOverlapp, facei)
401 const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
402 nbrPhiNonOverlapp[facei] *= w;
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything updated.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
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
Communications types.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
tmp< vectorField > nf() const
Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
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). Generates a FatalError on failed casts and uses the virtual type() m...
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.
List< labelList > labelListList
List of labelList.
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.
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.