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,
49  mappedConvectiveHeatTransfer,
50  dictionary
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(),
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(),
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 // ************************************************************************* //
Foam::IOobject::NO_WRITE
Definition: IOobject.H:195
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::IOobject::AUTO_WRITE
Definition: IOobject.H:194
Foam::regionModels::surfaceFilmModels::heatTransferModel
Base class for film heat transfer models.
Definition: heatTransferModel.H:56
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::Time::timeName
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
Foam::regionModels::regionModel::time
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:40
Foam::regionModels::surfaceFilmModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Foam::regionModels::regionModel::primaryMesh
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
Definition: regionModelI.H:34
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
Foam::regionModels::surfaceFilmModels::surfaceFilmRegionModel
Base class for surface film models.
Definition: surfaceFilmRegionModel.H:55
Foam::pow3
dimensionedScalar pow3(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:89
mappedConvectiveHeatTransfer.H
Foam::regionModels::regionModel::regionMesh
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:64
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
kinematicSingleLayer.H
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes
wordList mappedPushedFieldPatchTypes() const
Return boundary types for pushed mapped field patches.
Foam::regionModels::surfaceFilmModels::mappedConvectiveHeatTransfer::~mappedConvectiveHeatTransfer
virtual ~mappedConvectiveHeatTransfer()
Destructor.
Definition: mappedConvectiveHeatTransfer.C:99
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::regionModels::surfaceFilmModels::mappedConvectiveHeatTransfer::h
virtual tmp< volScalarField > h() const
Return the heat transfer coefficient [W/m2/K].
Definition: mappedConvectiveHeatTransfer.C:115
Foam::GeometricField::correctBoundaryConditions
void correctBoundaryConditions()
Correct boundary field.
Definition: GeometricField.C:940
Foam::regionModels::surfaceFilmModels::defineTypeNameAndDebug
defineTypeNameAndDebug(kinematicSingleLayer, 0)
Foam::regionModels::surfaceFilmModels::mappedConvectiveHeatTransfer::correct
virtual void correct()
Correct.
Definition: mappedConvectiveHeatTransfer.C:105
Foam::dimTemperature
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:54
Foam::IOobject::NO_READ
Definition: IOobject.H:188
zeroGradientFvPatchFields.H
Foam::IOobject::MUST_READ
Definition: IOobject.H:185