Go to the documentation of this file.
40 #include "heatTransferModel.H"
48 namespace regionModels
50 namespace surfaceFilmModels
93 Info<<
"thermoSingleLayer::resetPrimaryRegionSourceTerms()" <<
endl;
150 Info<<
"thermoSingleLayer::transferPrimaryRegionThermoFields()" <<
endl;
160 YPrimary_[i].correctBoundaryConditions();
169 Info<<
"thermoSingleLayer::transferPrimaryRegionSourceFields()" <<
endl;
193 if (
time().outputTime())
216 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
236 Info<<
"thermoSingleLayer::updateSubmodels()" <<
endl;
291 Info<<
"thermoSingleLayer::solveEnergy()" <<
endl;
330 const word& modelType,
333 const word& regionType,
351 zeroGradientFvPatchScalarField::typeName
370 zeroGradientFvPatchScalarField::typeName
396 zeroGradientFvPatchScalarField::typeName
409 zeroGradientFvPatchScalarField::typeName
430 "primaryMassPCTrans",
438 zeroGradientFvPatchScalarField::typeName
440 primaryEnergyPCTrans_
444 "primaryEnergyPCTrans",
452 zeroGradientFvPatchScalarField::typeName
455 deltaWet_(
readScalar(coeffs_.lookup(
"deltaWet"))),
456 hydrophilic_(
readBool(coeffs_.lookup(
"hydrophilic"))),
457 hydrophilicDryScale_(0.0),
458 hydrophilicWetScale_(0.0),
472 this->mappedPushedFieldPatchTypes<scalar>()
501 this->mappedFieldAndInternalPatchTypes<scalar>()
520 if (coeffs().readIfPresent(
"Tmin", Tmin_))
522 Info<<
" limiting minimum temperature to " << Tmin_ <<
endl;
525 if (coeffs().readIfPresent(
"Tmax", Tmax_))
527 Info<<
" limiting maximum temperature to " << Tmax_ <<
endl;
530 if (thermo_.hasMultiComponentCarrier())
532 YPrimary_.setSize(thermo_.carrier().species().size());
534 forAll(thermo_.carrier().species(), i)
543 thermo_.carrier().species()[i],
551 pSp_.boundaryField().types()
559 coeffs_.lookup(
"hydrophilicDryScale") >> hydrophilicDryScale_;
560 coeffs_.lookup(
"hydrophilicWetScale") >> hydrophilicWetScale_;
565 transferPrimaryRegionThermoFields();
569 correctThermoFields();
574 deltaRho_ == delta_*rho_;
593 viscosity_->correct(pPrimary_, T_);
610 const scalar massSource,
611 const vector& momentumSource,
612 const scalar pressureSource,
613 const scalar energySource
628 Info<<
" energy = " << energySource <<
nl <<
endl;
631 hsSpPrimary_.boundaryField()[patchI][faceI] -= energySource;
639 Info<<
"thermoSingleLayer::preEvolveRegion()" <<
endl;
656 Info<<
"thermoSingleLayer::evolveRegion()" <<
endl;
680 for (
int corr=1; corr<=
nCorr_; corr++)
802 const label vapId = thermo_.carrierId(filmThermo_->name());
826 const scalar dt = time().deltaTValue();
828 forAll(intCoupledPatchIDs_, i)
830 const label filmPatchI = intCoupledPatchIDs_[i];
833 primaryMassPCTrans_.boundaryField()[filmPatchI];
835 toPrimary(filmPatchI, patchMass);
837 const label primaryPatchI = primaryPatchIDs()[i];
839 primaryMesh().boundaryMesh()[primaryPatchI].faceCells();
843 Srho[
cells[j]] = patchMass[j]/(V[
cells[j]]*dt);
virtual void solveEnergy()
Solve energy equation.
volScalarField Tw_
Temperature - wall / [K].
virtual bool read()
Read control parameters from dictionary.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual bool read()
Read control parameters from dictionary.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
virtual void info()
Provide some feedback.
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
A class for handling words, derived from string.
static autoPtr< phaseChangeModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
dimensionedScalar deltaT() const
Return time step.
virtual ~thermoSingleLayer()
Destructor.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual void preEvolveRegion()
Pre-evolve film hook.
#define forAll(list, i)
Loop across all elements in list.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen film surface and primary.
A class for managing temporary objects.
const dimensionSet dimEnergy
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
Thermodynamic form of single-cell layer surface film model.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
virtual void solveContinuity()
Solve continuity equation.
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
autoPtr< phaseChangeModel > phaseChange_
Phase change.
Calculate the divergence of the given field.
volScalarField primaryEnergyPCTrans_
Film energy evolved via phase change.
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
const Time & time() const
Return the reference to the time database.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
wordList hsBoundaryTypes()
Return boundary types for sensible enthalpy field.
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, const fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
volScalarField rho_
Density / [kg/m3].
volScalarField sigma_
Surface tension / [m/s2].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const dimensionedVector & g
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
const dimensionedScalar Tstd
Standard temperature.
volScalarField T_
Temperature - mean / [K].
This function object reads fields from the time directories and adds them to the mesh database for fu...
volScalarField Cp_
Specific heat capacity / [J/kg/K].
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
scalarField availableMass_
Available mass for transfer via sub-models.
volScalarField pPrimary_
Pressure / [Pa].
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
virtual void correctThermoFields()
Correct the thermo fields.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
virtual void evolveRegion()
Evolve the film equations.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
volScalarField hsSp_
Energy / [J/m2/s].
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
const dimensionSet dimArea(sqr(dimLength))
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Pre-declare SubField and related Field type.
volScalarField delta_
Film thickness / [m].
A patch is a list of labels that address the faces in the global face list.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
virtual void info()
Provide some feedback.
tmp< fvVectorMatrix > UEqn(fvm::div(phi, U)+MRF.DDt(U)+turbulence->divDevReff(U)==fvOptions(U))
InternalField & internalField()
Return internal field.
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
static autoPtr< filmViscosityModel > New(surfaceFilmModel &owner, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
scalar deltaTValue() const
Return time step value.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
volScalarField Ts_
Temperature - surface / [K].
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
volScalarField primaryMassPCTrans_
Film mass evolved via phase change.
virtual void updateSubmodels()
Update the film sub-models.
virtual const volScalarField & T() const
Return the film mean temperature [K].
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.
PtrList< volScalarField > YPrimary_
List of specie mass fractions / [0-1].
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.
volScalarField TPrimary_
Temperature / [K].
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
Generic dimensioned Type class.
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
label nCorr_
Number of PISO-like correctors.
const double e
Elementary charge.
Ostream & indent(Ostream &os)
Indent stream.
virtual tmp< fvScalarMatrix > q(volScalarField &hs) const
Return the wall/surface heat transfer term for the enthalpy equation.
virtual void preEvolveRegion()
Pre-evolve film hook.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
volScalarField pSp_
Pressure / [Pa].
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
void correctBoundaryConditions()
Correct boundary field.
volScalarField hsSpPrimary_
Energy / [J/m2/s].
volScalarField hs_
Sensible enthalpy / [J/kg].
wordList types() const
Return a list of the patch types.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const Time & time_
Reference to the time database.
Calculate the laplacian of the given field.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
This boundary condition provides a self-contained version of the mapped condition....
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
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.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
volScalarField rhoPrimary_
Density / [kg/m3].
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
volScalarField kappa_
Thermal conductivity / [W/m/K].
void toPrimary(const label regionPatchI, List< Type > ®ionField) const
Convert a local region field to the primary region.
bool hydrophilic_
Activation flag.
thermoSingleLayer(const thermoSingleLayer &)
Disallow default bitwise copy construct.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
static autoPtr< heatTransferModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
autoPtr< filmRadiationModel > radiation_
Radiation.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
A List with indirect addressing.
virtual void correctAlpha()
Correct film coverage field.
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
Calculate the first temporal derivative.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
void size(const label)
Override size to be inconsistent with allocated storage.
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient bewteen wall and film [W/m2/K].
Type gMin(const FieldField< Field, Type > &f)
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
const dimensionSet dimVolume(pow3(dimLength))
virtual void updateSubmodels()
Update the film sub-models.
Generic GeometricField class.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
volScalarField rhoSp_
Mass / [kg/m2/s].
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
label nOuterCorr_
Number of outer correctors.
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const fvMesh & regionMesh() const
Return the region mesh database.
dimensionedScalar pos(const dimensionedScalar &ds)