wallBoundedStreamLine.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::wallBoundedStreamLine
26 
27 Group
28  grpFieldFunctionObjects
29 
30 Description
31  This function object generates streamline data by sampling a set of
32  user-specified fields along a particle track, transported by a
33  user-specified velocity field, constrained to a patch.
34 
35  Example of function object specification:
36  \verbatim
37  wallBoundedStreamLine1
38  {
39  type wallBoundedStreamLine;
40  functionObjectLibs ("libfieldFunctionObjects.so");
41  ...
42  setFormat vtk;
43  UName UNear;
44  trackForward yes;
45  fields
46  (
47  UNear
48  p
49  );
50  lifeTime 10000;
51  trackLength 1e-3;
52  bounds (0.2 -10 -10)(0.22 10 10);
53  cloudName particleTracks;
54  seedSampleSet patchSeed;
55  patchSeedCoeffs
56  {
57  type patchSeed;
58  patches (wall);
59  axis x;
60  maxPoints 20000;
61  }
62  }
63  \endverbatim
64 
65  \heading Function object usage
66  \table
67  Property | Description | Required | Default value
68  type | type name: wallBoundedStreamLine| yes |
69  setFormat | output data type | yes |
70  UName | tracking velocity field name | yes |
71  fields | fields to sample | yes |
72  lifetime | maximum number of particle tracking steps | yes |
73  trackLength | tracking segment length | no |
74  cloudName | cloud name to use | yes |
75  log | Log to standard output | no | yes
76  bounds | Bounding box to trim tracks | no | greatBox
77  seedSampleSet| seeding method (see below)| yes |
78  \endtable
79 
80  \linebreak
81  Where \c seedSampleSet is typically one of
82  \plaintable
83  uniform | uniform particle seeding
84  cloud | cloud of points
85  patchSeed | seeding via patch faces
86  triSurfaceMeshPointSet | points according to a tri-surface mesh
87  \endplaintable
88 
89 SeeAlso
90  Foam::functionObject
91  Foam::OutputFilterFunctionObject
92  Foam::sampledSet
93  Foam::streamLineBase
94  Foam::streamLine
95 
96 SourceFiles
97  wallBoundedStreamLine.C
98 
99 \*---------------------------------------------------------------------------*/
100 
101 #ifndef wallBoundedStreamLine_H
102 #define wallBoundedStreamLine_H
103 
104 #include "streamLineBase.H"
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 namespace Foam
110 {
111 
112 /*---------------------------------------------------------------------------*\
113  Class wallBoundedStreamLine Declaration
114 \*---------------------------------------------------------------------------*/
115 
116 class wallBoundedStreamLine
117 :
118  public streamLineBase
119 {
120  // Private Member Functions
121 
122  //- Find wall tet on cell
123  tetIndices findNearestTet
124  (
125  const PackedBoolList& isWallPatch,
126  const point& seedPt,
127  const label cellI
128  ) const;
129 
130  //- Disallow default bitwise copy construct
132 
133  //- Disallow default bitwise assignment
134  void operator=(const wallBoundedStreamLine&);
135 
136 
137 public:
138 
139  //- Runtime type information
140  TypeName("wallBoundedStreamLine");
141 
142 
143  // Constructors
144 
145  //- Construct for given objectRegistry and dictionary.
146  // Allow the possibility to load fields from files
148  (
149  const word& name,
150  const objectRegistry&,
151  const dictionary&,
152  const bool loadFromFiles = false
153  );
154 
155 
156  //- Destructor
157  virtual ~wallBoundedStreamLine();
158 
159 
160  // Member Functions
161 
162  //- Read settings
163  virtual void read(const dictionary&);
164 
165  //- Do the actual tracking to fill the track data
166  virtual void track();
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::wallBoundedStreamLine::findNearestTet
tetIndices findNearestTet(const PackedBoolList &isWallPatch, const point &seedPt, const label cellI) const
Find wall tet on cell.
Definition: wallBoundedStreamLine.C:43
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:50
Foam::wallBoundedStreamLine::~wallBoundedStreamLine
virtual ~wallBoundedStreamLine()
Destructor.
Definition: wallBoundedStreamLine.C:246
Foam::wallBoundedStreamLine::wallBoundedStreamLine
wallBoundedStreamLine(const wallBoundedStreamLine &)
Disallow default bitwise copy construct.
streamLineBase.H
Foam::wallBoundedStreamLine
This function object generates streamline data by sampling a set of user-specified fields along a par...
Definition: wallBoundedStreamLine.H:186
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::tetIndices
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
Definition: tetIndices.H:73
Foam::wallBoundedStreamLine::track
virtual void track()
Do the actual tracking to fill the track data.
Definition: wallBoundedStreamLine.C:99
Foam::wallBoundedStreamLine::TypeName
TypeName("wallBoundedStreamLine")
Runtime type information.
Foam::Vector< scalar >
Foam::streamLineBase
Definition: streamLineBase.H:62
Foam::wallBoundedStreamLine::operator=
void operator=(const wallBoundedStreamLine &)
Disallow default bitwise assignment.
Foam::point
vector point
Point is a vector.
Definition: point.H:41
Foam::functionObjectState::name
const word & name() const
Return the name.
Definition: functionObjectState.C:58
Foam::wallBoundedStreamLine::read
virtual void read(const dictionary &)
Read settings.
Definition: wallBoundedStreamLine.C:252