ThermalDiffusivity.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) 2015-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 "ThermalDiffusivity.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class BasicTurbulenceModel>
34 (
35  const word& type,
36  const alphaField& alpha,
37  const volScalarField& rho,
38  const volVectorField& U,
39  const surfaceScalarField& alphaRhoPhi,
40  const surfaceScalarField& phi,
41  const transportModel& transport,
42  const word& propertiesName
43 )
44 :
45  BasicTurbulenceModel
46  (
47  type,
48  alpha,
49  rho,
50  U,
51  alphaRhoPhi,
52  phi,
53  transport,
54  propertiesName
55  )
56 {}
57 
58 
59 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
60 
61 template<class BasicTurbulenceModel>
64 (
65  const alphaField& alpha,
66  const volScalarField& rho,
67  const volVectorField& U,
68  const surfaceScalarField& alphaRhoPhi,
69  const surfaceScalarField& phi,
70  const transportModel& transport,
71  const word& propertiesName
72 )
73 {
75  (
76  static_cast<ThermalDiffusivity*>(
78  (
79  alpha,
80  rho,
81  U,
82  alphaRhoPhi,
83  phi,
84  transport,
85  propertiesName
86  ).ptr())
87  );
88 }
89 
90 
91 template<class BasicTurbulenceModel>
94 (
95  const volScalarField& rho,
96  const volVectorField& U,
97  const surfaceScalarField& phi,
98  const transportModel& transport,
99  const word& propertiesName
100 )
101 {
103  (
104  static_cast<ThermalDiffusivity*>(
106  (
107  rho,
108  U,
109  phi,
110  transport,
111  propertiesName
112  ).ptr())
113  );
114 }
115 
116 
117 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
118 
119 template<class BasicTurbulenceModel>
122 {
124  (
125  IOobject
126  (
127  IOobject::groupName("alphat", this->alphaRhoPhi_.group()),
128  this->runTime_.timeName(),
129  this->mesh_,
130  IOobject::NO_READ,
131  IOobject::NO_WRITE
132  ),
133  this->mesh_,
135  );
136 }
137 
138 
139 template<class BasicTurbulenceModel>
142 (
143  const label patchi
144 ) const
145 {
146  return tmp<scalarField>
147  (
148  new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
149  );
150 }
151 
152 
153 // ************************************************************************* //
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimDensity
const dimensionSet dimDensity
ThermalDiffusivity.H
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
rho
rho
Definition: readInitialConditions.H:88
Foam::ThermalDiffusivity::ThermalDiffusivity
ThermalDiffusivity(const word &type, const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
Construct.
Definition: ThermalDiffusivity.C:34
Foam::ThermalDiffusivity< Foam::PhaseCompressibleTurbulenceModel< Foam::fluidThermo > >::alphaField
Foam::PhaseCompressibleTurbulenceModel< Foam::fluidThermo > ::alphaField alphaField
Definition: ThermalDiffusivity.H:58
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::dimViscosity
const dimensionSet dimViscosity
Foam::ThermalDiffusivity::New
static autoPtr< ThermalDiffusivity > New(const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Definition: ThermalDiffusivity.C:64
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::ThermalDiffusivity< Foam::PhaseCompressibleTurbulenceModel< Foam::fluidThermo > >::transportModel
Foam::PhaseCompressibleTurbulenceModel< Foam::fluidThermo > ::transportModel transportModel
Definition: ThermalDiffusivity.H:60
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
U
U
Definition: pEqn.H:72
Foam::ThermalDiffusivity
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Definition: phaseCompressibleTurbulenceModelFwd.H:47
Foam::ThermalDiffusivity::alphat
virtual tmp< volScalarField > alphat() const
Return the turbulent thermal diffusivity for enthalpy [kg/m/s].
Definition: ThermalDiffusivity.C:121
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::GeometricField< scalar, fvPatchField, volMesh >