61 scalar d =
mag(Cf[celli] -
x0_);
67 else if ((d >=
r1_) && (d <=
r2_))
82 const word& modelType,
110 URefName_(
"unknown-URef"),
126 const volScalarField coeff(name_ +
":coeff", w_*frequency_*blendFactor_);
145 const volScalarField coeff(name_ +
":coeff", w_*frequency_*blendFactor_);
165 const volScalarField coeff(name_ +
":coeff", w_*frequency_*blendFactor_);
180 if (!coeffs_.readIfPresent(
"UNames", fieldNames_))
182 fieldNames_.resize(1);
183 fieldNames_.first() = coeffs_.getOrDefault<
word>(
"U",
"U");
188 coeffs_.readEntry(
"frequency", frequency_.value());
189 coeffs_.readEntry(
"URef", URefName_);
190 coeffs_.readCompat<
vector>(
"origin", {{
"centre", -1806}}, x0_);
191 coeffs_.readEntry(
"radius1", r1_);
192 coeffs_.readEntry(
"radius2", r2_);
194 if (coeffs_.readIfPresent(
"w", w_))
196 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.
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 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.
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...
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)