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;
const word zeroGradientType
A zeroGradient patch field type.
virtual bool read(const dictionary &dict)
Read dictionary.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
const fvMesh & mesh_
Reference to the mesh database.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool read(const dictionary &dict)
Read source dictionary.
Template invariant parts for fvPatchField.
const dimensionSet dimless
Dimensionless.
void setBlendingFactor()
Helper function to set the blending factor.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
dimensionedScalar cos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
constexpr scalar pi(M_PI)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
acousticDampingSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
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())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
Applies sources on velocity (i.e. U) within a specified region to enable acoustic damping...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
labelList cells_
Set of cells to apply source to.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Intermediate abstract class for handling cell-set options for the derived fvOptions.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldI)
Add implicit contribution to momentum equation.
const volVectorField & C() const
Return cell centres as volVectorField.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
volScalarField blendFactor_
Blending factor [-].
Calculate the finiteVolume matrix for implicit and explicit sources.
Base abstract class for handling finite volume options (i.e. fvOption).
static constexpr const zero Zero
Global zero (0)