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-2018 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 "fvcDiv.H"
28 #include "fvcLaplacian.H"
29 #include "fvcFlux.H"
30 #include "fvm.H"
32 #include "mixedFvPatchFields.H"
34 #include "mapDistribute.H"
35 #include "constants.H"
37 
38 // Sub-models
39 #include "filmThermoModel.H"
40 #include "filmViscosityModel.H"
41 #include "heatTransferModel.H"
42 #include "phaseChangeModel.H"
43 #include "filmRadiationModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace regionModels
50 {
51 namespace surfaceFilmModels
52 {
53 
54 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
55 
56 defineTypeNameAndDebug(thermoSingleLayer, 0);
57 
58 addToRunTimeSelectionTable(surfaceFilmRegionModel, thermoSingleLayer, mesh);
59 
60 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
61 
62 wordList thermoSingleLayer::hsBoundaryTypes()
63 {
64  wordList bTypes(T_.boundaryField().types());
65  forAll(bTypes, patchi)
66  {
67  if
68  (
69  T_.boundaryField()[patchi].fixesValue()
70  || isA<mixedFvPatchScalarField>(T_.boundaryField()[patchi])
71  || isA<mappedFieldFvPatchField<scalar>>(T_.boundaryField()[patchi])
72  )
73  {
75  }
76  }
77 
78  return bTypes;
79 }
80 
81 
82 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
83 
85 {
86  // No additional properties to read
88 }
89 
90 
92 {
93  if (debug)
94  {
96  }
97 
99 
100  hsSpPrimary_ == dimensionedScalar("zero", hsSp_.dimensions(), 0.0);
101 }
102 
103 
105 {
106  rho_ == filmThermo_->rho();
107  sigma_ == filmThermo_->sigma();
108  Cp_ == filmThermo_->Cp();
109  kappa_ == filmThermo_->kappa();
110 }
111 
112 
114 {
116 
117  volScalarField::Boundary& hsBf = hs_.boundaryFieldRef();
118 
119  forAll(hsBf, patchi)
120  {
123  {
124  hsBf[patchi] == hs(Tp, patchi);
125  }
126  }
127 }
128 
129 
131 {
133 
134  // Push boundary film temperature into wall temperature internal field
135  for (label i=0; i<intCoupledPatchIDs_.size(); i++)
136  {
138  const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
141  }
143 
144  // Update film surface temperature
145  Ts_ = T_;
147 }
148 
149 
151 {
152  if (debug)
153  {
154  InfoInFunction << endl;
155  }
156 
158 
159  // Update primary region fields on local region via direct mapped (coupled)
160  // boundary conditions
162  forAll(YPrimary_, i)
163  {
164  YPrimary_[i].correctBoundaryConditions();
165  }
166 }
167 
168 
170 {
171  if (debug)
172  {
173  InfoInFunction << endl;
174  }
175 
177 
178  volScalarField::Boundary& hsSpPrimaryBf =
180 
181  // Convert accummulated source terms into per unit area per unit time
182  const scalar deltaT = time_.deltaTValue();
183  forAll(hsSpPrimaryBf, patchi)
184  {
185  scalarField rpriMagSfdeltaT
186  (
187  (1.0/deltaT)/primaryMesh().magSf().boundaryField()[patchi]
188  );
189 
190  hsSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
191  }
192 
193  // Retrieve the source fields from the primary region via direct mapped
194  // (coupled) boundary conditions
195  // - fields require transfer of values for both patch AND to push the
196  // values into the first layer of internal cells
198 }
199 
200 
202 {
203  if (hydrophilic_)
204  {
205  const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
206  const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
207 
208  forAll(alpha_, i)
209  {
210  if ((alpha_[i] < 0.5) && (delta_[i] > hydrophilicWet))
211  {
212  alpha_[i] = 1.0;
213  }
214  else if ((alpha_[i] > 0.5) && (delta_[i] < hydrophilicDry))
215  {
216  alpha_[i] = 0.0;
217  }
218  }
219 
221  }
222  else
223  {
224  alpha_ ==
226  }
227 }
228 
229 
231 {
232  if (debug)
233  {
234  InfoInFunction << endl;
235  }
236 
237  // Update heat transfer coefficient sub-models
238  htcs_->correct();
239  htcw_->correct();
240 
241  // Update radiation
242  radiation_->correct();
243 
244  // Update injection model - mass returned is mass available for injection
246 
247  phaseChange_->correct
248  (
249  time_.deltaTValue(),
253  );
254 
255  const volScalarField rMagSfDt((1/time().deltaT())/magSf());
256 
257  // Vapour recoil pressure
258  pSp_ -= sqr(rMagSfDt*primaryMassTrans_)/(2*rhoPrimary_);
259 
260  // Update transfer model - mass returned is mass available for transfer
262 
263  // Update source fields
264  rhoSp_ += rMagSfDt*(cloudMassTrans_ + primaryMassTrans_);
266 
267  turbulence_->correct();
268 }
269 
270 
272 {
274 
275  return
276  (
277  // Heat-transfer to the primary region
278  - fvm::Sp(htcs_->h()/Cp_, hs)
279  + htcs_->h()*(hs/Cp_ + alpha*(TPrimary_ - T_))
280 
281  // Heat-transfer to the wall
282  - fvm::Sp(htcw_->h()/Cp_, hs)
283  + htcw_->h()*(hs/Cp_ + alpha*(Tw_- T_))
284  );
285 }
286 
287 
289 {
290  if (debug)
291  {
292  InfoInFunction << endl;
293  }
294 
296 
297  solve
298  (
300  + fvm::div(phi_, hs_)
301  ==
302  - hsSp_
303  + q(hs_)
304  + radiation_->Shs()
305  );
306 
308 
309  // Evaluate viscosity from user-model
310  viscosity_->correct(pPrimary_, T_);
311 }
312 
313 
314 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
315 
316 thermoSingleLayer::thermoSingleLayer
317 (
318  const word& modelType,
319  const fvMesh& mesh,
320  const dimensionedVector& g,
321  const word& regionType,
322  const bool readFields
323 )
324 :
325  kinematicSingleLayer(modelType, mesh, g, regionType, false),
326  thermo_(mesh.lookupObject<SLGThermo>("SLGThermo")),
327  Cp_
328  (
329  IOobject
330  (
331  "Cp",
332  time().timeName(),
333  regionMesh(),
336  ),
337  regionMesh(),
339  zeroGradientFvPatchScalarField::typeName
340  ),
341  kappa_
342  (
343  IOobject
344  (
345  "kappa",
346  time().timeName(),
347  regionMesh(),
350  ),
351  regionMesh(),
353  (
354  "kappa",
356  0.0
357  ),
358  zeroGradientFvPatchScalarField::typeName
359  ),
360 
361  T_
362  (
363  IOobject
364  (
365  "Tf",
366  time().timeName(),
367  regionMesh(),
370  ),
371  regionMesh()
372  ),
373  Ts_
374  (
375  IOobject
376  (
377  "Tsf",
378  time().timeName(),
379  regionMesh(),
382  ),
383  T_,
384  zeroGradientFvPatchScalarField::typeName
385  ),
386  Tw_
387  (
388  IOobject
389  (
390  "Twf",
391  time().timeName(),
392  regionMesh(),
395  ),
396  T_,
397  zeroGradientFvPatchScalarField::typeName
398  ),
399  hs_
400  (
401  IOobject
402  (
403  "hf",
404  time().timeName(),
405  regionMesh(),
408  ),
409  regionMesh(),
410  dimensionedScalar("zero", dimEnergy/dimMass, 0.0),
411  hsBoundaryTypes()
412  ),
413 
415  (
416  IOobject
417  (
418  "primaryEnergyTrans",
419  time().timeName(),
420  regionMesh(),
423  ),
424  regionMesh(),
425  dimensionedScalar("zero", dimEnergy, 0),
426  zeroGradientFvPatchScalarField::typeName
427  ),
428 
429  deltaWet_(readScalar(coeffs_.lookup("deltaWet"))),
430  hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
433 
434  hsSp_
435  (
436  IOobject
437  (
438  "hsSp",
439  time().timeName(),
440  regionMesh(),
443  ),
444  regionMesh(),
446  this->mappedPushedFieldPatchTypes<scalar>()
447  ),
448 
450  (
451  IOobject
452  (
453  hsSp_.name(), // Must have same name as hSp_ to enable mapping
454  time().timeName(),
455  primaryMesh(),
458  ),
459  primaryMesh(),
460  dimensionedScalar("zero", hsSp_.dimensions(), 0.0)
461  ),
462 
463  TPrimary_
464  (
465  IOobject
466  (
467  "T", // Same name as T on primary region to enable mapping
468  time().timeName(),
469  regionMesh(),
472  ),
473  regionMesh(),
474  dimensionedScalar("zero", dimTemperature, 0.0),
475  this->mappedFieldAndInternalPatchTypes<scalar>()
476  ),
477 
478  YPrimary_(),
479 
481  htcs_
482  (
483  heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
484  ),
485  htcw_
486  (
487  heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
488  ),
491  Tmin_(-vGreat),
492  Tmax_(vGreat)
493 {
494  if (coeffs().readIfPresent("Tmin", Tmin_))
495  {
496  Info<< " limiting minimum temperature to " << Tmin_ << endl;
497  }
498 
499  if (coeffs().readIfPresent("Tmax", Tmax_))
500  {
501  Info<< " limiting maximum temperature to " << Tmax_ << endl;
502  }
503 
505  {
506  YPrimary_.setSize(thermo_.carrier().species().size());
507 
508  forAll(thermo_.carrier().species(), i)
509  {
510  YPrimary_.set
511  (
512  i,
513  new volScalarField
514  (
515  IOobject
516  (
517  thermo_.carrier().species()[i],
518  time().timeName(),
519  regionMesh(),
522  ),
523  regionMesh(),
524  dimensionedScalar("zero", dimless, 0.0),
525  pSp_.boundaryField().types()
526  )
527  );
528  }
529  }
530 
531  if (hydrophilic_)
532  {
533  coeffs_.lookup("hydrophilicDryScale") >> hydrophilicDryScale_;
534  coeffs_.lookup("hydrophilicWetScale") >> hydrophilicWetScale_;
535  }
536 
537  if (readFields)
538  {
540 
541  correctAlpha();
542 
544 
545  // Update derived fields
546  hs_ == hs(T_);
547 
548  deltaRho_ == delta_*rho_;
549 
551  (
552  IOobject
553  (
554  "phi",
555  time().timeName(),
556  regionMesh(),
559  false
560  ),
562  );
563 
564  phi_ == phi0;
565 
566  // Evaluate viscosity from user-model
567  viscosity_->correct(pPrimary_, T_);
568  }
569 }
570 
571 
572 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
573 
575 {}
576 
577 
578 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
579 
581 (
582  const label patchi,
583  const label facei,
584  const scalar massSource,
585  const vector& momentumSource,
586  const scalar pressureSource,
587  const scalar energySource
588 )
589 {
591  (
592  patchi,
593  facei,
594  massSource,
595  momentumSource,
596  pressureSource,
597  energySource
598  );
599 
600  if (debug)
601  {
602  Info<< " energy = " << energySource << nl << endl;
603  }
604 
605  hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
606 }
607 
608 
610 {
611  if (debug)
612  {
613  InfoInFunction << endl;
614  }
615 
618 }
619 
620 
622 {
623  if (debug)
624  {
625  InfoInFunction << endl;
626  }
627 
628  // Update film coverage indicator
629  correctAlpha();
630 
631  // Update film wall and surface velocities
633 
634  // Update film wall and surface temperatures
636 
637  // Solve continuity for deltaRho_
638  solveContinuity();
639 
640  // Update sub-models to provide updated source contributions
641  updateSubmodels();
642 
643  // Solve continuity for deltaRho_
644  solveContinuity();
645 
646  for (int oCorr=1; oCorr<=nOuterCorr_; oCorr++)
647  {
648  // Explicit pressure source contribution
649  tmp<volScalarField> tpu(this->pu());
650 
651  // Implicit pressure source coefficient
652  tmp<volScalarField> tpp(this->pp());
653 
654  // Solve for momentum for U_
655  tmp<fvVectorMatrix> UEqn = solveMomentum(tpu(), tpp());
656 
657  // Solve energy for hs_ - also updates thermo
658  solveEnergy();
659 
660  // Film thickness correction loop
661  for (int corr=1; corr<=nCorr_; corr++)
662  {
663  // Solve thickness for delta_
664  solveThickness(tpu(), tpp(), UEqn());
665  }
666  }
667 
668  // Update deltaRho_ with new delta_
669  deltaRho_ == delta_*rho_;
670 
671  // Update temperature using latest hs_
672  T_ == T(hs_);
673 
674  // Reset source terms for next time integration
676 }
677 
678 
680 {
681  return Cp_;
682 }
683 
684 
686 {
687  return kappa_;
688 }
689 
690 
692 {
693  return T_;
694 }
695 
696 
698 {
699  return Ts_;
700 }
701 
702 
704 {
705  return Tw_;
706 }
707 
708 
710 {
711  return hs_;
712 }
713 
714 
716 {
718 
719  const scalarField& Tinternal = T_;
720 
721  Info<< indent << "min/mean/max(T) = "
722  << gMin(Tinternal) << ", "
723  << gAverage(Tinternal) << ", "
724  << gMax(Tinternal) << nl;
725 
726  phaseChange_->info(Info);
727 }
728 
729 
731 {
733  (
735  (
736  IOobject
737  (
738  "thermoSingleLayer::Srho",
739  time().timeName(),
740  primaryMesh(),
743  false
744  ),
745  primaryMesh(),
747  )
748  );
749 
750  scalarField& Srho = tSrho.ref();
751  const scalarField& V = primaryMesh().V();
752  const scalar dt = time_.deltaTValue();
753 
755  {
756  const label filmPatchi = intCoupledPatchIDs()[i];
757 
758  scalarField patchMass =
759  primaryMassTrans_.boundaryField()[filmPatchi];
760 
761  toPrimary(filmPatchi, patchMass);
762 
763  const label primaryPatchi = primaryPatchIDs()[i];
764  const unallocLabelList& cells =
765  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
766 
767  forAll(patchMass, j)
768  {
769  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
770  }
771  }
772 
773  return tSrho;
774 }
775 
776 
778 (
779  const label i
780 ) const
781 {
782  const label vapId = thermo_.carrierId(filmThermo_->name());
783 
785  (
787  (
788  IOobject
789  (
790  "thermoSingleLayer::Srho(" + Foam::name(i) + ")",
791  time_.timeName(),
792  primaryMesh(),
795  false
796  ),
797  primaryMesh(),
799  )
800  );
801 
802  if (vapId == i)
803  {
804  scalarField& Srho = tSrho.ref();
805  const scalarField& V = primaryMesh().V();
806  const scalar dt = time().deltaTValue();
807 
809  {
810  const label filmPatchi = intCoupledPatchIDs_[i];
811 
812  scalarField patchMass =
813  primaryMassTrans_.boundaryField()[filmPatchi];
814 
815  toPrimary(filmPatchi, patchMass);
816 
817  const label primaryPatchi = primaryPatchIDs()[i];
818  const unallocLabelList& cells =
819  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
820 
821  forAll(patchMass, j)
822  {
823  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
824  }
825  }
826  }
827 
828  return tSrho;
829 }
830 
831 
833 {
835  (
837  (
838  IOobject
839  (
840  "thermoSingleLayer::Sh",
841  time().timeName(),
842  primaryMesh(),
845  false
846  ),
847  primaryMesh(),
849  )
850  );
851 
852  scalarField& Sh = tSh.ref();
853  const scalarField& V = primaryMesh().V();
854  const scalar dt = time_.deltaTValue();
855 
857  {
858  const label filmPatchi = intCoupledPatchIDs_[i];
859 
860  scalarField patchEnergy =
861  primaryEnergyTrans_.boundaryField()[filmPatchi];
862 
863  toPrimary(filmPatchi, patchEnergy);
864 
865  const unallocLabelList& cells =
866  primaryMesh().boundaryMesh()[primaryPatchIDs()[i]].faceCells();
867 
868  forAll(patchEnergy, j)
869  {
870  Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
871  }
872  }
873 
874  return tSh;
875 }
876 
877 
878 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
879 
880 } // end namespace Foam
881 } // end namespace regionModels
882 } // end namespace surfaceFilmModels
883 
884 // ************************************************************************* //
volScalarField Ts_
Temperature - surface [K].
virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:424
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/m2/K].
virtual void correctAlpha()
Correct film coverage field.
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:428
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
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:297
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:226
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
static autoPtr< filmRadiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
Kinematic form of single-cell layer surface film 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:94
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
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:256
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.
const speciesTable & species() const
Return the table of species.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
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:626
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)
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, const fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
Macros for easy insertion into run-time selection tables.
virtual void solveContinuity()
Solve continuity equation.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
volScalarField deltaRho_
Film thickness*density (helper field) [kg/m2].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:692
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
virtual tmp< fvScalarMatrix > q(volScalarField &hs) const
Return the wall/surface heat transfer term for the enthalpy equation.
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
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
const labelUList & faceCells() const
Return face-cell addressing.
Definition: polyPatch.C:315
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
A class for handling words, derived from string.
Definition: word.H:59
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
Calculate the face-flux of the given field.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
Calculate the laplacian of the given field.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvmDdt.C:46
scalar deltaTValue() const
Return time step value.
Definition: TimeStateI.H:41
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 fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
word timeName
Definition: getTimeIndex.H:3
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.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Definition: doubleScalar.H:68
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:61
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
const SLGThermo & thermo_
Reference to the SLGThermo.
Calculate the divergence of the given field.
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
Definition: regionModelI.H:172
dimensionedScalar pos0(const dimensionedScalar &ds)
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:265
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)
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
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.
dictionary coeffs_
Model coefficients dictionary.
Definition: regionModel.H:102
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
Definition: SLGThermo.C:108
virtual bool read()
Read control parameters from dictionary.
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 const volScalarField & magSf() const
Return the face area magnitudes / [m2].
label patchi
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:87
surfaceScalarField phi_
Mass flux (includes film thickness) [kg.m/s].
fvVectorMatrix & UEqn
Definition: UEqn.H:13
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
A List with indirect addressing.
Definition: fvMatrix.H:106
virtual void preEvolveRegion()
Pre-evolve film hook.
virtual void updateSurfaceVelocities()
Update film surface velocities.
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.
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
messageStream Info
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
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:114
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)
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
volScalarField hs_
Sensible enthalpy [J/kg].
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered [].
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
Namespace for OpenFOAM.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:576
virtual const volScalarField & T() const
Return the film mean temperature [K].
#define InfoInFunction
Report an information message using Foam::Info.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].