Loading...
Searching...
No Matches
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 the velocity gradient tensor
35 \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 | <time>/inputField
52 output file | - | -
53 output field | volScalarField | <time>/outputField
54 \endtable
55
56Usage
57 Minimal example by using \c system/controlDict.functions:
58 \verbatim
59 QFO
60 {
61 // Mandatory entries
62 type Q;
63 libs (fieldFunctionObjects);
64
65 // Inherited entries
66 ...
67 }
68 \endverbatim
69
70 where the entries mean:
71 \table
72 Property | Description | Type | Reqd | Deflt
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 fieldExpression.H \endlink
79
80SourceFiles
81 Q.C
82
83\*---------------------------------------------------------------------------*/
84
85#ifndef Foam_functionObjects_Q_H
86#define Foam_functionObjects_Q_H
87
88#include "fieldExpression.H"
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92namespace Foam
93{
94namespace functionObjects
95{
96
97/*---------------------------------------------------------------------------*\
98 Class Q Declaration
99\*---------------------------------------------------------------------------*/
100
101class Q
102:
103 public fieldExpression
104{
105 // Private Member Functions
106
107 //- Calculate the Q field and return true if successful
108 virtual bool calc();
109
110
111public:
112
113 //- Runtime type information
114 TypeName("Q");
115
116
117 // Constructors
118
119 //- Construct from name, Time and dictionary
120 Q
121 (
122 const word& name,
123 const Time& runTime,
124 const dictionary& dict
125 );
126
127 //- No copy construct
128 Q(const Q&) = delete;
129
130 //- No copy assignment
131 void operator=(const Q&) = delete;
132
133
134 //- Destructor
135 virtual ~Q() = default;
136};
137
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141} // End namespace functionObjects
142} // End namespace Foam
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146#endif
147
148// ************************************************************************* //
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.
Computes the second invariant of the velocity gradient tensor .
Definition Q.H:137
Q(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Definition Q.C:62
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....
fieldExpression(const word &name, const Time &runTime, const dictionary &dict, const word &fieldName=word::null, const word &resultName=word::null)
Construct from name, Time and dictionary.
virtual bool calc()=0
Calculate the components of the field and return true if successful.
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