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 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 "fluidThermo.H"
50 #include "surfaceFilmModel.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace fv
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class VoFSurfaceFilm Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class VoFSurfaceFilm
64 :
65  public fvModel
66 {
67  // Private Data
68 
69  //- The name of the phase which transfers to the film
70  word phaseName_;
71 
72  //- Reference to the primary region thermo
73  const fluidThermo& thermo_;
74 
75  //- The surface film model pointer
77 
78  //- Current time index (used for updating)
79  mutable label curTimeIndex_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("VoFSurfaceFilm");
86 
87 
88  // Constructors
89 
90  //- Construct from explicit source name and mesh
92  (
93  const word& sourceName,
94  const word& modelType,
95  const dictionary& dict,
96  const fvMesh& mesh
97  );
98 
99  //- Disallow default bitwise copy construction
101  (
102  const VoFSurfaceFilm&
103  ) = delete;
104 
105 
106  // Member Functions
107 
108  // Checks
109 
110  //- Return the list of fields for which the option adds source term
111  // to the transport equation
112  virtual wordList addSupFields() const;
113 
114 
115  // Correct
116 
117  //- Solve the film and update the sources
118  virtual void correct();
119 
120 
121  // Add explicit and implicit contributions to compressible equation
122 
123  //- Add explicit contribution to compressible enthalpy equation
124  virtual void addSup
125  (
126  const volScalarField& rho,
127  fvMatrix<scalar>& eqn,
128  const word& fieldName
129  ) const;
130 
131  //- Add implicit contribution to compressible momentum equation
132  virtual void addSup
133  (
134  const volScalarField& rho,
135  fvMatrix<vector>& eqn,
136  const word& fieldName
137  ) const;
138 
139 
140  // Member Operators
141 
142  //- Disallow default bitwise assignment
143  void operator=(const VoFSurfaceFilm&) = delete;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace fv
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
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:55
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.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:53
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:78
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Namespace for OpenFOAM.
Surface film model for VoF simulations.