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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::streamLine
29
30Group
31 grpFieldFunctionObjects
32
33Description
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
46Usage
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 nastran
116 raw
117 vtk
118 xmgr
119 \endverbatim
120
121 Options for the \c direction entry:
122 \verbatim
123 bidirectional
124 forward
125 backward
126 \endverbatim
127
128 The inherited entries are elaborated in:
129 - \link functionObject.H \endlink
130
131 Usage by the \c postProcess utility is not available.
132
133Note
134 When specifying the track resolution, the \c trackLength or \c nSubCycle
135 option should be used.
136
137See also
138 - Foam::functionObject
139 - Foam::functionObjects::fvMeshFunctionObject
140 - Foam::sampledSet
141 - Foam::wallBoundedStreamLine
142 - Foam::streamLineBase
143 - ExtendedCodeGuide::functionObjects::field::streamLine
144
145SourceFiles
146 streamLine.C
147
148\*---------------------------------------------------------------------------*/
149
150#ifndef functionObjects_streamLine_H
151#define functionObjects_streamLine_H
152
153#include "streamLineBase.H"
154
155// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156
157namespace Foam
158{
159
160class objectRegistry;
161class dictionary;
162
163namespace functionObjects
164{
165
166/*---------------------------------------------------------------------------*\
167 Class streamLine Declaration
168\*---------------------------------------------------------------------------*/
169
170class streamLine
171:
172 public streamLineBase
173{
174 // Private Data
175
176 //- Number of subcycling steps
177 label nSubCycle_;
178
179
180public:
181
182 //- Runtime type information
183 TypeName("streamLine");
184
185
186 // Constructors
187
188 //- Construct from Time and dictionary
190 (
191 const word& name,
192 const Time& runTime,
193 const dictionary& dict
194 );
195
196 //- No copy construct
197 streamLine(const streamLine&) = delete;
198
199 //- No copy assignment
200 void operator=(const streamLine&) = delete;
201
202
203 //- Destructor
204 virtual ~streamLine() = default;
205
206
207 // Member Functions
208
209 //- Read settings
210 virtual bool read(const dictionary&);
211
212 //- Do the actual tracking to fill the track data
213 virtual void track();
214};
215
216
217// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219} // End namespace functionObjects
220} // End namespace Foam
221
222// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223
224#endif
225
226// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Generates streamline data by sampling a set of user-specified fields along a particle track,...
Definition: streamLine.H:274
void operator=(const streamLine &)=delete
No copy assignment.
streamLine(const streamLine &)=delete
No copy construct.
TypeName("streamLine")
Runtime type information.
virtual ~streamLine()=default
Destructor.
streamLine(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: streamLine.C:141
virtual void track()
Do the actual tracking to fill the track data.
Definition: streamLine.C:48
virtual bool read(const dictionary &)
Read settings.
Definition: streamLine.C:155
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73