|
|
|
solid.HGo 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-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::solid 00027 00028 Description 00029 The thermophysical properties of a solid 00030 00031 SourceFiles 00032 solid.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef solid_H 00037 #define solid_H 00038 00039 #include "typeInfo.H" 00040 #include "autoPtr.H" 00041 #include "runTimeSelectionTables.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 class solid; 00049 00050 Ostream& operator<< 00051 ( 00052 Ostream&, 00053 const solid& 00054 ); 00055 00056 00057 /*---------------------------------------------------------------------------*\ 00058 Class solid Declaration 00059 \*---------------------------------------------------------------------------*/ 00060 00061 class solid 00062 { 00063 00064 // Private data 00065 00066 //- Density [kg/m3] 00067 scalar rho_; 00068 00069 //- Specific heat capacity [J/(kg.K)] 00070 scalar cp_; 00071 00072 //- Thermal conductivity [W/(m.K)] 00073 scalar K_; 00074 00075 //- Heat of formation [J/kg] 00076 scalar Hf_; 00077 00078 //- Emissivity 00079 scalar emissivity_; 00080 00081 00082 public: 00083 00084 //- Runtime type information 00085 TypeName("solid"); 00086 00087 00088 // Declare run-time constructor selection tables 00089 00090 declareRunTimeSelectionTable 00091 ( 00092 autoPtr, 00093 solid, 00094 , 00095 (), 00096 () 00097 ); 00098 00099 declareRunTimeSelectionTable 00100 ( 00101 autoPtr, 00102 solid, 00103 Istream, 00104 (Istream& is), 00105 (is) 00106 ); 00107 00108 00109 // Constructors 00110 00111 //- Construct from components 00112 solid 00113 ( 00114 scalar rho, 00115 scalar cp, 00116 scalar K, 00117 scalar Hf, 00118 scalar emissivity 00119 ); 00120 00121 //- Construct from Istream 00122 solid(Istream& is); 00123 00124 //- Return a pointer to a new solid created from input 00125 static autoPtr<solid> New(Istream& is); 00126 00127 00128 // Destructor 00129 00130 virtual ~solid() 00131 {} 00132 00133 00134 // Member Functions 00135 00136 // Phisical constants which define the solid 00137 00138 //- Density [kg/m3] 00139 inline scalar rho() const; 00140 00141 //- Specific heat capacity [J/(kg.K)] 00142 inline scalar cp() const; 00143 00144 //- Thermal conductivity [W/(m.K)] 00145 inline scalar K() const; 00146 00147 //- Heat of formation [J/kg] 00148 inline scalar Hf() const; 00149 00150 //- Emissivity [] 00151 inline scalar emissivity() const; 00152 00153 00154 // I-O 00155 00156 //- Write the solid properties 00157 virtual void writeData(Ostream& os) const; 00158 00159 00160 // Ostream Operator 00161 00162 friend Ostream& operator<<(Ostream& os, const solid& s); 00163 }; 00164 00165 00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00167 00168 #include "solidI.H" 00169 00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00171 00172 } // End namespace Foam 00173 00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00175 00176 #endif 00177 00178 // ************************************************************************* // |