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

DsmcParcelI_.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) 2009-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 #include <OpenFOAM/mathematicalConstants.H>
00027 
00028 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00029 
00030 template <class ParcelType>
00031 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
00032 :
00033     mass_(0),
00034     d_(0)
00035 {}
00036 
00037 
00038 template <class ParcelType>
00039 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
00040 (
00041     const dictionary& dict
00042 )
00043 :
00044     mass_(readScalar(dict.lookup("mass"))),
00045     d_(readScalar(dict.lookup("diameter"))),
00046     internalDegreesOfFreedom_
00047     (
00048         readScalar(dict.lookup("internalDegreesOfFreedom"))
00049     ),
00050     omega_(readScalar(dict.lookup("omega")))
00051 {}
00052 
00053 
00054 template <class ParcelType>
00055 inline Foam::DsmcParcel<ParcelType>::trackData::trackData
00056 (
00057     DsmcCloud<ParcelType>& cloud
00058 )
00059 :
00060     Particle<ParcelType>::trackData(cloud),
00061     cloud_(cloud)
00062 {}
00063 
00064 
00065 template <class ParcelType>
00066 inline Foam::DsmcParcel<ParcelType>::DsmcParcel
00067 (
00068     DsmcCloud<ParcelType>& owner,
00069     const vector& position,
00070     const vector& U,
00071     const scalar Ei,
00072     const label celli,
00073     const label typeId
00074 )
00075 :
00076     Particle<ParcelType>(owner, position, celli),
00077     U_(U),
00078     Ei_(Ei),
00079     typeId_(typeId)
00080 {}
00081 
00082 
00083 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
00084 
00085 template <class ParcelType>
00086 inline Foam::scalar
00087 Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
00088 {
00089     return mass_;
00090 }
00091 
00092 
00093 template <class ParcelType>
00094 inline Foam::scalar
00095 Foam::DsmcParcel<ParcelType>::constantProperties::d() const
00096 {
00097     return d_;
00098 }
00099 
00100 
00101 template <class ParcelType>
00102 inline Foam::scalar
00103 Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
00104 {
00105     return mathematicalConstant::pi*d_*d_;
00106 }
00107 
00108 
00109 template <class ParcelType>
00110 inline Foam::scalar
00111 Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom()
00112 const
00113 {
00114     return internalDegreesOfFreedom_;
00115 }
00116 
00117 
00118 template <class ParcelType>
00119 inline Foam::scalar
00120 Foam::DsmcParcel<ParcelType>::constantProperties::omega() const
00121 {
00122     return omega_;
00123 }
00124 
00125 
00126 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
00127 
00128 template <class ParcelType>
00129 inline Foam::DsmcCloud<ParcelType>&
00130 Foam::DsmcParcel<ParcelType>::trackData::cloud()
00131 {
00132     return cloud_;
00133 }
00134 
00135 
00136 // * * * * * * * * * * DsmcParcel Member Functions  * * * * * * * * * * //
00137 
00138 template <class ParcelType>
00139 inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const
00140 {
00141     return typeId_;
00142 }
00143 
00144 
00145 template <class ParcelType>
00146 inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const
00147 {
00148     return U_;
00149 }
00150 
00151 
00152 template <class ParcelType>
00153 inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const
00154 {
00155     return Ei_;
00156 }
00157 
00158 
00159 template <class ParcelType>
00160 inline Foam::vector& Foam::DsmcParcel<ParcelType>::U()
00161 {
00162     return U_;
00163 }
00164 
00165 
00166 template <class ParcelType>
00167 inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei()
00168 {
00169     return Ei_;
00170 }
00171 
00172 
00173 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines