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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2015-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::streamLine
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Generates streamline data by sampling a set of user-specified fields along a
35  particle track, transported by a user-specified velocity field.
36 
37  Operands:
38  \table
39  Operand | Type | Location
40  input | - | -
41  output file | - <!--
42  --> | $FOAM_CASE/postProcessing/sets/<FO>/<time>/<file>
43  output field | - | -
44  \endtable
45 
46 Usage
47  Minimal example by using \c system/controlDict.functions:
48  \verbatim
49  streamLine1
50  {
51  // Mandatory entries (unmodifiable)
52  type streamLine;
53  libs (fieldFunctionObjects);
54 
55  // Mandatory entries (runtime modifiable)
56  U <fieldTrack>;
57  fields (<fieldTrack> <field1> ... <fieldN>);
58  setFormat vtk;
59  direction bidirectional;
60  lifeTime 10000;
61  cloud particleTracks;
62  seedSampleSet
63  {
64  type uniform;
65  axis x;
66  start (-0.0205 0.0001 0.00001);
67  end (-0.0205 0.0005 0.00001);
68  nPoints 100;
69  }
70 
71  // Optional entries (runtime modifiable)
72  bounds (0.2 -10 -10)(0.22 10 10);
73  trackLength 1e-3;
74  nSubCycle 1;
75  interpolationScheme cellPoint;
76 
77  // Deprecated
78  // trackForward true;
79 
80  // Optional (inherited) entries
81  ...
82  }
83  \endverbatim
84 
85  where the entries mean:
86  \table
87  Property | Description | Type | Req'd | Dflt
88  type | Type name: streamLine | word | yes | -
89  libs | Library name: fieldFunctionObjects | word | yes | -
90  U | Name of tracking velocity field | word | yes | -
91  fields | Names of operand fields to sample | wordList | yes | -
92  setFormat | Type of output data | word | yes | -
93  direction | Direction to track | vector | yes | -
94  lifetime | Maximum number of particle tracking steps | label | yes | -
95  cloud | Name of cloud | word | yes | -
96  seedSampleSet| Name of seeding method (see below) | word | yes | -
97  bounds | Bounding box to trim tracks | vector | no | invertedBox
98  trackLength | Tracking segment length | scalar | no | VGREAT
99  nSubCycle | Number of tracking steps per cell | label | no | 1
100  interpolationScheme | Interp. scheme for sample | word | no | cellPoint
101  \endtable
102 
103  Options for the \c seedSampleSet entry:
104  \verbatim
105  uniform | uniform particle seeding
106  cloud | cloud of points
107  triSurfaceMeshPointSet | points according to a tri-surface mesh
108  \endverbatim
109 
110  Options for the \c setFormat entry:
111  \verbatim
112  csv
113  ensight
114  gnuplot
115  jplot
116  nastran
117  raw
118  vtk
119  xmgr
120  \endverbatim
121 
122  Options for the \c direction entry:
123  \verbatim
124  bidirectional
125  forward
126  backward
127  \endverbatim
128 
129  The inherited entries are elaborated in:
130  - \link functionObject.H \endlink
131 
132  Usage by the \c postProcess utility is not available.
133 
134 Note
135  When specifying the track resolution, the \c trackLength or \c nSubCycle
136  option should be used.
137 
138 See also
139  - Foam::functionObject
140  - Foam::functionObjects::fvMeshFunctionObject
141  - Foam::sampledSet
142  - Foam::wallBoundedStreamLine
143  - Foam::streamLineBase
144  - ExtendedCodeGuide::functionObjects::field::streamLine
145 
146 SourceFiles
147  streamLine.C
148 
149 \*---------------------------------------------------------------------------*/
150 
151 #ifndef functionObjects_streamLine_H
152 #define functionObjects_streamLine_H
153 
154 #include "streamLineBase.H"
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 namespace Foam
159 {
160 
161 class objectRegistry;
162 class dictionary;
163 
164 namespace functionObjects
165 {
166 
167 /*---------------------------------------------------------------------------*\
168  Class streamLine Declaration
169 \*---------------------------------------------------------------------------*/
170 
171 class streamLine
172 :
173  public streamLineBase
174 {
175  // Private Data
176 
177  //- Number of subcycling steps
178  label nSubCycle_;
179 
180 
181 public:
182 
183  //- Runtime type information
184  TypeName("streamLine");
185 
186 
187  // Constructors
188 
189  //- Construct from Time and dictionary
190  streamLine
191  (
192  const word& name,
193  const Time& runTime,
194  const dictionary& dict
195  );
196 
197  //- No copy construct
198  streamLine(const streamLine&) = delete;
199 
200  //- No copy assignment
201  void operator=(const streamLine&) = delete;
202 
203 
204  //- Destructor
205  virtual ~streamLine() = default;
206 
207 
208  // Member Functions
209 
210  //- Read settings
211  virtual bool read(const dictionary&);
212 
213  //- Do the actual tracking to fill the track data
214  virtual void track();
215 };
216 
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 } // End namespace functionObjects
221 } // End namespace Foam
222 
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 
225 #endif
226 
227 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::functionObjects::streamLine::TypeName
TypeName("streamLine")
Runtime type information.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::functionObjects::streamLine
Generates streamline data by sampling a set of user-specified fields along a particle track,...
Definition: streamLine.H:272
streamLineBase.H
Foam::functionObjects::streamLine::track
virtual void track()
Do the actual tracking to fill the track data.
Definition: streamLine.C:48
Foam::functionObjects::streamLineBase
Definition: streamLineBase.H:65
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::functionObjects::streamLine::operator=
void operator=(const streamLine &)=delete
No copy assignment.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObjects::streamLine::streamLine
streamLine(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: streamLine.C:141
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::streamLine::read
virtual bool read(const dictionary &)
Read settings.
Definition: streamLine.C:155
Foam::functionObjects::streamLine::~streamLine
virtual ~streamLine()=default
Destructor.