thermoSingleLayer.C
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-2021 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 \*---------------------------------------------------------------------------*/
25 
26 #include "thermoSingleLayer.H"
27 #include "fluidThermo.H"
28 #include "basicSpecieMixture.H"
29 #include "liquidThermo.H"
30 
31 #include "fvcDdt.H"
32 #include "fvcDiv.H"
33 #include "fvcFlux.H"
34 
35 #include "fvmDdt.H"
36 #include "fvmDiv.H"
37 #include "fvmSup.H"
38 
40 #include "mixedFvPatchFields.H"
42 #include "mapDistribute.H"
43 #include "constants.H"
44 
45 #include "heatTransferModel.H"
46 #include "phaseChangeModel.H"
47 #include "filmRadiationModel.H"
48 
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace regionModels
56 {
57 namespace surfaceFilmModels
58 {
59 
60 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
61 
62 defineTypeNameAndDebug(thermoSingleLayer, 0);
63 addToRunTimeSelectionTable(surfaceFilmRegionModel, thermoSingleLayer, mesh);
64 
65 
66 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
67 
69 {
70  // No additional properties to read
72 }
73 
74 
76 {
78 
80 
82 }
83 
84 
86 {
87  volScalarField& T = thermo_->T();
88 
90 
91  volScalarField::Boundary& heBf = thermo_->he().boundaryFieldRef();
92 
93  forAll(heBf, patchi)
94  {
95  const fvPatchField<scalar>& Tp = T.boundaryField()[patchi];
97  {
98  heBf[patchi] == thermo().he(Tp, patchi);
99  }
100  }
101 }
102 
103 
105 {
107 
109 
110  // Update primary region fields on local region via direct mapped (coupled)
111  // boundary conditions
113  forAll(YPrimary_, i)
114  {
115  YPrimary_[i].correctBoundaryConditions();
116  }
117 }
118 
119 
121 {
123 
125 
126  volScalarField::Boundary& hSpPrimaryBf = hSpPrimary_.boundaryFieldRef();
127 
128  // Convert accumulated source terms into per unit area per unit time
129  const scalar deltaT = time_.deltaTValue();
130  forAll(hSpPrimaryBf, patchi)
131  {
132  scalarField rpriMagSfdeltaT
133  (
134  (1/deltaT)/primaryMesh().magSf().boundaryField()[patchi]
135  );
136 
137  hSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
138  }
139 
140  // Retrieve the source fields from the primary region
141  toRegion(hSp_, hSpPrimaryBf);
142  hSp_.field() /= VbyA();
143 }
144 
145 
147 {
148  if (hydrophilic_)
149  {
150  const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
151  const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
152 
153  forAll(coverage_, i)
154  {
155  if ((coverage_[i] < 0.5) && (delta_[i] > hydrophilicWet))
156  {
157  coverage_[i] = 1;
158  }
159  else if ((coverage_[i] > 0.5) && (delta_[i] < hydrophilicDry))
160  {
161  coverage_[i] = 0;
162  }
163  }
164 
166  }
167  else
168  {
170  }
171 }
172 
173 
175 {
177 
178  // Update heat transfer coefficient sub-models
179  htcs_->correct();
180  htcw_->correct();
181 
182  // Update radiation
183  radiation_->correct();
184 
185  // Update ejection model - mass returned is mass available for ejection
187 
188  phaseChange_->correct
189  (
190  time_.deltaTValue(),
194  );
195 
196  const volScalarField::Internal rMagSfDt((1/time().deltaT())/magSf());
197 
198  // Vapour recoil pressure
199  pSp_ -= sqr(rMagSfDt*primaryMassTrans_())/(2*rhoPrimary_());
200 
201  // Update transfer model - mass returned is mass available for transfer
203  (
205  primaryMassTrans_,
208  );
209 
210  const volScalarField::Internal rVDt
211  (
212  1/(time().deltaT()*regionMesh().V())
213  );
214 
215  volScalarField& he = thermo_->he();
216 
217  // Update source fields
218  rhoSp_ += rVDt*(cloudMassTrans_() + primaryMassTrans_());
219  USp_ += rVDt*(cloudMassTrans_()*U_() + primaryMomentumTrans_());
220  hSp_ += rVDt*(cloudMassTrans_()*he() + primaryEnergyTrans_());
221 
222  momentumTransport_->correct();
223 }
224 
225 
227 {
229 
230  const volScalarField::Internal& T = thermo().T();
231 
232  const tmp<volScalarField> tCpv = thermo().Cpv();
233  const volScalarField::Internal& Cpv = tCpv();
234 
235  return
236  (
237  // Heat-transfer to the primary region
238  - fvm::Sp((htcs_->h()/VbyA())/Cpv, h)
239  + (htcs_->h()/VbyA())*(h()/Cpv + coverage*(TPrimary_() - T))
240 
241  // Heat-transfer to the wall
242  - fvm::Sp((htcw_->h()/VbyA())/Cpv, h)
243  + (htcw_->h()/VbyA())*(h()/Cpv + coverage*(Tw() - T))
244  );
245 }
246 
247 
249 {
251 
253 
254  volScalarField& he = thermo_->he();
255 
256  fvScalarMatrix heEqn
257  (
258  fvm::ddt(alpha_, rho(), he) + fvm::div(phi_, he)
259  - fvm::Sp(continuityErr_, he)
260  ==
261  - hSp_
262  + q(he)
263  + radiation_->Shs()/VbyA()
264  );
265 
266  heEqn.relax();
267 
268  heEqn.solve();
269 
270  thermo_->correct();
271 }
272 
273 
274 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
275 
277 (
278  const word& modelType,
279  const fvMesh& mesh,
280  const dimensionedVector& g,
281  const word& regionType,
282  const bool readFields
283 )
284 :
285  kinematicSingleLayer(modelType, mesh, g, regionType, false),
287 
289  (
291  (
293  )
294  ),
295 
297  (
298  IOobject
299  (
300  "primaryEnergyTrans",
301  time().timeName(),
302  regionMesh(),
305  ),
306  regionMesh(),
308  zeroGradientFvPatchScalarField::typeName
309  ),
310 
311  deltaWet_(coeffs_.lookup<scalar>("deltaWet")),
312  hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
315 
316  hSp_
317  (
318  IOobject
319  (
320  "hSp",
321  time().timeName(),
322  regionMesh(),
325  ),
326  regionMesh(),
328  ),
329 
331  (
332  IOobject
333  (
334  hSp_.name(),
335  time().timeName(),
336  primaryMesh(),
339  ),
340  primaryMesh(),
342  ),
343 
344  TPrimary_
345  (
346  IOobject
347  (
348  "T", // Same name as T on primary region to enable mapping
349  time().timeName(),
350  regionMesh(),
353  ),
354  regionMesh(),
356  this->mappedFieldAndInternalPatchTypes<scalar>()
357  ),
358 
359  YPrimary_(),
360 
361  htcs_
362  (
363  heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
364  ),
365 
366  htcw_
367  (
368  heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
369  ),
370 
373  Tmin_(-vGreat),
374  Tmax_(vGreat)
375 {
376  if (coeffs().readIfPresent("Tmin", Tmin_))
377  {
378  Info<< " limiting minimum temperature to " << Tmin_ << endl;
379  }
380 
381  if (coeffs().readIfPresent("Tmax", Tmax_))
382  {
383  Info<< " limiting maximum temperature to " << Tmax_ << endl;
384  }
385 
386  if (isA<basicSpecieMixture>(primaryThermo_))
387  {
388  const basicSpecieMixture& primarySpecieThermo =
389  refCast<const basicSpecieMixture>(primaryThermo_);
390 
391  YPrimary_.setSize(primarySpecieThermo.species().size());
392 
393  forAll(primarySpecieThermo.species(), i)
394  {
395  YPrimary_.set
396  (
397  i,
398  new volScalarField
399  (
400  IOobject
401  (
402  primarySpecieThermo.species()[i],
403  time().timeName(),
404  regionMesh(),
407  ),
408  regionMesh(),
410  this->mappedFieldAndInternalPatchTypes<scalar>()
411  )
412  );
413  }
414  }
415 
416  if (hydrophilic_)
417  {
418  coeffs_.lookup("hydrophilicDryScale") >> hydrophilicDryScale_;
419  coeffs_.lookup("hydrophilicWetScale") >> hydrophilicWetScale_;
420  }
421 
422  if (readFields)
423  {
425 
426  correctCoverage();
427 
429  (
430  IOobject
431  (
432  "phi",
433  time().timeName(),
434  regionMesh(),
437  false
438  ),
440  );
441 
442  phi_ == phi;
443  }
444 }
445 
446 
447 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
448 
450 {}
451 
452 
453 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
454 
456 (
457  const label patchi,
458  const label facei,
459  const scalar massSource,
460  const vector& momentumSource,
461  const scalar pressureSource,
462  const scalar energySource
463 )
464 {
466  (
467  patchi,
468  facei,
469  massSource,
470  momentumSource,
471  pressureSource,
472  energySource
473  );
474 
475  DebugInFunction << " energy = " << energySource << endl;
476 
477  hSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
478 }
479 
480 
482 {
484 
487 }
488 
489 
491 {
493 
494  // Update film coverage indicator
495  correctCoverage();
496 
498 
499  // Predict delta_ from continuity
500  predictDelta();
501 
502  // Update sub-models to provide updated source contributions
503  updateSubmodels();
504 
505  // Predict delta_ from continuity with updated source
506  predictDelta();
507 
508  // Capillary pressure
509  const volScalarField pc(this->pc());
510 
511  while (pimple_.loop())
512  {
513  // External pressure
514  const volScalarField pe(this->pe());
515 
516  // Solve for momentum for U_
517  const fvVectorMatrix UEqn(solveMomentum(pc, pe));
518 
519  // Solve energy for h_ - also updates thermo
520  solveEnergy();
521 
522  // Film thickness correction loop
523  while (pimple_.correct())
524  {
525  solveAlpha(UEqn, pc, pe);
526  }
527  }
528 
529  // Reset source terms for next time integration
531 }
532 
533 
535 {
536  return thermo().T();
537 }
538 
539 
541 {
543  (
545  (
546  "Tw",
547  regionMesh(),
549  )
550  );
551 
553 
554  const volScalarField& T = thermo().T();
555 
556  // Push boundary film temperature into wall temperature internal field
557  for (label i=0; i<intCoupledPatchIDs_.size(); i++)
558  {
559  label patchi = intCoupledPatchIDs_[i];
560  const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
562  T.boundaryField()[patchi];
563  }
564 
565  return tTw;
566 }
567 
568 
570 {
572 
573  const scalarField& Tinternal = thermo().T();
574 
575  Info<< indent << "min/mean/max(T) = "
576  << gMin(Tinternal) << ", "
577  << gAverage(Tinternal) << ", "
578  << gMax(Tinternal) << nl;
579 
580  phaseChange_->info(Info);
581 }
582 
583 
585 (
586  const label i
587 ) const
588 {
589  const basicSpecieMixture& primarySpecieThermo =
590  refCast<const basicSpecieMixture>(primaryThermo_);
591 
592  // Set local liquidThermo properties
593  const liquidProperties& liquidThermo =
594  refCast<const heRhoThermopureMixtureliquidProperties>(thermo())
595  .cellThermoMixture(0).properties();
596 
597  const label vapId = primarySpecieThermo.species()[liquidThermo.name()];
598 
600  (
602  (
603  IOobject::modelName("SY(" + Foam::name(i) + ")", typeName),
604  primaryMesh(),
606  )
607  );
608 
609  if (vapId == i)
610  {
611  scalarField& SYi = tSYi.ref();
612  const scalarField& V = primaryMesh().V();
613  const scalar dt = time().deltaTValue();
614 
616  {
617  const label filmPatchi = intCoupledPatchIDs_[i];
618 
619  scalarField patchMass =
620  primaryMassTrans_.boundaryField()[filmPatchi];
621 
622  toPrimary(filmPatchi, patchMass);
623 
624  const label primaryPatchi = primaryPatchIDs()[i];
625  const unallocLabelList& cells =
626  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
627 
628  forAll(patchMass, j)
629  {
630  SYi[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
631  }
632  }
633  }
634 
635  return tSYi;
636 }
637 
638 
640 {
642  (
644  (
645  IOobject::modelName("Sh", typeName),
646  primaryMesh(),
648  )
649  );
650 
651  scalarField& Sh = tSh.ref();
652  const scalarField& V = primaryMesh().V();
653  const scalar dt = time_.deltaTValue();
654 
656  {
657  const label filmPatchi = intCoupledPatchIDs_[i];
658 
659  scalarField patchEnergy =
660  primaryEnergyTrans_.boundaryField()[filmPatchi];
661 
662  toPrimary(filmPatchi, patchEnergy);
663 
664  const unallocLabelList& cells =
665  primaryMesh().boundaryMesh()[primaryPatchIDs()[i]].faceCells();
666 
667  forAll(patchEnergy, j)
668  {
669  Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
670  }
671  }
672 
673  return tSh;
674 }
675 
676 
677 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
678 
679 } // end namespace Foam
680 } // end namespace regionModels
681 } // end namespace surfaceFilmModels
682 
683 // ************************************************************************* //
virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:434
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
Definition: typeInfo.H:134
virtual tmp< volScalarField::Internal > Ts() const
Return the film surface temperature [K].
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient between wall and film [W/m^2/K].
autoPtr< phaseChangeModel > phaseChange_
Phase change.
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
thermoSingleLayer(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word &regionType, const bool readFields=true)
Construct from components.
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
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const word & name() const
Return name.
Definition: IOobject.H:303
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:221
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
volVectorField primaryMomentumTrans_
Film momentum transfer.
virtual void correctCoverage()
Correct film coverage field.
scalar Tmax_
Maximum temperature limit (optional)
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Type gMin(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
volScalarField::Internal continuityErr_
Current continuity error caused by delta_ bounding.
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:181
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< fvScalarMatrix > q(volScalarField &h) const
Return the wall/surface heat transfer term for the enthalpy equation.
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
static autoPtr< radiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
volScalarField::Internal hSp_
Energy [J/m2/s].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
volVectorField::Internal USp_
Momentum [kg/m/s^2].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
scalarField availableMass_
Available mass for transfer via sub-models.
volScalarField cloudDiameterTrans_
Parcel diameters originating from film to cloud.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:636
const dimensionSet dimless
volScalarField coverage_
Film coverage indicator, 1 = covered, 0 = uncovered [].
bool readBool(Istream &)
Definition: boolIO.C:60
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient between film surface and primary.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionedScalar h
Planck constant.
virtual tmp< volScalarField > Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:982
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pc, const volScalarField &pe)
Solve for film velocity.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Calculate the first temporal derivative.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
void toPrimary(const label regionPatchi, List< Type > &regionField) const
Convert a local region field to the primary region.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
Definition: regionModelI.H:31
virtual void updateSubmodels()
Update the film sub-models.
virtual void correct(scalarField &availableMass, volScalarField &massToTransfer, volVectorField &momentumToTransfer)
Correct kinematic transfers.
const cellShapeList & cells
const labelUList & faceCells() const
Return face-cell addressing.
Definition: polyPatch.C:334
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
A class for handling words, derived from string.
Definition: word.H:59
Calculate the face-flux of the given field.
static word groupName(Name name, const word &group)
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:53
#define DebugInFunction
Report an information message using Foam::Info.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvmDdt.C:46
Calculate the matrix for the first temporal derivative.
scalar deltaTValue() const
Return time step value.
Definition: TimeStateI.H:41
bool loop()
Pimple loop.
Definition: pimpleControl.C:81
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const volScalarField & coverage() const
Return the film coverage, 1 = covered, 0 = uncovered [].
static const word null
An empty word.
Definition: word.H:77
const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:55
The thermophysical properties of a liquid.
const fluidThermo & primaryThermo_
Reference to the primary region thermo.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
word timeName
Definition: getTimeIndex.H:3
virtual void solveAlpha(const fvVectorMatrix &UEqn, const volScalarField &pc, const volScalarField &pe)
Solve for film volume fraction and thickness.
virtual tmp< volScalarField::Internal > SYi(const label i) const
Return mass source for specie i - Eulerian phase only.
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
scalar Tmin_
Minimum temperature limit (optional)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
autoPtr< momentumTransportModel > momentumTransport_
Momentum transport model.
Calculate the divergence of the given field.
bool correct()
Piso loop.
Definition: pisoControl.C:80
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
Definition: regionModelI.H:166
static const word dictName
Name of the thermophysical properties dictionary.
Definition: basicThermo.H:129
virtual void evolveRegion()
Evolve the film equations.
virtual void addSources(const label patchi, const label facei, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource)
External hook to add sources to the film.
static const char nl
Definition: Ostream.H:260
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvmDiv.C:46
thermo he()
Type gMax(const FieldField< Field, Type > &f)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
Definition: fvMatrix.C:521
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const dimensionSet dimEnergy
const Field< Type > & field() const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
volScalarField primaryEnergyTrans_
Film energy transfer.
const dimensionSet dimMass
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
transferModelList transfer_
Transfer with the continuous phase.
kinematicSingleLayer(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word &regionType, const bool readFields=true)
Construct from components.
dictionary coeffs_
Model coefficients dictionary.
Definition: regionModel.H:94
virtual bool read()
Read control parameters from dictionary.
Calculate the matrix for the divergence of the given field and flux.
virtual void correctHforMappedT()
Correct sensible enthalpy for mapped temperature fields.
label patchi
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
virtual void predictDelta()
Predict delta_ from the continuity equation.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
scalar deltaWet_
Threshold film thickness beyond which the film is considered &#39;wet&#39;.
virtual const volScalarField & T() const =0
Temperature [K].
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Type gAverage(const FieldField< Field, Type > &f)
const Time & time_
Reference to the time database.
Definition: regionModel.H:82
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
volScalarField alpha_
Film volume fraction in the cell layer [].
virtual void preEvolveRegion()
Pre-evolve film hook.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
PtrList< volScalarField > YPrimary_
List of specie mass fractions [0-1].
virtual void correct(scalarField &availableMass, volScalarField &massToEject, volScalarField &diameterToEject)
Correct.
const dimensionSet dimVolume
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
static autoPtr< heatTransferModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void addSources(const label patchi, const label facei, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource=0)
External hook to add sources to the film.
const volScalarField & rho() const
Return the film density [kg/m^3].
virtual tmp< volScalarField::Internal > Tw() const
Return the film wall temperature [K].
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
This boundary condition provides a self-contained version of the mapped condition. It does not use information on the patch; instead it holds thr data locally.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
Definition: regionModel.H:106
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Definition: fvcFlux.C:32
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
const dictionary & coeffs() const
Return the model coefficients dictionary.
Definition: regionModelI.H:90
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
Calculate the matrix for implicit and explicit sources.
addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh)
const dimensionSet dimTemperature
Namespace for OpenFOAM.
const speciesTable & species() const
Return the table of species.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:844
fvVectorMatrix & UEqn
Definition: UEqn.H:13