BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / radiationModels / derivedFvPatchFields / radiationCoupledBase / radiationCoupledBase.H
bloba60c23d4c5779a7d21b3ec7520c4be9700b33595
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 Class
25     radiationCoupledBase
27 Description
28     Common functions to emissivity. It gets supplied from lookup into a
29     dictionary or calculated by the solidThermo:
31     - 'lookup' : lookup volScalarField with name
32     - 'solidThermo' : use basicSolidThermo emissivity()
34 SourceFiles
35     radiationCoupledBase.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef radiationCoupledBase_H
40 #define radiationCoupledBase_H
42 #include "scalarField.H"
43 #include "NamedEnum.H"
44 #include "fvPatch.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 /*---------------------------------------------------------------------------*\
52                     Class radiationCoupledBase Declaration
53 \*---------------------------------------------------------------------------*/
55 class radiationCoupledBase
57 public:
58         //- Type of supplied emissivity
59         enum emissivityMethodType
60         {
61             SOLIDTHERMO,
62             LOOKUP
63         };
65 private:
67     // Private data
69         static const NamedEnum<emissivityMethodType, 2>
70             emissivityMethodTypeNames_;
72         //- Underlying patch
73         const fvPatch& patch_;
75 protected:
77     // Protected data
79         //- How to get emissivity
80         const emissivityMethodType method_;
82          //- Emissivity
83          // Cached locally when is read from dictionary (lookup mode)
84         scalarField emissivity_;
87 public:
89     // Constructors
91         //- Construct from patch, emissivity mode and emissivity
92         radiationCoupledBase
93         (
94             const fvPatch& patch,
95             const word& calculationMethod,
96             const scalarField& emissivity
97         );
99         //- Construct from patch and dictionary
100         radiationCoupledBase
101         (
102             const fvPatch& patch,
103             const dictionary& dict
104         );
107     // Member functions
109         //- Method to obtain emissivity
110         word emissivityMethod() const
111         {
112             return emissivityMethodTypeNames_[method_];
113         }
116         //- Calculate corresponding emissivity field
117         scalarField emissivity() const;
119         //- Write
120         void write(Ostream&) const;
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 } // End namespace Foam
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 #endif
132 // ************************************************************************* //