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 compressibleLaminar_H
00038 #define compressibleLaminar_H
00039 
00040 #include "turbulenceModel.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace compressible
00047 {
00048 namespace turbulenceModels
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                            Class laminar Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class laminar
00056 :
00057     public turbulenceModel
00058 {
00059 
00060 public:
00061 
00062     //- Runtime type information
00063     TypeName("laminar");
00064 
00065     // Constructors
00066 
00067         //- from components
00068         laminar
00069         (
00070             const volScalarField& rho,
00071             const volVectorField& U,
00072             const surfaceScalarField& phi,
00073             basicThermo& thermophysicalModel
00074         );
00075 
00076 
00077     // Destructor
00078 
00079         ~laminar()
00080         {}
00081 
00082 
00083     // Member Functions
00084 
00085         tmp<volScalarField> mut() const
00086         {
00087             return tmp<volScalarField>
00088             (
00089                 new volScalarField
00090                 (
00091                     IOobject
00092                     (
00093                         "mut",
00094                         runTime_.timeName(),
00095                         mesh_,
00096                         IOobject::NO_READ,
00097                         IOobject::NO_WRITE
00098                     ),
00099                     mesh_,
00100                     dimensionedScalar("mut", mu().dimensions(), 0.0)
00101                 )
00102             );
00103         }
00104 
00105         tmp<volScalarField> muEff() const
00106         {
00107             return tmp<volScalarField>(new volScalarField("muEff", mu()));
00108         }
00109 
00110         tmp<volScalarField> alphaEff() const
00111         {
00112             return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
00113         }
00114 
00115         tmp<volScalarField> k() const
00116         {
00117             return tmp<volScalarField>
00118             (
00119                 new volScalarField
00120                 (
00121                     IOobject
00122                     (
00123                         "k",
00124                         runTime_.timeName(),
00125                         mesh_,
00126                         IOobject::NO_READ,
00127                         IOobject::NO_WRITE
00128                     ),
00129                     mesh_,
00130                     dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
00131                 )
00132             );
00133         }
00134 
00135         tmp<volScalarField> epsilon() const
00136         {
00137             return tmp<volScalarField>
00138             (
00139                 new volScalarField
00140                 (
00141                     IOobject
00142                     (
00143                         "epsilon",
00144                         runTime_.timeName(),
00145                         mesh_,
00146                         IOobject::NO_READ,
00147                         IOobject::NO_WRITE
00148                     ),
00149                     mesh_,
00150                     dimensionedScalar
00151                     (
00152                         "epsilon", sqr(U_.dimensions())/dimTime, 0.0
00153                     )
00154                 )
00155             );
00156         }
00157 
00158         tmp<volTensorField> R() const
00159         {
00160             return tmp<volTensorField>
00161             (
00162                 new volTensorField
00163                 (
00164                     IOobject
00165                     (
00166                         "R",
00167                         runTime_.timeName(),
00168                         mesh_,
00169                         IOobject::NO_READ,
00170                         IOobject::NO_WRITE
00171                     ),
00172                     mesh_,
00173                     dimensionedTensor
00174                     (
00175                         "R", sqr(U_.dimensions()), tensor::zero
00176                     )
00177                 )
00178             );
00179         }
00180 
00181         tmp<fvVectorMatrix> divRhoR(volVectorField& U) const;
00182 
00183         void correct();
00184 
00185         //- Read turbulenceProperties dictionary
00186         bool read();
00187 };
00188 
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 } // End namespace turbulenceModels
00193 } // End namespace compressible
00194 } // End namespace Foam
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************************************************************* //
For further information go to www.openfoam.org