turbulenceModel.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) 2011-2015 OpenFOAM Foundation
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 "turbulenceModel.H"
27 #include "volFields.H"
28 #include "surfaceFields.H"
29 #include "wallFvPatch.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
36 }
37 
38 const Foam::word Foam::turbulenceModel::propertiesName("turbulenceProperties");
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
43 Foam::turbulenceModel::turbulenceModel
44 (
45  const volVectorField& U,
46  const surfaceScalarField& alphaRhoPhi,
47  const surfaceScalarField& phi,
48  const word& propertiesName
49 )
50 :
52  (
53  IOobject
54  (
55  IOobject::groupName(propertiesName, U.group()),
56  U.time().constant(),
57  U.db(),
60  )
61  ),
62 
63  runTime_(U.time()),
64  mesh_(U.mesh()),
65 
66  U_(U),
67  alphaRhoPhi_(alphaRhoPhi),
68  phi_(phi),
69  y_(mesh_)
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
76 {
77  return phi_;
78 }
79 
80 
82 {
83  return regIOobject::read();
84 }
85 
86 
88 {}
89 
90 
92 {
93  if (mesh_.changing())
94  {
95  y_.correct();
96  }
97 }
98 
99 
100 // ************************************************************************* //
Foam::surfaceFields.
virtual void validate()
Validate the turbulence fields after construction.
virtual bool read()
Read object.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
word group() const
Return group (extension part of name)
Definition: IOobject.C:349
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
static word groupName(Name name, const word &group)
const word & constant() const
Return constant name.
Definition: TimePaths.H:124
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
const Time & time() const
Return time.
Definition: IOobject.C:337
A class for managing temporary objects.
Definition: PtrList.H:53
const objectRegistry & db() const
Return the local objectRegistry.
Definition: IOobject.C:331
virtual bool read()=0
Read model coefficients if they have changed.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.