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

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