Loading...
Searching...
No Matches
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-2022 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 | - | postProcessing/sets/<FO>/<time>/file
42 output field | - | -
43 \endtable
44
45Usage
46 Minimal example by using \c system/controlDict.functions:
47 \verbatim
48 streamLineFO
49 {
50 // Mandatory entries
51 type streamLine;
52 libs (fieldFunctionObjects);
53
54 // Mandatory entries
55 fields (<field1> ... <fieldN>);
56 setFormat vtk;
57 lifeTime 10000;
58 seedSampleSet
59 {
60 type uniform;
61 axis x;
62 start (-0.0205 0.0001 0.00001);
63 end (-0.0205 0.0005 0.00001);
64 nPoints 100;
65 }
66
67 // Optional entries
68 U <word>;
69 direction forward;
70 cloud particleTracks;
71 bounds (0.2 -10 -10)(0.22 10 10);
72 trackLength 1e-3;
73 nSubCycle 1;
74 interpolationScheme cellPoint;
75
76 // Deprecated
77 // trackForward true;
78
79 // Inherited entries
80 ...
81 }
82 \endverbatim
83
84 where the entries mean:
85 \table
86 Property | Description | Type | Reqd | Deflt
87 type | Type name: streamLine | word | yes | -
88 libs | Library name: fieldFunctionObjects | word | yes | -
89 U | Name of tracking velocity field | word | no | U
90 fields | Names of operand fields to sample | wordList | yes | -
91 setFormat | Type of output data | word | yes | -
92 direction | Direction (enum) to track | word | no | forward
93 lifetime | Maximum number of particle tracking steps | label | yes | -
94 cloud | Cloud name to use for streamlines | word | no | typeName
95 seedSampleSet| Seeding description (see below) | dict | yes | -
96 bounds | Bounding box to trim tracks | vector pair | no | -
97 trackLength | Tracking segment length | scalar | no | VGREAT
98 nSubCycle | Number of tracking steps per cell | label | no | 1
99 interpolationScheme | Interp. scheme for sample | word | no | cellPoint
100 \endtable
101
102 Example types for the \c seedSampleSet sub-dict:
103 \verbatim
104 uniform | uniform particle seeding
105 cloud | cloud of points
106 triSurfaceMeshPointSet | points according to a tri-surface mesh
107 \endverbatim
108
109 Options for the \c setFormat entry:
110 \verbatim
111 csv
112 ensight
113 gnuplot
114 nastran
115 raw
116 vtk
117 xmgr
118 \endverbatim
119
120 Options for the \c direction entry:
121 \verbatim
122 forward
123 backward
124 bidirectional
125 \endverbatim
126
127 The inherited entries are elaborated in:
128 - \link streamLineBase.H \endlink
129
130Note
131 When specifying the track resolution, the \c trackLength or \c nSubCycle
132 option should be used.
133
134SourceFiles
135 streamLine.C
136
137\*---------------------------------------------------------------------------*/
138
139#ifndef Foam_functionObjects_streamLine_H
140#define Foam_functionObjects_streamLine_H
141
142#include "streamLineBase.H"
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146namespace Foam
147{
148
149// Forward Declarations
150class objectRegistry;
151class dictionary;
152
153namespace functionObjects
154{
155
156/*---------------------------------------------------------------------------*\
157 Class streamLine Declaration
158\*---------------------------------------------------------------------------*/
159
160class streamLine
161:
162 public functionObjects::streamLineBase
163{
164 // Private Data
165
166 //- Number of subcycling steps
167 label nSubCycle_;
168
169
170public:
171
172 //- Runtime type information
173 TypeName("streamLine");
174
175
176 // Constructors
177
178 //- Construct from name, Time and dictionary
180 (
181 const word& name,
182 const Time& runTime,
183 const dictionary& dict
184 );
185
186 //- No copy construct
187 streamLine(const streamLine&) = delete;
188
189 //- No copy assignment
190 void operator=(const streamLine&) = delete;
191
192
193 //- Destructor
194 virtual ~streamLine() = default;
195
196
197 // Member Functions
198
199 //- Read the function-object dictionary
200 virtual bool read(const dictionary& dict);
201
202 //- Do the actual tracking to fill the track data
203 virtual void track();
204};
205
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209} // End namespace functionObjects
210} // End namespace Foam
211
212// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213
214#endif
215
216// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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:258
void operator=(const streamLine &)=delete
No copy assignment.
streamLine(const streamLine &)=delete
No copy construct.
TypeName("streamLine")
Runtime type information.
virtual ~streamLine()=default
Destructor.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
Definition streamLine.C:135
streamLine(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Definition streamLine.C:121
virtual void track()
Do the actual tracking to fill the track data.
Definition streamLine.C:41
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68