initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / radiationModel / radiationModel / radiationModel.H
blob4d01dee1cf158d11c2ce49b21cf3d16aa3934d6c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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
31 Class
32     Foam::radiation::radiationModel
34 Description
35     Top level model for radiation modelling
37 SourceFiles
38     radiationModel.C
40 \*---------------------------------------------------------------------------*/
42 #ifndef radiationModel_H
43 #define radiationModel_H
45 #include "IOdictionary.H"
46 #include "autoPtr.H"
47 #include "runTimeSelectionTables.H"
48 #include "volFields.H"
49 #include "basicThermo.H"
50 #include "fvMatrices.H"
51 #include "blackBodyEmission.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 namespace Foam
57 namespace radiation
60 // Forward declaration of classes
61 class absorptionEmissionModel;
62 class scatterModel;
64 /*---------------------------------------------------------------------------*\
65                        Class radiationModel Declaration
66 \*---------------------------------------------------------------------------*/
68 class radiationModel
70     public IOdictionary
72 protected:
74     // Protected data
76         //- Reference to the mesh database
77         const fvMesh& mesh_;
79         //- Reference to the time database
80         const Time& time_;
82         //- Reference to the temperature field
83         const volScalarField& T_;
85         //- Model specific dictionary input parameters
86         Switch radiation_;
88         //- Radiation model dictionary
89         dictionary coeffs_;
91         //- Radiation solver frequency - number flow solver iterations per
92         //  radiation solver iteration
93         label solverFreq_;
96         // References to the radiation sub-models
98             //- Absorption/emission model
99             autoPtr<absorptionEmissionModel> absorptionEmission_;
101             //- Scatter model
102             autoPtr<scatterModel> scatter_;
105 private:
107     // Private Member Functions
109         //- Disallow default bitwise copy construct
110         radiationModel(const radiationModel&);
112         //- Disallow default bitwise assignment
113         void operator=(const radiationModel&);
116 public:
118     //- Runtime type information
119     TypeName("radiationModel");
122     // Declare runtime constructor selection table
124          declareRunTimeSelectionTable
125          (
126              autoPtr,
127              radiationModel,
128              dictionary,
129              (
130                  const volScalarField& T
131              ),
132              (T)
133          );
136     // Constructors
138         //- Null constructor
139         radiationModel(const volScalarField& T);
141         //- Construct from components
142         radiationModel(const word& type, const volScalarField& T);
145     // Selectors
147          //- Return a reference to the selected radiation model
148          static autoPtr<radiationModel> New(const volScalarField& T);
151     //- Destructor
152     virtual ~radiationModel();
155     // Member Functions
157         // Edit
159             //- Main update/correction routine
160             virtual void correct();
162             //- Solve radiation equation(s)
163             virtual void calculate() = 0;
165             //- Read radiationProperties dictionary
166             virtual bool read() = 0;
169         // Access
171             //- Source term component (for power of T^4)
172             virtual tmp<volScalarField> Rp() const = 0;
174             //- Source term component (constant)
175             virtual tmp<DimensionedField<scalar, volMesh> > Ru() const = 0;
177             //- Enthalpy source term
178             virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const;
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 } // End namespace radiation
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 #endif
191 // ************************************************************************* //