See GL #1433
Applies corrections to turbulence kinetic energy equation and turbulence
viscosity field for incompressible multiphase flow cases.
Turbulence kinetic energy is over-predicted in VOF solvers at the phase
interface and throughout the water column in nearly-potential flow regions
beneath surface waves.
This fvOption applies corrections based on the references:
Buoyancy source term in turbulence kinetic energy equation:
Devolder, B., Rauwoens, P., and Troch, P. (2017).
Application of a buoyancy-modified k-w SST turbulence model to
simulate wave run-up around a monopile subjected to regular waves
using OpenFOAM.
Coastal Engineering, 125, 81-94.
Correction to turbulence viscosity field:
Larsen, B.E. and Fuhrman, D.R. (2018).
On the over-production of turbulence beneath surface waves in
Reynolds-averaged Navier-Stokes models
J. Fluid Mech, 853, 419-460
Example usage:
multiphaseStabilizedTurbulence1
{
type multiphaseStabilizedTurbulence;
active yes;
multiphaseStabilizedTurbulenceCoeffs
{
// Optional coefficients
lambda2 0.1; // A value of 0 sets the nut correction to 0
Cmu 0.09; // from k-epsilon model
C 1.51; // model coefficient from k-omega model
alpha 1.36; // 1/Prt
}
}
Thanks go to the Turbulence Technical Committee, and the useful discussions
with and code testing by Bjarke Eltard-Larsen and David Fuhrman (Technical
University of Denmark).
ENH: modify fWallFunction for kEpsilonPhitF model
The k-epsilon-phit-f turbulence closure model for incompressible and
compressible flows.
The model is a three-transport-equation linear-eddy-viscosity turbulence
closure model alongside an elliptic relaxation equation:
- Turbulent kinetic energy, \c k,
- Turbulent kinetic energy dissipation rate, \c epsilon,
- Normalised wall-normal fluctuating velocity scale, \c phit,
- Elliptic relaxation factor, \c f.
Reference:
\verbatim
Standard model (Tag:LUU):
Laurence, D. R., Uribe, J. C., & Utyuzhnikov, S. V. (2005).
A robust formulation of the v2−f model.
Flow, Turbulence and Combustion, 73(3-4), 169–185.
DOI:10.1007/s10494-005-1974-8
\endverbatim
The default model coefficients are (LUU:Eqs. 19-20):
\verbatim
kEpsilonPhitFCoeffs
{
Cmu 0.22, // Turbulent viscosity constant
Ceps1a 1.4, // Model constant for epsilon
Ceps1b 1.0, // Model constant for epsilon
Ceps1c 0.05, // Model constant for epsilon
Ceps2 1.9, // Model constant for epsilon
Cf1 1.4, // Model constant for f
Cf2 0.3, // Model constant for f
CL 0.25, // Model constant for L
Ceta 110.0, // Model constant for L
CT 6.0, // Model constant for T
sigmaK 1.0, // Turbulent Prandtl number for k
sigmaEps 1.3, // Turbulent Prandtl number for epsilon
sigmaPhit 1.0, // Turbulent Prandtl number for phit = sigmaK
}
\endverbatim
Note
The name of the original variable replacing 'v2' is 'phi' (LUU:Eq. 14).
However, the name 'phi' preexisted in OpenFOAM; therefore, this name was
replaced by 'phit'
qem and qin were not set to zero for the wideBand model BC.
qin was used in the grey model BC to calculate Ir(the total
incoming heat flux). As it is now set to zero, the grey model
loops over the incoming rays to calculate Ir instead of relaying
on qin stored in radiativeIntensityRay.
- follows the principle of least surprise if the expansion behaviour
for #eval and expressions (eg, exprFixedValue) are the same. This
is possible now that we harness the regular stringOps::expand()
within exprString::expand()
Adding check for p.active at the end of KinematicParcel::move.
p.hitFace() is called only for active parcels.
Setting to zero the initialization for stored lists of stick and
escape parcels
in LocalInteraction and StandardWallInteraction models
NOTE: KinematicParcel::hitPatch counts overall system escaped
parcels and mass based on polyPatch type and not on type of
patchInteractionModel. Thus, if a patch is a Wall for fluid
but escape for parcel the overall report will be wrong but
the local report for each patch is correct
- This scheme is useful to calculate the face interpolation values for
the Gauss gradient when the diffussion coefficient is discontinuous
across a face. This sheme is used for Gauss grad.
- reuse more of stringOps expansions to reduce code and improve the
syntax flexiblity.
We can now embed "pre-calculated" values into an expression.
For example,
angle 35;
valueExpr "vector(${{cos(degToRad($angle))}}, 2, 3)";
and the ${{..}} will be evaluated with the regular string evaluation
and used to build the entire expression for boundary condition
evaluation.
Could also use for fairly wild indirect referencing:
axis1 (1 0 0);
axis2 (0 1 0);
axis3 (0 0 1);
index 100;
expr "$[(vector) axis${{ ($index % 3) +1 }}] / ${{max(1,$index)}}";
Calculates the acoustic power due to the volume of isotropic turbulence
using Proudman's formula
The acoustic power \f$ P_A \f$ [W/m3] in terms of turbulence \f$ k \f$
and \f$ \epsilon \f$ is given as:
\f[
P_A = alpha_\epsilon \rho \epsilon M_t^5
\f]
where \f$ alpha_\epsilon \f$ is a constant (0.1) and
\f[
M_t = \frac{\sqrt{2 k}}{a_0}
\f]
with \f$ a_0 \f$ the speed of sound. The acoustic power is also output in
dB using:
\f[
L_P = 10 \log \frac{P_A}{P_ref}
\f]
where \f$ P_ref \f$ is a constant (1e-12 W/m3)
Usage
Example of function object specification to calculate the Proudman acoustic
power
proudmanAcousticPower1
{
type proudmanAcousticPower;
libs ("libfieldFunctionObjects.so");
...
// Required additional entries for incompressible calculations
rhoInf 1.225;
aRef 340;
}
Where the entries comprise:
Property | Description | Required | Default value
type | type name: proudmanAcousticPower | yes |
rhoInf | Freestream density for incompressible cases | no |
aRef | Reference spped of sound for incompressible cases | no |
alphaEps | Model coefficient | no | 0.1
Note
- The freestream density and reference speed of sound are only necessary
when a thermodynamics package is unavailable, typically for incompressible
cases.
- Failed due to double*Matrix<float> multiplication.
Style changes
- use SquareMatrix with Identity on construction
- use Zero in constructors
- remove trailing space and semi-colons
- skip processing OSspecific/MSwindows since this can cause duplicate
doxygen entries
STYLE: adjust formatting in code templates
STYLE: use std::string methods without extra qualifications
- ensure that the updateControl is "non-sticky" on re-read,
even if we do not support runtime-modifiable here
STYLE: add syntax example (wingMotion), but with updateInterval 1
- synchronize the scalar interval value with the integer version.
This ensures that the interval() method returns the correct
representative value.
- added clear() method to reset to 'always' (pass-through)
- ensure that the updateControl is "non-sticky" on re-read,
even if we do not support runtime-modifiable here
STYLE: add syntax example (wingMotion), but with updateInterval 1
The adjoint library is enhanced with new functionality enabling
automated shape optimisation loops. A parameterisation scheme based on
volumetric B-Splines is introduced, the control points of which act as
the design variables in the optimisation loop [1, 2]. The control
points of the volumetric B-Splines boxes can be defined in either
Cartesian or cylindrical coordinates.
The entire loop (solution of the flow and adjoint equations, computation
of sensitivity derivatives, update of the design variables and mesh) is
run within adjointOptimisationFoam. A number of methods to update the
design variables are implemented, including popular Quasi-Newton methods
like BFGS and methods capable of handling constraints like loop using
the SQP or constraint projection.
The software was developed by PCOpt/NTUA and FOSS GP, with contributions from
Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather
[1] E.M. Papoutsis-Kiachagias, N. Magoulas, J. Mueller, C. Othmer,
K.C. Giannakoglou: 'Noise Reduction in Car Aerodynamics using a
Surrogate Objective Function and the Continuous Adjoint Method with
Wall Functions', Computers & Fluids, 122:223-232, 2015
[2] E. M. Papoutsis-Kiachagias, V. G. Asouti, K. C. Giannakoglou,
K. Gkagkas, S. Shimokawa, E. Itakura: ‘Multi-point aerodynamic shape
optimization of cars based on continuous adjoint’, Structural and
Multidisciplinary Optimization, 59(2):675–694, 2019