Skip to content
Snippets Groups Projects
Commit b878313f authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

DOC: fix turbulentInlet BC header (#1100)

    STYLE: add getOrDefault(), missing doc dashes
parent 94061153
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField ...@@ -57,7 +57,7 @@ Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
ranGen_(label(0)), ranGen_(label(0)),
fluctuationScale_(dict.get<Type>("fluctuationScale")), fluctuationScale_(dict.get<Type>("fluctuationScale")),
referenceField_("referenceField", dict, p.size()), referenceField_("referenceField", dict, p.size()),
alpha_(dict.lookupOrDefault<scalar>("alpha", 0.1)), alpha_(dict.getOrDefault<scalar>("alpha", 0.1)),
curTimeIndex_(-1) curTimeIndex_(-1)
{ {
if (dict.found("value")) if (dict.found("value"))
......
...@@ -30,44 +30,69 @@ Group ...@@ -30,44 +30,69 @@ Group
grpInletBoundaryConditions grpInletBoundaryConditions
Description Description
This boundary condition generates a fluctuating inlet condition by adding This boundary condition produces spatiotemporal-variant field by summing
a random component to a reference (mean) field. a set of pseudo-random numbers and a given spatiotemporal-invariant mean
field. The field can be any type, e.g. scalarField. At a single point and
time, all components are summed by the same random number, e.g. velocity
components (u, v, w) are summed by the same random number, p; thus, output
is (u+p, v+p, w+p).
The pseudo-random number generator obeys the probability density function
of the uniform distribution constrained by the range [0:1]. The seed for
the random number generator is hard-coded; therefore, when you run a
simulation involving this BC with the same terminal, it will produce the
same sequence of random numbers at every execution.
\f[ \f[
x_p = (1 - \alpha) x_p^{n-1} + \alpha (x_{ref} + s C_{RMS} x_{ref}) x_p = (1 - \alpha) x_p^{n - 1} + \alpha (x_{ref} + c s R |x_{ref}|)
\f] \f]
where where
\vartable \vartable
x_p | patch values x_p | patch field
x_{ref} | reference patch values x_{ref} | spatiotemporal-invariant patch scalar
n | time level n | time level
\alpha | fraction of new random component added to previous time value \alpha | a scalar attempting to build two-temporal-point correlations
C_{RMS} | RMS coefficient by heuristically adding a fraction of the new random component
s | fluctuation scale to the previous time patch field
c | a heuristic automatically calculated correction term
to compensate energy level losses due to the alpha scalar
R | pseudo-random number [HARD-CODED seed]
s | fluctuation scale (proportional to the xRef)
\endvartable \endvartable
Usage Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
fluctuationScale | RMS fluctuation scale (fraction of mean) | yes | fluctuationScale | RMS fluctuation scale (fraction of mean) | yes |
referenceField | reference (mean) field | yes | referenceField | reference (mean) field | yes |
alpha | fraction of new random component added to previous| no| 0.1 alpha | fraction of new random component added to previous | no | 0.1
\endtable \endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
<patchName> <patchName>
{ {
type turbulentInlet; // Mandatory entries
fluctuationScale 0.1; type turbulentInlet;
referenceField uniform 10; fluctuationScale 0.1; // the term `s` above
alpha 0.1; referenceField uniform 10; // the term `xRef` above
// Optional entries
alpha 0.1; // the term `alpha` above
} }
\endverbatim \endverbatim
See also Note
This boundary condition must not be used for DES or LES computations as a
turbulent velocity inflow condition, because the BC will not produce
turbulence-alike time-series, and will decay almost immediately downstream
of the inlet boundary although its historical name suggests the opposite.
Nevertheless, the BC may be still used for other applications, e.g. as a
uniform-random noise source in aeroacoustics.
SeeAlso
Foam::fixedValueFvPatchField Foam::fixedValueFvPatchField
SourceFiles SourceFiles
...@@ -95,7 +120,7 @@ class turbulentInletFvPatchField ...@@ -95,7 +120,7 @@ class turbulentInletFvPatchField
: :
public fixedValueFvPatchField<Type> public fixedValueFvPatchField<Type>
{ {
// Private data // Private Data
//- Random number generator //- Random number generator
Random ranGen_; Random ranGen_;
...@@ -137,7 +162,7 @@ public: ...@@ -137,7 +162,7 @@ public:
); );
//- Construct by mapping given turbulentInletFvPatchField //- Construct by mapping given turbulentInletFvPatchField
// onto a new patch //- onto a new patch
turbulentInletFvPatchField turbulentInletFvPatchField
( (
const turbulentInletFvPatchField<Type>&, const turbulentInletFvPatchField<Type>&,
...@@ -181,7 +206,7 @@ public: ...@@ -181,7 +206,7 @@ public:
} }
// Member functions // Member Functions
// Access // Access
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment