1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::radiation::viewFactor
28 View factor radiation model. The system solved is: C q = b
30 Cij = deltaij/Ej - (1/Ej - 1)Fij
37 Fij = view factor matrix
43 \*---------------------------------------------------------------------------*/
45 #ifndef radiationModelviewFactor_H
46 #define radiationModelviewFactor_H
48 #include "radiationModel.H"
49 #include "singleCellFvMesh.H"
50 #include "scalarMatrices.H"
51 #include "globalIndex.H"
52 #include "scalarIOList.H"
53 #include "mapDistribute.H"
54 #include "volFields.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 /*---------------------------------------------------------------------------*\
64 Class viewFactor Declaration
65 \*---------------------------------------------------------------------------*/
73 //- Agglomeration List
74 labelListIOList finalAgglom_;
77 autoPtr<mapDistribute> map_;
80 singleCellFvMesh coarseMesh_;
82 //- Net radiative heat flux [W/m2]
85 //- View factor matrix
86 autoPtr<scalarSquareMatrix> Fmatrix_;
88 //- Inverse of C matrix
89 autoPtr<scalarSquareMatrix> CLU_;
92 labelList selectedPatches_;
94 //- Total global coarse faces
95 label totalNCoarseFaces_;
97 //- Total local coarse faces
98 label nLocalCoarseFaces_;
100 //- Constant emissivity
101 bool constEmissivity_;
103 //- Iterations Counter
106 //- Pivot Indices for LU decomposition
107 labelList pivotIndices_;
110 // Private Member Functions
115 //- Insert view factors into main matrix
116 void insertMatrixElements
118 const globalIndex& index,
119 const label fromProcI,
120 const labelListList& globalFaceFaces,
121 const scalarListList& viewFactors,
122 scalarSquareMatrix& matrix
125 //- Disallow default bitwise copy construct
126 viewFactor(const viewFactor&);
128 //- Disallow default bitwise assignment
129 void operator=(const viewFactor&);
134 //- Runtime type information
135 TypeName("viewFactor");
140 //- Construct from components
141 viewFactor(const volScalarField& T);
143 //- Construct from components
144 viewFactor(const dictionary& dict, const volScalarField& T);
148 virtual ~viewFactor();
155 //- Solve system of equation(s)
158 //- Read radiation properties dictionary
161 //- Source term component (for power of T^4)
162 virtual tmp<volScalarField> Rp() const;
164 //- Source term component (constant)
165 virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
170 //- Const access to total radiative heat flux field
171 inline const volScalarField& Qr() const;
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 #include "viewFactorI.H"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace radiation
182 } // End namespace Foam
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 // ************************************************************************* //