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

ThermoParcelI.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::ThermoParcel<ParcelType>::constantProperties::constantProperties
00030 (
00031     const dictionary& parentDict
00032 )
00033 :
00034     KinematicParcel<ParcelType>::constantProperties(parentDict),
00035     T0_(dimensionedScalar(this->dict().lookup("T0")).value()),
00036     TMin_(dimensionedScalar(this->dict().lookup("TMin")).value()),
00037     cp0_(dimensionedScalar(this->dict().lookup("cp0")).value()),
00038     epsilon0_(dimensionedScalar(this->dict().lookup("epsilon0")).value()),
00039     f0_(dimensionedScalar(this->dict().lookup("f0")).value()),
00040     Pr_(dimensionedScalar(this->dict().lookup("Pr")).value())
00041 {}
00042 
00043 
00044 template<class ParcelType>
00045 inline Foam::ThermoParcel<ParcelType>::trackData::trackData
00046 (
00047     ThermoCloud<ParcelType>& cloud,
00048     const constantProperties& constProps,
00049     const interpolation<scalar>& rhoInterp,
00050     const interpolation<vector>& UInterp,
00051     const interpolation<scalar>& muInterp,
00052     const interpolation<scalar>& TInterp,
00053     const interpolation<scalar>& cpInterp,
00054     const vector& g
00055 )
00056 :
00057     KinematicParcel<ParcelType>::trackData
00058     (
00059         cloud,
00060         constProps,
00061         rhoInterp,
00062         UInterp,
00063         muInterp,
00064         g
00065     ),
00066     cloud_(cloud),
00067     constProps_(constProps),
00068     TInterp_(TInterp),
00069     cpInterp_(cpInterp)
00070 {}
00071 
00072 
00073 template<class ParcelType>
00074 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
00075 (
00076     ThermoCloud<ParcelType>& owner,
00077     const vector& position,
00078     const label cellI
00079 )
00080 :
00081     KinematicParcel<ParcelType>(owner, position, cellI),
00082     T_(0.0),
00083     cp_(0.0),
00084     Tc_(0.0),
00085     cpc_(0.0)
00086 {}
00087 
00088 
00089 template<class ParcelType>
00090 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
00091 (
00092     ThermoCloud<ParcelType>& owner,
00093     const vector& position,
00094     const label cellI,
00095     const label typeId,
00096     const scalar nParticle0,
00097     const scalar d0,
00098     const vector& U0,
00099     const constantProperties& constProps
00100 )
00101 :
00102     KinematicParcel<ParcelType>
00103     (
00104         owner,
00105         position,
00106         cellI,
00107         typeId,
00108         nParticle0,
00109         d0,
00110         U0,
00111         constProps
00112     ),
00113     T_(constProps.T0()),
00114     cp_(constProps.cp0()),
00115     Tc_(0.0),
00116     cpc_(0.0)
00117 {}
00118 
00119 
00120 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
00121 
00122 template <class ParcelType>
00123 inline Foam::scalar
00124 Foam::ThermoParcel<ParcelType>::constantProperties::T0() const
00125 {
00126     return T0_;
00127 }
00128 
00129 
00130 template <class ParcelType>
00131 inline Foam::scalar
00132 Foam::ThermoParcel<ParcelType>::constantProperties::TMin() const
00133 {
00134     return TMin_;
00135 }
00136 
00137 
00138 template <class ParcelType>
00139 inline Foam::scalar
00140 Foam::ThermoParcel<ParcelType>::constantProperties::cp0() const
00141 {
00142     return cp0_;
00143 }
00144 
00145 
00146 template <class ParcelType>
00147 inline Foam::scalar
00148 Foam::ThermoParcel<ParcelType>::constantProperties::epsilon0() const
00149 {
00150     return epsilon0_;
00151 }
00152 
00153 
00154 template <class ParcelType>
00155 inline Foam::scalar
00156 Foam::ThermoParcel<ParcelType>::constantProperties::f0() const
00157 {
00158     return f0_;
00159 }
00160 
00161 
00162 template <class ParcelType>
00163 inline Foam::scalar
00164 Foam::ThermoParcel<ParcelType>::constantProperties::Pr() const
00165 {
00166     return Pr_;
00167 }
00168 
00169 
00170 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
00171 
00172 template<class ParcelType>
00173 inline Foam::ThermoCloud<ParcelType>&
00174 Foam::ThermoParcel<ParcelType>::trackData::cloud()
00175 {
00176     return cloud_;
00177 }
00178 
00179 
00180 template <class ParcelType>
00181 inline const typename Foam::ThermoParcel<ParcelType>::constantProperties&
00182 Foam::ThermoParcel<ParcelType>::trackData::constProps() const
00183 {
00184     return constProps_;
00185 }
00186 
00187 
00188 template<class ParcelType>
00189 inline const Foam::interpolation<Foam::scalar>&
00190 Foam::ThermoParcel<ParcelType>::trackData::TInterp() const
00191 {
00192     return TInterp_;
00193 }
00194 
00195 
00196 template<class ParcelType>
00197 inline const Foam::interpolation<Foam::scalar>&
00198 Foam::ThermoParcel<ParcelType>::trackData::cpInterp() const
00199 {
00200     return cpInterp_;
00201 }
00202 
00203 
00204 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
00205 
00206 template<class ParcelType>
00207 inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const
00208 {
00209     return T_;
00210 }
00211 
00212 
00213 template<class ParcelType>
00214 inline Foam::scalar Foam::ThermoParcel<ParcelType>::cp() const
00215 {
00216     return cp_;
00217 }
00218 
00219 
00220 template<class ParcelType>
00221 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
00222 {
00223     return T_;
00224 }
00225 
00226 
00227 template<class ParcelType>
00228 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::cp()
00229 {
00230     return cp_;
00231 }
00232 
00233 
00234 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines