FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

solid.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::solid
00026 
00027 Description
00028     The thermophysical properties of a solid
00029 
00030 SourceFiles
00031     solid.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef solid_H
00036 #define solid_H
00037 
00038 #include <OpenFOAM/typeInfo.H>
00039 #include <OpenFOAM/autoPtr.H>
00040 #include <OpenFOAM/runTimeSelectionTables.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 class solid;
00048 
00049 Ostream& operator<<
00050 (
00051      Ostream&,
00052      const solid&
00053 );
00054 
00055 
00056 /*---------------------------------------------------------------------------*\
00057                             Class solid Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class solid
00061 {
00062 
00063     // Private data
00064 
00065         //- Density [kg/m3]
00066         scalar rho_;
00067 
00068         //- Specific heat capacity [J/(kg.K)]
00069         scalar cp_;
00070 
00071         //- Thermal conductivity [W/(m.K)]
00072         scalar K_;
00073 
00074         //- Heat of formation [J/kg]
00075         scalar Hf_;
00076 
00077         //- Emissivity
00078         scalar emissivity_;
00079 
00080 
00081 public:
00082 
00083     //- Runtime type information
00084     TypeName("solid");
00085 
00086 
00087     // Declare run-time constructor selection tables
00088 
00089     declareRunTimeSelectionTable
00090     (
00091         autoPtr,
00092         solid,
00093         ,
00094         (),
00095         ()
00096     );
00097 
00098     declareRunTimeSelectionTable
00099     (
00100         autoPtr,
00101         solid,
00102         Istream,
00103         (Istream& is),
00104         (is)
00105     );
00106 
00107 
00108     // Constructors
00109 
00110         //- Construct from components
00111         solid
00112         (
00113             scalar rho,
00114             scalar cp,
00115             scalar K,
00116             scalar Hf,
00117             scalar emissivity
00118         );
00119 
00120         //- Construct from Istream
00121         solid(Istream& is);
00122 
00123         //- Return a pointer to a new solid created from input
00124         static autoPtr<solid> New(Istream& is);
00125 
00126 
00127     // Destructor
00128 
00129         virtual ~solid()
00130         {}
00131 
00132 
00133     // Member Functions
00134 
00135         // Phisical constants which define the solid
00136 
00137             //- Density [kg/m3]
00138             inline scalar rho() const;
00139 
00140             //- Specific heat capacity [J/(kg.K)]
00141             inline scalar cp() const;
00142 
00143             //- Thermal conductivity [W/(m.K)]
00144             inline scalar K() const;
00145 
00146             //- Heat of formation [J/kg]
00147             inline scalar Hf() const;
00148 
00149             //- Emissivity []
00150             inline scalar emissivity() const;
00151 
00152 
00153         // I-O
00154 
00155             //- Write the solid properties
00156             virtual void writeData(Ostream& os) const;
00157 
00158 
00159         // Ostream Operator
00160 
00161         friend Ostream& operator<<(Ostream& os, const solid& s);
00162 };
00163 
00164 
00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00166 
00167 #include "solidI.H"
00168 
00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00170 
00171 } // End namespace Foam
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 #endif
00176 
00177 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines