61 scalar d =
mag(Cf[celli] -
x0_);
67 else if ((d >=
r1_) && (d <=
r2_))
82 const word& modelType,
90 mesh_.newIOobject(
IOobject::scopedName(name_,
"blend")),
100 URefName_(
"unknown-URef"),
119 w_*frequency_*blendFactor_
121 const auto& coeff = tcoeff();
145 w_*frequency_*blendFactor_
147 const auto& coeff = tcoeff();
172 w_*frequency_*blendFactor_
174 const auto& coeff = tcoeff();
191 if (!coeffs_.readIfPresent(
"UNames", fieldNames_))
193 fieldNames_.resize(1);
194 fieldNames_.first() = coeffs_.getOrDefault<
word>(
"U",
"U");
199 coeffs_.readEntry(
"frequency", frequency_.value());
200 coeffs_.readEntry(
"URef", URefName_);
201 coeffs_.readCompat<
vector>(
"origin", {{
"centre", -1806}}, x0_);
202 coeffs_.readEntry(
"radius1", r1_);
203 coeffs_.readEntry(
"radius2", r2_);
205 if (coeffs_.readIfPresent(
"w", w_))
207 Info<< name_ <<
": Setting stencil width to " << w_ <<
endl;
constexpr scalar pi(M_PI)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
@ NO_REGISTER
Do not request registration (bool: false).
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres as volVectorField.
Template invariant parts for fvPatchField.
Applies sources on velocity (i.e. U) within a specified region to enable acoustic damping.
volScalarField blendFactor_
Blending factor [-].
acousticDampingSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
virtual bool read(const dictionary &dict)
Read dictionary.
word URefName_
Name of reference velocity field.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Add implicit contribution to momentum equation.
void setBlendingFactor()
Helper function to set the blending factor.
dimensionedScalar frequency_
Frequency [Hz].
Intermediate abstract class for handling cell-set options for the derived fvOptions.
labelList cells_
Set of cells to apply source to.
virtual bool read(const dictionary &dict)
Read source dictionary.
cellSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Base abstract class for handling finite volume options (i.e. fvOption).
const word & name() const noexcept
Return const access to the source name.
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
const word name_
Source name.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the finiteVolume matrix for implicit and explicit sources.
constexpr scalar pi(M_PI)
Namespace for finite-volume.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.