Commit db2057a1 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[doc][cleanup] Use the proposed limited sTilde method, add doxygen

Fix problem with sanitizelinks.sh
parent c937aac0
......@@ -194,7 +194,7 @@
* \ingroup RANSModel
* \defgroup OneEqModel 1-Eq. Models
* \brief One-equation turbulence model by Spalart-Allmaras
* \copydetails ./freeflow/oneeq/model.hh
* \copydetails ./freeflow/rans/oneeq/model.hh
*/
/*!
* \ingroup RANSModel
......
#make the modules page default view clearer (toggleLevel(1))
sed -i 's/\(init_search();\)/\1 toggleLevel(1);/' html/modules.html
if [ -e html/modules.html ]; then
sed -i 's/\(init_search();\)/\1 toggleLevel(1);/' html/modules.html
fi
......@@ -1725,3 +1725,14 @@ url={http://dx.doi.org/10.1007/s11242-015-0599-1}
address = {Harlow},
edition = {2},
}
@InCollection{Spalart1992a,
author = {Spalart, P. R. and Allmaras, S. R.},
title = {{A one-equation turbulence model for aerodynamic flows}},
booktitle = {Aerospace Sciences Meetings},
publisher = {American Institute of Aeronautics and Astronautics},
year = {1992},
pages = {--},
doi = {10.2514/6.1992-439},
url = {http://dx.doi.org/10.2514/6.1992-439}
}
......@@ -24,7 +24,54 @@
*
* \copydoc RANSModel
*
* \todo please doc me
* This model, published by Spalart and Allmaras 1992 \cite Spalart1992a,
* uses one additional PDE for a working variable \f$ \tilde{\nu} \f$.
* This variable has the units of a viscosity and can be converted to the eddy
* viscosity via a model function~(\f$ f_\text{v1} \f$):
* \f[
* \nu_\text{t} = \tilde{\nu} f_\text{v1}
* \f]
*
* Here, as proposed by Wilcox \cite Wilcox2008a and Versteeg \cite Versteeg2009a, the correction
* term which account for the transition or trip, is dropped from the original equations,
* such that the balance equation simplifies to:
* \f[
* \frac{\partial \tilde{\nu}}{\partial t}
* + \nabla \cdot \left( \tilde{\nu} \textbf{v} \right)
* - c_\text{b1} \tilde{S} \tilde{\nu}
* - \frac{1}{\sigma_{\tilde{\nu}}} \nabla \cdot \left( \left[ \nu + \tilde{\nu} \right] \nabla \tilde{\nu} \right)
* - \frac{c_\text{b2}}{\sigma_{\tilde{\nu}}} \left| \nabla \tilde{\nu} \right|^2
* + c_\text{w1} f_\text{w} \frac{\tilde{\nu}^2}{y^2}
* = 0
* \f]
*
* Here, a modified mean effective strain rate (\f$ \tilde{S} \f$) based on
* the mean rotation rate tensor (\f$ \mathbf{\Omega} \f$) is used:
* \f[
* \tilde{S} = \sqrt{2 \mathbf{\Omega} \cdot \mathbf{\Omega}} + \frac{\tilde{\nu}}{\kappa^2 y^2} f_\text{v2}
* \f]
* \f[
* \mathbf{\Omega} = \frac{1}{2} \left( \nabla \textbf{v}_\text{g}
* - \nabla \textbf{v}_\text{g}^\intercal \right)
* \f]
*
* This balance equation is linked to the flow geometry by the distance to the closest wall ($y$).
* Further, the model uses the following functions and expressions:
* \f[ \chi = \frac{\tilde{\nu}}{\nu} \f]
* \f[ f_\text{v1} = \frac{\chi^3}{\chi^3+c_\text{v1}^3} \f]
* \f[ f_\text{v2} = 1 - \frac{\chi}{1+f_\text{v1}\chi} \f]
* \f[ f_\text{w} = g_\text{w} \left( \frac{1+c_\text{w3}^6}{g^6_\text{w}+c_\text{w3}^6}
* \right)^\frac{1}{6} \f]
* \f[ g_\text{w} = r_\text{w} + c_\text{w2} (r_\text{w}^6 - r_\text{w}) \f]
* \f[ r_\text{w} = \min \left[ \frac{\tilde{\nu}}{\tilde{S}\kappa^2 y^2},10\right] \f]
* \f[ \sigma_{\tilde{\nu}} = \nicefrac{2}{3} \f]
* \f[ c_\text{b1} = 0.1355 \f]
* \f[ c_\text{b2} = 0.622 \f]
* \f[ c_\text{v1} = 7.1 \f]
* \f[ c_\text{w1} = \frac{c_\text{b1}}{\kappa^2}
* + \frac{1+c_\text{b2}}{\sigma_{\tilde{\nu}}} \f]
* \f[ c_\text{w2} = 0.3 \f]
* \f[ c_\text{w3} = 2 \f]
*/
#ifndef DUMUX_ONEEQ_MODEL_HH
......
......@@ -199,8 +199,9 @@ public:
Scalar ft2() const
{
using std::exp;
// the trip correction term is dropped according to Versteeg2009 and Wilcox2006
// return ct3() * exp(-ct4() * viscosityRatio() * viscosityRatio());
return 0.0;
// return ct3() * exp(-ct4() * viscosityRatio() * viscosityRatio());
}
//! \brief Returns a model function
......@@ -231,36 +232,32 @@ public:
Scalar viscosityRatio() const
{ return viscosityTilde() / RANSParentType::kinematicViscosity(); }
//! \brief Returns a modified version of the stress tensor scalar product
/*
* ! \brief Returns a modified version of the stress tensor scalar product
*
* According to <a href="https://turbmodels.larc.nasa.gov/spalart.html">NASA</a>
* this term should never be zero and different limiters might be used.
* The Implementation uses the one proposed in:
* Allmaras, S. R., Johnson, F. T., and Spalart, P. R.,
* "Modifications and Clarifications for the Implementation of the Spalart-Allmaras Turbulence Model," ICCFD7-1902
*/
Scalar stressTensorScalarProductTilde() const
{
static const int sTildeTerm = getParamFromGroup<int>("",
"OneEq.STildeType", 0);
if (sTildeTerm == 1)
{
return std::max(0.3 * vorticityMagnitude(),
vorticityMagnitude()
+ viscosityTilde() * fv2()
/ RANSParentType::karmanConstant() / RANSParentType::karmanConstant()
/ RANSParentType::wallDistance() / RANSParentType::wallDistance());
}
else if (sTildeTerm == 2)
{
Scalar sBar = viscosityTilde() * fv2()
/ RANSParentType::karmanConstant() / RANSParentType::karmanConstant()
/ RANSParentType::wallDistance() / RANSParentType::wallDistance();
return sBar < -c2() * vorticityMagnitude()
? vorticityMagnitude()
+ (vorticityMagnitude() * (c2() * c2() * vorticityMagnitude() + c3() * sBar))
/ ((c3() - 2.0 * c2()) * vorticityMagnitude() - sBar)
: vorticityMagnitude() + sBar;
}
return vorticityMagnitude()
+ viscosityTilde() * fv2()
/ RANSParentType::karmanConstant() / RANSParentType::karmanConstant()
/ RANSParentType::wallDistance() / RANSParentType::wallDistance();
// original form
// return vorticityMagnitude()
// + viscosityTilde() * fv2()
// / RANSParentType::karmanConstant() / RANSParentType::karmanConstant()
// / RANSParentType::wallDistance() / RANSParentType::wallDistance();
// limiter form, literature source see above
Scalar sBar = viscosityTilde() * fv2()
/ RANSParentType::karmanConstant() / RANSParentType::karmanConstant()
/ RANSParentType::wallDistance() / RANSParentType::wallDistance();
return sBar < -c2() * vorticityMagnitude()
? vorticityMagnitude()
+ (vorticityMagnitude() * (c2() * c2() * vorticityMagnitude() + c3() * sBar))
/ ((c3() - 2.0 * c2()) * vorticityMagnitude() - sBar)
: vorticityMagnitude() + sBar;
}
//! \brief Returns the magnitude of the vorticity
......
......@@ -21,9 +21,6 @@ InletVelocity = 2.5 # [m/s]
EnableGravity = false
SandGrainRoughness = 0.0 # [m] # not implemented for EddyViscosityModel = 3
[OneEq]
STildeType = 2
[RANS]
EddyViscosityModel = "baldwinLomax"
UseStoredEddyViscosity = false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment