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
25 \*---------------------------------------------------------------------------*/
27 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 // Construct from components
35 template<class ReactionRate, class ChemicallyActivationFunction>
37 ChemicallyActivatedReactionRate<ReactionRate, ChemicallyActivationFunction>::
38 ChemicallyActivatedReactionRate
40 const ReactionRate& k0,
41 const ReactionRate& kInf,
42 const ChemicallyActivationFunction& F,
43 const thirdBodyEfficiencies& tbes
49 thirdBodyEfficiencies_(tbes)
53 //- Construct from Istream
54 template<class ReactionRate, class ChemicallyActivationFunction>
56 ChemicallyActivatedReactionRate<ReactionRate, ChemicallyActivationFunction>::
57 ChemicallyActivatedReactionRate
59 const speciesTable& species,
63 k0_(species, is.readBegin("ChemicallyActivatedReactionRate(Istream&)")),
66 thirdBodyEfficiencies_(species, is)
68 is.readEnd("ChemicallyActivatedReactionRate(Istream&)");
72 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 template<class ReactionRate, class ChemicallyActivationFunction>
75 inline scalar ChemicallyActivatedReactionRate
76 <ReactionRate, ChemicallyActivationFunction>::operator()
83 scalar k0 = k0_(T, p, c);
84 scalar kInf = kInf_(T, p, c);
86 scalar Pr = k0*thirdBodyEfficiencies_.M(c)/kInf;
88 return k0*(1/(1 + Pr))*F_(T, Pr);
92 template<class ReactionRate, class ChemicallyActivationFunction>
93 inline Ostream& operator<<
96 const ChemicallyActivatedReactionRate
97 <ReactionRate, ChemicallyActivationFunction>& carr
100 os << token::BEGIN_LIST
101 << carr.k0_ << token::SPACE << carr.kInf_ << token::SPACE << carr.F_
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 } // End namespace Foam
111 // ************************ vim: set sw=4 sts=4 et: ************************ //