mappedConvectiveHeatTransfer.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 
31 #include "kinematicSingleLayer.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace regionModels
38 {
39 namespace surfaceFilmModels
40 {
41 
42 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
43 
44 defineTypeNameAndDebug(mappedConvectiveHeatTransfer, 0);
45 
47 (
48  heatTransferModel,
51 );
52 
53 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
54 
55 mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer
56 (
58  const dictionary& dict
59 )
60 :
61  heatTransferModel(film),
62  htcConvPrimary_
63  (
64  IOobject
65  (
66  "htcConv",
67  film.time().timeName(),
68  film.primaryMesh().thisDb(),
69  IOobject::MUST_READ,
70  IOobject::AUTO_WRITE
71  ),
72  film.primaryMesh()
73  ),
74  htcConvFilm_
75  (
76  IOobject
77  (
78  htcConvPrimary_.name(), // must have same name as above for mapping
79  film.time().timeName(),
80  film.regionMesh().thisDb(),
81  IOobject::NO_READ,
82  IOobject::NO_WRITE
83  ),
84  film.regionMesh(),
86  film.mappedPushedFieldPatchTypes<scalar>()
87  )
88 {
89  // Update the primary-side convective heat transfer coefficient
90  htcConvPrimary_.correctBoundaryConditions();
91 
92  // Pull the data from the primary region via direct mapped BCs
93  htcConvFilm_.correctBoundaryConditions();
94 }
95 
96 
97 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
98 
100 {}
101 
102 
103 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
104 
106 {
107  // Update the primary-side convective heat transfer coefficient
108  htcConvPrimary_.correctBoundaryConditions();
109 
110  // Pull the data from the primary region via direct mapped BCs
111  htcConvFilm_.correctBoundaryConditions();
112 }
113 
114 
116 {
117  return htcConvFilm_;
118 }
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace surfaceFilmModels
124 } // End namespace regionModels
125 } // End namespace Foam
126 
127 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< volScalarField > h() const
Return the heat transfer coefficient [W/m2/K].
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
word timeName
Definition: getTimeIndex.H:3
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
void correctBoundaryConditions()
Correct boundary field.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
defineTypeNameAndDebug(kinematicSingleLayer, 0)
Convective heat transfer model based on a re-working of a Nusselt number correlation.
Namespace for OpenFOAM.
Base class for film heat transfer models.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127