DSMCParcelI.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
29
30// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31
32template<class ParcelType>
34:
35 mass_(0),
36 d_(0)
37{}
38
39
40template<class ParcelType>
42(
43 const dictionary& dict
44)
45:
46 mass_(dict.get<scalar>("mass")),
47 d_(dict.get<scalar>("diameter")),
48 internalDegreesOfFreedom_(dict.get<int>("internalDegreesOfFreedom")),
49 omega_(dict.get<scalar>("omega"))
50{}
51
52
53template<class ParcelType>
55(
56 const polyMesh& mesh,
58 const label celli,
59 const label tetFacei,
60 const label tetPti,
61 const vector& U,
62 const scalar Ei,
63 const label typeId
64)
65:
66 ParcelType(mesh, coordinates, celli, tetFacei, tetPti),
67 U_(U),
68 Ei_(Ei),
70{}
71
72
73template<class ParcelType>
75(
76 const polyMesh& mesh,
77 const vector& position,
78 const label celli,
79 const vector& U,
80 const scalar Ei,
81 const label typeId
82)
83:
84 ParcelType(mesh, position, celli),
85 U_(U),
86 Ei_(Ei),
87 typeId_(typeId)
88{}
89
90
91// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
92
93template<class ParcelType>
94inline Foam::scalar
96{
97 return mass_;
98}
99
100
101template<class ParcelType>
103{
104 return d_;
105}
106
107
108template<class ParcelType>
109inline Foam::scalar
111{
112 return constant::mathematical::pi*d_*d_;
113}
114
115
116template<class ParcelType>
117inline Foam::direction
119const
120{
121 return internalDegreesOfFreedom_;
122}
123
124
125template<class ParcelType>
126inline Foam::scalar
128{
129 return omega_;
130}
131
132
133// * * * * * * * * * * DSMCParcel Member Functions * * * * * * * * * * //
134
135template<class ParcelType>
136inline Foam::label Foam::DSMCParcel<ParcelType>::typeId() const
137{
138 return typeId_;
139}
140
141
142template<class ParcelType>
144{
145 return U_;
146}
147
148
149template<class ParcelType>
150inline Foam::scalar Foam::DSMCParcel<ParcelType>::Ei() const
151{
152 return Ei_;
153}
154
155
156template<class ParcelType>
158{
159 return U_;
160}
161
162
163template<class ParcelType>
165{
166 return Ei_;
167}
168
169
170// ************************************************************************* //
scalar d() const
Return const access to the hard sphere diameter [m].
Definition: DSMCParcelI.H:102
constantProperties()
Null constructor, allows List of constantProperties to be.
Definition: DSMCParcelI.H:33
scalar omega() const
Return the viscosity index.
Definition: DSMCParcelI.H:127
scalar mass() const
Return const access to the particle mass [kg].
Definition: DSMCParcelI.H:95
scalar sigmaT() const
Return the reference total collision cross section.
Definition: DSMCParcelI.H:110
direction internalDegreesOfFreedom() const
Return the internalDegreesOfFreedom.
Definition: DSMCParcelI.H:118
DSMC parcel class.
Definition: DSMCParcel.H:73
label typeId_
Parcel type id.
Definition: DSMCParcel.H:148
label typeId() const
Return type id.
Definition: DSMCParcelI.H:136
const vector & U() const
Return const access to velocity.
Definition: DSMCParcelI.H:143
scalar Ei() const
Return const access to internal energy.
Definition: DSMCParcelI.H:150
vector U_
Velocity of Parcel [m/s].
Definition: DSMCParcel.H:141
scalar Ei_
Internal energy of the Parcel, covering all non-translational.
Definition: DSMCParcel.H:145
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
U
Definition: pEqn.H:72
dynamicFvMesh & mesh
PtrList< coordinateSystem > coordinates(solidRegions.size())
constexpr scalar pi(M_PI)
uint8_t direction
Definition: direction.H:56
dictionary dict