Go to the documentation of this file.
43 patchMeanVelocityForce,
52 Foam::fv::patchMeanVelocityForce::patchMeanVelocityForce
54 const word& sourceName,
55 const word& modelType,
61 patch_(coeffs_.get<
word>(
"patch")),
62 patchi_(
mesh.boundaryMesh().findPatchID(patch_))
67 <<
"Cannot find patch " << patch_
84 (flowDir_ &
U.boundaryField()[patchi_])
85 *mesh_.boundary()[patchi_].magSf()
87 sum(mesh_.boundary()[patchi_].magSf())
96 if (Pstream::parRun() && isA<cyclicPolyPatch>(
patches[patchi_]))
100 processorCyclicPolyPatch::patchIDs(patch_,
patches)
103 forAll(processorCyclicPatches, pcpi)
105 const label patchi = processorCyclicPatches[pcpi];
110 (flowDir_ &
U.boundaryField()[patchi])
111 *mesh_.boundary()[patchi].magSf()
114 sumAmagUsumA.
y() +=
sum(mesh_.boundary()[patchi].magSf());
120 return sumAmagUsumA.
x()/sumAmagUsumA.
y();
A class for handling words, derived from Foam::string.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
virtual scalar magUbarAve(const volVectorField &U) const
Calculate and return the magnitude of the mean velocity.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineTypeNameAndDebug(option, 0)
Calculates and applies the force necessary to maintain the specified mean velocity.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const polyBoundaryMesh & patches
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.