BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / regionModels / surfaceFilmModels / submodels / thermo / heatTransferModel / mappedConvectiveHeatTransfer / mappedConvectiveHeatTransfer.C
blob83ba62a06c42aa0b80aa55fd5d11c927acc1eef9
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 "mappedConvectiveHeatTransfer.H"
27 #include "zeroGradientFvPatchFields.H"
28 #include "addToRunTimeSelectionTable.H"
29 #include "kinematicSingleLayer.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace Foam
35 namespace regionModels
37 namespace surfaceFilmModels
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
42 defineTypeNameAndDebug(mappedConvectiveHeatTransfer, 0);
44 addToRunTimeSelectionTable
46     heatTransferModel,
47     mappedConvectiveHeatTransfer,
48     dictionary
51 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
53 mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer
55     const surfaceFilmModel& owner,
56     const dictionary& dict
59     heatTransferModel(owner),
60     htcConvPrimary_
61     (
62         IOobject
63         (
64             "htcConv",
65             owner.time().timeName(),
66             owner.primaryMesh(),
67             IOobject::MUST_READ,
68             IOobject::AUTO_WRITE
69         ),
70         owner.primaryMesh()
71     ),
72     htcConvFilm_
73     (
74         IOobject
75         (
76             htcConvPrimary_.name(), // must have same name as above for mapping
77             owner.time().timeName(),
78             owner.regionMesh(),
79             IOobject::NO_READ,
80             IOobject::NO_WRITE
81         ),
82         owner.regionMesh(),
83         dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0),
84         owner.mappedPushedFieldPatchTypes<scalar>()
85     )
87     // Update the primary-side convective heat transfer coefficient
88     htcConvPrimary_.correctBoundaryConditions();
90     // Pull the data from the primary region via direct mapped BCs
91     htcConvFilm_.correctBoundaryConditions();
95 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
97 mappedConvectiveHeatTransfer::~mappedConvectiveHeatTransfer()
101 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
103 void mappedConvectiveHeatTransfer::correct()
105     // Update the primary-side convective heat transfer coefficient
106     htcConvPrimary_.correctBoundaryConditions();
108     // Pull the data from the primary region via direct mapped BCs
109     htcConvFilm_.correctBoundaryConditions();
113 tmp<volScalarField> mappedConvectiveHeatTransfer::h() const
115     return htcConvFilm_;
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace surfaceFilmModels
122 } // End namespace regionModels
123 } // End namespace Foam
125 // ************************************************************************* //