65 const bool foundDirs =
coeffs().
found(
"directions");
69 (foundOgn && foundDir && !foundOgns && !foundDirs)
70 || (!foundOgn && !foundDir && foundOgns && foundDirs)
73 foundScale || foundOgn || foundDir || foundOgns || foundDirs;
105 <<
"The same, non-zero number of origins and "
115 if (!foundAll && foundAny)
118 <<
"The scaling specification is incomplete. \"scale\", "
119 <<
"\"origin\" and \"direction\" (or \"origins\" and "
120 <<
"\"directions\"), must all be specified in order to scale "
121 <<
"the forcing. The forcing will be applied uniformly across "
145 scale =
max(scale, scale_->value(
x));
149 if (debug && mesh().time().writeTime())
169 if (lambdaBoundary_.value() > 0)
175 if (!bm[
patchi].coupled())
178 = lambdaBoundary_.value()
185 if (debug && mesh().time().writeTime())
187 tforceCoeff->write();
196 return forceCoeff(scale());
205 const word& modelType,
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< Type > &)
Return a temporary field constructed from name, mesh,.
static autoPtr< Function1< Type > > New(const word &name, const dictionary &dict)
Selector.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set size to zero.
void setSize(const label)
Reset size of List.
T & last()
Return the last element of the list.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const word & name() const
Return const reference to name.
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
const dictionary & coeffs() const
Return dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
Base fvModel for forcing functions.
void readCoeffs()
Non-virtual read.
vectorField directions_
Directions of increasing scaling coordinate.
dimensionedScalar lambda_
Damping coefficient [1/s].
vectorField origins_
Origins of the scaling coordinate.
dimensionedScalar lambdaBoundary_
Optional boundary damping coefficient [1/s].
forcing(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool read(const dictionary &dict)
Read dictionary.
tmp< volScalarField::Internal > forceCoeff() const
Return the force coefficient.
tmp< volScalarField::Internal > scale() const
Return the scale distribution.
autoPtr< Function1< scalar > > scale_
The scaling function.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar c
Speed of light in a vacuum.
defineTypeNameAndDebug(bound, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
const dimensionSet dimTime
dimensioned< scalar > mag(const dimensioned< Type > &)
word typedName(Name name)
Return the name of the object within the given type.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const complex &)
Return a string representation of a complex.