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::solidMixture 00026 00027 Description 00028 Foam::solidMixture 00029 00030 \*---------------------------------------------------------------------------*/ 00031 00032 #ifndef solidMixture_H 00033 #define solidMixture_H 00034 00035 #include <OpenFOAM/scalarField.H> 00036 #include <OpenFOAM/PtrList.H> 00037 #include <solids/solid.H> 00038 #include <OpenFOAM/autoPtr.H> 00039 00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00041 00042 namespace Foam 00043 { 00044 00045 /*---------------------------------------------------------------------------*\ 00046 Class solidMixture Declaration 00047 \*---------------------------------------------------------------------------*/ 00048 00049 class solidMixture 00050 { 00051 00052 // Private data 00053 00054 //- The names of the solids 00055 List<word> components_; 00056 00057 //- The solid properties 00058 PtrList<solid> properties_; 00059 00060 00061 public: 00062 00063 // Constructors 00064 00065 //- Construct from dictionary 00066 solidMixture 00067 ( 00068 const dictionary& 00069 ); 00070 00071 00072 // Selectors 00073 00074 //- Select construct from dictionary 00075 static autoPtr<solidMixture> New 00076 ( 00077 const dictionary& 00078 ); 00079 00080 00081 // Member Functions 00082 00083 //- Return the sold names 00084 inline const List<word>& components() const 00085 { 00086 return components_; 00087 } 00088 00089 //- Return the solid properties 00090 inline const PtrList<solid>& properties() const 00091 { 00092 return properties_; 00093 } 00094 00095 //- Returns the mass fractions, given mole fractions 00096 scalarField Y(const scalarField& X) const; 00097 00098 //- Returns the mole fractions, given mass fractions 00099 scalarField X(const scalarField& Y) const; 00100 00101 //- Calculate the mixture density [kg/m^3] as a function of 00102 // volume fractions 00103 scalar rho 00104 ( 00105 const scalarField& X 00106 ) const; 00107 00108 //- Calculate the mixture heat capacity [J/(kg K)] as a function 00109 // of mass fractions 00110 scalar cp 00111 ( 00112 const scalarField& Y 00113 ) const; 00114 }; 00115 00116 00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00118 00119 } // End namespace Foam 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 #endif 00124 00125 // ************************ vim: set sw=4 sts=4 et: ************************ //