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::multiComponentMixture
29 Foam::multiComponentMixture
32 multiComponentMixture.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef multiComponentMixture_H
37 #define multiComponentMixture_H
39 #include "basicMultiComponentMixture.H"
40 #include "HashPtrTable.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class multiComponentMixture Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class ThermoType>
52 class multiComponentMixture
54 public basicMultiComponentMixture
59 PtrList<ThermoType> speciesData_;
61 //- Temporary storage for the cell/face mixture thermo data
62 mutable ThermoType mixture_;
65 // Private member functions
67 //- Construct the species data from the given dictionary and return the
68 // data for the first specie to initialise the mixture thermo data
69 const ThermoType& constructSpeciesData(const dictionary& thermoDict);
71 //- Correct the mass fractions to sum to 1
72 void correctMassFractions();
74 //- Construct as copy (not implemented)
75 multiComponentMixture(const multiComponentMixture<ThermoType>&);
80 //- The type of thermodynamics this mixture is instantiated for
81 typedef ThermoType thermoType;
86 //- Construct from dictionary, specie names, thermo database and mesh
90 const wordList& specieNames,
91 const HashPtrTable<ThermoType>& specieThermoData,
95 //- Construct from dictionary and mesh
96 multiComponentMixture(const dictionary&, const fvMesh&);
100 virtual ~multiComponentMixture()
106 const ThermoType& cellMixture(const label celli) const;
108 const ThermoType& patchFaceMixture
114 //- Return the raw specie thermodynamic data
115 const PtrList<ThermoType>& speciesData() const
121 void read(const dictionary&);
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 } // End namespace Foam
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 # include "multiComponentMixture.C"
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 // ************************************************************************* //