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 compressible
00034 {
00035 namespace RASModels
00036 {
00037 
00038 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00039 
00040 defineTypeNameAndDebug(laminar, 0);
00041 addToRunTimeSelectionTable(RASModel, laminar, dictionary);
00042 
00043 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00044 
00045 laminar::laminar
00046 (
00047     const volScalarField& rho,
00048     const volVectorField& U,
00049     const surfaceScalarField& phi,
00050     const basicThermo& thermophysicalModel
00051 )
00052 :
00053     RASModel(typeName, rho, U, phi, thermophysicalModel)
00054 {}
00055 
00056 
00057 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00058 
00059 tmp<volScalarField> laminar::mut() const
00060 {
00061     return tmp<volScalarField>
00062     (
00063         new volScalarField
00064         (
00065             IOobject
00066             (
00067                 "mut",
00068                 runTime_.timeName(),
00069                 mesh_,
00070                 IOobject::NO_READ,
00071                 IOobject::NO_WRITE
00072             ),
00073             mesh_,
00074             dimensionedScalar("mut", mu().dimensions(), 0.0)
00075         )
00076     );
00077 }
00078 
00079 
00080 tmp<volScalarField> laminar::k() const
00081 {
00082     return tmp<volScalarField>
00083     (
00084         new volScalarField
00085         (
00086             IOobject
00087             (
00088                 "k",
00089                 runTime_.timeName(),
00090                 mesh_,
00091                 IOobject::NO_READ,
00092                 IOobject::NO_WRITE
00093             ),
00094             mesh_,
00095             dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
00096         )
00097     );
00098 }
00099 
00100 
00101 tmp<volScalarField> laminar::epsilon() const
00102 {
00103     return tmp<volScalarField>
00104     (
00105         new volScalarField
00106         (
00107             IOobject
00108             (
00109                 "epsilon",
00110                 runTime_.timeName(),
00111                 mesh_,
00112                 IOobject::NO_READ,
00113                 IOobject::NO_WRITE
00114             ),
00115             mesh_,
00116             dimensionedScalar
00117             (
00118                 "epsilon", sqr(U_.dimensions())/dimTime, 0.0
00119             )
00120         )
00121     );
00122 }
00123 
00124 
00125 tmp<volSymmTensorField> laminar::R() const
00126 {
00127     return tmp<volSymmTensorField>
00128     (
00129         new volSymmTensorField
00130         (
00131             IOobject
00132             (
00133                 "R",
00134                 runTime_.timeName(),
00135                 mesh_,
00136                 IOobject::NO_READ,
00137                 IOobject::NO_WRITE
00138             ),
00139             mesh_,
00140             dimensionedSymmTensor
00141             (
00142                 "R", sqr(U_.dimensions()), symmTensor::zero
00143             )
00144         )
00145     );
00146 }
00147 
00148 
00149 tmp<volSymmTensorField> laminar::devRhoReff() const
00150 {
00151     return tmp<volSymmTensorField>
00152     (
00153         new volSymmTensorField
00154         (
00155             IOobject
00156             (
00157                 "devRhoReff",
00158                 runTime_.timeName(),
00159                 mesh_,
00160                 IOobject::NO_READ,
00161                 IOobject::NO_WRITE
00162             ),
00163            -mu()*dev(twoSymm(fvc::grad(U_)))
00164         )
00165     );
00166 }
00167 
00168 
00169 tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
00170 {
00171     return
00172     (
00173       - fvm::laplacian(muEff(), U)
00174       - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
00175     );
00176 }
00177 
00178 
00179 bool laminar::read()
00180 {
00181     return RASModel::read();
00182 }
00183 
00184 
00185 void laminar::correct()
00186 {}
00187 
00188 
00189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00190 
00191 } // End namespace RASModels
00192 } // End namespace compressible
00193 } // End namespace Foam
00194 
00195 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines