radiationCoupledBase.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::radiationCoupledBase
26 
27 Description
28  Common functions to emissivity. It gets supplied from lookup into a
29  dictionary or calculated by the solidThermo:
30 
31  - 'lookup' : Read the patch emissivity field from the dictionary
32  - 'solidRadiation' : Use the emissivity field mapped from the adjacent solid
33 
34 SourceFiles
35  radiationCoupledBase.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef radiationCoupledBase_H
40 #define radiationCoupledBase_H
41 
42 #include "scalarField.H"
43 #include "NamedEnum.H"
44 #include "fvPatch.H"
45 #include "fieldMapper.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class radiationCoupledBase Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58 public:
59 
60  // Public Types
61 
62  //- Emissivity methods
64  {
67  };
68 
69  //- Names of emissivity methods
72 
73 
74 private:
75 
76  // Private Data
77 
78  //- Underlying patch
79  const fvPatch& patch_;
80 
81 
82 protected:
83 
84  // Protected data
85 
86  //- How to get emissivity
88 
89  //- Emissivity. Cached locally when looked up.
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("radiationCoupledBase");
97 
98 
99  // Constructors
100 
101  //- Construct from patch, emissivity mode and emissivity
103  (
104  const fvPatch& patch,
105  const word& calculationMethod,
106  const scalarField& emissivity
107  );
108 
109  //- Construct from patch, emissivity mode and emissivity and mapper
111  (
112  const fvPatch& patch,
113  const word& calculationMethod,
114  const scalarField& emissivity,
115  const fieldMapper& mapper
116  );
117 
118  //- Construct from patch and dictionary
120  (
121  const fvPatch& patch,
122  const dictionary& dict
123  );
124 
125 
126  //- Destructor
127  virtual ~radiationCoupledBase();
128 
129 
130  // Member Functions
131 
132  // Access
133 
134  //- Method to obtain emissivity
135  word emissivityMethod() const
136  {
138  }
139 
140  //- Calculate corresponding emissivity field
142 
143 
144  // Mapping functions
145 
146  //- Map the given fvPatchField onto this fvPatchField
147  virtual void map(const fvPatchScalarField&, const fieldMapper&);
148 
149  //- Reset the fvPatchField to the given fvPatchField
150  // Used for mesh to mesh mapping
151  virtual void reset(const fvPatchScalarField&);
152 
153 
154  //- Write
155  void write(Ostream&) const;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Abstract base class for field mapping.
Definition: fieldMapper.H:48
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:88
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
Common functions to emissivity. It gets supplied from lookup into a dictionary or calculated by the s...
radiationCoupledBase(const fvPatch &patch, const word &calculationMethod, const scalarField &emissivity)
Construct from patch, emissivity mode and emissivity.
void write(Ostream &) const
Write.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
tmp< scalarField > emissivity() const
Calculate corresponding emissivity field.
virtual void map(const fvPatchScalarField &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
virtual ~radiationCoupledBase()
Destructor.
scalarField emissivity_
Emissivity. Cached locally when looked up.
TypeName("radiationCoupledBase")
Runtime type information.
static const NamedEnum< emissivityMethodType, 2 > emissivityMethodTypeNames_
Names of emissivity methods.
emissivityMethodType
Emissivity methods.
word emissivityMethod() const
Method to obtain emissivity.
const emissivityMethodType method_
How to get emissivity.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict