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-------------------------------------------------------------------------------
10License
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
35namespace Foam
36{
38}
39
40const Foam::word Foam::turbulenceModel::propertiesName("turbulenceProperties");
41
42
43// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44
46(
47 const volVectorField& U,
48 const surfaceScalarField& alphaRhoPhi,
50 const word& propertiesName
51)
52:
54 (
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// ************************************************************************* //
surfaceScalarField & phi
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
constant condensation/saturation model.
virtual bool read()
Read object.
A class for managing temporary objects.
Definition: tmp.H:65
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual void validate()
Validate the turbulence fields after construction.
virtual bool read()=0
Read model coefficients if they have changed.
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
U
Definition: pEqn.H:72
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Foam::surfaceFields.