radiation.H
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) 2017 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fv::radiation
29 
30 Description
31  Applies radiation sources (i.e. \c Sh)
32  to the energy equation for compressible flows.
33 
34 Usage
35  Minimal example by using \c constant/fvOptions:
36  \verbatim
37  radiation1
38  {
39  // Mandatory entries (unmodifiable)
40  type radiation;
41  fields (h);
42 
43  // Mandatory/Optional (inherited) entries
44  ...
45  }
46  \endverbatim
47 
48  where the entries mean:
49  \table
50  Property | Description | Type | Reqd | Dflt
51  type | Type name: radiation | word | yes | -
52  fields | Name of operand energy field | word | yes | -
53  \endtable
54 
55  The inherited entries are elaborated in:
56  - \link fvOption.H \endlink
57 
58 SourceFiles
59  radiation.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef radiation_H
64 #define radiation_H
65 
66 #include "fvOption.H"
68 #include "radiationModel.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 namespace fv
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class radiation Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class radiation
82 :
83  public fv::option
84 {
85  // Private Data
86 
87  //- The radiation model pointer
88  autoPtr<Foam::radiation::radiationModel> radiation_;
89 
90 
91  // Private Member Functions
92 
93  //- No copy construct
94  radiation(const radiation&) = delete;
95 
96  //- No copy assignment
97  void operator=(const radiation&) = delete;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("radiation");
104 
105 
106  // Constructors
107 
108  //- Construct from explicit source name and mesh
109  radiation
110  (
111  const word& sourceName,
112  const word& modelType,
113  const dictionary& dict,
114  const fvMesh& mesh
115  );
116 
117 
118  // Member Functions
119 
120  // Evaluate
121 
122  //- Add explicit contribution to compressible momentum equation
123  virtual void addSup
124  (
125  const volScalarField& rho,
126  fvMatrix<scalar>& eqn,
127  const label fieldi
128  );
129 
130 
131  // IO
132 
133  //- Read source dictionary
134  virtual bool read(const dictionary& dict);
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace fv
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::radiation::addSup
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible momentum equation.
Definition: radiation.C:77
Foam::fv::radiation::TypeName
TypeName("radiation")
Runtime type information.
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::option
Base abstract class for handling finite volume options (i.e. fvOption).
Definition: fvOption.H:126
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
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:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fv::radiation
Applies radiation sources (i.e. Sh) to the energy equation for compressible flows.
Definition: radiation.H:98
fv
labelList fv(nPoints)
uniformDimensionedFields.H
Foam::autoPtr< Foam::radiation::radiationModel >
Foam::fv::radiation::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: radiation.C:70
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
fvOption.H
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::GeometricField< scalar, fvPatchField, volMesh >
radiationModel.H