Loading...
Searching...
No Matches
enstrophy.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) 2016 OpenFOAM Foundation
9 Copyright (C) 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::enstrophy
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the enstrophy of an input \c volVectorField.
35
36 Enstrophy, i.e. \f$\xi\f$:
37
38 \f[
39 \xi = 0.5 mag(\nabla \times \vec U )^2
40 \f]
41
42 where \f$\vec U\f$ is the input \c volVectorField.
43
44 Operands:
45 \table
46 Operand | Type | Location
47 input | volVectorField | <time>/inputField
48 output file | - | -
49 output field | volScalarField | <time>/outputField
50 \endtable
51
52Usage
53 Minimal example by using \c system/controlDict.functions:
54 \verbatim
55 enstrophyFO
56 {
57 // Mandatory entries
58 type enstrophy;
59 libs (fieldFunctionObjects);
60
61 // Inherited entries
62 ...
63 }
64 \endverbatim
65
66 where the entries mean:
67 \table
68 Property | Description | Type | Reqd | Deflt
69 type | Type name: enstrophy | word | yes | -
70 libs | Library name: fieldFunctionObjects | word | yes | -
71 \endtable
72
73 The inherited entries are elaborated in:
74 - \link fieldExpression.H \endlink
75
76SourceFiles
77 enstrophy.C
78
79\*---------------------------------------------------------------------------*/
80
81#ifndef Foam_functionObjects_enstrophy_H
82#define Foam_functionObjects_enstrophy_H
83
84#include "fieldExpression.H"
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88namespace Foam
89{
90namespace functionObjects
91{
92
93/*---------------------------------------------------------------------------*\
94 Class enstrophy Declaration
95\*---------------------------------------------------------------------------*/
96
97class enstrophy
98:
99 public fieldExpression
100{
101 // Private Member Functions
102
103 //- Calculate the enstrophy field and return true if successful
104 virtual bool calc();
105
106
107public:
108
109 //- Runtime type information
110 TypeName("enstrophy");
111
112
113 // Constructors
114
115 //- Construct from name, Time and dictionary
117 (
118 const word& name,
119 const Time& runTime,
120 const dictionary& dict
121 );
122
123 //- No copy construct
124 enstrophy(const enstrophy&) = delete;
125
126 //- No copy assignment
127 void operator=(const enstrophy&) = delete;
128
129
130 //- Destructor
131 virtual ~enstrophy() = default;
132};
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace functionObjects
138} // End namespace Foam
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
144// ************************************************************************* //
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 enstrophy of an input volVectorField.
Definition enstrophy.H:129
enstrophy(const enstrophy &)=delete
No copy construct.
TypeName("enstrophy")
Runtime type information.
enstrophy(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Definition enstrophy.C:58
void operator=(const enstrophy &)=delete
No copy assignment.
virtual ~enstrophy()=default
Destructor.
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