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-2016 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 "fvm.H"
33 #include "mapDistribute.H"
34 #include "constants.H"
35 
36 // Sub-models
37 #include "filmThermoModel.H"
38 #include "filmViscosityModel.H"
39 #include "heatTransferModel.H"
40 #include "phaseChangeModel.H"
41 #include "filmRadiationModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace regionModels
48 {
49 namespace surfaceFilmModels
50 {
51 
52 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
53 
54 defineTypeNameAndDebug(thermoSingleLayer, 0);
55 
56 addToRunTimeSelectionTable(surfaceFilmModel, thermoSingleLayer, mesh);
57 
58 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
59 
60 wordList thermoSingleLayer::hsBoundaryTypes()
61 {
62  wordList bTypes(T_.boundaryField().types());
63  forAll(bTypes, patchi)
64  {
65  if
66  (
67  T_.boundaryField()[patchi].fixesValue()
69  )
70  {
72  }
73  }
74 
75  return bTypes;
76 }
77 
78 
79 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
80 
82 {
83  // no additional properties to read
85 }
86 
87 
89 {
90  if (debug)
91  {
92  Info<< "thermoSingleLayer::resetPrimaryRegionSourceTerms()" << endl;
93  }
94 
96 
98 }
99 
100 
102 {
103  rho_ == filmThermo_->rho();
104  sigma_ == filmThermo_->sigma();
105  Cp_ == filmThermo_->Cp();
106  kappa_ == filmThermo_->kappa();
107 }
108 
109 
111 {
113 
115  {
118  {
119  hs_.boundaryField()[patchi] == hs(Tp, patchi);
120  }
121  }
122 }
123 
124 
126 {
128 
129  // Push boundary film temperature into wall temperature internal field
130  for (label i=0; i<intCoupledPatchIDs_.size(); i++)
131  {
133  const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
136  }
138 
139  // Update film surface temperature
140  Ts_ = T_;
142 }
143 
144 
146 {
147  if (debug)
148  {
149  Info<< "thermoSingleLayer::transferPrimaryRegionThermoFields()" << endl;
150  }
151 
153 
154  // Update primary region fields on local region via direct mapped (coupled)
155  // boundary conditions
157  forAll(YPrimary_, i)
158  {
159  YPrimary_[i].correctBoundaryConditions();
160  }
161 }
162 
163 
165 {
166  if (debug)
167  {
168  Info<< "thermoSingleLayer::transferPrimaryRegionSourceFields()" << endl;
169  }
170 
172 
173  // Convert accummulated source terms into per unit area per unit time
174  const scalar deltaT = time_.deltaTValue();
176  {
177  const scalarField& priMagSf =
179 
180  hsSpPrimary_.boundaryField()[patchi] /= priMagSf*deltaT;
181  }
182 
183  // Retrieve the source fields from the primary region via direct mapped
184  // (coupled) boundary conditions
185  // - fields require transfer of values for both patch AND to push the
186  // values into the first layer of internal cells
188 
189  // Apply enthalpy source as difference between incoming and actual states
190  hsSp_ -= rhoSp_*hs_;
191 }
192 
193 
195 {
196  if (hydrophilic_)
197  {
198  const scalar hydrophilicDry = hydrophilicDryScale_*deltaWet_;
199  const scalar hydrophilicWet = hydrophilicWetScale_*deltaWet_;
200 
201  forAll(alpha_, i)
202  {
203  if ((alpha_[i] < 0.5) && (delta_[i] > hydrophilicWet))
204  {
205  alpha_[i] = 1.0;
206  }
207  else if ((alpha_[i] > 0.5) && (delta_[i] < hydrophilicDry))
208  {
209  alpha_[i] = 0.0;
210  }
211  }
212 
214  }
215  else
216  {
217  alpha_ ==
219  }
220 }
221 
222 
224 {
225  if (debug)
226  {
227  Info<< "thermoSingleLayer::updateSubmodels()" << endl;
228  }
229 
230  // Update heat transfer coefficient sub-models
231  htcs_->correct();
232  htcw_->correct();
233 
234  phaseChange_->correct
235  (
236  time_.deltaTValue(),
240  );
241 
242  // Update radiation
243  radiation_->correct();
244 
245  // Update kinematic sub-models
247 
248  // Update source fields
250  rhoSp_ += primaryMassPCTrans_/magSf()/time().deltaT();
251 
252  // Vapour recoil pressure
253  pSp_ -= sqr(primaryMassPCTrans_/magSf()/time().deltaT())/2.0/rhoPrimary_;
254 }
255 
256 
258 {
259  return
260  (
261  // Heat-transfer to the primary region
262  - fvm::Sp(htcs_->h()/Cp_, hs)
263  + htcs_->h()*(hs/Cp_ + alpha_*(TPrimary_ - T_))
264 
265  // Heat-transfer to the wall
266  - fvm::Sp(htcw_->h()/Cp_, hs)
267  + htcw_->h()*(hs/Cp_ + alpha_*(Tw_- T_))
268  );
269 }
270 
271 
273 {
274  if (debug)
275  {
276  Info<< "thermoSingleLayer::solveEnergy()" << endl;
277  }
278 
280 
281  solve
282  (
284  + fvm::div(phi_, hs_)
285  ==
286  - hsSp_
287  - rhoSp_*hs_
288  + q(hs_)
289  + radiation_->Shs()
290  );
291 
293 
294  // evaluate viscosity from user-model
295  viscosity_->correct(pPrimary_, T_);
296 }
297 
298 
299 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
300 
301 thermoSingleLayer::thermoSingleLayer
302 (
303  const word& modelType,
304  const fvMesh& mesh,
305  const dimensionedVector& g,
306  const word& regionType,
307  const bool readFields
308 )
309 :
310  kinematicSingleLayer(modelType, mesh, g, regionType, false),
311  thermo_(mesh.lookupObject<SLGThermo>("SLGThermo")),
312  Cp_
313  (
314  IOobject
315  (
316  "Cp",
317  time().timeName(),
318  regionMesh(),
321  ),
322  regionMesh(),
324  zeroGradientFvPatchScalarField::typeName
325  ),
326  kappa_
327  (
328  IOobject
329  (
330  "kappa",
331  time().timeName(),
332  regionMesh(),
335  ),
336  regionMesh(),
338  (
339  "kappa",
341  0.0
342  ),
343  zeroGradientFvPatchScalarField::typeName
344  ),
345 
346  T_
347  (
348  IOobject
349  (
350  "Tf",
351  time().timeName(),
352  regionMesh(),
355  ),
356  regionMesh()
357  ),
358  Ts_
359  (
360  IOobject
361  (
362  "Tsf",
363  time().timeName(),
364  regionMesh(),
367  ),
368  T_,
369  zeroGradientFvPatchScalarField::typeName
370  ),
371  Tw_
372  (
373  IOobject
374  (
375  "Twf",
376  time().timeName(),
377  regionMesh(),
380  ),
381  T_,
382  zeroGradientFvPatchScalarField::typeName
383  ),
384  hs_
385  (
386  IOobject
387  (
388  "hf",
389  time().timeName(),
390  regionMesh(),
393  ),
394  regionMesh(),
395  dimensionedScalar("zero", dimEnergy/dimMass, 0.0),
396  hsBoundaryTypes()
397  ),
398 
400  (
401  IOobject
402  (
403  "primaryMassPCTrans",
404  time().timeName(),
405  regionMesh(),
408  ),
409  regionMesh(),
410  dimensionedScalar("zero", dimMass, 0),
411  zeroGradientFvPatchScalarField::typeName
412  ),
414  (
415  IOobject
416  (
417  "primaryEnergyPCTrans",
418  time().timeName(),
419  regionMesh(),
422  ),
423  regionMesh(),
424  dimensionedScalar("zero", dimEnergy, 0),
425  zeroGradientFvPatchScalarField::typeName
426  ),
427 
428  deltaWet_(readScalar(coeffs_.lookup("deltaWet"))),
429  hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))),
432 
433  hsSp_
434  (
435  IOobject
436  (
437  "hsSp",
438  time().timeName(),
439  regionMesh(),
442  ),
443  regionMesh(),
445  this->mappedPushedFieldPatchTypes<scalar>()
446  ),
447 
449  (
450  IOobject
451  (
452  hsSp_.name(), // must have same name as hSp_ to enable mapping
453  time().timeName(),
454  primaryMesh(),
457  ),
458  primaryMesh(),
459  dimensionedScalar("zero", hsSp_.dimensions(), 0.0)
460  ),
461 
462  TPrimary_
463  (
464  IOobject
465  (
466  "T", // same name as T on primary region to enable mapping
467  time().timeName(),
468  regionMesh(),
471  ),
472  regionMesh(),
473  dimensionedScalar("zero", dimTemperature, 0.0),
474  this->mappedFieldAndInternalPatchTypes<scalar>()
475  ),
476 
477  YPrimary_(),
478 
480  htcs_
481  (
482  heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
483  ),
484  htcw_
485  (
486  heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
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(),
523  dimensionedScalar("zero", dimless, 0.0),
524  pSp_.boundaryField().types()
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  correctAlpha();
541 
543 
544  // Update derived fields
545  hs_ == hs(T_);
546 
547  deltaRho_ == delta_*rho_;
548 
550  (
551  IOobject
552  (
553  "phi",
554  time().timeName(),
555  regionMesh(),
558  false
559  ),
561  );
562 
563  phi_ == phi0;
564 
565  // evaluate viscosity from user-model
566  viscosity_->correct(pPrimary_, T_);
567  }
568 }
569 
570 
571 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
572 
574 {}
575 
576 
577 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
578 
580 (
581  const label patchi,
582  const label facei,
583  const scalar massSource,
584  const vector& momentumSource,
585  const scalar pressureSource,
586  const scalar energySource
587 )
588 {
590  (
591  patchi,
592  facei,
593  massSource,
594  momentumSource,
595  pressureSource,
596  energySource
597  );
598 
599  if (debug)
600  {
601  Info<< " energy = " << energySource << nl << endl;
602  }
603 
604  hsSpPrimary_.boundaryField()[patchi][facei] -= energySource;
605 }
606 
607 
609 {
610  if (debug)
611  {
612  Info<< "thermoSingleLayer::preEvolveRegion()" << endl;
613  }
614 
615 // correctHsForMappedT();
616 
618 
619  // Update phase change
622 }
623 
624 
626 {
627  if (debug)
628  {
629  Info<< "thermoSingleLayer::evolveRegion()" << endl;
630  }
631 
632  // Update film coverage indicator
633  correctAlpha();
634 
635  // Update film wall and surface velocities
637 
638  // Update film wall and surface temperatures
640 
641  // Update sub-models to provide updated source contributions
642  updateSubmodels();
643 
644  // Solve continuity for deltaRho_
645  solveContinuity();
646 
647  for (int oCorr=1; oCorr<=nOuterCorr_; oCorr++)
648  {
649  // Explicit pressure source contribution
650  tmp<volScalarField> tpu(this->pu());
651 
652  // Implicit pressure source coefficient
653  tmp<volScalarField> tpp(this->pp());
654 
655  // Solve for momentum for U_
656  tmp<fvVectorMatrix> UEqn = solveMomentum(tpu(), tpp());
657 
658  // Solve energy for hs_ - also updates thermo
659  solveEnergy();
660 
661  // Film thickness correction loop
662  for (int corr=1; corr<=nCorr_; corr++)
663  {
664  // Solve thickness for delta_
665  solveThickness(tpu(), tpp(), UEqn());
666  }
667  }
668 
669  // Update deltaRho_ with new delta_
670  deltaRho_ == delta_*rho_;
671 
672  // Update temperature using latest hs_
673  T_ == T(hs_);
674 
675  // Reset source terms for next time integration
677 }
678 
679 
681 {
682  return Cp_;
683 }
684 
685 
687 {
688  return kappa_;
689 }
690 
691 
693 {
694  return T_;
695 }
696 
697 
699 {
700  return Ts_;
701 }
702 
703 
705 {
706  return Tw_;
707 }
708 
709 
711 {
712  return hs_;
713 }
714 
715 
717 {
718  return primaryMassPCTrans_;
719 }
720 
721 
723 {
725 
726  const scalarField& Tinternal = T_.internalField();
727 
728  Info<< indent << "min/max(T) = " << gMin(Tinternal) << ", "
729  << gMax(Tinternal) << nl;
730 
731  phaseChange_->info(Info);
732 }
733 
734 
736 {
738  (
740  (
741  IOobject
742  (
743  "thermoSingleLayer::Srho",
744  time().timeName(),
745  primaryMesh(),
748  false
749  ),
750  primaryMesh(),
752  )
753  );
754 
755  scalarField& Srho = tSrho();
756  const scalarField& V = primaryMesh().V();
757  const scalar dt = time_.deltaTValue();
758 
760  {
761  const label filmPatchi = intCoupledPatchIDs()[i];
762 
763  scalarField patchMass =
764  primaryMassPCTrans_.boundaryField()[filmPatchi];
765 
766  toPrimary(filmPatchi, patchMass);
767 
768  const label primaryPatchi = primaryPatchIDs()[i];
769  const unallocLabelList& cells =
770  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
771 
772  forAll(patchMass, j)
773  {
774  Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
775  }
776  }
777 
778  return tSrho;
779 }
780 
781 
783 (
784  const label i
785 ) const
786 {
787  const label vapId = thermo_.carrierId(filmThermo_->name());
788 
790  (
792  (
793  IOobject
794  (
795  "thermoSingleLayer::Srho(" + Foam::name(i) + ")",
796  time_.timeName(),
797  primaryMesh(),
800  false
801  ),
802  primaryMesh(),
804  )
805  );
806 
807  if (vapId == i)
808  {
809  scalarField& Srho = tSrho();
810  const scalarField& V = primaryMesh().V();
811  const scalar dt = time().deltaTValue();
812 
814  {
815  const label filmPatchi = intCoupledPatchIDs_[i];
816 
817  scalarField patchMass =
818  primaryMassPCTrans_.boundaryField()[filmPatchi];
819 
820  toPrimary(filmPatchi, patchMass);
821 
822  const label primaryPatchi = primaryPatchIDs()[i];
823  const unallocLabelList& cells =
824  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
825 
826  forAll(patchMass, j)
827  {
828  Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
829  }
830  }
831  }
832 
833  return tSrho;
834 }
835 
836 
838 {
840  (
842  (
843  IOobject
844  (
845  "thermoSingleLayer::Sh",
846  time().timeName(),
847  primaryMesh(),
850  false
851  ),
852  primaryMesh(),
854  )
855  );
856 /*
857  phase change energy fed back into the film...
858 
859  scalarField& Sh = tSh();
860  const scalarField& V = primaryMesh().V();
861  const scalar dt = time_.deltaTValue();
862 
863  forAll(intCoupledPatchIDs_, i)
864  {
865  const label filmPatchi = intCoupledPatchIDs_[i];
866 
867  scalarField patchEnergy =
868  primaryEnergyPCTrans_.boundaryField()[filmPatchi];
869 
870  toPrimary(filmPatchi, patchEnergy);
871 
872  const label primaryPatchi = primaryPatchIDs()[i];
873  const unallocLabelList& cells =
874  primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
875 
876  forAll(patchEnergy, j)
877  {
878  Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
879  }
880  }
881 */
882  return tSh;
883 }
884 
885 
886 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
887 
888 } // end namespace Foam
889 } // end namespace regionModels
890 } // end namespace surfaceFilmModels
891 
892 // ************************************************************************* //
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvmDdt.C:46
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
Definition: SLGThermo.C:108
bool readBool(Istream &)
Definition: boolIO.C:60
virtual void preEvolveRegion()
Pre-evolve film hook.
static const char *const typeName
Definition: Field.H:94
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
Definition: regionModelI.H:193
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvmDiv.C:46
static autoPtr< phaseChangeModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen film surface and primary.
virtual const volScalarField & T() const
Return the film mean temperature [K].
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
Definition: regionModelI.H:186
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:221
const labelUList & faceCells() const
Return face-cell addressing.
Definition: polyPatch.C:316
virtual void evolveRegion()
Evolve the film equations.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
volScalarField primaryMassPCTrans_
Film mass evolved via phase change.
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
A class for handling words, derived from string.
Definition: word.H:59
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
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:741
virtual void correctThermoFields()
Correct the thermo fields.
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:76
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
InternalField & internalField()
Return internal field.
const dimensionSet dimEnergy
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
volScalarField Tw_
Temperature - wall / [K].
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
messageStream Info
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
volScalarField primaryEnergyPCTrans_
Film energy evolved via phase change.
volScalarField Cp_
Specific heat capacity / [J/kg/K].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
virtual void correctAlpha()
Correct film coverage field.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:638
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
Definition: regionModel.H:117
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
PtrList< volScalarField > YPrimary_
List of specie mass fractions / [0-1].
Namespace for OpenFOAM.
virtual void updateSubmodels()
Update the film sub-models.
Calculate the laplacian of the given field.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
Definition: SLGThermo.H:62
virtual void updateSubmodels()
Update the film sub-models.
scalar Tmax_
Maximum temperature limit (optional)
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
virtual bool read()
Read control parameters from dictionary.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
static const char nl
Definition: Ostream.H:260
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
static autoPtr< heatTransferModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
scalar deltaTValue() const
Return time step value.
Definition: TimeState.H:100
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
A List with indirect addressing.
Definition: fvMatrix.H:106
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
volScalarField kappa_
Thermal conductivity / [W/m/K].
static autoPtr< filmViscosityModel > New(surfaceFilmModel &owner, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
virtual tmp< fvScalarMatrix > q(volScalarField &hs) const
Return the wall/surface heat transfer term for the enthalpy equation.
scalar Tmin_
Minimum temperature limit (optional)
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
#define forAll(list, i)
Definition: UList.H:421
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 & magSf() const
Return the face area magnitudes / [m2].
const SLGThermo & thermo_
Reference to the SLGThermo.
label patchi
dictionary coeffs_
Model coefficients dictionary.
Definition: regionModel.H:105
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
volScalarField hs_
Sensible enthalpy / [J/kg].
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.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
static autoPtr< filmRadiationModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
Macros for easy insertion into run-time selection tables.
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
const dimensionSet & dimensions() const
Return dimensions.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
const word & name() const
Return name.
Definition: IOobject.H:260
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
Type gMin(const FieldField< Field, Type > &f)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:421
const cellShapeList & cells
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 dictionary & coeffs() const
Return the model coefficients dictionary.
Definition: regionModelI.H:102
solverPerformance solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
Calculate the divergence of the given field.
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, const fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
Definition: regionModelI.H:31
autoPtr< filmRadiationModel > radiation_
Radiation.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:452
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
List< word > wordList
A List of words.
Definition: fileName.H:54
void correctBoundaryConditions()
Correct boundary field.
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
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
volScalarField Ts_
Temperature - surface / [K].
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const Time & time_
Reference to the time database.
Definition: regionModel.H:90
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
autoPtr< phaseChangeModel > phaseChange_
Phase change.
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
Definition: SLGThermo.C:238
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
virtual bool read()
Read control parameters from dictionary.
dimensionedScalar pos(const dimensionedScalar &ds)
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.
virtual void updateSurfaceVelocities()
Update film surface velocities.
dimensionedScalar deltaT() const
Return time step.
Definition: TimeState.C:79
const speciesTable & species() const
Return the table of species.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void solveContinuity()
Solve continuity equation.
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
Definition: typeInfo.H:134
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
Definition: SLGThermo.C:157
scalarField availableMass_
Available mass for transfer via sub-models.
Type gMax(const FieldField< Field, Type > &f)
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
Definition: PtrList.H:118
void toPrimary(const label regionPatchI, List< Type > &regionField) const
Convert a local region field to the primary region.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient bewteen wall and film [W/m2/K].
word timeName
Definition: getTimeIndex.H:3
scalar deltaWet_
Threshold film thickness beyond which the film is considered &#39;wet&#39;.
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].