ddt.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) 2017 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::ddt
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the Eulerian time derivative of an input volume field for
35 time-variant simulations (not appropriate to steady-state simulations).
36
37 Operands:
38 \table
39 Operand | Type | Location
40 input | vol<Type>Field | $FOAM_CASE/<time>/<inpField>
41 output file | - | -
42 output field | vol<Type>Field | $FOAM_CASE/<time>/<outField>
43 \endtable
44
45 where \c <Type>=Scalar/Vector/SphericalTensor/SymmTensor/Tensor.
46
47Usage
48 Minimal example by using \c system/controlDict.functions:
49 \verbatim
50 ddt1
51 {
52 // Mandatory entries (unmodifiable)
53 type ddt;
54 libs (fieldFunctionObjects);
55
56 // Mandatory (inherited) entries (runtime modifiable)
57 field <field>;
58
59 // Optional (inherited) entries
60 ...
61 }
62 \endverbatim
63
64 where the entries mean:
65 \table
66 Property | Description | Type | Req'd | Dflt
67 type | Type name: ddt | word | yes | -
68 libs | Library name: fieldFunctionObjects | word | yes | -
69 field | Name of operand field | word | yes | -
70 \endtable
71
72 The inherited entries are elaborated in:
73 - \link functionObject.H \endlink
74 - \link fieldExpression.H \endlink
75
76 Minimal example by using the \c postProcess utility:
77 \verbatim
78 postProcess -func "ddt(<field>)"
79 \endverbatim
80
81See also
82 - Foam::functionObject
83 - Foam::functionObjects::fvMeshFunctionObject
84 - Foam::functionObjects::fieldExpression
85 - ExtendedCodeGuide::functionObjects::field::ddt
86
87SourceFiles
88 ddt.C
89 ddtTemplates.C
90
91\*---------------------------------------------------------------------------*/
92
93#ifndef functionObjects_ddt_H
94#define functionObjects_ddt_H
95
96#include "fieldExpression.H"
97
98// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99
100namespace Foam
101{
102namespace functionObjects
103{
104
105/*---------------------------------------------------------------------------*\
106 Class ddt Declaration
107\*---------------------------------------------------------------------------*/
108
109class ddt
110:
111 public fieldExpression
112{
113
114 // Private Member Functions
115
116 //- Calculate and store the result
117 // \return true if fieldName_ was known and had the correct type
118 template<class Type>
119 bool calcDdt();
120
121 //- Calculate time derivative of the field
122 // \return true on success
123 virtual bool calc();
124
125
126public:
127
128 //- Runtime type information
129 TypeName("ddt");
130
131
132 // Constructors
133
134 //- Construct from Time and dictionary
135 ddt
136 (
137 const word& name,
138 const Time& runTime,
139 const dictionary& dict
140 );
141
142 //- No copy construct
143 ddt(const ddt&) = delete;
144
145 //- No copy assignment
146 void operator=(const ddt&) = delete;
147
149 //- Destructor
150 virtual ~ddt() = default;
151};
152
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156} // End namespace functionObjects
157} // End namespace Foam
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161#ifdef NoRepository
162 #include "ddtTemplates.C"
163#endif
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
169// ************************************************************************* //
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 Eulerian time derivative of an input volume field for time-variant simulations (not appr...
Definition: ddt.H:151
void operator=(const ddt &)=delete
No copy assignment.
ddt(const ddt &)=delete
No copy construct.
TypeName("ddt")
Runtime type information.
ddt(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: ddt.C:71
virtual ~ddt()=default
Destructor.
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
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:47
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73