49 const word& sourceName,
50 const word& modelType,
55 meanVelocityForce(sourceName, modelType,
dict,
mesh),
56 patch_(coeffs_.get<
word>(
"patch")),
62 <<
"Cannot find patch " <<
patch_
80 (flowDir_ &
U.boundaryField()[patchi_])
81 * mesh_.boundary()[patchi_].magSf()
83 sumAmagUsumA[1] +=
sum(mesh_.boundary()[patchi_].magSf());
102 (flowDir_ &
U.boundaryField()[patchi])
103 * mesh_.boundary()[patchi].magSf()
105 sumAmagUsumA[1] +=
sum(mesh_.boundary()[patchi].magSf());
109 mesh_.reduce(sumAmagUsumA, sumOp<scalar>());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> with a fixed length <N>.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
meanVelocityForce(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
vector flowDir_
Flow direction.
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
dictionary coeffs_
Dictionary containing source coefficients.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Applies the force over the specified patch to maintain the specified mean velocity for incompressible...
label patchi_
Patch index.
patchMeanVelocityForce(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
word patch_
Name of operand patch.
virtual scalar magUbarAve(const volVectorField &U) const
Calculate and return the magnitude of the mean velocity averaged over the specified patch.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
static labelList patchIDs(const word &cyclicPolyPatchName, const polyBoundaryMesh &bm)
Return the indices of a processorCyclicPolyPatchs.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Namespace for finite-volume.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
static constexpr const zero Zero
Global zero (0).
errorManipArg< error, int > exit(error &err, const int errNo=1)