phaseMap.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020 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::phaseMap
26 
27 Description
28  This functionObject writes the phase-fraction map field alpha.map with
29  incremental value ranges for each phase
30  e.g., with values 0 for water, 1 for air, 2 for oil etc.
31 
32  Example of function object specification:
33  \verbatim
34  phaseMap
35  {
36  type phaseMap;
37  libs ("libmultiphaseEulerFoamFunctionObjects.so");
38  writeControl writeTime;
39  }
40  \endverbatim
41 
42 Usage
43  \table
44  Property | Description | Required | Default value
45  type | type name: phaseMap | yes |
46  \endtable
47 
48 See also
49  Foam::functionObjects::fvMeshFunctionObject
50  Foam::functionObject
51 
52 SourceFiles
53  phaseMap.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef functionObjects_phaseMap_H
58 #define functionObjects_phaseMap_H
59 
60 #include "fvMeshFunctionObject.H"
61 #include "phaseSystem.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace functionObjects
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class phaseMap Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class phaseMap
75 :
76  public fvMeshFunctionObject
77 {
78 protected:
79 
80  // Protected data
81 
82  //- Constant access to phases
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("phaseMap");
90 
91 
92  // Constructors
93 
94  //- Construct from Time and dictionary
95  phaseMap
96  (
97  const word& name,
98  const Time& runTime,
99  const dictionary&
100  );
101 
102  //- Disallow default bitwise copy construction
103  phaseMap(const phaseMap&) = delete;
104 
105 
106  //- Destructor
107  virtual ~phaseMap();
108 
109 
110  // Member Functions
111 
112  //- Calculate the force fields
113  virtual bool execute();
114 
115  //- Write the force fields
116  virtual bool write();
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const phaseMap&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace functionObjects
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
This functionObject writes the phase-fraction map field alpha.map with incremental value ranges for e...
Definition: phaseMap.H:83
engineTime & runTime
virtual ~phaseMap()
Destructor.
phaseMap(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
A class for handling words, derived from string.
Definition: word.H:59
TypeName("phaseMap")
Runtime type information.
virtual bool write()
Write the force fields.
const phaseSystem::phaseModelList & phases_
Constant access to phases.
Definition: phaseMap.H:92
virtual bool execute()
Calculate the force fields.
void operator=(const phaseMap &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.