initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / solidMixture / solidMixture / solidMixture.H
blob4524857911bd49abab7519d8cf12268196bcf5cd
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::solidMixture
28 Description
29     Foam::solidMixture
31 \*---------------------------------------------------------------------------*/
33 #ifndef solidMixture_H
34 #define solidMixture_H
36 #include "scalarField.H"
37 #include "PtrList.H"
38 #include "solid.H"
39 #include "autoPtr.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                          Class solidMixture Declaration
48 \*---------------------------------------------------------------------------*/
50 class solidMixture
53     // Private data
55         //- The names of the solids
56         List<word> components_;
58         //- The solid properties
59         PtrList<solid> properties_;
62 public:
64     // Constructors
66         //- Construct from dictionary
67         solidMixture
68         (
69             const dictionary&
70         );
73     // Selectors
75         //- Select construct from dictionary
76         static autoPtr<solidMixture> New
77         (
78             const dictionary&
79         );
82     // Member Functions
84         //- Return the sold names
85         inline const List<word>& components() const
86         {
87             return components_;
88         }
90         //- Return the solid properties
91         inline const PtrList<solid>& properties() const
92         {
93             return properties_;
94         }
96         //- Returns the mass fractions, given mole fractions
97         scalarField Y(const scalarField& X) const;
99         //- Returns the mole fractions, given mass fractions
100         scalarField X(const scalarField& Y) const;
102         //- Calculate the mixture density [kg/m^3] as a function of
103         //  volume fractions
104         scalar rho
105         (
106             const scalarField& X
107         ) const;
109         //- Calculate the mixture heat capacity [J/(kg K)] as a function
110         //  of mass fractions
111         scalar cp
112         (
113             const scalarField& Y
114         ) const;
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 } // End namespace Foam
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 #endif
126 // ************************************************************************* //