FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

ReactingParcelI_.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00027 
00028 template<class ParcelType>
00029 inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
00030 (
00031     const dictionary& parentDict
00032 )
00033 :
00034     ThermoParcel<ParcelType>::constantProperties(parentDict),
00035     pMin_(dimensionedScalar(this->dict().lookup("pMin")).value()),
00036     constantVolume_(this->dict().lookup("constantVolume")),
00037     Tvap_(dimensionedScalar(this->dict().lookup("Tvap")).value()),
00038     Tbp_(dimensionedScalar(this->dict().lookup("Tbp")).value())
00039 {}
00040 
00041 
00042 template<class ParcelType>
00043 inline Foam::ReactingParcel<ParcelType>::trackData::trackData
00044 (
00045     ReactingCloud<ParcelType>& cloud,
00046     const constantProperties& constProps,
00047     const interpolation<scalar>& rhoInterp,
00048     const interpolation<vector>& UInterp,
00049     const interpolation<scalar>& muInterp,
00050     const interpolation<scalar>& TInterp,
00051     const interpolation<scalar>& CpInterp,
00052     const interpolation<scalar>& pInterp,
00053     const vector& g
00054 )
00055 :
00056     ThermoParcel<ParcelType>::trackData
00057     (
00058         cloud,
00059         constProps,
00060         rhoInterp,
00061         UInterp,
00062         muInterp,
00063         TInterp,
00064         CpInterp,
00065         g
00066     ),
00067     cloud_(cloud),
00068     constProps_(constProps),
00069     pInterp_(pInterp)
00070 {}
00071 
00072 
00073 template<class ParcelType>
00074 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
00075 (
00076     ReactingCloud<ParcelType>& owner,
00077     const vector& position,
00078     const label cellI
00079 )
00080 :
00081     ThermoParcel<ParcelType>(owner, position, cellI),
00082     mass0_(0.0),
00083     Y_(0),
00084     pc_(0.0)
00085 {}
00086 
00087 
00088 template<class ParcelType>
00089 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
00090 (
00091     ReactingCloud<ParcelType>& owner,
00092     const vector& position,
00093     const label cellI,
00094     const label typeId,
00095     const scalar nParticle0,
00096     const scalar d0,
00097     const vector& U0,
00098     const scalarField& Y0,
00099     const constantProperties& constProps
00100 )
00101 :
00102     ThermoParcel<ParcelType>
00103     (
00104         owner,
00105         position,
00106         cellI,
00107         typeId,
00108         nParticle0,
00109         d0,
00110         U0,
00111         constProps
00112     ),
00113     mass0_(0.0),
00114     Y_(Y0),
00115     pc_(0.0)
00116 {
00117     // Set initial parcel mass
00118     mass0_ = this->mass();
00119 }
00120 
00121 
00122 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
00123 
00124 template<class ParcelType>
00125 inline Foam::scalar
00126 Foam::ReactingParcel<ParcelType>::constantProperties::pMin() const
00127 {
00128     return pMin_;
00129 }
00130 
00131 
00132 template<class ParcelType>
00133 inline Foam::Switch
00134 Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const
00135 {
00136     return constantVolume_;
00137 }
00138 
00139 
00140 template<class ParcelType>
00141 inline Foam::scalar
00142 Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const
00143 {
00144     return Tvap_;
00145 }
00146 
00147 
00148 template<class ParcelType>
00149 inline Foam::scalar
00150 Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const
00151 {
00152     return Tbp_;
00153 }
00154 
00155 
00156 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
00157 
00158 template<class ParcelType>
00159 inline Foam::ReactingCloud<ParcelType>&
00160 Foam::ReactingParcel<ParcelType>::trackData::cloud()
00161 {
00162     return cloud_;
00163 }
00164 
00165 
00166 template<class ParcelType>
00167 inline const typename Foam::ReactingParcel<ParcelType>::constantProperties&
00168 Foam::ReactingParcel<ParcelType>::trackData::constProps() const
00169 {
00170     return constProps_;
00171 }
00172 
00173 
00174 template<class ParcelType>
00175 inline const Foam::interpolation<Foam::scalar>&
00176 Foam::ReactingParcel<ParcelType>::trackData::pInterp() const
00177 {
00178     return pInterp_;
00179 }
00180 
00181 
00182 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
00183 
00184 template<class ParcelType>
00185 inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
00186 {
00187     return mass0_;
00188 }
00189 
00190 
00191 template<class ParcelType>
00192 inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() const
00193 {
00194     return Y_;
00195 }
00196 
00197 
00198 template<class ParcelType>
00199 inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
00200 {
00201     return pc_;
00202 }
00203 
00204 
00205 template<class ParcelType>
00206 inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
00207 {
00208     return mass0_;
00209 }
00210 
00211 
00212 template<class ParcelType>
00213 inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y()
00214 {
00215     return Y_;
00216 }
00217 
00218 
00219 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines