46 Foam::fv::patchMeanVelocityForce::patchMeanVelocityForce
48 const word& sourceName,
49 const word& modelType,
50 const dictionary&
dict,
54 meanVelocityForce(sourceName, modelType,
dict,
mesh),
55 patch_(coeffs_.
get<word>(
"patch")),
56 patchi_(
mesh.boundaryMesh().findPatchID(patch_))
61 <<
"Cannot find patch " << patch_
69 Foam::scalar Foam::fv::patchMeanVelocityForce::magUbarAve
78 (flowDir_ &
U.boundaryField()[patchi_])
79 *mesh_.boundary()[patchi_].magSf()
81 sum(mesh_.boundary()[patchi_].magSf())
88 const polyBoundaryMesh&
patches = mesh_.boundaryMesh();
97 forAll(processorCyclicPatches, pcpi)
99 const label patchi = processorCyclicPatches[pcpi];
104 (flowDir_ &
U.boundaryField()[patchi])
105 *mesh_.boundary()[patchi].magSf()
108 sumAmagUsumA.y() +=
sum(mesh_.boundary()[patchi].magSf());
112 mesh_.reduce(sumAmagUsumA, sumOp<vector2D>());
114 return sumAmagUsumA.x()/sumAmagUsumA.y();