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 | Copyright (C) 2011-2015 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 parcelss 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 off 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
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 a vector tangential to input vector, v
155  vector tangentVector(const vector& v) const;
156 
157  //- Return splashed parcel direction
159  (
160  const vector& tanVec1,
161  const vector& tanVec2,
162  const vector& nf
163  ) const;
164 
165 
166  // Interaction models
167 
168  //- Absorb parcel into film
169  void absorbInteraction
170  (
172  const parcelType& p,
173  const polyPatch& pp,
174  const label faceI,
175  const scalar mass,
176  bool& keepParticle
177  );
178 
179  //- Bounce parcel (flip parcel normal velocity)
180  void bounceInteraction
181  (
182  parcelType& p,
183  const polyPatch& pp,
184  const label faceI,
185  bool& keepParticle
186  ) const;
187 
188  //- Parcel interaction with dry surface
190  (
192  const parcelType& p,
193  const polyPatch& pp,
194  const label faceI,
195  bool& keepParticle
196  );
197 
198  //- Parcel interaction with wetted surface
200  (
202  parcelType& p,
203  const polyPatch& pp,
204  const label faceI,
205  bool& keepParticle
206  );
207 
208  //- Bai parcel splash interaction model
209  void splashInteraction
210  (
212  const parcelType& p,
213  const polyPatch& pp,
214  const label faceI,
215  const scalar mRatio,
216  const scalar We,
217  const scalar Wec,
218  const scalar sigma,
219  bool& keepParticle
220  );
221 
222 
223  // Injection from sheet (ejection) helper functions
224 
225  //- Cache the film fields in preparation for injection
226  virtual void cacheFilmFields
227  (
228  const label filmPatchI,
229  const label primaryPatchI,
231  filmModel
232  );
233 
234  //- Set the individual parcel properties
235  virtual void setParcelProperties
236  (
237  parcelType& p,
238  const label filmFaceI
239  ) const;
240 
241 
242 public:
243 
244  //- Runtime type information
245  TypeName("thermoSurfaceFilm");
246 
247 
248  // Constructors
249 
250  //- Construct from components
251  ThermoSurfaceFilm(const dictionary& dict, CloudType& owner);
252 
253  //- Construct copy
255 
256  //- Construct and return a clone using supplied owner cloud
258  {
260  (
262  );
263  }
264 
265 
266  //- Destructor
267  virtual ~ThermoSurfaceFilm();
268 
269 
270  // Member Functions
271 
272  // Evaluation
273 
274  //- Transfer parcel from cloud to surface film
275  // Returns true if parcel is to be transferred
276  virtual bool transferParcel
277  (
278  parcelType& p,
279  const polyPatch& pp,
280  bool& keepParticle
281  );
282 
283 
284  // I-O
285 
286  //- Write surface film info to stream
287  virtual void info(Ostream& os);
288 };
289 
290 
291 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
292 
293 } // End namespace Foam
294 
295 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
296 
297 #ifdef NoRepository
298 # include "ThermoSurfaceFilm.C"
299 #endif
300 
301 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
302 
303 #endif
304 
305 // ************************************************************************* //
Foam::ThermoSurfaceFilm::interactionType_
interactionType interactionType_
Interaction type enumeration.
Definition: ThermoSurfaceFilm.H:118
Foam::ThermoSurfaceFilm::rndGen_
cachedRandom & rndGen_
Reference to the cloud random number generator.
Definition: ThermoSurfaceFilm.H:100
Foam::ThermoSurfaceFilm::interactionType
interactionType
Definition: ThermoSurfaceFilm.H:72
Foam::ThermoSurfaceFilm::TFilmPatch_
scalarList TFilmPatch_
Film temperature / patch face.
Definition: ThermoSurfaceFilm.H:109
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::SLGThermo
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: SLGThermo.H:62
Foam::ThermoSurfaceFilm::ThermoSurfaceFilm
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
Definition: ThermoSurfaceFilm.C:478
Foam::ThermoSurfaceFilm::Adry_
scalar Adry_
Dry surface roughness coefficient.
Definition: ThermoSurfaceFilm.H:137
Foam::ThermoSurfaceFilm::itBounce
@ itBounce
Definition: ThermoSurfaceFilm.H:75
Foam::ThermoSurfaceFilm::deltaWet_
scalar deltaWet_
Film thickness beyond which patch is assumed to be wet.
Definition: ThermoSurfaceFilm.H:121
Foam::ThermoSurfaceFilm::setParcelProperties
virtual void setParcelProperties(parcelType &p, const label filmFaceI) const
Set the individual parcel properties.
Definition: ThermoSurfaceFilm.C:648
Foam::ThermoSurfaceFilm::cacheFilmFields
virtual void cacheFilmFields(const label filmPatchI, const label primaryPatchI, const regionModels::surfaceFilmModels::surfaceFilmModel &filmModel)
Cache the film fields in preparation for injection.
Definition: ThermoSurfaceFilm.C:625
Foam::ThermoSurfaceFilm::TypeName
TypeName("thermoSurfaceFilm")
Runtime type information.
Foam::ThermoSurfaceFilm::splashParcelType_
label splashParcelType_
Splash parcel type label - id assigned to identify parcel for.
Definition: ThermoSurfaceFilm.H:126
Foam::ThermoSurfaceFilm::parcelType
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Definition: ThermoSurfaceFilm.H:97
Foam::ThermoSurfaceFilm::absorbInteraction
void absorbInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, const parcelType &p, const polyPatch &pp, const label faceI, const scalar mass, bool &keepParticle)
Absorb parcel into film.
Definition: ThermoSurfaceFilm.C:131
Foam::ThermoSurfaceFilm
Thermo parcel surface film model.
Definition: ThermoSurfaceFilm.H:63
Foam::ThermoSurfaceFilm::Cf_
scalar Cf_
Skin friction typically in the range 0.6 < Cf < 0.8.
Definition: ThermoSurfaceFilm.H:145
Foam::label
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
ThermoSurfaceFilm.C
Foam::cachedRandom
Random number generator.
Definition: cachedRandom.H:63
Foam::SurfaceFilmModel
Templated wall surface film model class.
Definition: KinematicCloud.H:85
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::ThermoSurfaceFilm::parcelsPerSplash_
label parcelsPerSplash_
Number of new parcels resulting from splash event.
Definition: ThermoSurfaceFilm.H:129
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::ThermoSurfaceFilm::Awet_
scalar Awet_
Wet surface roughness coefficient.
Definition: ThermoSurfaceFilm.H:141
Foam::ThermoSurfaceFilm::interactionTypeEnum
interactionType interactionTypeEnum(const word &it) const
Definition: ThermoSurfaceFilm.C:49
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::ThermoSurfaceFilm::clone
virtual autoPtr< SurfaceFilmModel< CloudType > > clone() const
Construct and return a clone using supplied owner cloud.
Definition: ThermoSurfaceFilm.H:256
Foam::ThermoSurfaceFilm::splashInteraction
void splashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, 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.
Definition: ThermoSurfaceFilm.C:341
Foam::ThermoSurfaceFilm::info
virtual void info(Ostream &os)
Write surface film info to stream.
Definition: ThermoSurfaceFilm.C:662
Foam::ThermoSurfaceFilm::CpFilmPatch_
scalarList CpFilmPatch_
Film specific heat capacity / patch face.
Definition: ThermoSurfaceFilm.H:112
Foam::ThermoSurfaceFilm::wetSplashInteraction
void wetSplashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, parcelType &p, const polyPatch &pp, const label faceI, bool &keepParticle)
Parcel interaction with wetted surface.
Definition: ThermoSurfaceFilm.C:264
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::ThermoSurfaceFilm::bounceInteraction
void bounceInteraction(parcelType &p, const polyPatch &pp, const label faceI, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity)
Definition: ThermoSurfaceFilm.C:178
Foam::ThermoSurfaceFilm::thermo_
const SLGThermo & thermo_
Reference to the cloud thermo package.
Definition: ThermoSurfaceFilm.H:103
Foam::ThermoSurfaceFilm::nParcelsSplashed_
label nParcelsSplashed_
Counter for number of new splash parcels.
Definition: ThermoSurfaceFilm.H:148
Foam::Vector< scalar >
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::ThermoSurfaceFilm::itSplashBai
@ itSplashBai
Definition: ThermoSurfaceFilm.H:76
Foam::ThermoSurfaceFilm::tangentVector
vector tangentVector(const vector &v) const
Return a vector tangential to input vector, v.
Definition: ThermoSurfaceFilm.C:86
Foam::constant::physicoChemical::sigma
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Foam::ThermoSurfaceFilm::drySplashInteraction
void drySplashInteraction(regionModels::surfaceFilmModels::surfaceFilmModel &filmModel, const parcelType &p, const polyPatch &pp, const label faceI, bool &keepParticle)
Parcel interaction with dry surface.
Definition: ThermoSurfaceFilm.C:208
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
SurfaceFilmModel.H
Foam::ThermoSurfaceFilm::splashDirection
vector splashDirection(const vector &tanVec1, const vector &tanVec2, const vector &nf) const
Return splashed parcel direction.
Definition: ThermoSurfaceFilm.C:106
Foam::regionModels::surfaceFilmModels::surfaceFilmModel
Base class for surface film models.
Definition: surfaceFilmModel.H:61
Foam::ThermoSurfaceFilm::interactionTypeStr
word interactionTypeStr(const interactionType &it) const
Definition: ThermoSurfaceFilm.C:70
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::ThermoSurfaceFilm::transferParcel
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
Definition: ThermoSurfaceFilm.C:553
Foam::ThermoSurfaceFilm::interactionTypeNames_
static wordList interactionTypeNames_
Word descriptions of interaction type names.
Definition: ThermoSurfaceFilm.H:80
Foam::ThermoSurfaceFilm::itAbsorb
@ itAbsorb
Definition: ThermoSurfaceFilm.H:74
Foam::ThermoSurfaceFilm::~ThermoSurfaceFilm
virtual ~ThermoSurfaceFilm()
Destructor.
Definition: ThermoSurfaceFilm.C:545