Added measurement of surface values of velocity and temperature to allow slip
[OpenFOAM-1.6.x.git] / src / lagrangian / dsmc / parcels / Templates / DsmcParcel / DsmcParcelI.H
blob372a3537ca3c3f82a2d5c0f600709bbaa91a6b7c
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 #include "mathematicalConstants.H"
29 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
31 template <class ParcelType>
32 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
34     mass_(0),
35     d_(0)
39 template <class ParcelType>
40 inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
42     const dictionary& dict
45     mass_(readScalar(dict.lookup("mass"))),
46     d_(readScalar(dict.lookup("diameter"))),
47     internalDegreesOfFreedom_
48     (
49         readScalar(dict.lookup("internalDegreesOfFreedom"))
50     ),
51     omega_(readScalar(dict.lookup("omega")))
55 template <class ParcelType>
56 inline Foam::DsmcParcel<ParcelType>::trackData::trackData
58     DsmcCloud<ParcelType>& cloud
61     Particle<ParcelType>::trackData(cloud),
62     cloud_(cloud)
66 template <class ParcelType>
67 inline Foam::DsmcParcel<ParcelType>::DsmcParcel
69     DsmcCloud<ParcelType>& owner,
70     const vector& position,
71     const vector& U,
72     const scalar Ei,
73     const label celli,
74     const label typeId
77     Particle<ParcelType>(owner, position, celli),
78     U_(U),
79     Ei_(Ei),
80     typeId_(typeId)
84 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
86 template <class ParcelType>
87 inline Foam::scalar
88 Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
90     return mass_;
94 template <class ParcelType>
95 inline Foam::scalar
96 Foam::DsmcParcel<ParcelType>::constantProperties::d() const
98     return d_;
102 template <class ParcelType>
103 inline Foam::scalar
104 Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
106     return mathematicalConstant::pi*d_*d_;
110 template <class ParcelType>
111 inline Foam::scalar
112 Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom()
113 const
115     return internalDegreesOfFreedom_;
119 template <class ParcelType>
120 inline Foam::scalar
121 Foam::DsmcParcel<ParcelType>::constantProperties::omega() const
123     return omega_;
127 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
129 template <class ParcelType>
130 inline Foam::DsmcCloud<ParcelType>&
131 Foam::DsmcParcel<ParcelType>::trackData::cloud()
133     return cloud_;
137 // * * * * * * * * * * DsmcParcel Member Functions  * * * * * * * * * * //
139 template <class ParcelType>
140 inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const
142     return typeId_;
146 template <class ParcelType>
147 inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const
149     return U_;
153 template <class ParcelType>
154 inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const
156     return Ei_;
160 template <class ParcelType>
161 inline Foam::vector& Foam::DsmcParcel<ParcelType>::U()
163     return U_;
167 template <class ParcelType>
168 inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei()
170     return Ei_;
174 // ************************************************************************* //