thermoSingleLayer.C
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-2017 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"
34 #include "mapDistribute.H"
35 #include "constants.H"
36 
37 // Sub-models
38 #include "filmThermoModel.H"
39 #include "filmViscosityModel.H"
40 #include "heatTransferModel.H"
41 #include "phaseChangeModel.H"
42 #include "filmRadiationModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace regionModels
49 {
50 namespace surfaceFilmModels
51 {
52 
53 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
54 
55 defineTypeNameAndDebug(thermoSingleLayer, 0);
56 
57 addToRunTimeSelectionTable(surfaceFilmModel, thermoSingleLayer, mesh);
58 
59 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
60 
61 wordList thermoSingleLayer::hsBoundaryTypes()
62 {
63  wordList bTypes(T_.boundaryField().types());
64  forAll(bTypes, patchi)
65  {
66  if
67  (
68  T_.boundaryField()[patchi].fixesValue()
70  )
71  {
73  }
74  }
75 
76  return bTypes;
77 }
78 
79 
80 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
81 
83 {
84  // No additional properties to read
86 }
87 
88 
90 {
91  if (debug)
92  {
94  }
95 
97 
99 }
100 
101 
103 {
104  rho_ == filmThermo_->rho();
105  sigma_ == filmThermo_->sigma();
106  Cp_ == filmThermo_->Cp();
107  kappa_ == filmThermo_->kappa();
108 }
109 
110 
112 {
114 
115  volScalarField::Boundary& hsBf = hs_.boundaryFieldRef();
116 
117  forAll(hsBf, patchi)
118  {
121  {
122  hsBf[patchi] == hs(Tp, patchi);
123  }
124  }
125 }
126 
127 
129 {
131 
132  // Push boundary film temperature into wall temperature internal field
133  for (label i=0; i<intCoupledPatchIDs_.size(); i++)
134  {
136  const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
139  }
141 
142  // Update film surface temperature
143  Ts_ = T_;
145 }
146 
147 
149 {
150  if (debug)
151  {
152  InfoInFunction << endl;
153  }
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 {
169  if (debug)
170  {
171  InfoInFunction << endl;
172  }
173 
175 
176  volScalarField::Boundary& hsSpPrimaryBf =
178 
179  // Convert accummulated source terms into per unit area per unit time
180  const scalar deltaT = time_.deltaTValue();
181  forAll(hsSpPrimaryBf, patchi)
182  {
183  scalarField rpriMagSfdeltaT
184  (
185  (1.0/deltaT)/primaryMesh().magSf().boundaryField()[patchi]
186  );
187 
188  hsSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
189  }
190 
191  // Retrieve the source fields from the primary region via direct mapped
192  // (coupled) boundary conditions
193  // - fields require transfer of values for both patch AND to push the
194  // values into the first layer of internal cells
196 }
197 
198 
200 {
201  if (hydrophilic_)
202  {
203  const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
204  const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
205 
206  forAll(alpha_, i)
207  {
208  if ((alpha_[i] < 0.5) && (delta_[i] > hydrophilicWet))
209  {
210  alpha_[i] = 1.0;
211  }
212  else if ((alpha_[i] > 0.5) && (delta_[i] < hydrophilicDry))
213  {
214  alpha_[i] = 0.0;
215  }
216  }
217 
219  }
220  else
221  {
222  alpha_ ==
224  }
225 }
226 
227 
229 {
230  if (debug)
231  {
232  InfoInFunction << endl;
233  }
234 
235  // Update heat transfer coefficient sub-models
236  htcs_->correct();
237  htcw_->correct();
238 
239  // Update radiation
240  radiation_->correct();
241 
242  // Update injection model - mass returned is mass available for injection
244 
245  phaseChange_->correct
246  (
247  time_.deltaTValue(),
251  );
252 
253  const volScalarField rMagSfDt((1/time().deltaT())/magSf());
254 
255  // Vapour recoil pressure
256  pSp_ -= sqr(rMagSfDt*primaryMassTrans_)/(2*rhoPrimary_);
257 
258  // Update transfer model - mass returned is mass available for transfer
260 
261  // Update source fields
262  rhoSp_ += rMagSfDt*(cloudMassTrans_ + primaryMassTrans_);
264 
265  turbulence_->correct();
266 }
267 
268 
270 {
272 
273  return
274  (
275  // Heat-transfer to the primary region
276  - fvm::Sp(htcs_->h()/Cp_, hs)
277  + htcs_->h()*(hs/Cp_ + alpha*(TPrimary_ - T_))
278 
279  // Heat-transfer to the wall
280  - fvm::Sp(htcw_->h()/Cp_, hs)
281  + htcw_->h()*(hs/Cp_ + alpha*(Tw_- T_))
282  );
283 }
284 
285 
287 {
288  if (debug)
289  {
290  InfoInFunction << endl;
291  }
292 
294 
295  solve
296  (
298  + fvm::div(phi_, hs_)
299  ==
300  - hsSp_
301  + q(hs_)
302  + radiation_->Shs()
303  );
304 
306 
307  // Evaluate viscosity from user-model
308  viscosity_->correct(pPrimary_, T_);
309 }
310 
311 
312 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
313 
314 thermoSingleLayer::thermoSingleLayer
315 (
316  const word& modelType,
317  const fvMesh& mesh,
318  const dimensionedVector& g,
319  const word& regionType,
320  const bool readFields
321 )
322 :
323  kinematicSingleLayer(modelType, mesh, g, regionType, false),
324  thermo_(mesh.lookupObject<SLGThermo>("SLGThermo")),
325  Cp_
326  (
327  IOobject
328  (
329  "Cp",
330  time().timeName(),
331  regionMesh(),
334  ),
335  regionMesh(),
337  zeroGradientFvPatchScalarField::typeName
338  ),
339  kappa_
340  (
341  IOobject
342  (
343  "kappa",
344  time().timeName(),
345  regionMesh(),
348  ),
349  regionMesh(),
351  (
352  "kappa",
354  0.0
355  ),
356  zeroGradientFvPatchScalarField::typeName
357  ),
358 
359  T_
360  (
361  IOobject
362  (
363  "Tf",
364  time().timeName(),
365  regionMesh(),
368  ),
369  regionMesh()
370  ),
371  Ts_
372  (
373  IOobject
374  (
375  "Tsf",
376  time().timeName(),
377  regionMesh(),
380  ),
381  T_,
382  zeroGradientFvPatchScalarField::typeName
383  ),
384  Tw_
385  (
386  IOobject
387  (
388  "Twf",
389  time().timeName(),
390  regionMesh(),
393  ),
394  T_,
395  zeroGradientFvPatchScalarField::typeName
396  ),
397  hs_
398  (
399  IOobject
400  (
401  "hf",
402  time().timeName(),
403  regionMesh(),
406  ),
407  regionMesh(),
408  dimensionedScalar("zero", dimEnergy/dimMass, 0.0),
409  hsBoundaryTypes()
410  ),
411 
413  (
414  IOobject
415  (
416  "primaryEnergyTrans",
417  time().timeName(),
418  regionMesh(),
421  ),
422  regionMesh(),
423  dimensionedScalar("zero", dimEnergy, 0),
424  zeroGradientFvPatchScalarField::typeName
425  ),
426 
427  deltaWet_(readScalar(coeffs_.lookup("deltaWet"))),
428  hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
431 
432  hsSp_
433  (
434  IOobject
435  (
436  "hsSp",
437  time().timeName(),
438  regionMesh(),
441  ),
442  regionMesh(),
444  this->mappedPushedFieldPatchTypes<scalar>()
445  ),
446 
448  (
449  IOobject
450  (
451  hsSp_.name(), // Must have same name as hSp_ to enable mapping
452  time().timeName(),
453  primaryMesh(),
456  ),
457  primaryMesh(),
458  dimensionedScalar("zero", hsSp_.dimensions(), 0.0)
459  ),
460 
461  TPrimary_
462  (
463  IOobject
464  (
465  "T", // Same name as T on primary region to enable mapping
466  time().timeName(),
467  regionMesh(),
470  ),
471  regionMesh(),
472  dimensionedScalar("zero", dimTemperature, 0.0),
473  this->mappedFieldAndInternalPatchTypes<scalar>()
474  ),
475 
476  YPrimary_(),
477 
479  htcs_
480  (
481  heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
482  ),
483  htcw_
484  (
485  heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
486  ),
489  Tmin_(-VGREAT),
490  Tmax_(VGREAT)
491 {
492  if (coeffs().readIfPresent("Tmin", Tmin_))
493  {
494  Info<< " limiting minimum temperature to " << Tmin_ << endl;
495  }
496 
497  if (coeffs().readIfPresent("Tmax", Tmax_))
498  {
499  Info<< " limiting maximum temperature to " << Tmax_ << endl;
500  }
501 
503  {
504  YPrimary_.setSize(thermo_.carrier().species().size());
505 
506  forAll(thermo_.carrier().species(), i)
507  {
508  YPrimary_.set
509  (
510  i,
511  new volScalarField
512  (
513  IOobject
514  (
515  thermo_.carrier().species()[i],
516  time().timeName(),
517  regionMesh(),
520  ),
521  regionMesh(),
522  dimensionedScalar("zero", dimless, 0.0),
523  pSp_.boundaryField().types()
524  )
525  );
526  }
527  }
528 
529  if (hydrophilic_)
530  {
531  coeffs_.lookup("hydrophilicDryScale") >> hydrophilicDryScale_;
532  coeffs_.lookup("hydrophilicWetScale") >> hydrophilicWetScale_;
533  }
534 
535  if (readFields)
536  {
538 
539  correctAlpha();
540 
542 
543  // Update derived fields
544  hs_ == hs(T_);
545 
546  deltaRho_ == delta_*rho_;
547 
549  (
550  IOobject
551  (
552  "phi",
553  time().timeName(),
554  regionMesh(),
557  false
558  ),
560  );
561 
562  phi_ == phi0;
563 
564  // Evaluate viscosity from user-model
565  viscosity_->correct(pPrimary_, T_);
566  }
567 }
568 
569 
570 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
571 
573 {}
574 
575 
576 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
577 
579 (
580  const label patchi,
581  const label facei,
582  const scalar massSource,
583  const vector& momentumSource,
584  const scalar pressureSource,
585  const scalar energySource
586 )
587 {
589  (
590  patchi,
591  facei,
592  massSource,
593  momentumSource,
594  pressureSource,
595  energySource
596  );
597 
598  if (debug)
599  {
600  Info<< " energy = " << energySource << nl << endl;
601  }
602 
603  hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
604 }
605 
606 
608 {
609  if (debug)
610  {
611  InfoInFunction << endl;
612  }
613 
616 }
617 
618 
620 {
621  if (debug)
622  {
623  InfoInFunction << endl;
624  }
625 
626  // Update film coverage indicator
627  correctAlpha();
628 
629  // Update film wall and surface velocities
631 
632  // Update film wall and surface temperatures
634 
635  // Update sub-models to provide updated source contributions
636  updateSubmodels();
637 
638  // Solve continuity for deltaRho_
639  solveContinuity();
640 
641  for (int oCorr=1; oCorr<=nOuterCorr_; oCorr++)
642  {
643  // Explicit pressure source contribution
644  tmp<volScalarField> tpu(this->pu());
645 
646  // Implicit pressure source coefficient
647  tmp<volScalarField> tpp(this->pp());
648 
649  // Solve for momentum for U_
650  tmp<fvVectorMatrix> UEqn = solveMomentum(tpu(), tpp());
651 
652  // Solve energy for hs_ - also updates thermo
653  solveEnergy();
654 
655  // Film thickness correction loop
656  for (int corr=1; corr<=nCorr_; corr++)
657  {
658  // Solve thickness for delta_
659  solveThickness(tpu(), tpp(), UEqn());
660  }
661  }
662 
663  // Update deltaRho_ with new delta_
664  deltaRho_ == delta_*rho_;
665 
666  // Update temperature using latest hs_
667  T_ == T(hs_);
668 
669  // Reset source terms for next time integration
671 }
672 
673 
675 {
676  return Cp_;
677 }
678 
679 
681 {
682  return kappa_;
683 }
684 
685 
687 {
688  return T_;
689 }
690 
691 
693 {
694  return Ts_;
695 }
696 
697 
699 {
700  return Tw_;
701 }
702 
703 
705 {
706  return hs_;
707 }
708 
709 
711 {
713 
714  const scalarField& Tinternal = T_;
715 
716  Info<< indent << "min/mean/max(T) = "
717  << gMin(Tinternal) << ", "
718  << gAverage(Tinternal) << ", "
719  << gMax(Tinternal) << nl;
720 
721  phaseChange_->info(Info);
722 }
723 
724 
726 {
728  (
730  (
731  IOobject
732  (
733  "thermoSingleLayer::Srho",
734  time().timeName(),
735  primaryMesh(),
738  false
739  ),
740  primaryMesh(),
742  )
743  );
744 
745  scalarField& Srho = tSrho.ref();
746  const scalarField& V = primaryMesh().V();
747  const scalar dt = time_.deltaTValue();
748 
750  {
751  const label filmPatchi = intCoupledPatchIDs()[i];
752 
753  scalarField patchMass =
754  primaryMassTrans_.boundaryField()[filmPatchi];
755 
756  toPrimary(filmPatchi, patchMass);
757 
758  const label primaryPatchi = primaryPatchIDs()[i];
759  const unallocLabelList& cells =
760  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
761 
762  forAll(patchMass, j)
763  {
764  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
765  }
766  }
767 
768  return tSrho;
769 }
770 
771 
773 (
774  const label i
775 ) const
776 {
777  const label vapId = thermo_.carrierId(filmThermo_->name());
778 
780  (
782  (
783  IOobject
784  (
785  "thermoSingleLayer::Srho(" + Foam::name(i) + ")",
786  time_.timeName(),
787  primaryMesh(),
790  false
791  ),
792  primaryMesh(),
794  )
795  );
796 
797  if (vapId == i)
798  {
799  scalarField& Srho = tSrho.ref();
800  const scalarField& V = primaryMesh().V();
801  const scalar dt = time().deltaTValue();
802 
804  {
805  const label filmPatchi = intCoupledPatchIDs_[i];
806 
807  scalarField patchMass =
808  primaryMassTrans_.boundaryField()[filmPatchi];
809 
810  toPrimary(filmPatchi, patchMass);
811 
812  const label primaryPatchi = primaryPatchIDs()[i];
813  const unallocLabelList& cells =
814  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
815 
816  forAll(patchMass, j)
817  {
818  Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
819  }
820  }
821  }
822 
823  return tSrho;
824 }
825 
826 
828 {
830  (
832  (
833  IOobject
834  (
835  "thermoSingleLayer::Sh",
836  time().timeName(),
837  primaryMesh(),
840  false
841  ),
842  primaryMesh(),
844  )
845  );
846 
847  scalarField& Sh = tSh.ref();
848  const scalarField& V = primaryMesh().V();
849  const scalar dt = time_.deltaTValue();
850 
852  {
853  const label filmPatchi = intCoupledPatchIDs_[i];
854 
855  scalarField patchEnergy =
856  primaryEnergyTrans_.boundaryField()[filmPatchi];
857 
858  toPrimary(filmPatchi, patchEnergy);
859 
860  const unallocLabelList& cells =
861  primaryMesh().boundaryMesh()[primaryPatchIDs()[i]].faceCells();
862 
863  forAll(patchEnergy, j)
864  {
865  Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
866  }
867  }
868 
869  return tSh;
870 }
871 
872 
873 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
874 
875 } // end namespace Foam
876 } // end namespace regionModels
877 } // end namespace surfaceFilmModels
878 
879 // ************************************************************************* //
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 bewteen 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:291
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:223
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
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)
static autoPtr< filmViscosityModel > New(surfaceFilmModel &film, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
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:253
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
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:644
bool readBool(Istream &)
Definition: boolIO.C:60
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen 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.
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.
static autoPtr< heatTransferModel > New(surfaceFilmModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
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 succesful.
Definition: doubleScalar.H:63
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:262
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.
static autoPtr< filmRadiationModel > New(surfaceFilmModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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.
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].
static autoPtr< phaseChangeModel > New(surfaceFilmModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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].