initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / dsmc / parcels / Templates / DsmcParcel / DsmcParcelI.H
blob239571ceaef99cb46f15003212de45ba09cbeb88
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
29 template <class ParcelType>
30 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
32     mass_(0),
33     d_(0)
37 template <class ParcelType>
38 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
40     const dictionary& dict
43     mass_(readScalar(dict.lookup("mass"))),
44     d_(readScalar(dict.lookup("diameter"))),
45     internalDegreesOfFreedom_
46     (
47         readScalar(dict.lookup("internalDegreesOfFreedom"))
48     ),
49     omega_(readScalar(dict.lookup("omega")))
53 template <class ParcelType>
54 inline Foam::DsmcParcel<ParcelType>::trackData::trackData
56     DsmcCloud<ParcelType>& cloud
59     Particle<ParcelType>::trackData(cloud),
60     cloud_(cloud)
64 template <class ParcelType>
65 inline Foam::DsmcParcel<ParcelType>::DsmcParcel
67     DsmcCloud<ParcelType>& owner,
68     const vector& position,
69     const vector& U,
70     const scalar Ei,
71     const label celli,
72     const label typeId
75     Particle<ParcelType>(owner, position, celli),
76     U_(U),
77     Ei_(Ei),
78     typeId_(typeId)
82 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
84 template <class ParcelType>
85 inline Foam::scalar
86 Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
88     return mass_;
92 template <class ParcelType>
93 inline Foam::scalar
94 Foam::DsmcParcel<ParcelType>::constantProperties::d() const
96     return d_;
100 template <class ParcelType>
101 inline Foam::scalar
102 Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
104     return mathematicalConstant::pi*d_*d_;
108 template <class ParcelType>
109 inline Foam::scalar
110 Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom()
111 const
113     return internalDegreesOfFreedom_;
117 template <class ParcelType>
118 inline Foam::scalar
119 Foam::DsmcParcel<ParcelType>::constantProperties::omega() const
121     return omega_;
125 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
127 template <class ParcelType>
128 inline Foam::DsmcCloud<ParcelType>&
129 Foam::DsmcParcel<ParcelType>::trackData::cloud()
131     return cloud_;
135 // * * * * * * * * * * DsmcParcel Member Functions  * * * * * * * * * * //
137 template <class ParcelType>
138 inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const
140     return typeId_;
144 template <class ParcelType>
145 inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const
147     return U_;
151 template <class ParcelType>
152 inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const
154     return Ei_;
158 template <class ParcelType>
159 inline Foam::vector& Foam::DsmcParcel<ParcelType>::U()
161     return U_;
165 template <class ParcelType>
166 inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei()
168     return Ei_;
172 // ************************************************************************* //