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-2020 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 
28 #include "fvcDdt.H"
29 #include "fvcDiv.H"
30 #include "fvcFlux.H"
31 
32 #include "fvmDdt.H"
33 #include "fvmDiv.H"
34 #include "fvmSup.H"
35 
37 #include "mixedFvPatchFields.H"
39 #include "mapDistribute.H"
40 #include "constants.H"
42 
43 // Sub-models
44 #include "filmThermoModel.H"
45 #include "filmViscosityModel.H"
46 #include "heatTransferModel.H"
47 #include "phaseChangeModel.H"
48 #include "filmRadiationModel.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace regionModels
55 {
56 namespace surfaceFilmModels
57 {
58 
59 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
60 
61 defineTypeNameAndDebug(thermoSingleLayer, 0);
62 addToRunTimeSelectionTable(surfaceFilmRegionModel, thermoSingleLayer, mesh);
63 
64 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
65 
66 wordList thermoSingleLayer::hBoundaryTypes()
67 {
68  wordList bTypes(T_.boundaryField().types());
69  forAll(bTypes, patchi)
70  {
71  if
72  (
73  T_.boundaryField()[patchi].fixesValue()
74  || isA<mixedFvPatchScalarField>(T_.boundaryField()[patchi])
75  || isA<mappedFieldFvPatchField<scalar>>(T_.boundaryField()[patchi])
76  )
77  {
79  }
80  }
81 
82  return bTypes;
83 }
84 
85 
86 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
87 
89 {
90  // No additional properties to read
92 }
93 
94 
96 {
98 
100 
102 }
103 
104 
106 {
107  rho_ == filmThermo_->rho();
108  sigma_ == filmThermo_->sigma();
109  Cp_ == filmThermo_->Cp();
110  kappa_ == filmThermo_->kappa();
111 }
112 
113 
115 {
117 
118  volScalarField::Boundary& hBf = h_.boundaryFieldRef();
119 
120  forAll(hBf, patchi)
121  {
124  {
125  hBf[patchi] == h(Tp, patchi);
126  }
127  }
128 }
129 
130 
132 {
134 
135  // Push boundary film temperature into wall temperature internal field
136  for (label i=0; i<intCoupledPatchIDs_.size(); i++)
137  {
139  const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
142  }
144 
145  // Update film surface temperature
146  Ts_ = T_;
148 }
149 
150 
152 {
154 
156 
157  // Update primary region fields on local region via direct mapped (coupled)
158  // boundary conditions
160  forAll(YPrimary_, i)
161  {
162  YPrimary_[i].correctBoundaryConditions();
163  }
164 }
165 
166 
168 {
170 
172 
173  volScalarField::Boundary& hSpPrimaryBf = hSpPrimary_.boundaryFieldRef();
174 
175  // Convert accumulated source terms into per unit area per unit time
176  const scalar deltaT = time_.deltaTValue();
177  forAll(hSpPrimaryBf, patchi)
178  {
179  scalarField rpriMagSfdeltaT
180  (
181  (1/deltaT)/primaryMesh().magSf().boundaryField()[patchi]
182  );
183 
184  hSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
185  }
186 
187  // Retrieve the source fields from the primary region
188  toRegion(hSp_, hSpPrimaryBf);
189  hSp_.field() /= VbyA();
190 }
191 
192 
194 {
195  if (hydrophilic_)
196  {
197  const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
198  const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
199 
200  forAll(coverage_, i)
201  {
202  if ((coverage_[i] < 0.5) && (delta_[i] > hydrophilicWet))
203  {
204  coverage_[i] = 1;
205  }
206  else if ((coverage_[i] > 0.5) && (delta_[i] < hydrophilicDry))
207  {
208  coverage_[i] = 0;
209  }
210  }
211 
213  }
214  else
215  {
217  }
218 }
219 
220 
222 {
224 
225  // Update heat transfer coefficient sub-models
226  htcs_->correct();
227  htcw_->correct();
228 
229  // Update radiation
230  radiation_->correct();
231 
232  // Update injection model - mass returned is mass available for injection
234 
235  phaseChange_->correct
236  (
237  time_.deltaTValue(),
241  );
242 
243  const volScalarField::Internal rMagSfDt((1/time().deltaT())/magSf());
244 
245  const volScalarField::Internal rVDt
246  (
247  1/(time().deltaT()*regionMesh().V())
248  );
249 
250  // Vapour recoil pressure
251  pSp_ -= sqr(rMagSfDt*primaryMassTrans_())/(2*rhoPrimary_());
252 
253  // Update transfer model - mass returned is mass available for transfer
255 
256  // Update source fields
257  rhoSp_ += rVDt*(cloudMassTrans_() + primaryMassTrans_());
258  hSp_ += rVDt*(cloudMassTrans_()*h_() + primaryEnergyTrans_());
259 
260  turbulence_->correct();
261 }
262 
263 
265 {
267 
268  return
269  (
270  // Heat-transfer to the primary region
271  - fvm::Sp((htcs_->h()/VbyA())/Cp_, h)
272  + (htcs_->h()/VbyA())*(h()/Cp_ + coverage*(TPrimary_() - T_()))
273 
274  // Heat-transfer to the wall
275  - fvm::Sp((htcw_->h()/VbyA())/Cp_, h)
276  + (htcw_->h()/VbyA())*(h()/Cp_ + coverage*(Tw_()- T_()))
277  );
278 }
279 
280 
282 {
284 
286 
287  fvScalarMatrix hEqn
288  (
291  ==
292  - hSp_
293  + q(h_)
294  + radiation_->Shs()/VbyA()
295  );
296 
297  hEqn.relax();
298 
299  hEqn.solve();
300 
301  // Update temperature using latest h_
302  T_ == T(h_);
303 
305 
306  // Evaluate viscosity from user-model
307  viscosity_->correct(pPrimary_, T_);
308 }
309 
310 
311 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
312 
314 (
315  const word& modelType,
316  const fvMesh& mesh,
317  const dimensionedVector& g,
318  const word& regionType,
319  const bool readFields
320 )
321 :
322  kinematicSingleLayer(modelType, mesh, g, regionType, false),
323  thermo_(mesh.lookupObject<SLGThermo>("SLGThermo")),
324 
325  Cp_
326  (
327  IOobject
328  (
329  "Cp",
330  time().timeName(),
331  regionMesh(),
334  ),
335  regionMesh(),
337  zeroGradientFvPatchScalarField::typeName
338  ),
339 
340  kappa_
341  (
342  IOobject
343  (
344  "kappa",
345  time().timeName(),
346  regionMesh(),
349  ),
350  regionMesh(),
352  zeroGradientFvPatchScalarField::typeName
353  ),
354 
355  T_
356  (
357  IOobject
358  (
359  "T",
360  time().timeName(),
361  regionMesh(),
364  ),
365  regionMesh()
366  ),
367 
368  Ts_
369  (
370  IOobject
371  (
372  "Ts",
373  time().timeName(),
374  regionMesh(),
377  ),
378  T_,
379  zeroGradientFvPatchScalarField::typeName
380  ),
381 
382  Tw_
383  (
384  IOobject
385  (
386  "Tw",
387  time().timeName(),
388  regionMesh(),
391  ),
392  T_,
393  zeroGradientFvPatchScalarField::typeName
394  ),
395 
396  h_
397  (
398  IOobject
399  (
400  "h",
401  time().timeName(),
402  regionMesh(),
405  ),
406  regionMesh(),
408  hBoundaryTypes()
409  ),
410 
412  (
413  IOobject
414  (
415  "primaryEnergyTrans",
416  time().timeName(),
417  regionMesh(),
420  ),
421  regionMesh(),
423  zeroGradientFvPatchScalarField::typeName
424  ),
425 
426  deltaWet_(coeffs_.lookup<scalar>("deltaWet")),
427  hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
430 
431  hSp_
432  (
433  IOobject
434  (
435  "hSp",
436  time().timeName(),
437  regionMesh(),
440  ),
441  regionMesh(),
443  ),
444 
446  (
447  IOobject
448  (
449  hSp_.name(),
450  time().timeName(),
451  primaryMesh(),
454  ),
455  primaryMesh(),
457  ),
458 
459  TPrimary_
460  (
461  IOobject
462  (
463  "T", // Same name as T on primary region to enable mapping
464  time().timeName(),
465  regionMesh(),
468  ),
469  regionMesh(),
471  this->mappedFieldAndInternalPatchTypes<scalar>()
472  ),
473 
474  YPrimary_(),
475 
477 
478  htcs_
479  (
480  heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
481  ),
482 
483  htcw_
484  (
485  heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
486  ),
487 
490  Tmin_(-vGreat),
491  Tmax_(vGreat)
492 {
493  if (coeffs().readIfPresent("Tmin", Tmin_))
494  {
495  Info<< " limiting minimum temperature to " << Tmin_ << endl;
496  }
497 
498  if (coeffs().readIfPresent("Tmax", Tmax_))
499  {
500  Info<< " limiting maximum temperature to " << Tmax_ << endl;
501  }
502 
504  {
505  YPrimary_.setSize(thermo_.carrier().species().size());
506 
507  forAll(thermo_.carrier().species(), i)
508  {
509  YPrimary_.set
510  (
511  i,
512  new volScalarField
513  (
514  IOobject
515  (
516  thermo_.carrier().species()[i],
517  time().timeName(),
518  regionMesh(),
521  ),
522  regionMesh(),
524  this->mappedFieldAndInternalPatchTypes<scalar>()
525  )
526  );
527  }
528  }
529 
530  if (hydrophilic_)
531  {
532  coeffs_.lookup("hydrophilicDryScale") >> hydrophilicDryScale_;
533  coeffs_.lookup("hydrophilicWetScale") >> hydrophilicWetScale_;
534  }
535 
536  if (readFields)
537  {
539 
540  correctCoverage();
541 
543 
544  // Update derived fields
545  h_ == h(T_);
546 
548  (
549  IOobject
550  (
551  "phi",
552  time().timeName(),
553  regionMesh(),
556  false
557  ),
559  );
560 
561  phi_ == phi;
562 
563  // Evaluate viscosity from user-model
564  viscosity_->correct(pPrimary_, T_);
565  }
566 }
567 
568 
569 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
570 
572 {}
573 
574 
575 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
576 
578 (
579  const label patchi,
580  const label facei,
581  const scalar massSource,
582  const vector& momentumSource,
583  const scalar pressureSource,
584  const scalar energySource
585 )
586 {
588  (
589  patchi,
590  facei,
591  massSource,
592  momentumSource,
593  pressureSource,
594  energySource
595  );
596 
597  DebugInFunction << " energy = " << energySource << endl;
598 
599  hSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
600 }
601 
602 
604 {
606 
609 }
610 
611 
613 {
615 
616  // Update film coverage indicator
617  correctCoverage();
618 
619  // Update film wall and surface velocities
621 
622  // Update film wall and surface temperatures
624 
625  // Predict delta_ from continuity
626  predictDelta();
627 
628  // Update sub-models to provide updated source contributions
629  updateSubmodels();
630 
631  // Predict delta_ from continuity with updated source
632  predictDelta();
633 
634  // Capillary pressure
635  const volScalarField pc(this->pc());
636 
637  while (pimple_.loop())
638  {
639  // External pressure
640  const volScalarField pe(this->pe());
641 
642  // Solve for momentum for U_
643  const fvVectorMatrix UEqn(solveMomentum(pc, pe));
644 
645  // Solve energy for h_ - also updates thermo
646  solveEnergy();
647 
648  // Film thickness correction loop
649  while (pimple_.correct())
650  {
651  solveAlpha(UEqn, pc, pe);
652  }
653  }
654 
655  // Reset source terms for next time integration
657 }
658 
659 
661 {
662  return Cp_;
663 }
664 
665 
667 {
668  return kappa_;
669 }
670 
671 
673 {
674  return T_;
675 }
676 
677 
679 {
680  return Ts_;
681 }
682 
683 
685 {
686  return Tw_;
687 }
688 
689 
691 {
692  return h_;
693 }
694 
695 
697 {
699 
700  const scalarField& Tinternal = T_;
701 
702  Info<< indent << "min/mean/max(T) = "
703  << gMin(Tinternal) << ", "
704  << gAverage(Tinternal) << ", "
705  << gMax(Tinternal) << nl;
706 
707  phaseChange_->info(Info);
708 }
709 
710 
712 {
714  (
716  (
717  "thermoSingleLayer::Srho",
718  primaryMesh(),
720  )
721  );
722 
723  scalarField& Srho = tSrho.ref();
724  const scalarField& V = primaryMesh().V();
725  const scalar dt = time_.deltaTValue();
726 
728  {
729  const label filmPatchi = intCoupledPatchIDs()[i];
730 
731  scalarField patchMass =
732  primaryMassTrans_.boundaryField()[filmPatchi];
733 
734  toPrimary(filmPatchi, patchMass);
735 
736  const label primaryPatchi = primaryPatchIDs()[i];
737  const unallocLabelList& cells =
738  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
739 
740  forAll(patchMass, j)
741  {
742  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
743  }
744  }
745 
746  return tSrho;
747 }
748 
749 
751 (
752  const label i
753 ) const
754 {
755  const label vapId = thermo_.carrierId(filmThermo_->name());
756 
758  (
760  (
761  "thermoSingleLayer::Srho(" + Foam::name(i) + ")",
762  primaryMesh(),
764  )
765  );
766 
767  if (vapId == i)
768  {
769  scalarField& Srho = tSrho.ref();
770  const scalarField& V = primaryMesh().V();
771  const scalar dt = time().deltaTValue();
772 
774  {
775  const label filmPatchi = intCoupledPatchIDs_[i];
776 
777  scalarField patchMass =
778  primaryMassTrans_.boundaryField()[filmPatchi];
779 
780  toPrimary(filmPatchi, patchMass);
781 
782  const label primaryPatchi = primaryPatchIDs()[i];
783  const unallocLabelList& cells =
784  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
785 
786  forAll(patchMass, j)
787  {
788  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
789  }
790  }
791  }
792 
793  return tSrho;
794 }
795 
796 
798 {
800  (
802  (
803  "thermoSingleLayer::Sh",
804  primaryMesh(),
806  )
807  );
808 
809  scalarField& Sh = tSh.ref();
810  const scalarField& V = primaryMesh().V();
811  const scalar dt = time_.deltaTValue();
812 
814  {
815  const label filmPatchi = intCoupledPatchIDs_[i];
816 
817  scalarField patchEnergy =
818  primaryEnergyTrans_.boundaryField()[filmPatchi];
819 
820  toPrimary(filmPatchi, patchEnergy);
821 
822  const unallocLabelList& cells =
823  primaryMesh().boundaryMesh()[primaryPatchIDs()[i]].faceCells();
824 
825  forAll(patchEnergy, j)
826  {
827  Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
828  }
829  }
830 
831  return tSh;
832 }
833 
834 
835 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
836 
837 } // end namespace Foam
838 } // end namespace regionModels
839 } // end namespace surfaceFilmModels
840 
841 // ************************************************************************* //
volScalarField Ts_
Temperature - surface [K].
virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:434
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
Definition: typeInfo.H:134
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient between wall and film [W/m^2/K].
autoPtr< phaseChangeModel > phaseChange_
Phase change.
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
#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
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
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.
virtual void correctCoverage()
Correct film coverage field.
static autoPtr< filmRadiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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)
static const char *const typeName
Definition: Field.H:105
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:174
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
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
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
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
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
Definition: SLGThermo.C:223
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:622
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.
static autoPtr< filmViscosityModel > New(surfaceFilmRegionModel &film, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
virtual tmp< volScalarField::Internal > Srho() const
Return total mass source - Eulerian phase only.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:934
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.
virtual void correct(scalarField &availableMass, volScalarField &massToTransfer)
Correct kinematic transfers.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
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.
const cellShapeList & cells
const labelUList & faceCells() const
Return face-cell addressing.
Definition: polyPatch.C:321
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.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
#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
volScalarField kappa_
Thermal conductivity [W/m/K].
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 [].
const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
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.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
Definition: SLGThermo.H:62
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
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
const SLGThermo & thermo_
Reference to the SLGThermo.
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:172
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
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 Field< Type > & field() const
volScalarField primaryEnergyTrans_
Film energy transfer.
virtual void correctThermoFields()
Correct the thermo fields.
autoPtr< filmRadiationModel > radiation_
Radiation.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
const dimensionSet dimEnergy
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:97
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
Definition: SLGThermo.C:108
virtual bool read()
Read control parameters from dictionary.
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
Definition: fileName.H:54
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
Definition: SLGThermo.C:148
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.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
scalar deltaWet_
Threshold film thickness beyond which the film is considered &#39;wet&#39;.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
volScalarField Cp_
Specific heat capacity [J/kg/K].
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
fvVectorMatrix & UEqn
Definition: UEqn.H:11
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.
virtual void updateSurfaceVelocities()
Update film surface velocities.
virtual const volScalarField & h() const
Return the film sensible enthalpy [J/kg].
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].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
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.
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
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.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
Definition: regionModel.H:109
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
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
Definition: regionModelI.H:179
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:96
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
defineTypeNameAndDebug(kinematicSingleLayer, 0)
autoPtr< filmMomentumTransportModel > turbulence_
Turbulence model.
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
Calculate the matrix for implicit and explicit sources.
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:812
virtual const volScalarField & T() const
Return the film mean temperature [K].
virtual const volScalarField & Tw() const
Return the film wall temperature [K].