OpenFOAM logo
Open Source CFD Toolkit

laminar.H

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-2005 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     laminar
00027 
00028 Description
00029     Dummy turbulence model for laminar flow.
00030 
00031 SourceFiles
00032     laminar.C
00033     laminarCorrect.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef laminar_H
00038 #define laminar_H
00039 
00040 #include "turbulenceModel.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace turbulenceModels
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                            Class laminar Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class laminar
00054 :
00055     public turbulenceModel
00056 {
00057 
00058 public:
00059 
00060     //- Runtime type information
00061     TypeName("laminar");
00062 
00063     // Constructors
00064 
00065         //- from components
00066         laminar
00067         (
00068             const volVectorField& U,
00069             const surfaceScalarField& phi,
00070             transportModel& transport
00071         );
00072 
00073 
00074     // Destructor
00075 
00076         ~laminar()
00077         {}
00078 
00079 
00080     // Member Functions
00081 
00082         tmp<volScalarField> nut() const
00083         {
00084             return tmp<volScalarField>
00085             (
00086                 new volScalarField
00087                 (
00088                     IOobject
00089                     (
00090                         "nut",
00091                         runTime_.timeName(),
00092                         mesh_,
00093                         IOobject::NO_READ,
00094                         IOobject::NO_WRITE
00095                     ),
00096                     mesh_,
00097                     dimensionedScalar("nut", nu().dimensions(), 0.0)
00098                 )
00099             );
00100         }
00101 
00102         tmp<volScalarField> nuEff() const
00103         {
00104             return tmp<volScalarField>(new volScalarField("nuEff", nu()));
00105         }
00106 
00107         tmp<volScalarField> k() const
00108         {
00109             return tmp<volScalarField>
00110             (
00111                 new volScalarField
00112                 (
00113                     IOobject
00114                     (
00115                         "k",
00116                         runTime_.timeName(),
00117                         mesh_,
00118                         IOobject::NO_READ,
00119                         IOobject::NO_WRITE
00120                     ),
00121                     mesh_,
00122                     dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
00123                 )
00124             );
00125         }
00126 
00127         tmp<volScalarField> epsilon() const
00128         {
00129             return tmp<volScalarField>
00130             (
00131                 new volScalarField
00132                 (
00133                     IOobject
00134                     (
00135                         "epsilon",
00136                         runTime_.timeName(),
00137                         mesh_,
00138                         IOobject::NO_READ,
00139                         IOobject::NO_WRITE
00140                     ),
00141                     mesh_,
00142                     dimensionedScalar
00143                     (
00144                         "epsilon", sqr(U_.dimensions())/dimTime, 0.0
00145                     )
00146                 )
00147             );
00148         }
00149 
00150         tmp<volTensorField> R() const
00151         {
00152             return tmp<volTensorField>
00153             (
00154                 new volTensorField
00155                 (
00156                     IOobject
00157                     (
00158                         "R",
00159                         runTime_.timeName(),
00160                         mesh_,
00161                         IOobject::NO_READ,
00162                         IOobject::NO_WRITE
00163                     ),
00164                     mesh_,
00165                     dimensionedTensor
00166                     (
00167                         "R", sqr(U_.dimensions()), tensor::zero
00168                     )
00169                 )
00170             );
00171         }
00172 
00173         tmp<fvVectorMatrix> divR(volVectorField& U) const;
00174 
00175         void correct();
00176 
00177         //- Read turbulenceProperties dictionary
00178         bool read();
00179 };
00180 
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 } // End namespace turbulenceModels
00185 } // End namespace Foam
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 #endif
00190 
00191 // ************************************************************************* //
For further information go to www.openfoam.org