1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
26 Foam::basicMultiComponentMixture
32 basicMultiComponentMixture.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef basicMultiComponentMixture_H
37 #define basicMultiComponentMixture_H
39 #include "volFields.H"
41 #include "speciesTable.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class basicMultiComponentMixture Declaration
50 \*---------------------------------------------------------------------------*/
52 class basicMultiComponentMixture
59 //- Table of specie names
60 speciesTable species_;
62 //- Species mass fractions
63 PtrList<volScalarField> Y_;
70 //- Construct from dictionary and mesh
71 basicMultiComponentMixture
74 const wordList& specieNames,
80 virtual ~basicMultiComponentMixture()
86 //- Return the table of species
87 const speciesTable& species() const
92 //- Return the mass-fraction fields
93 inline PtrList<volScalarField>& Y();
95 //- Return the const mass-fraction fields
96 inline const PtrList<volScalarField>& Y() const;
98 //- Return the mass-fraction field for a specie given by index
99 inline volScalarField& Y(const label i);
101 //- Return the const mass-fraction field for a specie given by index
102 inline const volScalarField& Y(const label i) const;
104 //- Return the mass-fraction field for a specie given by name
105 inline volScalarField& Y(const word& specieName);
107 //- Return the const mass-fraction field for a specie given by name
108 inline const volScalarField& Y(const word& specieName) const;
110 //- Does the mixture include this specie?
111 inline bool contains(const word& specieName) const;
113 inline scalar fres(const scalar ft, const scalar stoicRatio) const;
115 inline tmp<volScalarField> fres
117 const volScalarField& ft,
118 const dimensionedScalar& stoicRatio
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 } // End namespace Foam
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 #include "basicMultiComponentMixtureI.H"
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 // ************************************************************************* //