ThermoSurfaceFilm.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2021-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::ThermoSurfaceFilm
29 
30 Group
31  grpLagrangianIntermediateSurfaceFilmSubModels
32 
33 Description
34  Thermo parcel surface film model.
35 
36 SourceFiles
37  ThermoSurfaceFilm.C
38  ThermoSurfaceFilmI.H
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef Foam_ThermoSurfaceFilm_H
43 #define Foam_ThermoSurfaceFilm_H
44 
45 #include "KinematicSurfaceFilm.H"
46 #include "UPtrList.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class ThermoSurfaceFilm Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class CloudType>
59 :
60  public KinematicSurfaceFilm<CloudType>
61 {
62 protected:
63 
64  // Data Types
65 
66  //- Convenience typedef to the cloud's parcel type
67  typedef typename CloudType::parcelType parcelType;
68 
69  typedef typename
71  areaFilm;
72 
73  typedef typename
75  regionFilm;
76 
77 
78  // Protected Data
79 
80  //- Reference to the cloud thermo package
81  const SLGThermo& thermo_;
82 
83 
84  // Cached injector fields per film patch
85 
86  //- Film temperature / patch face
88 
89  //- Film specific heat capacity / patch face
91 
92 
93  // Protected Member Functions
94 
95  // Injection from sheet (ejection) helper functions
96 
97  //- Cache the film fields in preparation for injection
98  virtual void cacheFilmFields
99  (
100  const label filmPatchi,
101  const label primaryPatchi,
102  const regionFilm&
103  );
104 
105  //- Cache the finite area film fields in preparation for injection
106  virtual void cacheFilmFields(const areaFilm&);
107 
108  //- Set the individual parcel properties
109  virtual void setParcelProperties
110  (
111  parcelType& p,
112  const label filmFacei
113  ) const;
114 
115 
116 public:
117 
118  //- Runtime type information
119  TypeName("thermoSurfaceFilm");
120 
121 
122  // Constructors
123 
124  //- Construct from components
126 
127  //- Construct copy
129 
130  //- Construct and return a clone using supplied owner cloud
132  {
134  (
136  );
137  }
138 
139 
140  //- Destructor
141  virtual ~ThermoSurfaceFilm() = default;
142 
143 
144  // Member Functions
145 
146  // Interaction models
147 
148  //- Absorb parcel into film
149  template<class filmType>
150  void absorbInteraction
151  (
152  filmType&,
153  const parcelType& p,
154  const polyPatch& pp,
155  const label facei,
156  const scalar mass,
157  bool& keepParticle
158  );
159 
160 
161  // Evaluation
162 
163  //- Transfer parcel from cloud to surface film
164  // Returns true if parcel is to be transferred
165  virtual bool transferParcel
166  (
167  parcelType& p,
168  const polyPatch& pp,
169  bool& keepParticle
170  );
171 
172 
173  // I-O
174 
175  //- Write surface film info
176  virtual void info();
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #ifdef NoRepository
187  #include "ThermoSurfaceFilm.C"
188 #endif
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
Thermo parcel surface film model.
virtual void info()
Write surface film info.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
virtual autoPtr< SurfaceFilmModel< CloudType > > clone() const
Construct and return a clone using supplied owner cloud.
void absorbInteraction(filmType &, const parcelType &p, const polyPatch &pp, const label facei, const scalar mass, bool &keepParticle)
Absorb parcel into film.
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
virtual ~ThermoSurfaceFilm()=default
Destructor.
scalarField CpFilmPatch_
Film specific heat capacity / patch face.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
const CloudType & owner() const
Return const access to the owner cloud.
CloudType::parcelType parcelType
Convenience typedef to the cloud&#39;s parcel type.
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionFilm &)
Cache the film fields in preparation for injection.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
Definition: SLGThermo.H:60
const SLGThermo & thermo_
Reference to the cloud thermo package.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:290
Kinematic parcel surface film model.
regionModels::surfaceFilmModels::surfaceFilmRegionModel regionFilm
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
TypeName("thermoSurfaceFilm")
Runtime type information.
scalarField TFilmPatch_
Film temperature / patch face.
volScalarField & p
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:69
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67
regionModels::areaSurfaceFilmModels::liquidFilmBase areaFilm
CloudType::parcelType parcelType
Convenience typedef to the cloud&#39;s parcel type.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.