initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / thermophysicalModels / radiation / radiationModel / radiationModel / radiationModel.H
blob08afe1bbad668115294de3cbaf810fa1c25cf52b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Namespace
26     Foam::radiation
28 Description
29     Namespace for radiation modelling
32 Class
33     Foam::radiation::radiationModel
35 Description
36     Top level model for radiation modelling
38 SourceFiles
39     radiationModel.C
41 \*---------------------------------------------------------------------------*/
43 #ifndef radiationModel_H
44 #define radiationModel_H
46 #include "IOdictionary.H"
47 #include "autoPtr.H"
48 #include "runTimeSelectionTables.H"
49 #include "volFields.H"
50 #include "basicThermo.H"
51 #include "fvMatrices.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 namespace Foam
57 namespace radiation
60 class absorptionEmissionModel;
61 class scatterModel;
63 /*---------------------------------------------------------------------------*\
64                            Class radiationModel Declaration
65 \*---------------------------------------------------------------------------*/
67 class radiationModel
69     public IOdictionary
72 protected:
74     // Protected data
76         //- Reference to the temperature field
77         const volScalarField& T_;
79         //- Reference to the mesh
80         const fvMesh& mesh_;
82         //- Model specific dictionary input parameters
83         Switch radiation_;
85         //- Radiation model dictionary
86         dictionary radiationModelCoeffs_;
89         // References to the radiation sub-models
91             //- Absorption/emission model
92             autoPtr<absorptionEmissionModel> absorptionEmission_;
94             //- Scatter model
95             autoPtr<scatterModel> scatter_;
98 private:
100     // Private Member Functions
102         //- Disallow default bitwise copy construct
103         radiationModel(const radiationModel&);
105         //- Disallow default bitwise assignment
106         void operator=(const radiationModel&);
109 public:
111     //- Runtime type information
112     TypeName("radiationModel");
115     // Declare runtime constructor selection table
117          declareRunTimeSelectionTable
118          (
119              autoPtr,
120              radiationModel,
121              dictionary,
122              (
123                  const volScalarField& T
124              ),
125              (T)
126          );
129     // Constructors
131         //- Construct from components
132         radiationModel
133         (
134             const word& type,
135             const volScalarField& T
136         );
139     // Selectors
141          //- Return a reference to the selected radiation model
142          static autoPtr<radiationModel> New
143          (
144              const volScalarField& T
145          );
148     // Destructor
150         virtual ~radiationModel();
153     // Member Functions
155         // Edit
157             //- Solve radiation equation(s)
158             virtual void correct() = 0;
160             //- Read radiationProperties dictionary
161             virtual bool read() = 0;
164         // Access
166             //- Source term component (for power of T^4)
167             virtual tmp<volScalarField> Rp() const = 0;
169             //- Source term component (constant)
170             virtual tmp<DimensionedField<scalar, volMesh> > Ru() const = 0;
172             //- Enthalpy source term
173             virtual tmp<fvScalarMatrix> Sh
174             (
175                 basicThermo& thermo
176             ) const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace radiation
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 #endif
189 // ************************************************************************* //