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