ThermoSurfaceFilm.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-2019 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::ThermoSurfaceFilm
26 
27 Description
28  Thermo parcel surface film model.
29 
30  Responsible for:
31  - injecting parcels from the film model into the cloud, e.g. for dripping
32  - parcel interaction with the film, e.g absorb, bounce, splash
33 
34  Splash model references:
35 
36  Bai and Gosman, `Mathematical modelling of wall films formed by
37  impinging sprays', SAE 960626, 1996
38 
39  Bai et al, `Modelling of gasoline spray impingement', Atom. Sprays,
40  vol 12, pp 1-27, 2002
41 
42 
43 SourceFiles
44  ThermoSurfaceFilm.C
45  ThermoSurfaceFilmI.H
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef ThermoSurfaceFilm_H
50 #define ThermoSurfaceFilm_H
51 
52 #include "SurfaceFilmModel.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class ThermoSurfaceFilm Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 template<class CloudType>
65 :
66  public SurfaceFilmModel<CloudType>
67 {
68 public:
69 
70  // Public data
71 
72  // Interaction type enumerations
73  enum interactionType
74  {
78  };
79 
80  //- Word descriptions of interaction type names
82 
83 
84  // Public Member Functions
85 
86  // Return interaction type enum from word
87  interactionType interactionTypeEnum(const word& it) const;
88 
89  // Return word from interaction type enum
90  word interactionTypeStr(const interactionType& it) const;
91 
92 
93 protected:
94 
95  // Protected data
96 
97  //- Convenience typedef to the cloud's parcel type
98  typedef typename CloudType::parcelType parcelType;
99 
100  //- Reference to the cloud random number generator
101  Random& rndGen_;
102 
103  //- Reference to the cloud thermo package
104  const SLGThermo& thermo_;
105 
106 
107  // Cached injector fields per film patch
108 
109  //- Film temperature / patch face
111 
112  //- Film specific heat capacity / patch face
114 
115 
116  // Interaction model data
117 
118  //- Interaction type enumeration
120 
121  //- Film thickness beyond which patch is assumed to be wet
122  scalar deltaWet_;
123 
124  //- Splash parcel type label - id assigned to identify parcel for
125  // post-processing. If not specified, defaults to originating cloud
126  // type
128 
129  //- Number of new parcels resulting from splash event
131 
132 
133  // Surface roughness coefficient typically in the range 1300 - 5200
134  // and decreases with increasing surface roughness
135 
136  //- Dry surface roughness coefficient
137  // = 2630 for dry interaction (ref. Bai)
138  scalar Adry_;
139 
140  //- Wet surface roughness coefficient
141  // = 1320 for wet interaction (ref. Bai)
142  scalar Awet_;
143 
144 
145  //- Skin friction typically in the range 0.6 < Cf < 0.8
146  scalar Cf_;
147 
148  //- Counter for number of new splash parcels
150 
151 
152  // Protected Member Functions
153 
154  //- Return splashed parcel direction
156  (
157  const vector& tanVec1,
158  const vector& tanVec2,
159  const vector& nf
160  ) const;
161 
162 
163  // Interaction models
164 
165  //- Absorb parcel into film
166  void absorbInteraction
167  (
169  const parcelType& p,
170  const polyPatch& pp,
171  const label facei,
172  const scalar mass,
173  bool& keepParticle
174  );
175 
176  //- Bounce parcel (flip parcel normal velocity)
177  void bounceInteraction
178  (
179  parcelType& p,
180  const polyPatch& pp,
181  const label facei,
182  bool& keepParticle
183  ) const;
184 
185  //- Parcel interaction with dry surface
187  (
189  const parcelType& p,
190  const polyPatch& pp,
191  const label facei,
192  bool& keepParticle
193  );
194 
195  //- Parcel interaction with wetted surface
197  (
199  parcelType& p,
200  const polyPatch& pp,
201  const label facei,
202  bool& keepParticle
203  );
204 
205  //- Bai parcel splash interaction model
206  void splashInteraction
207  (
209  const parcelType& p,
210  const polyPatch& pp,
211  const label facei,
212  const scalar mRatio,
213  const scalar We,
214  const scalar Wec,
215  const scalar sigma,
216  bool& keepParticle
217  );
218 
219 
220  // Injection from sheet (ejection) helper functions
221 
222  //- Cache the film fields in preparation for injection
223  virtual void cacheFilmFields
224  (
225  const label filmPatchi,
226  const label primaryPatchi,
228  filmModel
229  );
230 
231  //- Set the individual parcel properties
232  virtual void setParcelProperties
233  (
234  parcelType& p,
235  const label filmFacei
236  ) const;
237 
238 
239 public:
240 
241  //- Runtime type information
242  TypeName("thermoSurfaceFilm");
243 
244 
245  // Constructors
246 
247  //- Construct from components
249 
250  //- Construct copy
252 
253  //- Construct and return a clone using supplied owner cloud
255  {
257  (
259  );
260  }
261 
262 
263  //- Destructor
264  virtual ~ThermoSurfaceFilm();
265 
266 
267  // Member Functions
268 
269  // Evaluation
270 
271  //- Transfer parcel from cloud to surface film
272  // Returns true if parcel is to be transferred
273  virtual bool transferParcel
274  (
275  parcelType& p,
276  const polyPatch& pp,
277  bool& keepParticle
278  );
279 
280 
281  // I-O
282 
283  //- Write surface film info to stream
284  virtual void info(Ostream& os);
285 };
286 
287 
288 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
289 
290 } // End namespace Foam
291 
292 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
293 
294 #ifdef NoRepository
295  #include "ThermoSurfaceFilm.C"
296 #endif
297 
298 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
299 
300 #endif
301 
302 // ************************************************************************* //
scalar Awet_
Wet surface roughness coefficient.
Thermo parcel surface film model.
scalar Cf_
Skin friction typically in the range 0.6 < Cf < 0.8.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
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.
const dimensionedScalar & sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
scalar Adry_
Dry surface roughness coefficient.
virtual ~ThermoSurfaceFilm()
Destructor.
scalarList TFilmPatch_
Film temperature / patch face.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
void drySplashInteraction(regionModels::surfaceFilmModels::surfaceFilmRegionModel &, const parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with dry surface.
const CloudType & owner() const
Return const access to the owner cloud.
virtual void info(Ostream &os)
Write surface film info to stream.
interactionType interactionType_
Interaction type enumeration.
void absorbInteraction(regionModels::surfaceFilmModels::surfaceFilmRegionModel &, const parcelType &p, const polyPatch &pp, const label facei, const scalar mass, bool &keepParticle)
Absorb parcel into film.
interactionType interactionTypeEnum(const word &it) const
static wordList interactionTypeNames_
Word descriptions of interaction type names.
A class for handling words, derived from string.
Definition: word.H:59
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
Definition: SLGThermo.H:62
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmRegionModel &filmModel)
Cache the film fields in preparation for injection.
Random number generator.
Definition: Random.H:57
const SLGThermo & thermo_
Reference to the cloud thermo package.
vector splashDirection(const vector &tanVec1, const vector &tanVec2, const vector &nf) const
Return splashed parcel direction.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:215
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void bounceInteraction(parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity)
void splashInteraction(regionModels::surfaceFilmModels::surfaceFilmRegionModel &, const parcelType &p, const polyPatch &pp, const label facei, const scalar mRatio, const scalar We, const scalar Wec, const scalar sigma, bool &keepParticle)
Bai parcel splash interaction model.
label parcelsPerSplash_
Number of new parcels resulting from splash event.
label nParcelsSplashed_
Counter for number of new splash parcels.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Random & rndGen_
Reference to the cloud random number generator.
TypeName("thermoSurfaceFilm")
Runtime type information.
volScalarField & p
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
word interactionTypeStr(const interactionType &it) const
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
void wetSplashInteraction(regionModels::surfaceFilmModels::surfaceFilmRegionModel &, parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with wetted surface.
scalar deltaWet_
Film thickness beyond which patch is assumed to be wet.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
label splashParcelType_
Splash parcel type label - id assigned to identify parcel for.
scalarList CpFilmPatch_
Film specific heat capacity / patch face.
CloudType::parcelType parcelType
Convenience typedef to the cloud&#39;s parcel type.
Namespace for OpenFOAM.