1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::multiComponentMixture
28 Foam::multiComponentMixture
31 multiComponentMixture.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef multiComponentMixture_H
36 #define multiComponentMixture_H
38 #include "basicMultiComponentMixture.H"
39 #include "HashPtrTable.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class multiComponentMixture Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class ThermoType>
51 class multiComponentMixture
53 public basicMultiComponentMixture
58 PtrList<ThermoType> speciesData_;
60 //- Temporary storage for the cell/face mixture thermo data
61 mutable ThermoType mixture_;
64 // Private member functions
66 //- Construct the species data from the given dictionary and return the
67 // data for the first specie to initialise the mixture thermo data
68 const ThermoType& constructSpeciesData(const dictionary& thermoDict);
70 //- Correct the mass fractions to sum to 1
71 void correctMassFractions();
73 //- Construct as copy (not implemented)
74 multiComponentMixture(const multiComponentMixture<ThermoType>&);
79 //- The type of thermodynamics this mixture is instantiated for
80 typedef ThermoType thermoType;
85 //- Construct from dictionary, specie names, thermo database and mesh
89 const wordList& specieNames,
90 const HashPtrTable<ThermoType>& specieThermoData,
95 //- Construct from dictionary and mesh
100 const objectRegistry&
105 virtual ~multiComponentMixture()
111 const ThermoType& cellMixture(const label celli) const;
113 const ThermoType& patchFaceMixture
119 //- Return the raw specie thermodynamic data
120 const PtrList<ThermoType>& speciesData() const
126 void read(const dictionary&);
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 # include "multiComponentMixture.C"
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 // ************************************************************************* //