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 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 "fluidThermo.H"
50 #include "surfaceFilmModel.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace fv
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class surfaceFilm Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class surfaceFilm
64 :
65  public fvModel
66 {
67  // Private Data
68 
69  //- Reference to the primary region thermo
70  const fluidThermo& primaryThermo_;
71 
72  //- The surfaceFilmModel pointer
74 
75  //- Current time index (used for updating)
76  mutable label curTimeIndex_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("surfaceFilm");
83 
84 
85  // Constructors
86 
87  //- Construct from explicit source name and mesh
89  (
90  const word& sourceName,
91  const word& modelType,
92  const dictionary& dict,
93  const fvMesh& mesh
94  );
95 
96  //- Disallow default bitwise copy construction
98  (
99  const surfaceFilm&
100  ) = delete;
101 
102 
103  // Member Functions
104 
105  // Checks
106 
107  //- Return the list of fields for which the option adds source term
108  // to the transport equation
109  virtual wordList addSupFields() const;
110 
111 
112  // Correct
113 
114  //- Solve the Lagrangian surfaceFilm and update the sources
115  virtual void correct();
116 
117 
118  // Add explicit and implicit contributions to compressible equation
119 
120  //- Add source to continuity equation
121  virtual void addSup
122  (
123  fvMatrix<scalar>& eqn,
124  const word& fieldName
125  ) const;
126 
127  //- Add source to pressure or enthalpy equation
128  virtual void addSup
129  (
130  const volScalarField& rho,
131  fvMatrix<scalar>& eqn,
132  const word& fieldName
133  ) const;
134 
135  //- Add source to momentum equation
136  virtual void addSup
137  (
138  const volScalarField& rho,
139  fvMatrix<vector>& eqn,
140  const word& fieldName
141  ) const;
142 
143 
144  // Member Operators
145 
146  //- Disallow default bitwise assignment
147  void operator=(const surfaceFilm&) = delete;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace fv
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
virtual void correct()
Solve the Lagrangian surfaceFilm and update the sources.
Definition: surfaceFilm.C:102
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
TypeName("surfaceFilm")
Runtime type information.
surfaceFilm fvModel
Definition: surfaceFilm.H:62
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:55
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Definition: surfaceFilm.C:78
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
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
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
surfaceFilm(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Definition: surfaceFilm.C:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual void addSup(fvMatrix< scalar > &eqn, const word &fieldName) const
Add source to continuity equation.
Definition: surfaceFilm.C:116
Namespace for OpenFOAM.