1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::ThermoSurfaceFilm
28 Thermo parcel surface film model.
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
34 Splash model references:
36 Bai and Gosman, `Mathematical modelling of wall films formed by
37 impinging sprays', SAE 960626, 1996
39 Bai et al, `Modelling off gasoline spray impingement', Atom. Sprays,
47 \*---------------------------------------------------------------------------*/
49 #ifndef ThermoSurfaceFilm_H
50 #define ThermoSurfaceFilm_H
52 #include "SurfaceFilmModel.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 /*---------------------------------------------------------------------------*\
60 Class ThermoSurfaceFilm Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class CloudType>
64 class ThermoSurfaceFilm
66 public SurfaceFilmModel<CloudType>
72 // Interaction type enumerations
80 //- Word descriptions of interaction type names
81 static wordList interactionTypeNames_;
84 // Public Member Functions
86 // Return interaction type enum from word
87 interactionType interactionTypeEnum(const word& it) const;
89 // Return word from interaction type enum
90 word interactionTypeStr(const interactionType& it) const;
97 //- Convenience typedef to the cloud's parcel type
98 typedef typename CloudType::parcelType parcelType;
100 //- Reference to the cloud random number generator
101 cachedRandom& rndGen_;
103 //- Reference to the cloud thermo package
104 const SLGThermo& thermo_;
107 // Cached injector fields per film patch
109 //- Film temperature / patch face
110 scalarList TFilmPatch_;
112 //- Film specific heat capacity / patch face
113 scalarList CpFilmPatch_;
116 // Interaction model data
118 //- Interaction type enumeration
119 interactionType interactionType_;
121 //- Film thickness beyond which patch is assumed to be wet
124 //- Splash parcel type label - id assigned to identify parcel for
125 // post-processing. If not specified, defaults to originating cloud
127 label splashParcelType_;
129 //- Number of new parcels resulting from splash event
130 label parcelsPerSplash_;
133 // Surface roughness coefficient typically in the range 1300 - 5200
134 // and decreases with increasing surface roughness
136 //- Dry surface roughness coefficient
137 // = 2630 for dry interaction (ref. Bai)
140 //- Wet surface roughness coefficient
141 // = 1320 for wet interaction (ref. Bai)
145 //- Skin friction typically in the range 0.6 < Cf < 0.8
148 //- Counter for number of new splash parcels
149 label nParcelsSplashed_;
152 // Protected Member Functions
154 //- Return a vector tangential to input vector, v
155 vector tangentVector(const vector& v) const;
157 //- Return splashed parcel direction
158 vector splashDirection
160 const vector& tanVec1,
161 const vector& tanVec2,
166 // Interaction models
168 //- Absorb parcel into film
169 void absorbInteraction
171 regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
179 //- Bounce parcel (flip parcel normal velocity)
180 void bounceInteraction
188 //- Parcel interaction with dry surface
189 void drySplashInteraction
191 regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
198 //- Parcel interaction with wetted surface
199 void wetSplashInteraction
201 regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
208 //- Bai parcel splash interaction model
209 void splashInteraction
211 regionModels::surfaceFilmModels::surfaceFilmModel& filmModel,
223 // Injection from sheet (ejection) helper functions
225 //- Cache the film fields in preparation for injection
226 virtual void cacheFilmFields
228 const label filmPatchI,
229 const label primaryPatchI,
230 const mapDistribute& distMap,
231 const regionModels::surfaceFilmModels::surfaceFilmModel&
235 //- Set the individual parcel properties
236 virtual void setParcelProperties
239 const label filmFaceI
245 //- Runtime type information
246 TypeName("thermoSurfaceFilm");
251 //- Construct from components
254 const dictionary& dict,
256 const dimensionedVector& g
260 ThermoSurfaceFilm(const ThermoSurfaceFilm<CloudType>& sfm);
262 //- Construct and return a clone using supplied owner cloud
263 virtual autoPtr<SurfaceFilmModel<CloudType> > clone()
265 return autoPtr<SurfaceFilmModel<CloudType> >
267 new ThermoSurfaceFilm<CloudType>(*this)
273 virtual ~ThermoSurfaceFilm();
280 //- Transfer parcel from cloud to surface film
281 // Returns true if parcel is to be transferred
282 virtual bool transferParcel
292 //- Write surface film info to stream
293 virtual void info(Ostream& os) const;
297 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
299 } // End namespace Foam
301 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
304 # include "ThermoSurfaceFilm.C"
307 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
311 // ************************************************************************* //