Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / specie / reaction / reactionRate / thirdBodyArrheniusReactionRate / thirdBodyArrheniusReactionRateI.H
blob917c1cda131f92c6a5095240183ab92e777916cb
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
28 inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
30     const scalar A,
31     const scalar beta,
32     const scalar Ta,
33     const thirdBodyEfficiencies& tbes
36     ArrheniusReactionRate(A, beta, Ta),
37     thirdBodyEfficiencies_(tbes)
41 inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
43     const speciesTable& species,
44     Istream& is
47     ArrheniusReactionRate
48     (
49         species,
50         is.readBegin("thirdBodyArrheniusReactionRate(Istream&)")
51     ),
52     thirdBodyEfficiencies_(species, is)
54     is.readEnd("thirdBodyArrheniusReactionRate(Istream&)");
58 inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
60     const speciesTable& species,
61     const dictionary& dict
64     ArrheniusReactionRate
65     (
66         species,
67         dict
68     ),
69     thirdBodyEfficiencies_(species, dict)
73 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
75 inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator()
77     const scalar T,
78     const scalar p,
79     const scalarField& c
80 ) const
82     return
83         thirdBodyEfficiencies_.M(c)
84        *ArrheniusReactionRate::operator()(T, p, c);
88 inline void Foam::thirdBodyArrheniusReactionRate::write(Ostream& os) const
90     ArrheniusReactionRate::write(os);
91     thirdBodyEfficiencies_.write(os);
95 inline Foam::Ostream& Foam::operator<<
97     Ostream& os,
98     const thirdBodyArrheniusReactionRate& arr
101     os  << token::BEGIN_LIST
102         << static_cast<const ArrheniusReactionRate&>(arr)
103         << token::SPACE << arr.thirdBodyEfficiencies_
104         << token::END_LIST;
105     return os;
109 // ************************************************************************* //