constantHeatTransfer.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-2015 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 "constantHeatTransfer.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace fv
36 {
37  defineTypeNameAndDebug(constantHeatTransfer, 0);
39  (
40  option,
41  constantHeatTransfer,
42  dictionary
43  );
44 }
45 }
46 
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
51 (
52  const word& name,
53  const word& modelType,
54  const dictionary& dict,
55  const fvMesh& mesh
56 )
57 :
59  htcConst_(),
60  AoV_()
61 {
62  if (active() && master_)
63  {
64  htcConst_.reset
65  (
66  new volScalarField
67  (
68  IOobject
69  (
70  "htcConst",
71  mesh_.time().timeName(),
72  mesh_,
73  IOobject::MUST_READ,
74  IOobject::AUTO_WRITE
75  ),
76  mesh_
77  )
78  );
79 
80  AoV_.reset
81  (
82  new volScalarField
83  (
84  IOobject
85  (
86  "AoV",
87  mesh_.time().timeName(),
88  mesh_,
89  IOobject::MUST_READ,
90  IOobject::AUTO_WRITE
91  ),
92  mesh_
93  )
94  );
95 
96  htc_ = htcConst_()*AoV_();
97  }
98 }
99 
100 
101 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
102 
104 {}
105 
106 
107 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
108 
110 {}
111 
112 
114 {
116  {
117  return true;
118  }
119 
120  return false;
121 }
122 
123 
124 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::interRegionHeatTransferModel
Base class for inter region heat exchange. The derived classes must provide the heat transfer coeffis...
Definition: interRegionHeatTransferModel.H:59
Foam::fv::constantHeatTransfer::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: constantHeatTransfer.C:113
Foam::fv::constantHeatTransfer::calculateHtc
virtual void calculateHtc()
Calculate the heat transfer coefficient.
Definition: constantHeatTransfer.C:109
Foam::fv::constantHeatTransfer::constantHeatTransfer
constantHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
Definition: constantHeatTransfer.C:51
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
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:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
Foam::fv::constantHeatTransfer::~constantHeatTransfer
virtual ~constantHeatTransfer()
Destructor.
Definition: constantHeatTransfer.C:103
Foam::fv::interRegionHeatTransferModel::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: interRegionHeatTransferModel.C:266
Foam::fv::defineTypeNameAndDebug
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
Foam::fv::addToRunTimeSelectionTable
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
Foam::GeometricField< scalar, fvPatchField, volMesh >
constantHeatTransfer.H