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

ReactingMultiphaseParcelI.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) 2008-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::ReactingMultiphaseParcel<ParcelType>::constantProperties::
00030 constantProperties
00031 (
00032     const dictionary& parentDict
00033 )
00034 :
00035     ReactingParcel<ParcelType>::constantProperties(parentDict),
00036     LDevol_(dimensionedScalar(this->dict().lookup("LDevol")).value()),
00037     hRetentionCoeff_
00038     (
00039         dimensionedScalar(this->dict().lookup("hRetentionCoeff")).value()
00040     )
00041 {
00042     if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
00043     {
00044         FatalErrorIn
00045         (
00046             "ReactingMultiphaseParcel<ParcelType>::constantProperties::"
00047             "constantProperties"
00048         )   << "hRetentionCoeff must be in the range 0 to 1" << nl
00049             << exit(FatalError) << endl;
00050     }
00051 
00052     hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
00053 }
00054 
00055 
00056 template<class ParcelType>
00057 inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData
00058 (
00059     ReactingMultiphaseCloud<ParcelType>& cloud,
00060     const constantProperties& constProps,
00061     const interpolation<scalar>& rhoInterp,
00062     const interpolation<vector>& UInterp,
00063     const interpolation<scalar>& muInterp,
00064     const interpolation<scalar>& TInterp,
00065     const interpolation<scalar>& CpInterp,
00066     const interpolation<scalar>& pInterp,
00067     const vector& g
00068 )
00069 :
00070     ReactingParcel<ParcelType>::trackData
00071     (
00072         cloud,
00073         constProps,
00074         rhoInterp,
00075         UInterp,
00076         muInterp,
00077         TInterp,
00078         CpInterp,
00079         pInterp,
00080         g
00081     ),
00082     cloud_(cloud),
00083     constProps_(constProps)
00084 {}
00085 
00086 
00087 template <class ParcelType>
00088 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
00089 (
00090     ReactingMultiphaseCloud<ParcelType>& owner,
00091     const vector& position,
00092     const label cellI
00093 )
00094 :
00095     ReactingParcel<ParcelType>(owner, position, cellI),
00096     YGas_(0),
00097     YLiquid_(0),
00098     YSolid_(0),
00099     canCombust_(false)
00100 {}
00101 
00102 
00103 template<class ParcelType>
00104 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
00105 (
00106     ReactingMultiphaseCloud<ParcelType>& owner,
00107     const vector& position,
00108     const label cellI,
00109     const label typeId,
00110     const scalar nParticle0,
00111     const scalar d0,
00112     const vector& U0,
00113     const scalarField& Y0,
00114     const scalarField& YGas0,
00115     const scalarField& YLiquid0,
00116     const scalarField& YSolid0,
00117     const constantProperties& constProps
00118 )
00119 :
00120     ReactingParcel<ParcelType>
00121     (
00122         owner,
00123         position,
00124         cellI,
00125         typeId,
00126         nParticle0,
00127         d0,
00128         U0,
00129         Y0,
00130         constProps
00131     ),
00132     YGas_(YGas0),
00133     YLiquid_(YLiquid0),
00134     YSolid_(YSolid0),
00135     canCombust_(false)
00136 {}
00137 
00138 
00139 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
00140 
00141 template<class ParcelType>
00142 inline Foam::scalar
00143 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::LDevol() const
00144 {
00145     return LDevol_;
00146 }
00147 
00148 
00149 template<class ParcelType>
00150 inline Foam::scalar
00151 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
00152 hRetentionCoeff() const
00153 {
00154     return hRetentionCoeff_;
00155 }
00156 
00157 
00158 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
00159 
00160 template<class ParcelType>
00161 inline Foam::ReactingMultiphaseCloud<ParcelType>&
00162 Foam::ReactingMultiphaseParcel<ParcelType>::trackData::cloud()
00163 {
00164     return cloud_;
00165 }
00166 
00167 
00168 template<class ParcelType>
00169 inline const typename Foam::ReactingMultiphaseParcel<ParcelType>::
00170 constantProperties&
00171 Foam::ReactingMultiphaseParcel<ParcelType>::trackData::constProps() const
00172 {
00173     return constProps_;
00174 }
00175 
00176 
00177 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
00178 
00179 template<class ParcelType>
00180 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
00181 YGas() const
00182 {
00183     return YGas_;
00184 }
00185 
00186 
00187 template<class ParcelType>
00188 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
00189 YLiquid() const
00190 {
00191     return YLiquid_;
00192 }
00193 
00194 
00195 template<class ParcelType>
00196 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
00197 YSolid() const
00198 {
00199     return YSolid_;
00200 }
00201 
00202 
00203 template<class ParcelType>
00204 inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const
00205 {
00206     return canCombust_;
00207 }
00208 
00209 
00210 template<class ParcelType>
00211 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas()
00212 {
00213     return YGas_;
00214 }
00215 
00216 
00217 template<class ParcelType>
00218 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid()
00219 {
00220     return YLiquid_;
00221 }
00222 
00223 
00224 template<class ParcelType>
00225 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid()
00226 {
00227     return YSolid_;
00228 }
00229 
00230 
00231 template<class ParcelType>
00232 inline bool& Foam::ReactingMultiphaseParcel<ParcelType>::canCombust()
00233 {
00234     return canCombust_;
00235 }
00236 
00237 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines