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

basicMultiComponentMixture.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::basicMultiComponentMixture
00026 
00027 Description
00028     combustion mixture
00029 
00030 SourceFiles
00031     basicMultiComponentMixture.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef basicMultiComponentMixture_H
00036 #define basicMultiComponentMixture_H
00037 
00038 #include <finiteVolume/volFields.H>
00039 #include <OpenFOAM/PtrList.H>
00040 #include <specie/speciesTable.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                  Class basicMultiComponentMixture Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class basicMultiComponentMixture
00052 {
00053 
00054 protected:
00055 
00056     // Protected data
00057 
00058         //- Table of specie names
00059         speciesTable species_;
00060 
00061         //- Species mass fractions
00062         PtrList<volScalarField> Y_;
00063 
00064 
00065 public:
00066 
00067     // Constructors
00068 
00069         //- Construct from dictionary and mesh
00070         basicMultiComponentMixture
00071         (
00072             const dictionary&,
00073             const wordList& specieNames,
00074             const fvMesh&
00075         );
00076 
00077 
00078     //- Destructor
00079     virtual ~basicMultiComponentMixture()
00080     {}
00081 
00082 
00083     // Member functions
00084 
00085         //- Return the table of species
00086         const speciesTable& species() const
00087         {
00088             return species_;
00089         }
00090 
00091         //- Return the mass-fraction fields
00092         inline PtrList<volScalarField>& Y();
00093 
00094         //- Return the const mass-fraction fields
00095         inline const PtrList<volScalarField>& Y() const;
00096 
00097         //- Return the mass-fraction field for a specie given by index
00098         inline volScalarField& Y(const label i);
00099 
00100         //- Return the const mass-fraction field for a specie given by index
00101         inline const volScalarField& Y(const label i) const;
00102 
00103         //- Return the mass-fraction field for a specie given by name
00104         inline volScalarField& Y(const word& specieName);
00105 
00106         //- Return the const mass-fraction field for a specie given by name
00107         inline const volScalarField& Y(const word& specieName) const;
00108 
00109         //- Does the mixture include this specie?
00110         inline bool contains(const word& specieName) const;
00111 
00112         inline scalar fres(const scalar ft, const scalar stoicRatio) const;
00113 
00114         inline tmp<volScalarField> fres
00115         (
00116             const volScalarField& ft,
00117             const dimensionedScalar& stoicRatio
00118         ) const;
00119 };
00120 
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 } // End namespace Foam
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 #include "basicMultiComponentMixtureI.H"
00129 
00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00131 
00132 #endif
00133 
00134 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines