Q.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) 2013-2016 OpenFOAM Foundation
9 Copyright (C) 2016-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::Q
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the second invariant of
35 the velocity gradient tensor \f$[s^{-2}]\f$.
36
37 \f[
38 \vec Q = \frac{1}{2}
39 [ (tr (\nabla \vec U) )^2
40 - tr (\nabla \vec U \cdot \nabla \vec U) ]
41 \f]
42
43 where
44 \vartable
45 \vec U | velocity [m/s]
46 \endvartable
47
48 Operands:
49 \table
50 Operand | Type | Location
51 input | volVectorField | $FOAM_CASE/<time>/<inpField>
52 output file | - | -
53 output field | volScalarField | $FOAM_CASE/<time>/<outField>
54 \endtable
55
56Usage
57 Minimal example by using \c system/controlDict.functions:
58 \verbatim
59 Q1
60 {
61 // Mandatory entries (unmodifiable)
62 type Q;
63 libs (fieldFunctionObjects);
64
65 // Optional (inherited) entries
66 ...
67 }
68 \endverbatim
69
70 where the entries mean:
71 \table
72 Property | Description | Type | Req'd | Dflt
73 type | Type name: Q | word | yes | -
74 libs | Library name: fieldFunctionObjects | word | yes | -
75 \endtable
76
77 The inherited entries are elaborated in:
78 - \link functionObject.H \endlink
79 - \link fieldExpression.H \endlink
80
81 Minimal example by using the \c postProcess utility:
82 \verbatim
83 postProcess -func Q
84 \endverbatim
85
86See also
87 - Foam::functionObject
88 - Foam::functionObjects::fieldExpression
89 - Foam::functionObjects::fvMeshFunctionObject
90 - ExtendedCodeGuide::functionObjects::field::Q
91
92SourceFiles
93 Q.C
94
95\*---------------------------------------------------------------------------*/
96
97#ifndef functionObjects_Q_H
98#define functionObjects_Q_H
99
100#include "fieldExpression.H"
101
102// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103
104namespace Foam
105{
106namespace functionObjects
107{
108
109/*---------------------------------------------------------------------------*\
110 Class Q Declaration
111\*---------------------------------------------------------------------------*/
112
113class Q
114:
115 public fieldExpression
116{
117 // Private Member Functions
118
119 //- Calculate the Q field and return true if successful
120 virtual bool calc();
121
122
123public:
124
125 //- Runtime type information
126 TypeName("Q");
127
128
129 // Constructors
130
131 //- Construct from Time and dictionary
132 Q
133 (
134 const word& name,
135 const Time& runTime,
136 const dictionary& dict
137 );
138
139 //- No copy construct
140 Q(const Q&) = delete;
141
142 //- No copy assignment
143 void operator=(const Q&) = delete;
144
145
146 //- Destructor
147 virtual ~Q() = default;
148};
149
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153} // End namespace functionObjects
154} // End namespace Foam
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158#endif
159
160// ************************************************************************* //
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.
Computes the second invariant of the velocity gradient tensor .
Definition: Q.H:153
Q(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: Q.C:69
TypeName("Q")
Runtime type information.
Q(const Q &)=delete
No copy construct.
virtual ~Q()=default
Destructor.
void operator=(const Q &)=delete
No copy assignment.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
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