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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "turbulenceModel.H"
29 #include "volFields.H"
30 #include "surfaceFields.H"
31 #include "wallFvPatch.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
38 }
39 
40 const Foam::word Foam::turbulenceModel::propertiesName("turbulenceProperties");
41 
42 
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 
45 Foam::turbulenceModel::turbulenceModel
46 (
47  const volVectorField& U,
48  const surfaceScalarField& alphaRhoPhi,
49  const surfaceScalarField& phi,
50  const word& propertiesName
51 )
52 :
53  IOdictionary
54  (
55  IOobject
56  (
57  IOobject::groupName(propertiesName, alphaRhoPhi.group()),
58  U.time().constant(),
59  U.db(),
60  IOobject::MUST_READ_IF_MODIFIED,
61  IOobject::NO_WRITE
62  )
63  ),
64 
65  runTime_(U.time()),
66  mesh_(U.mesh()),
67 
68  U_(U),
69  alphaRhoPhi_(alphaRhoPhi),
70  phi_(phi),
71  y_(mesh_)
72 {}
73 
74 
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
76 
78 {
79  return phi_;
80 }
81 
82 
84 {
85  return regIOobject::read();
86 }
87 
88 
90 {}
91 
92 
94 {
95  if (mesh_.changing())
96  {
97  y_.correct();
98  }
99 }
100 
101 
102 // ************************************************************************* //
volFields.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::constant::atomic::group
constexpr const char *const group
Group name for atomic constants.
Definition: atomicConstants.H:52
Foam::turbulenceModel::phi
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Definition: turbulenceModel.C:77
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::regIOobject::read
virtual bool read()
Read object.
Definition: regIOobjectRead.C:191
wallFvPatch.H
surfaceFields.H
Foam::surfaceFields.
Foam::turbulenceModel::correct
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
Definition: turbulenceModel.C:93
Foam::compressible::turbulenceModel
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Definition: turbulentFluidThermoModel.H:63
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::turbulenceModel::read
virtual bool read()=0
Read model coefficients if they have changed.
Definition: turbulenceModel.C:83
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::turbulenceModel::validate
virtual void validate()
Validate the turbulence fields after construction.
Definition: turbulenceModel.C:89
Foam::turbulenceModel::phi_
const surfaceScalarField & phi_
Definition: turbulenceModel.H:77
constant
constant condensation/saturation model.
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
turbulenceModel.H