BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / regionModels / surfaceFilmModels / submodels / thermo / heatTransferModel / constantHeatTransfer / constantHeatTransfer.C
bloba8f90b90d4493bf39a5479a4e46e7aa5f3718446
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "constantHeatTransfer.H"
27 #include "volFields.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "zeroGradientFvPatchFields.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace Foam
35 namespace regionModels
37 namespace surfaceFilmModels
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
42 defineTypeNameAndDebug(constantHeatTransfer, 0);
44 addToRunTimeSelectionTable
46     heatTransferModel,
47     constantHeatTransfer,
48     dictionary
51 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
53 constantHeatTransfer::constantHeatTransfer
55     const surfaceFilmModel& owner,
56     const dictionary& dict
59     heatTransferModel(typeName, owner, dict),
60     c0_(readScalar(coeffs_.lookup("c0")))
64 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
66 constantHeatTransfer::~constantHeatTransfer()
70 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
72 void constantHeatTransfer::correct()
74     // do nothing
78 tmp<volScalarField> constantHeatTransfer::h() const
80     return tmp<volScalarField>
81     (
82         new volScalarField
83         (
84             IOobject
85             (
86                 "htc",
87                 owner_.time().timeName(),
88                 owner_.regionMesh(),
89                 IOobject::NO_READ,
90                 IOobject::NO_WRITE,
91                 false
92             ),
93             owner_.regionMesh(),
94             dimensionedScalar
95             (
96                 "c0",
97                 dimEnergy/dimTime/sqr(dimLength)/dimTemperature,
98                 c0_
99             ),
100             zeroGradientFvPatchScalarField::typeName
101         )
102     );
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 } // End namespace surfaceFilmModels
109 } // End namespace regionModels
110 } // End namespace Foam
112 // ************************************************************************* //