1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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
34 \*---------------------------------------------------------------------------*/
36 #ifndef dieselMixture_H
37 #define dieselMixture_H
39 #include "combustionMixture.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class dieselMixture Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class ThermoType>
53 public combustionMixture
57 static const int nSpecies_ = 2;
58 static const char* specieNames_[2];
60 dimensionedScalar stoicRatio_;
66 mutable ThermoType mixture_;
71 //- Construct as copy (not implemented)
72 dieselMixture(const dieselMixture<ThermoType>&);
77 //- The type of thermodynamics this mixture is instantiated for
78 typedef ThermoType thermoType;
83 //- Construct from dictionary and mesh
84 dieselMixture(const dictionary&, const fvMesh&);
89 virtual ~dieselMixture()
95 const dimensionedScalar& stoicRatio() const
100 const ThermoType& mixture(const scalar, const scalar) const;
102 const ThermoType& cellMixture(const label celli) const
104 return mixture(ft_[celli], fu_[celli]);
107 const ThermoType& patchFaceMixture
115 ft_.boundaryField()[patchi][facei],
116 fu_.boundaryField()[patchi][facei]
120 const ThermoType& cellReactants(const label celli) const
122 return mixture(ft_[celli], ft_[celli]);
125 const ThermoType& patchFaceReactants
133 ft_.boundaryField()[patchi][facei],
134 ft_.boundaryField()[patchi][facei]
138 const ThermoType& cellProducts(const label celli) const
140 scalar ft = ft_[celli];
141 return mixture(ft, fres(ft, stoicRatio().value()));
144 const ThermoType& patchFaceProducts
150 scalar ft = ft_.boundaryField()[patchi][facei];
151 return mixture(ft, fres(ft, stoicRatio().value()));
155 void read(const dictionary&);
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
166 # include "dieselMixture.C"
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 // ************************************************************************* //