OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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