40 #include "heatTransferModel.H" 48 namespace regionModels
50 namespace surfaceFilmModels
61 wordList thermoSingleLayer::hsBoundaryTypes()
162 YPrimary_[i].correctBoundaryConditions();
176 volScalarField::Boundary& hsSpPrimaryBf =
188 hsSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
212 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
314 thermoSingleLayer::thermoSingleLayer
316 const word& modelType,
319 const word& regionType,
320 const bool readFields
337 zeroGradientFvPatchScalarField::typeName
356 zeroGradientFvPatchScalarField::typeName
382 zeroGradientFvPatchScalarField::typeName
395 zeroGradientFvPatchScalarField::typeName
416 "primaryEnergyTrans",
424 zeroGradientFvPatchScalarField::typeName
444 this->mappedPushedFieldPatchTypes<scalar>()
473 this->mappedFieldAndInternalPatchTypes<scalar>()
582 const scalar massSource,
583 const vector& momentumSource,
584 const scalar pressureSource,
585 const scalar energySource
600 Info<<
" energy = " << energySource <<
nl <<
endl;
656 for (
int corr=1; corr<=
nCorr_; corr++)
717 <<
gMin(Tinternal) <<
", " 733 "thermoSingleLayer::Srho",
764 Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
785 "thermoSingleLayer::Srho(" +
Foam::name(i) +
")",
818 Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
835 "thermoSingleLayer::Sh",
865 Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
volScalarField Ts_
Temperature - surface [K].
virtual bool read()
Read control parameters from dictionary.
volScalarField hsSpPrimary_
Energy [J/m2/s].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
volScalarField TPrimary_
Temperature [K].
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.
virtual void preEvolveRegion()
Pre-evolve film hook.
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
const dimensionedScalar deltaSmall_
Small delta.
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.
const word & name() const
Return name.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
Ostream & indent(Ostream &os)
Indent stream.
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
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
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.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
const speciesTable & species() const
Return the table of species.
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.
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
virtual void solveEnergy()
Solve energy equation.
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.
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen film surface and primary.
const Time & time() const
Return the reference to the time database.
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.
injectionModelList injection_
Cloud injection.
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].
volScalarField sigma_
Surface tension [m/s2].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual void info()
Provide some feedback.
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].
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))
const dimensionSet & dimensions() const
Return dimensions.
void toPrimary(const label regionPatchi, List< Type > ®ionField) 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.
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 labelUList & faceCells() const
Return face-cell addressing.
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.
Calculate the face-flux of the given field.
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)
scalar deltaTValue() const
Return time step value.
volVectorField U_
Velocity - mean [m/s].
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.
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.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
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...
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
const SLGThermo & thermo_
Reference to the SLGThermo.
Calculate the divergence of the given field.
volScalarField rhoPrimary_
Density [kg/m3].
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
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.
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)
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.
const dimensionSet dimEnergy
transferModelList transfer_
Transfer with the continuous phase.
dictionary coeffs_
Model coefficients dictionary.
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
virtual bool read()
Read control parameters from dictionary.
List< word > wordList
A List of words.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
volScalarField mu_
Dynamic viscosity [Pa.s].
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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.
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.
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...
PtrList< volScalarField > YPrimary_
List of specie mass fractions [0-1].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
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)
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.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
A patch is a list of labels that address the faces in the global face list.
const dictionary & coeffs() const
Return the model coefficients dictionary.
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].
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))
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
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].