filmFlux.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) 2019 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::functionObjects::filmFlux
28
29Group
30 grpFieldFunctionObjects
31
32Description
33 Calculates the mass flux for surface film models.
34
35 Operands:
36 \table
37 Operand | Type | Location
38 input | dictionary | constant/<surfaceFilmProperties>
39 output file | - | -
40 output field | surfaceScalarField <!--
41 --> | <time>/<filmRegion>/<outField>
42 \endtable
43
44Usage
45 Minimal example by using \c system/controlDict.functions:
46 \verbatim
47 filmFlux1
48 {
49 // Mandatory entries (unmodifiable)
50 type filmFlux;
51
52 // Optional entries (runtime modifiable)
53 film <surfaceFilmPropertiesDictionary>;
54 result <resultName>;
55
56 // Optional (inherited) entries
57 ...
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Reqd | Dflt
64 type | Type name: filmFlux | word | yes | -
65 film | Name of surface film properties dictionary <!--
66 --> | dict | no | surfaceFilmProperties
67 result | Name of result field | word | no | filmFlux
68 \endtable
69
70 The inherited entries are elaborated in:
71 - \link stateFunctionObject.H \endlink
72
73 Usage by the \c postProcess utility is not available.
74
75See also
76 - Foam::functionObjects::stateFunctionObject
77
78SourceFiles
79 flux.C
80
81\*---------------------------------------------------------------------------*/
82
83#ifndef functionObjects_filmFlux_H
84#define functionObjects_filmFlux_H
85
86#include "stateFunctionObject.H"
88
89// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90
91namespace Foam
92{
93namespace functionObjects
94{
95
96/*---------------------------------------------------------------------------*\
97 Class filmFlux Declaration
98\*---------------------------------------------------------------------------*/
99
100class filmFlux
101:
102 public stateFunctionObject
103{
104 // Private Data
105
106 typedef regionModels::surfaceFilmModels::kinematicSingleLayer filmType;
107
108 //- Film model name
109 word filmName_;
110
111 //- Name of derived flux field
112 word resultName_;
113
114
115 // Private Member Functions
116
117 //- Helper function to set the pointer to the film model
118 const filmType& filmModel();
119
120
121public:
122
123 //- Runtime type information
124 TypeName("filmFlux");
125
126
127 // Constructors
128
129 //- Construct from Time and dictionary
131 (
132 const word& name,
133 const Time& runTime,
134 const dictionary& dict
135 );
136
137 //- No copy construct
138 filmFlux(const filmFlux&) = delete;
139
140 //- No copy assignment
141 void operator=(const filmFlux&) = delete;
142
144 //- Destructor
145 virtual ~filmFlux() = default;
146
147
148 // Member Functions
149
150 //- Read the field data
151 virtual bool read(const dictionary&);
152
153 //- Execute
154 virtual bool execute();
155
156 //- Write the field
157 virtual bool write();
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace functionObjects
164} // End namespace Foam
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168#endif
169
170// ************************************************************************* //
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.
Calculates the mass flux for surface film models.
Definition: filmFlux.H:146
filmFlux(const filmFlux &)=delete
No copy construct.
void operator=(const filmFlux &)=delete
No copy assignment.
filmFlux(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: filmFlux.C:56
TypeName("filmFlux")
Runtime type information.
virtual ~filmFlux()=default
Destructor.
virtual bool execute()
Execute.
Definition: filmFlux.C:86
virtual bool write()
Write the field.
Definition: filmFlux.C:146
virtual bool read(const dictionary &)
Read the field data.
Definition: filmFlux.C:72
Base class for function objects, adding functionality to read/write state information (data required ...
Kinematic form of single-cell layer surface film model.
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