streamLine.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-2013 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::streamLine
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.
34 
35  Example of function object specification:
36  \verbatim
37  streamLine1
38  {
39  type streamLine;
40  functionObjectLibs ("libfieldFunctionObjects.so");
41  ...
42  setFormat vtk;
43  UName U;
44  trackForward yes;
45  fields
46  (
47  U
48  p
49  );
50  lifeTime 10000;
51  trackLength 1e-3;
52  nSubCycle 5;
53  bounds (0.2 -10 -10)(0.22 10 10);
54  cloudName particleTracks;
55  seedSampleSet uniform;
56  uniformCoeffs
57  {
58  type uniform;
59  axis x; //distance;
60  start (-0.0205 0.0001 0.00001);
61  end (-0.0205 0.0005 0.00001);
62  nPoints 100;
63  }
64  }
65  \endverbatim
66 
67  \heading Function object usage
68  \table
69  Property | Description | Required | Default value
70  type | type name: streamLine | yes |
71  setFormat | output data type | yes |
72  UName | tracking velocity field name | yes |
73  fields | fields to sample | yes |
74  lifetime | maximum number of particle tracking steps | yes |
75  trackLength | tracking segment length | no |
76  nSubCycle | number of tracking steps per cell | no|
77  cloudName | cloud name to use | yes |
78  log | Log to standard output | no | yes
79  bounds | Bounding box to trim tracks | no | greatBox
80  seedSampleSet| seeding method (see below)| yes |
81  \endtable
82 
83  \linebreak
84  Where \c seedSampleSet is typically one of
85  \plaintable
86  uniform | uniform particle seeding
87  cloud | cloud of points
88  triSurfaceMeshPointSet | points according to a tri-surface mesh
89  \endplaintable
90 
91 Note
92  When specifying the track resolution, the \c trackLength OR \c nSubCycle
93  option should be used
94 
95 SeeAlso
96  Foam::functionObject
97  Foam::OutputFilterFunctionObject
98  Foam::sampledSet
99  Foam::wallBoundedStreamLine
100  Foam::streamLineBase
101 
102 SourceFiles
103  streamLine.C
104 
105 \*---------------------------------------------------------------------------*/
106 
107 #ifndef streamLine_H
108 #define streamLine_H
109 
110 #include "streamLineBase.H"
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 namespace Foam
115 {
116 
117 // Forward declaration of classes
118 class objectRegistry;
119 class dictionary;
120 
121 /*---------------------------------------------------------------------------*\
122  Class streamLine Declaration
123 \*---------------------------------------------------------------------------*/
124 
125 class streamLine
126 :
127  public streamLineBase
128 {
129  // Private data
130 
131  //- Number of subcycling steps
133 
134 
135  // Private Member Functions
136 
137  //- Disallow default bitwise copy construct
138  streamLine(const streamLine&);
139 
140  //- Disallow default bitwise assignment
141  void operator=(const streamLine&);
142 
143 
144 public:
145 
146  //- Runtime type information
147  TypeName("streamLine");
148 
149 
150  // Constructors
151 
152  //- Construct for given objectRegistry and dictionary.
153  // Allow the possibility to load fields from files
154  streamLine
155  (
156  const word& name,
157  const objectRegistry&,
158  const dictionary&,
159  const bool loadFromFiles = false
160  );
161 
162 
163  //- Destructor
164  virtual ~streamLine();
165 
166 
167  // Member Functions
168 
169  //- Read settings
170  virtual void read(const dictionary&);
171 
172  //- Do the actual tracking to fill the track data
173  virtual void track();
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::streamLine::nSubCycle_
label nSubCycle_
Number of subcycling steps.
Definition: streamLine.H:203
Foam::streamLine::streamLine
streamLine(const streamLine &)
Disallow default bitwise copy construct.
Foam::streamLine::TypeName
TypeName("streamLine")
Runtime type information.
Foam::streamLine::read
virtual void read(const dictionary &)
Read settings.
Definition: streamLine.C:144
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:50
streamLineBase.H
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::streamLine::~streamLine
virtual ~streamLine()
Destructor.
Definition: streamLine.C:138
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::streamLine
This function object generates streamline data by sampling a set of user-specified fields along a par...
Definition: streamLine.H:196
Foam::streamLineBase
Definition: streamLineBase.H:62
Foam::streamLine::operator=
void operator=(const streamLine &)
Disallow default bitwise assignment.
Foam::streamLine::track
virtual void track()
Do the actual tracking to fill the track data.
Definition: streamLine.C:41
Foam::functionObjectState::name
const word & name() const
Return the name.
Definition: functionObjectState.C:58