filmSubModelBase.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) 2011-2018 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::regionModels::surfaceFilmModels::filmSubModelBase
26 
27 Description
28  Base class for surface film sub-models
29 
30 SourceFiles
31  filmSubModelBaseI.H
32  filmSubModelBase.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef filmSubModelBase_H
37 #define filmSubModelBase_H
38 
39 #include "surfaceFilmRegionModel.H"
40 #include "subModelBase.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace regionModels
47 {
48 namespace surfaceFilmModels
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class filmSubModelBase Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class filmSubModelBase
56 :
57  public subModelBase
58 {
59 protected:
60 
61  // Protected data
62 
63  //- Reference to the film surface film model
65 
66 
67 public:
68 
69  // Constructors
70 
71  //- Construct null
73 
74  //- Construct from film film without name
76  (
78  const dictionary& dict,
79  const word& baseName,
80  const word& modelType,
81  const word& dictExt = "Coeffs"
82  );
83 
84  //- Construct from film film with name
86  (
87  const word& modelName,
89  const dictionary& dict,
90  const word& baseName,
91  const word& modelType
92  );
93 
94 
95  //- Destructor
96  virtual ~filmSubModelBase();
97 
98 
99  // Member Functions
100 
101  // Access
102 
103  //- Flag to indicate when to write a property
104  virtual bool writeTime() const;
105 
106  //- Return const access to the film surface film model
107  inline const surfaceFilmRegionModel& film() const;
108 
109  //- Return the reference to the film surface film model
110  inline surfaceFilmRegionModel& film();
111 
112  template<class FilmType>
113  inline const FilmType& filmType() const;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace surfaceFilmModels
120 } // End namespace regionModels
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #include "filmSubModelBaseI.H"
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #ifdef NoRepository
130  #include "filmSubModelBaseTemplates.C"
131 #endif
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
filmSubModelBase(surfaceFilmRegionModel &film)
Construct null.
Base class for surface film sub-models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
virtual bool writeTime() const
Flag to indicate when to write a property.
A class for handling words, derived from string.
Definition: word.H:59
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:122
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read ...
Definition: subModelBase.H:51
const word & baseName() const
Return const access to the base name of the sub-model.
Definition: subModelBase.C:116
surfaceFilmRegionModel & filmModel_
Reference to the film surface film model.
Namespace for OpenFOAM.