compressibleTurbulenceModel.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) 2013-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 
27 #include "surfaceInterpolate.H"
28 #include "surfaceFields.H"
29 
30 
31 // Symbol to force loading at runtime
32 extern "C"
34 {}
35 
36 
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41  defineTypeNameAndDebug(compressibleTurbulenceModel, 0);
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
48 (
49  const volScalarField& rho,
50  const volVectorField& U,
51  const surfaceScalarField& alphaRhoPhi,
52  const surfaceScalarField& phi,
53  const word& propertiesName
54 )
55 :
57  (
58  U,
59  alphaRhoPhi,
60  phi,
61  propertiesName
62  ),
63  rho_(rho)
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
68 
71 {
72  if (phi_.dimensions() == dimensionSet(0, 3, -1, 0, 0))
73  {
74  return phi_;
75  }
76  else
77  {
78  return phi_/fvc::interpolate(rho_);
79  }
80 }
81 
82 
84 {}
85 
86 
87 // ************************************************************************* //
compressibleTurbulenceModelsLoad
void compressibleTurbulenceModelsLoad()
Definition: compressibleTurbulenceModel.C:33
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
compressibleTurbulenceModel.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::fvc::interpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Definition: surfaceInterpolate.C:110
Foam::compressibleTurbulenceModel::compressibleTurbulenceModel
compressibleTurbulenceModel(const compressibleTurbulenceModel &)
Disallow default bitwise copy construct.
surfaceFields.H
Foam::surfaceFields.
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:116
U
U
Definition: pEqn.H:46
Foam::compressible::turbulenceModel
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Definition: turbulentFluidThermoModel.H:60
Foam::compressibleTurbulenceModel::rho_
const volScalarField & rho_
Definition: compressibleTurbulenceModel.H:60
surfaceInterpolate.H
Surface Interpolation.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
rho
rho
Definition: pEqn.H:3
Foam::turbulenceModel::phi_
const surfaceScalarField & phi_
Definition: turbulenceModel.H:74
Foam::compressibleTurbulenceModel::phi
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
Definition: compressibleTurbulenceModel.C:70
Foam::compressibleTurbulenceModel::correctEnergyTransport
virtual void correctEnergyTransport()
Correct the turbulence thermal diffusivity for energy transport.
Definition: compressibleTurbulenceModel.C:83
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)