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

laminar.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) 1991-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 "laminar.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(laminar, 0);
00041 addToRunTimeSelectionTable(LESModel, laminar, dictionary);
00042 
00043 
00044 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00045 
00046 laminar::laminar
00047 (
00048     const volVectorField& U,
00049     const surfaceScalarField& phi,
00050     transportModel& transport
00051 )
00052 :
00053     LESModel(typeName, U, phi, transport)
00054 {}
00055 
00056 
00057 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00058 
00059 tmp<volScalarField> laminar::k() const
00060 {
00061     return tmp<volScalarField>
00062     (
00063         new volScalarField
00064         (
00065             IOobject
00066             (
00067                 "k",
00068                 runTime_.timeName(),
00069                 mesh_,
00070                 IOobject::NO_READ,
00071                 IOobject::NO_WRITE
00072             ),
00073             mesh_,
00074             dimensionedScalar("k", sqr(U().dimensions()), 0.0)
00075         )
00076     );
00077 }
00078 
00079 tmp<volScalarField> laminar::epsilon() const
00080 {
00081     return 2*nu()*magSqr(symm(fvc::grad(U())));
00082 }
00083 
00084 tmp<volScalarField> laminar::nuSgs() const
00085 {
00086     return tmp<volScalarField>
00087     (
00088         new volScalarField
00089         (
00090             IOobject
00091             (
00092                 "nuSgs",
00093                 runTime_.timeName(),
00094                 mesh_,
00095                 IOobject::NO_READ,
00096                 IOobject::NO_WRITE
00097             ),
00098             mesh_,
00099             dimensionedScalar("nuSgs", nu().dimensions(), 0.0)
00100         )
00101     );
00102 }
00103 
00104 tmp<volScalarField> laminar::nuEff() const
00105 {
00106     return tmp<volScalarField>
00107     (
00108         new volScalarField("nuEff", nu())
00109     );
00110 }
00111 
00112 
00113 tmp<volSymmTensorField> laminar::B() const
00114 {
00115     return tmp<volSymmTensorField>
00116     (
00117         new volSymmTensorField
00118         (
00119             IOobject
00120             (
00121                 "B",
00122                 runTime_.timeName(),
00123                 mesh_,
00124                 IOobject::NO_READ,
00125                 IOobject::NO_WRITE
00126             ),
00127             mesh_,
00128             dimensionedSymmTensor
00129             (
00130                 "B", sqr(U().dimensions()), symmTensor::zero
00131             )
00132         )
00133     );
00134 }
00135 
00136 
00137 tmp<volSymmTensorField> laminar::devBeff() const
00138 {
00139     return -nu()*dev(twoSymm(fvc::grad(U())));
00140 }
00141 
00142 
00143 tmp<fvVectorMatrix> laminar::divDevBeff(volVectorField& U) const
00144 {
00145     return
00146     (
00147       - fvm::laplacian(nu(), U) - fvc::div(nu()*dev(fvc::grad(U)().T()))
00148     );
00149 }
00150 
00151 
00152 bool laminar::read()
00153 {
00154     return LESModel::read();
00155 }
00156 
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 } // End namespace LESModels
00161 } // End namespace incompressible
00162 } // End namespace Foam
00163 
00164 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines