40 #include "heatTransferModel.H" 48 namespace regionModels
50 namespace surfaceFilmModels
61 wordList thermoSingleLayer::hsBoundaryTypes()
162 YPrimary_[i].correctBoundaryConditions();
176 volScalarField::Boundary& hsSpPrimaryBf =
186 hsSpPrimaryBf[
patchi] /= priMagSf*deltaT;
213 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
307 thermoSingleLayer::thermoSingleLayer
309 const word& modelType,
312 const word& regionType,
313 const bool readFields
330 zeroGradientFvPatchScalarField::typeName
349 zeroGradientFvPatchScalarField::typeName
375 zeroGradientFvPatchScalarField::typeName
388 zeroGradientFvPatchScalarField::typeName
409 "primaryMassPCTrans",
417 zeroGradientFvPatchScalarField::typeName
423 "primaryEnergyPCTrans",
431 zeroGradientFvPatchScalarField::typeName
451 this->mappedPushedFieldPatchTypes<scalar>()
480 this->mappedFieldAndInternalPatchTypes<scalar>()
589 const scalar massSource,
590 const vector& momentumSource,
591 const scalar pressureSource,
592 const scalar energySource
607 Info<<
" energy = " << energySource <<
nl <<
endl;
666 for (
int corr=1; corr<=
nCorr_; corr++)
733 <<
gMin(Tinternal) <<
", " 749 "thermoSingleLayer::Srho",
780 Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
801 "thermoSingleLayer::Srho(" +
Foam::name(i) +
")",
834 Srho[cells[j]] = patchMass[j]/(V[cells[j]]*dt);
851 "thermoSingleLayer::Sh",
volScalarField Ts_
Temperature - surface / [K].
virtual bool read()
Read control parameters from dictionary.
volScalarField hsSpPrimary_
Energy / [J/m2/s].
volScalarField Tw_
Temperature - wall / [K].
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient bewteen wall and film [W/m2/K].
virtual void correctAlpha()
Correct film coverage field.
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
volScalarField TPrimary_
Temperature / [K].
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
autoPtr< phaseChangeModel > phaseChange_
Phase change.
#define forAll(list, i)
Loop across all elements in list.
virtual void preEvolveRegion()
Pre-evolve film hook.
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 resetPrimaryRegionSourceTerms()
Reset source term fields.
Ostream & indent(Ostream &os)
Indent stream.
const Time & time() const
Return the reference to the time database.
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
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
static autoPtr< phaseChangeModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
bool hydrophilic_
Activation flag.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
virtual void solveEnergy()
Solve energy equation.
scalarField availableMass_
Available mass for transfer via sub-models.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen film surface and primary.
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
const polyBoundaryMesh & boundaryMesh() const
Return boundary 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 primaryEnergyPCTrans_
Film energy evolved via phase change.
const fvMesh & regionMesh() const
Return the region mesh database.
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].
volScalarField sigma_
Surface tension / [m/s2].
virtual void info()
Provide some feedback.
const dictionary & coeffs() const
Return the model coefficients dictionary.
volScalarField rho_
Density / [kg/m3].
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
volScalarField hsSp_
Energy / [J/m2/s].
dimensionedScalar pos(const dimensionedScalar &ds)
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionSet dimVolume(pow3(dimLength))
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
virtual void updateSubmodels()
Update the film sub-models.
volScalarField T_
Temperature - mean / [K].
virtual void info()
Provide some feedback.
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
A class for handling words, derived from string.
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Calculate the face-flux of the given field.
virtual tmp< fvScalarMatrix > q(volScalarField &hs) const
Return the wall/surface heat transfer term for the enthalpy equation.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Calculate the laplacian of the given field.
volScalarField pPrimary_
Pressure / [Pa].
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
volVectorField U_
Velocity - mean / [m/s].
volScalarField kappa_
Thermal conductivity / [W/m/K].
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
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.
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
volScalarField delta_
Film thickness / [m].
volScalarField pSp_
Pressure / [Pa].
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...
const dimensionSet & dimensions() const
Return dimensions.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
const SLGThermo & thermo_
Reference to the SLGThermo.
Calculate the divergence of the given field.
virtual const volScalarField & T() const
Return the film mean temperature [K].
volScalarField rhoPrimary_
Density / [kg/m3].
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.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
label nCorr_
Number of PISO-like correctors.
Type gMax(const FieldField< Field, Type > &f)
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
static autoPtr< filmRadiationModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
scalar deltaTValue() const
Return time step value.
virtual void correctThermoFields()
Correct the thermo fields.
autoPtr< filmRadiationModel > radiation_
Radiation.
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimEnergy
dictionary coeffs_
Model coefficients dictionary.
virtual bool read()
Read control parameters from dictionary.
virtual void updateSubmodels()
Update the film sub-models.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
List< word > wordList
A List of words.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensionedScalar deltaT() const
Return time step.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
volScalarField mu_
Dynamic viscosity / [Pa.s].
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const labelUList & faceCells() const
Return face-cell addressing.
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.
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
virtual ~thermoSingleLayer()
Destructor.
static autoPtr< filmViscosityModel > New(surfaceFilmModel &owner, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
Mesh data needed to do the Finite Volume discretisation.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
A List with indirect addressing.
virtual void preEvolveRegion()
Pre-evolve film hook.
static autoPtr< heatTransferModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void updateSurfaceVelocities()
Update film surface velocities.
label nOuterCorr_
Number of outer correctors.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
PtrList< volScalarField > YPrimary_
List of specie mass fractions / [0-1].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
void correctBoundaryConditions()
Correct boundary field.
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
const speciesTable & species() const
Return the table of species.
volScalarField primaryMassPCTrans_
Film mass evolved via phase change.
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.
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)
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
A class for managing temporary objects.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
A patch is a list of labels that address the faces in the global face list.
T & ref() const
Return non-const reference or generate a fatal error.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
volScalarField rhoSp_
Mass / [kg/m2/s].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
volScalarField hs_
Sensible enthalpy / [J/kg].
const word & name() const
Return name.
const dimensionSet dimArea(sqr(dimLength))
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.