initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / intermediate / parcels / Templates / ReactingParcel / ReactingParcelI.H
blob55aa90eb7e5547b97d7d37b68764eb5e3c80980c
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 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
19     for more details.
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 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
29 template<class ParcelType>
30 inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
32     const dictionary& parentDict
35     ThermoParcel<ParcelType>::constantProperties(parentDict),
36     pMin_(dimensionedScalar(this->dict().lookup("pMin")).value()),
37     constantVolume_(this->dict().lookup("constantVolume")),
38     Tvap_(dimensionedScalar(this->dict().lookup("Tvap")).value()),
39     Tbp_(dimensionedScalar(this->dict().lookup("Tbp")).value())
43 template<class ParcelType>
44 inline Foam::ReactingParcel<ParcelType>::trackData::trackData
46     ReactingCloud<ParcelType>& cloud,
47     const constantProperties& constProps,
48     const interpolation<scalar>& rhoInterp,
49     const interpolation<vector>& UInterp,
50     const interpolation<scalar>& muInterp,
51     const interpolation<scalar>& TInterp,
52     const interpolation<scalar>& CpInterp,
53     const interpolation<scalar>& pInterp,
54     const vector& g
57     ThermoParcel<ParcelType>::trackData
58     (
59         cloud,
60         constProps,
61         rhoInterp,
62         UInterp,
63         muInterp,
64         TInterp,
65         CpInterp,
66         g
67     ),
68     cloud_(cloud),
69     constProps_(constProps),
70     pInterp_(pInterp)
74 template<class ParcelType>
75 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
77     ReactingCloud<ParcelType>& owner,
78     const vector& position,
79     const label cellI
82     ThermoParcel<ParcelType>(owner, position, cellI),
83     mass0_(0.0),
84     Y_(0),
85     pc_(0.0)
89 template<class ParcelType>
90 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
92     ReactingCloud<ParcelType>& owner,
93     const vector& position,
94     const label cellI,
95     const label typeId,
96     const scalar nParticle0,
97     const scalar d0,
98     const vector& U0,
99     const scalarField& Y0,
100     const constantProperties& constProps
103     ThermoParcel<ParcelType>
104     (
105         owner,
106         position,
107         cellI,
108         typeId,
109         nParticle0,
110         d0,
111         U0,
112         constProps
113     ),
114     mass0_(0.0),
115     Y_(Y0),
116     pc_(0.0)
118     // Set initial parcel mass
119     mass0_ = this->mass();
123 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
125 template<class ParcelType>
126 inline Foam::scalar
127 Foam::ReactingParcel<ParcelType>::constantProperties::pMin() const
129     return pMin_;
133 template<class ParcelType>
134 inline Foam::Switch
135 Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const
137     return constantVolume_;
141 template<class ParcelType>
142 inline Foam::scalar
143 Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const
145     return Tvap_;
149 template<class ParcelType>
150 inline Foam::scalar
151 Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const
153     return Tbp_;
157 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
159 template<class ParcelType>
160 inline Foam::ReactingCloud<ParcelType>&
161 Foam::ReactingParcel<ParcelType>::trackData::cloud()
163     return cloud_;
167 template<class ParcelType>
168 inline const typename Foam::ReactingParcel<ParcelType>::constantProperties&
169 Foam::ReactingParcel<ParcelType>::trackData::constProps() const
171     return constProps_;
175 template<class ParcelType>
176 inline const Foam::interpolation<Foam::scalar>&
177 Foam::ReactingParcel<ParcelType>::trackData::pInterp() const
179     return pInterp_;
183 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
185 template<class ParcelType>
186 inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
188     return mass0_;
192 template<class ParcelType>
193 inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() const
195     return Y_;
199 template<class ParcelType>
200 inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
202     return pc_;
206 template<class ParcelType>
207 inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
209     return mass0_;
213 template<class ParcelType>
214 inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y()
216     return Y_;
220 // ************************************************************************* //