OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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