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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::functionObjects::filmFlux
28 
29 Group
30  grpFieldFunctionObjects
31 
32 Description
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 
44 Usage
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 
75 See also
76  - Foam::functionObjects::stateFunctionObject
77 
78 SourceFiles
79  flux.C
80 
81 \*---------------------------------------------------------------------------*/
82 
83 #ifndef functionObjects_filmFlux_H
84 #define functionObjects_filmFlux_H
85 
86 #include "stateFunctionObject.H"
87 #include "kinematicSingleLayer.H"
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 namespace functionObjects
94 {
95 
96 /*---------------------------------------------------------------------------*\
97  Class filmFlux Declaration
98 \*---------------------------------------------------------------------------*/
99 
100 class 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 
121 public:
122 
123  //- Runtime type information
124  TypeName("filmFlux");
125 
126 
127  // Constructors
128 
129  //- Construct from Time and dictionary
130  filmFlux
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 
143 
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::functionObjects::stateFunctionObject
Base class for function objects, adding functionality to read/write state information (data required ...
Definition: stateFunctionObject.H:69
Foam::functionObjects::filmFlux::~filmFlux
virtual ~filmFlux()=default
Destructor.
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer
Kinematic form of single-cell layer surface film model.
Definition: kinematicSingleLayer.H:67
Foam::functionObjects::filmFlux::TypeName
TypeName("filmFlux")
Runtime type information.
Foam::functionObjects::filmFlux::filmFlux
filmFlux(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: filmFlux.C:56
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
kinematicSingleLayer.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObjects::filmFlux::operator=
void operator=(const filmFlux &)=delete
No copy assignment.
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::filmFlux::read
virtual bool read(const dictionary &)
Read the field data.
Definition: filmFlux.C:72
Foam::functionObjects::filmFlux::write
virtual bool write()
Write the field.
Definition: filmFlux.C:146
Foam::functionObjects::filmFlux
Calculates the mass flux for surface film models.
Definition: filmFlux.H:143
stateFunctionObject.H
Foam::functionObjects::filmFlux::execute
virtual bool execute()
Execute.
Definition: filmFlux.C:86