ReynoldsAnalogy.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020 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 Class
25  Foam::wallHeatTransferCoeffModels::ReynoldsAnalogy
26 
27 Description
28  Calculates and writes the estimated flow heat transfer coefficient at wall
29  patches as the volScalarField field 'wallHeatTransferCoeff' using Reynolds
30  Analogy.
31 
32  Reynolds Analogy model, given by:
33 
34  \f[
35  htc = 0.5 \rho C_p |U_{ref}| C_f
36  \f]
37 
38  where
39  \vartable
40  rho | Density [kg/m^3]
41  Cp | Specific heat capacity [m^2/K/s^2)]
42  Uref | Far field velocity magnitude [m/s]
43  Cf | Skin friction coefficient []
44  \endvartable
45 
46 
47  All wall patches are included by default; to restrict the calculation to
48  certain patches, use the optional 'patches' entry.
49 
50  Example of function object specification:
51  \verbatim
52  ReynoldsAnalogy1
53  {
54  type wallHeatTransferCoeff;
55  libs ("libfieldFunctionObjects.so");
56  model ReynoldsAnalogy;
57  ...
58  region fluid;
59  patches (".*Wall");
60  rho 1.225;
61  Cp 1005;
62  Uref 1.0;
63  }
64  \endverbatim
65 
66 Usage
67  \table
68  Property | Description | Required | Default value
69  type | type name: wallHeatTransferCoeff | yes |
70  model | Type name: ReynoldsAnalogy | no | kappaEff
71  patches | List of patches to process | no | all wall patches
72  region | Region to be evaluated | no | default region
73  rho | Density | yes |
74  Cp | Specific heat capacity | yes |
75  Uref | Reference velocity magnitude | yes | no
76  \endtable
77 
78 Note
79  Cp and rho are required only for incompressible flow calclulations.
80 
81 SourceFiles
82  ReynoldsAnalogy.C
83 
84 \*---------------------------------------------------------------------------*/
85 
86 #ifndef wallHeatTransferCoeffModels_ReynoldsAnalogy_H
87 #define wallHeatTransferCoeffModels_ReynoldsAnalogy_H
88 
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 namespace Foam
94 {
95 namespace wallHeatTransferCoeffModels
96 {
97 
98 /*---------------------------------------------------------------------------*\
99  Class ReynoldsAnalogy Declaration
100 \*---------------------------------------------------------------------------*/
101 
102 class ReynoldsAnalogy
103 :
104  public wallHeatTransferCoeffModel
105 {
106  // Private Data
107 
108  //- Reference to mesh
109  const fvMesh& mesh_;
110 
111  //- Reference velocity magnitude [m/s]
112  dimensionedScalar Uref_;
113 
114 
115  // Private member functions
116 
117  //- Calculate the wall shear-stress
118  tmp<volVectorField> calcShearStress
119  (
120  const volSymmTensorField& tau
121  );
122 
123 
124 public:
125 
126  //- Runtime type information
127  TypeName("ReynoldsAnalogy");
128 
129 
130  // Constructors
131 
132  //- Construct from name, mesh and dict
134  (
135  const word& name,
136  const fvMesh& mesh,
137  const dictionary& dict
138  );
139 
140  //- Disallow default bitwise copy construction
142  (
143  const ReynoldsAnalogy&
144  ) = delete;
145 
146 
147  //- Destructor
148  virtual ~ReynoldsAnalogy();
149 
150 
151  // Member Functions
152 
153  //- Read the ReynoldsAnalogy data
154  virtual bool read(const dictionary&);
155 
156  //- Calculate the heat transfer coefficient
158  (
159  const momentumTransportModel& mmtm,
160  const labelHashSet& patches
161  ) const;
162 
163 
164  // Member Operators
165 
166  //- Disallow default bitwise assignment
167  void operator=(const ReynoldsAnalogy&) = delete;
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace wallHeatTransferCoeffModels
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #endif
179 
180 // ************************************************************************* //
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:61
dictionary dict
void operator=(const ReynoldsAnalogy &)=delete
Disallow default bitwise assignment.
patches[0]
virtual bool read(const dictionary &)
Read the ReynoldsAnalogy data.
dynamicFvMesh & mesh
tmp< volSymmTensorField > tau(const momentumTransportModel &mmtm, const fvMesh &mesh) const
Calculate wall shear stress.
virtual tmp< volScalarField > htcByRhoCp(const momentumTransportModel &mmtm, const labelHashSet &patches) const
Calculate the heat transfer coefficient.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Abstract base class for turbulence models (RAS, LES and laminar).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
ReynoldsAnalogy(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from name, mesh and dict.
Calculates and writes the estimated flow heat transfer coefficient at wall patches as the volScalarFi...
A class for managing temporary objects.
Definition: PtrList.H:53
TypeName("ReynoldsAnalogy")
Runtime type information.
Namespace for OpenFOAM.