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

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-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::ThermoParcel<ParcelType>::constantProperties::constantProperties
00031 (
00032     const dictionary& parentDict
00033 )
00034 :
00035     KinematicParcel<ParcelType>::constantProperties(parentDict),
00036     T0_(dimensionedScalar(this->dict().lookup("T0")).value()),
00037     TMin_(dimensionedScalar(this->dict().lookup("TMin")).value()),
00038     cp0_(dimensionedScalar(this->dict().lookup("cp0")).value()),
00039     epsilon0_(dimensionedScalar(this->dict().lookup("epsilon0")).value()),
00040     f0_(dimensionedScalar(this->dict().lookup("f0")).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 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
00163 
00164 template<class ParcelType>
00165 inline Foam::ThermoCloud<ParcelType>&
00166 Foam::ThermoParcel<ParcelType>::trackData::cloud()
00167 {
00168     return cloud_;
00169 }
00170 
00171 
00172 template <class ParcelType>
00173 inline const typename Foam::ThermoParcel<ParcelType>::constantProperties&
00174 Foam::ThermoParcel<ParcelType>::trackData::constProps() const
00175 {
00176     return constProps_;
00177 }
00178 
00179 
00180 template<class ParcelType>
00181 inline const Foam::interpolation<Foam::scalar>&
00182 Foam::ThermoParcel<ParcelType>::trackData::TInterp() const
00183 {
00184     return TInterp_;
00185 }
00186 
00187 
00188 template<class ParcelType>
00189 inline const Foam::interpolation<Foam::scalar>&
00190 Foam::ThermoParcel<ParcelType>::trackData::cpInterp() const
00191 {
00192     return cpInterp_;
00193 }
00194 
00195 
00196 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
00197 
00198 template<class ParcelType>
00199 inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const
00200 {
00201     return T_;
00202 }
00203 
00204 
00205 template<class ParcelType>
00206 inline Foam::scalar Foam::ThermoParcel<ParcelType>::cp() const
00207 {
00208     return cp_;
00209 }
00210 
00211 
00212 template<class ParcelType>
00213 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
00214 {
00215     return T_;
00216 }
00217 
00218 
00219 template<class ParcelType>
00220 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::cp()
00221 {
00222     return cp_;
00223 }
00224 
00225 
00226 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd