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 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 ThermoSurfaceFilm_H
43 #define 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  // Protected Data
65 
66  //- Convenience typedef to the cloud's parcel type
67  typedef typename CloudType::parcelType parcelType;
68 
69  typedef typename
71 
72  typedef typename
74 
75  //- Reference to the cloud thermo package
76  const SLGThermo& thermo_;
77 
78 
79  // Cached injector fields per film patch
80 
81  //- Film temperature / patch face
83 
84  //- Film specific heat capacity / patch face
86 
87 
88  // Protected Member Functions
89 
90  // Injection from sheet (ejection) helper functions
91 
92  virtual void cacheFilmFields
93  (
94  const label primaryPatchi,
95  const areaFilm&
96  );
97 
98  //- Cache the film fields in preparation for injection
99  virtual void cacheFilmFields
100  (
101  const label filmPatchi,
102  const label primaryPatchi,
103  const regionFilm&
104  );
105 
106  //- Set the individual parcel properties
107  virtual void setParcelProperties
108  (
109  parcelType& p,
110  const label filmFacei
111  ) const;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("thermoSurfaceFilm");
118 
119 
120  // Constructors
121 
122  //- Construct from components
123  ThermoSurfaceFilm(const dictionary& dict, CloudType& owner);
124 
125  //- Construct copy
127 
128  //- Construct and return a clone using supplied owner cloud
130  {
132  (
134  );
135  }
136 
137 
138  //- Destructor
139  virtual ~ThermoSurfaceFilm() = default;
140 
141 
142  // Member Functions
143 
144  // Evaluation
145 
146  //- Transfer parcel from cloud to surface film
147  // Returns true if parcel is to be transferred
148  virtual bool transferParcel
149  (
150  parcelType& p,
151  const polyPatch& pp,
152  bool& keepParticle
153  );
154 
155 
156  // I-O
157 
158  //- Write surface film info to stream
159  virtual void info(Ostream& os);
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #ifdef NoRepository
170  #include "ThermoSurfaceFilm.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
Foam::ThermoSurfaceFilm::cacheFilmFields
virtual void cacheFilmFields(const label primaryPatchi, const areaFilm &)
Cache the film fields in preparation for injection.
Definition: ThermoSurfaceFilm.C:229
Foam::regionModels::areaSurfaceFilmModels::liquidFilmBase
Definition: liquidFilmBase.H:60
UPtrList.H
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::SLGThermo
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: SLGThermo.H:64
Foam::ThermoSurfaceFilm::ThermoSurfaceFilm
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
Definition: ThermoSurfaceFilm.C:35
Foam::ThermoSurfaceFilm::TFilmPatch_
scalarField TFilmPatch_
Film temperature / patch face.
Definition: ThermoSurfaceFilm.H:81
KinematicSurfaceFilm.H
Foam::ThermoSurfaceFilm::TypeName
TypeName("thermoSurfaceFilm")
Runtime type information.
Foam::ThermoSurfaceFilm::parcelType
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Definition: ThermoSurfaceFilm.H:66
Foam::ThermoSurfaceFilm
Thermo parcel surface film model.
Definition: ThermoSurfaceFilm.H:57
Foam::ThermoSurfaceFilm::CpFilmPatch_
scalarField CpFilmPatch_
Film specific heat capacity / patch face.
Definition: ThermoSurfaceFilm.H:84
Foam::Field< scalar >
Foam::regionModels::surfaceFilmModels::surfaceFilmRegionModel
Base class for surface film models.
Definition: surfaceFilmRegionModel.H:55
ThermoSurfaceFilm.C
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::ThermoSurfaceFilm::regionFilm
regionModels::surfaceFilmModels::surfaceFilmRegionModel regionFilm
Definition: ThermoSurfaceFilm.H:72
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::KinematicSurfaceFilm::parcelType
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Definition: KinematicSurfaceFilm.H:112
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam::ThermoSurfaceFilm::~ThermoSurfaceFilm
virtual ~ThermoSurfaceFilm()=default
Destructor.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ThermoSurfaceFilm::clone
virtual autoPtr< SurfaceFilmModel< CloudType > > clone() const
Construct and return a clone using supplied owner cloud.
Definition: ThermoSurfaceFilm.H:128
Foam::KinematicSurfaceFilm
Kinematic parcel surface film model.
Definition: KinematicSurfaceFilm.H:78
Foam::ThermoSurfaceFilm::info
virtual void info(Ostream &os)
Write surface film info to stream.
Definition: ThermoSurfaceFilm.C:264
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::ThermoSurfaceFilm::thermo_
const SLGThermo & thermo_
Reference to the cloud thermo package.
Definition: ThermoSurfaceFilm.H:75
Foam::ThermoSurfaceFilm::setParcelProperties
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
Definition: ThermoSurfaceFilm.C:250
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::ThermoSurfaceFilm::transferParcel
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
Definition: ThermoSurfaceFilm.C:67
Foam::ThermoSurfaceFilm::areaFilm
regionModels::areaSurfaceFilmModels::liquidFilmBase areaFilm
Definition: ThermoSurfaceFilm.H:69