FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

SpalartAllmarasDDES.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include "SpalartAllmarasDDES.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033 namespace incompressible
00034 {
00035 namespace LESModels
00036 {
00037 
00038 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00039 
00040 defineTypeNameAndDebug(SpalartAllmarasDDES, 0);
00041 addToRunTimeSelectionTable(LESModel, SpalartAllmarasDDES, dictionary);
00042 
00043 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
00044 
00045 tmp<volScalarField> SpalartAllmarasDDES::rd
00046 (
00047     const volScalarField& visc,
00048     const volScalarField& S
00049 ) const
00050 {
00051     return min
00052     (
00053         visc
00054         /(
00055             max
00056             (
00057                 S,
00058                 dimensionedScalar("SMALL", S.dimensions(), SMALL)
00059             )*sqr(kappa_*y_)
00060           + dimensionedScalar
00061             (
00062                 "ROOTVSMALL",
00063                 dimensionSet(0, 2 , -1, 0, 0),
00064                 ROOTVSMALL
00065             )
00066         ),
00067         scalar(10)
00068     );
00069 }
00070 
00071 
00072 tmp<volScalarField> SpalartAllmarasDDES::fd(const volScalarField& S) const
00073 {
00074     return 1 - tanh(pow3(8*rd(nuEff(), S)));
00075 }
00076 
00077 
00078 tmp<volScalarField> SpalartAllmarasDDES::S(const volTensorField& gradU) const
00079 {
00080     return sqrt(2.0)*mag(symm(gradU));
00081 }
00082 
00083 
00084 tmp<volScalarField> SpalartAllmarasDDES::dTilda(const volScalarField& S) const
00085 {
00086     return max
00087     (
00088         y_
00089       - fd(S)
00090        *max(y_ - CDES_*delta(), dimensionedScalar("zero", dimLength, 0)),
00091         dimensionedScalar("small", dimLength, SMALL)
00092     );
00093 }
00094 
00095 
00096 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00097 
00098 SpalartAllmarasDDES::SpalartAllmarasDDES
00099 (
00100     const volVectorField& U,
00101     const surfaceScalarField& phi,
00102     transportModel& transport
00103 )
00104 :
00105     SpalartAllmaras(U, phi, transport, typeName)
00106 {}
00107 
00108 
00109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00110 
00111 } // End namespace LESModels
00112 } // End namespace incompressible
00113 } // End namespace Foam
00114 
00115 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines