All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 | Copyright (C) 2013-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionObjects::Q
26 
27 Group
28  grpFieldFunctionObjects
29 
30 Description
31  This function object calculates and outputs the second invariant of the
32  velocity gradient tensor [1/s^2].
33 
34  \f[
35  Q = 0.5(sqr(tr(\nabla U)) - tr(((\nabla U) \cdot (\nabla U))))
36  \f]
37 
38 See also
39  Foam::functionObjects::fieldExpression
40  Foam::functionObjects::fvMeshFunctionObject
41 
42 SourceFiles
43  Q.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef functionObjects_Q_H
48 #define functionObjects_Q_H
49 
50 #include "fieldExpression.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace functionObjects
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class Q Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class Q
64 :
65  public fieldExpression
66 {
67  // Private Member Functions
68 
69  //- Calculate the Q field and return true if successful
70  virtual bool calc();
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("Q");
77 
78 
79  // Constructors
80 
81  //- Construct from Time and dictionary
82  Q
83  (
84  const word& name,
85  const Time& runTime,
86  const dictionary& dict
87  );
88 
89 
90  //- Destructor
91  virtual ~Q();
92 };
93 
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 } // End namespace functionObjects
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #endif
103 
104 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Q(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: Q.C:74
TypeName("Q")
Runtime type information.
const word & name() const
Return the name of this functionObject.
A class for handling words, derived from string.
Definition: word.H:59
This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s...
Definition: Q.H:62
virtual ~Q()
Destructor.
Definition: Q.C:88
Namespace for OpenFOAM.