diff --git a/doc/doxygen/modules.txt b/doc/doxygen/modules.txt index 9f341715ef5e44777feb71ef660c4fdc4cccc001..adc49c12ea13844d6c53a9ec4ff2b146c7e063b3 100644 --- a/doc/doxygen/modules.txt +++ b/doc/doxygen/modules.txt @@ -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 diff --git a/doc/doxygen/sanitizelinks.sh b/doc/doxygen/sanitizelinks.sh index 52051da2fa7d8214253c7c6af94f39cb1bf70232..3c07e38642e5d47dcfa12633fecafd0990b9284b 100755 --- a/doc/doxygen/sanitizelinks.sh +++ b/doc/doxygen/sanitizelinks.sh @@ -1,2 +1,4 @@ #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 diff --git a/doc/handbook/dumux-handbook.bib b/doc/handbook/dumux-handbook.bib index 6e14fbf946e5d1a411e815d1c485964f6865787a..4e61894b70634f753934f53935d74bc45eec32a1 100644 --- a/doc/handbook/dumux-handbook.bib +++ b/doc/handbook/dumux-handbook.bib @@ -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} +} diff --git a/dumux/freeflow/rans/oneeq/model.hh b/dumux/freeflow/rans/oneeq/model.hh index c7ed7084c96622088b00e10b97715ea54269b42d..8dde555d5aa295663aacdad905a6a442be000d43 100644 --- a/dumux/freeflow/rans/oneeq/model.hh +++ b/dumux/freeflow/rans/oneeq/model.hh @@ -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 diff --git a/dumux/freeflow/rans/oneeq/volumevariables.hh b/dumux/freeflow/rans/oneeq/volumevariables.hh index 207233d82d465a82e8b0352a772d05e0686b4f33..f7d060cb6e6554d6850e8d8761d69b5d2e602c4d 100644 --- a/dumux/freeflow/rans/oneeq/volumevariables.hh +++ b/dumux/freeflow/rans/oneeq/volumevariables.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 diff --git a/test/freeflow/rans/test_pipe_laufer.input b/test/freeflow/rans/test_pipe_laufer.input index 9630e30ed060e1ed8b48e03c90f7801aa7733df0..b0245e8898ea05886f7d7c25b812d520bf72190d 100644 --- a/test/freeflow/rans/test_pipe_laufer.input +++ b/test/freeflow/rans/test_pipe_laufer.input @@ -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