VoFSurfaceFilm.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) 2021-2022 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::fv::VoFSurfaceFilm
26 
27 Description
28  Surface film model for VoF simulations.
29 
30 Usage
31  Example usage:
32  \verbatim
33  VoFSurfaceFilm
34  {
35  type VoFSurfaceFilm;
36  phase water;
37  }
38  \endverbatim
39 
40 SourceFiles
41  VoFSurfaceFilm.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef VoFSurfaceFilm_H
46 #define VoFSurfaceFilm_H
47 
48 #include "fvModel.H"
49 #include "thermoSingleLayer.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fv
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class VoFSurfaceFilm Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class VoFSurfaceFilm
63 :
64  public fvModel
65 {
66  // Private Data
67 
68  //- The surface film model
70 
71  //- Current time index (used for updating)
72  mutable label curTimeIndex_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("VoFSurfaceFilm");
79 
80 
81  // Constructors
82 
83  //- Construct from explicit source name and mesh
85  (
86  const word& sourceName,
87  const word& modelType,
88  const dictionary& dict,
89  const fvMesh& mesh
90  );
91 
92  //- Disallow default bitwise copy construction
94  (
95  const VoFSurfaceFilm&
96  ) = delete;
97 
98 
99  // Member Functions
100 
101  // Checks
102 
103  //- Return the list of fields for which the option adds source term
104  // to the transport equation
105  virtual wordList addSupFields() const;
106 
107  //- Return the maximum time-step for stable operation
108  virtual scalar maxDeltaT() const;
109 
110 
111  // Correct
112 
113  //- Solve the film and update the sources
114  virtual void correct();
115 
116 
117  // Add explicit and implicit contributions to compressible equation
118 
119  //- Add explicit contribution to compressible enthalpy equation
120  virtual void addSup
121  (
122  const volScalarField& rho,
123  fvMatrix<scalar>& eqn,
124  const word& fieldName
125  ) const;
126 
127  //- Add implicit contribution to compressible momentum equation
128  virtual void addSup
129  (
130  const volScalarField& rho,
131  fvMatrix<vector>& eqn,
132  const word& fieldName
133  ) const;
134 
135 
136  // Mesh changes
137 
138  //- Update topology using the given map
139  virtual void topoChange(const polyTopoChangeMap&);
140 
141  //- Update from another mesh using the given map
142  virtual void mapMesh(const polyMeshMap&);
143 
144  //- Redistribute or update using the given distribution map
145  virtual void distribute(const polyDistributionMap&);
146 
147  //- Update for mesh motion
148  virtual bool movePoints();
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const VoFSurfaceFilm&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace fv
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
dictionary dict
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
void operator=(const VoFSurfaceFilm &)=delete
Disallow default bitwise assignment.
Finite volume model abstract base class.
Definition: fvModel.H:57
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
virtual void correct()
Solve the film and update the sources.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const word &fieldName) const
Add explicit contribution to compressible enthalpy equation.
virtual bool movePoints()
Update for mesh motion.
virtual scalar maxDeltaT() const
Return the maximum time-step for stable operation.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
TypeName("VoFSurfaceFilm")
Runtime type information.
VoFSurfaceFilm(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:50
Thermodynamic form of single-cell layer surface film model.
Namespace for OpenFOAM.
Surface film model for VoF simulations.