Loading...
Searching...
No Matches
probes.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-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2025 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::probes
29
30Group
31 grpUtilitiesFunctionObjects
32
33Description
34 Function object to sample fields at specified internal-mesh locations and
35 write to file.
36
37Usage
38 Minimal example by using \c system/controlDict.functions:
39 \verbatim
40 probes
41 {
42 // Mandatory entries
43 type probes;
44 libs (sampling);
45
46 fields (<wordRes>);
47 probeLocations (<vectorList>);
48
49 // Optional entries
50 verbose <bool>;
51 sampleOnExecute <bool>;
52 fixedLocations <bool>;
53 includeOutOfBounds <bool>;
54 interpolationScheme <word>;
55
56 // Inherited entries
57 ...
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Reqd | Deflt
64 type | Type name: probes | word | yes | -
65 libs | Library name: sampling | word | yes | -
66 fields | Names of fields to probe | wordRes | yes | -
67 probeLocations | Locations of probes | vectorList | yes | -
68 verbose | Enable/disable verbose output | bool | no | false
69 sampleOnExecute | Sample on execution and store results | bool | no <!--
70 --> | false
71 fixedLocations | Do not recalculate cells if mesh moves | bool | no | true
72 includeOutOfBounds | Include out-of-bounds locations | bool | no | true
73 interpolationScheme | Scheme to obtain values at the points | word <!--
74 --> | no | cell
75 \endtable
76
77 The inherited entries are elaborated in:
78 - \link fvMeshFunctionObject.H \endlink
79 - \link Probes.H \endlink
80 - \link internalFieldProbe.H \endlink
81 - \link probeModel.H \endlink
82
83Note
84 - The \c includeOutOfBounds filters out points that haven't been found.
85 Default is to include them (with value \c -VGREAT).
86
87SourceFiles
88 probes.C
89
90\*---------------------------------------------------------------------------*/
91
92#ifndef Foam_probes_H
93#define Foam_probes_H
94
95#include "Probes.H"
96#include "internalFieldProbe.H"
97
98// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99
100namespace Foam
101{
102
103/*---------------------------------------------------------------------------*\
104 Class probes Declaration
105\*---------------------------------------------------------------------------*/
106
107class probes
108:
109 public Probes<internalFieldProbe>
110{
111 // Private Data
112
113 //- Use simpler synonym for the base type
114 using Base = Probes<internalFieldProbe>;
115
116
117public:
118
119 //- Runtime type information
120 TypeName("probes");
121
122
123 // Constructors
124
125 //- Construct from Time and dictionary
126 probes
127 (
128 const word& name,
129 const Time& runTime,
130 const dictionary& dict,
131 const bool loadFromFiles = false,
132 const bool readFields = true
133 );
134
135
136 //- Destructor
137 virtual ~probes() = default;
138
139
140 // Member Functions
141
142 //- Bring Base::probeModel into this class's public scope.
143 using Base::probeModel;
144
145 //- Read the settings from the dictionary
146 virtual bool read(const dictionary&);
147};
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151} // End namespace Foam
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155#endif
156
157// ************************************************************************* //
Base class for sampling fields at specified locations and writing to file. The locations are specifie...
Definition Probes.H:61
const internalFieldProbe & probeModel() const noexcept
Definition Probes.H:250
Probes(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
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.
Function object to sample fields at specified internal-mesh locations and write to file.
Definition probes.H:169
TypeName("probes")
Runtime type information.
virtual ~probes()=default
Destructor.
virtual bool read(const dictionary &)
Read the settings from the dictionary.
Definition probes.C:67
probes(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
Construct from Time and dictionary.
Definition probes.C:41
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
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