initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / solids / solid / solid.H
blob3a7c8e27101a6e554b1a951e1ef69944b5de8357
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 Class
26     Foam::solid
28 Description
29     The thermophysical properties of a solid
31 SourceFiles
32     solid.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef solid_H
37 #define solid_H
39 #include "typeInfo.H"
40 #include "autoPtr.H"
41 #include "runTimeSelectionTables.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 class solid;
50 Ostream& operator<<
52      Ostream&,
53      const solid&
57 /*---------------------------------------------------------------------------*\
58                             Class solid Declaration
59 \*---------------------------------------------------------------------------*/
61 class solid
64     // Private data
66         //- Density [kg/m3]
67         scalar rho_;
69         //- Specific heat capacity [J/(kg.K)]
70         scalar cp_;
72         //- Thermal conductivity [W/(m.K)]
73         scalar K_;
75         //- Heat of formation [J/kg]
76         scalar Hf_;
78         //- Emissivity
79         scalar emissivity_;
82 public:
84     //- Runtime type information
85     TypeName("solid");
88     // Declare run-time constructor selection tables
90     declareRunTimeSelectionTable
91     (
92         autoPtr,
93         solid,
94         ,
95         (),
96         ()
97     );
99     declareRunTimeSelectionTable
100     (
101         autoPtr,
102         solid,
103         Istream,
104         (Istream& is),
105         (is)
106     );
109     // Constructors
111         //- Construct from components
112         solid
113         (
114             scalar rho,
115             scalar cp,
116             scalar K,
117             scalar Hf,
118             scalar emissivity
119         );
121         //- Construct from Istream
122         solid(Istream& is);
124         //- Return a pointer to a new solid created from input
125         static autoPtr<solid> New(Istream& is);
128     // Destructor
130         virtual ~solid()
131         {}
134     // Member Functions
136         // Phisical constants which define the solid
138             //- Density [kg/m3]
139             inline scalar rho() const;
141             //- Specific heat capacity [J/(kg.K)]
142             inline scalar cp() const;
144             //- Thermal conductivity [W/(m.K)]
145             inline scalar K() const;
147             //- Heat of formation [J/kg]
148             inline scalar Hf() const;
150             //- Emissivity []
151             inline scalar emissivity() const;
154         // I-O
156             //- Write the solid properties
157             virtual void writeData(Ostream& os) const;
160         // Ostream Operator
162         friend Ostream& operator<<(Ostream& os, const solid& s);
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 #include "solidI.H"
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 #endif
178 // ************************************************************************* //