FreeFOAM The Cross-Platform CFD Toolkit
laminar.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "laminar.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace incompressible
34 {
35 namespace LESModels
36 {
37 
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 
40 defineTypeNameAndDebug(laminar, 0);
41 addToRunTimeSelectionTable(LESModel, laminar, dictionary);
42 
43 
44 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45 
46 laminar::laminar
47 (
48  const volVectorField& U,
49  const surfaceScalarField& phi,
50  transportModel& transport
51 )
52 :
53  LESModel(typeName, U, phi, transport)
54 {}
55 
56 
57 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
58 
60 {
61  return tmp<volScalarField>
62  (
63  new volScalarField
64  (
65  IOobject
66  (
67  "k",
69  mesh_,
72  ),
73  mesh_,
74  dimensionedScalar("k", sqr(U().dimensions()), 0.0)
75  )
76  );
77 }
78 
80 {
81  return 2*nu()*magSqr(symm(fvc::grad(U())));
82 }
83 
85 {
86  return tmp<volScalarField>
87  (
88  new volScalarField
89  (
90  IOobject
91  (
92  "nuSgs",
94  mesh_,
97  ),
98  mesh_,
99  dimensionedScalar("nuSgs", nu().dimensions(), 0.0)
100  )
101  );
102 }
103 
105 {
106  return tmp<volScalarField>
107  (
108  new volScalarField("nuEff", nu())
109  );
110 }
111 
112 
114 {
116  (
118  (
119  IOobject
120  (
121  "B",
122  runTime_.timeName(),
123  mesh_,
126  ),
127  mesh_,
129  (
130  "B", sqr(U().dimensions()), symmTensor::zero
131  )
132  )
133  );
134 }
135 
136 
138 {
139  return -nu()*dev(twoSymm(fvc::grad(U())));
140 }
141 
142 
144 {
145  return
146  (
147  - fvm::laplacian(nu(), U) - fvc::div(nu()*dev(fvc::grad(U)().T()))
148  );
149 }
150 
151 
153 {
154  return LESModel::read();
155 }
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace LESModels
161 } // End namespace incompressible
162 } // End namespace Foam
163 
164 // ************************ vim: set sw=4 sts=4 et: ************************ //