39 #include "heatTransferModel.H" 47 namespace regionModels
49 namespace surfaceFilmModels
60 wordList thermoSingleLayer::hsBoundaryTypes()
92 Info<<
"thermoSingleLayer::resetPrimaryRegionSourceTerms()" <<
endl;
149 Info<<
"thermoSingleLayer::transferPrimaryRegionThermoFields()" <<
endl;
159 YPrimary_[i].correctBoundaryConditions();
168 Info<<
"thermoSingleLayer::transferPrimaryRegionSourceFields()" <<
endl;
207 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
227 Info<<
"thermoSingleLayer::updateSubmodels()" <<
endl;
276 Info<<
"thermoSingleLayer::solveEnergy()" <<
endl;
301 thermoSingleLayer::thermoSingleLayer
303 const word& modelType,
306 const word& regionType,
307 const bool readFields
324 zeroGradientFvPatchScalarField::typeName
343 zeroGradientFvPatchScalarField::typeName
369 zeroGradientFvPatchScalarField::typeName
382 zeroGradientFvPatchScalarField::typeName
403 "primaryMassPCTrans",
411 zeroGradientFvPatchScalarField::typeName
417 "primaryEnergyPCTrans",
425 zeroGradientFvPatchScalarField::typeName
445 this->mappedPushedFieldPatchTypes<scalar>()
474 this->mappedFieldAndInternalPatchTypes<scalar>()
583 const scalar massSource,
584 const vector& momentumSource,
585 const scalar pressureSource,
586 const scalar energySource
601 Info<<
" energy = " << energySource <<
nl <<
endl;
612 Info<<
"thermoSingleLayer::preEvolveRegion()" <<
endl;
629 Info<<
"thermoSingleLayer::evolveRegion()" <<
endl;
662 for (
int corr=1; corr<=
nCorr_; corr++)
743 "thermoSingleLayer::Srho",
774 Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
795 "thermoSingleLayer::Srho(" +
Foam::name(i) +
")",
828 Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
845 "thermoSingleLayer::Sh",
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)
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
label nCorr_
Number of PISO-like correctors.
virtual void preEvolveRegion()
Pre-evolve film hook.
volScalarField rhoPrimary_
Density / [kg/m3].
static const char *const typeName
Mesh data needed to do the Finite Volume discretisation.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
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)
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.
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.
volVectorField U_
Velocity - mean / [m/s].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Ostream & indent(Ostream &os)
Indent stream.
volScalarField hsSp_
Energy / [J/m2/s].
const labelUList & faceCells() const
Return face-cell addressing.
virtual void evolveRegion()
Evolve the film equations.
bool hydrophilic_
Activation flag.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
volScalarField primaryMassPCTrans_
Film mass evolved via phase change.
const dimensionSet dimArea(sqr(dimLength))
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual void correctThermoFields()
Correct the thermo fields.
void size(const label)
Override size to be inconsistent with allocated storage.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
volScalarField TPrimary_
Temperature / [K].
virtual void solveEnergy()
Solve energy equation.
InternalField & internalField()
Return internal field.
const dimensionSet dimEnergy
const fvMesh & regionMesh() const
Return the region mesh database.
volScalarField Tw_
Temperature - wall / [K].
const Time & time() const
Return the reference to the time database.
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.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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].
virtual ~thermoSingleLayer()
Destructor.
virtual void updateSubmodels()
Update the film sub-models.
Calculate the laplacian of the given field.
volScalarField T_
Temperature - mean / [K].
A patch is a list of labels that address the faces in the global face list.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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...
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
scalar deltaTValue() const
Return time step value.
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.
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.
label nOuterCorr_
Number of outer correctors.
scalar Tmin_
Minimum temperature limit (optional)
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const SLGThermo & thermo_
Reference to the SLGThermo.
dictionary coeffs_
Model coefficients dictionary.
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)
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...
const word & name() const
Return name.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
Type gMin(const FieldField< Field, Type > &f)
volScalarField delta_
Film thickness / [m].
volScalarField rho_
Density / [kg/m3].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const cellShapeList & cells
volScalarField hsSpPrimary_
Energy / [J/m2/s].
volScalarField rhoSp_
Mass / [kg/m2/s].
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.
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.
autoPtr< filmRadiationModel > radiation_
Radiation.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
List< word > wordList
A List of words.
void correctBoundaryConditions()
Correct boundary field.
virtual void info()
Provide some feedback.
const dimensionSet dimVolume(pow3(dimLength))
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
volScalarField mu_
Dynamic viscosity / [Pa.s].
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.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
volScalarField sigma_
Surface tension / [m/s2].
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.
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
volScalarField pSp_
Pressure / [Pa].
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.
virtual void preEvolveRegion()
Pre-evolve film hook.
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.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
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.
void toPrimary(const label regionPatchI, List< Type > ®ionField) const
Convert a local region field to the primary region.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
volScalarField pPrimary_
Pressure / [Pa].
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient bewteen wall and film [W/m2/K].
virtual void info()
Provide some feedback.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].