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-2025 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 ("libmultiphaseEulerFunctionObjects.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 phaseMap_functionObject_H
58 #define phaseMap_functionObject_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 public:
79 
80  //- Runtime type information
81  TypeName("phaseMap");
82 
83 
84  // Constructors
85 
86  //- Construct from Time and dictionary
87  phaseMap
88  (
89  const word& name,
90  const Time& runTime,
91  const dictionary&
92  );
93 
94  //- Disallow default bitwise copy construction
95  phaseMap(const phaseMap&) = delete;
96 
97 
98  //- Destructor
99  virtual ~phaseMap();
100 
101 
102  // Member Functions
103 
104  //- Return the list of fields required
105  virtual wordList fields() const
106  {
107  return wordList::null();
108  }
109 
110  //- Calculate the force fields
111  virtual bool execute();
112 
113  //- Write the force fields
114  virtual bool write();
115 
116 
117  // Member Operators
118 
119  //- Disallow default bitwise assignment
120  void operator=(const phaseMap&) = delete;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace functionObjects
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
static const List< word > & null()
Return a null List.
Definition: ListI.H:118
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
const word & name() const
Return the name of this functionObject.
This functionObject writes the phase-fraction map field alpha.map with incremental value ranges for e...
Definition: phaseMap.H:86
void operator=(const phaseMap &)=delete
Disallow default bitwise assignment.
phaseMap(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
Definition: phaseMap.C:44
virtual wordList fields() const
Return the list of fields required.
Definition: phaseMap.H:114
TypeName("phaseMap")
Runtime type information.
virtual ~phaseMap()
Destructor.
Definition: phaseMap.C:56
virtual bool execute()
Calculate the force fields.
Definition: phaseMap.C:62
virtual bool write()
Write the force fields.
Definition: phaseMap.C:68
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.