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     LES model for laminar flow.  It simply returns laminar properties.
00030 
00031 SourceFiles
00032     laminar.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef laminar_H
00037 #define laminar_H
00038 
00039 #include "LESmodel.H"
00040 #include "volFields.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace LESmodels
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                            Class laminar Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class laminar
00054 :
00055     public LESmodel
00056 {
00057     // Private member functions
00058 
00059         // Disallow default bitwise copy construct and assignment
00060         laminar(const laminar&);
00061         laminar& operator=(const laminar&);       
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("laminar");
00068 
00069 
00070     // Constructors
00071 
00072         //- Constructor from components
00073         laminar
00074         (
00075             const volVectorField& U,
00076             const surfaceScalarField& phi,
00077             transportModel& transport
00078         );
00079 
00080 
00081     // Destructor
00082 
00083         ~laminar()
00084         {}
00085 
00086 
00087     // Member Functions
00088 
00089         //- Evaluate B. This is done on the fly : its not usually necessary,
00090         //  but will be if we want to compare with experiments or DNS
00091         tmp<volTensorField> B() const
00092         {
00093             return tmp<volTensorField>
00094             (
00095                 new volTensorField
00096                 (
00097                     IOobject
00098                     (
00099                         "B",
00100                         runTime_.timeName(),
00101                         mesh_,
00102                         IOobject::NO_READ,
00103                         IOobject::NO_WRITE
00104                     ),
00105                     mesh_,
00106                     dimensionedTensor
00107                     (
00108                         "B", sqr(U().dimensions()), tensor::zero
00109                     )
00110                 )
00111             );
00112         }
00113         
00114         //- Return SGS kinetic energy
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         //- Return sub-grid disipation rate
00136         tmp<volScalarField> epsilon() const;
00137 
00138         //- Return SGS viscosity
00139         tmp<volScalarField> nuSgs() const
00140         {
00141             return tmp<volScalarField>
00142             (
00143                 new volScalarField
00144                 (
00145                     IOobject
00146                     (
00147                         "nuSgs",
00148                         runTime_.timeName(),
00149                         mesh_,
00150                         IOobject::NO_READ,
00151                         IOobject::NO_WRITE
00152                     ),
00153                     mesh_,
00154                     dimensionedScalar("nuSgs", nu().dimensions(), 0.0)
00155                 )
00156             );
00157         }       
00158 
00159         //- Return the effective viscosity
00160         tmp<volScalarField> nuEff() const
00161         {
00162             return tmp<volScalarField>
00163             (
00164                 new volScalarField("nuEff", nu())
00165             );
00166         }
00167 
00168         //- Returns divergence of B : i.e. the additional term in the
00169         //  filtered NSE.
00170         tmp<fvVectorMatrix> divB(volVectorField& U) const;
00171 
00172         //- Read turbulenceProperties dictionary
00173         bool read();
00174 };
00175 
00176 
00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00178 
00179 } // End namespace LESmodels
00180 } // End namespace Foam
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 #endif
00185 
00186 // ************************************************************************* //
For further information go to www.openfoam.org