Go to the documentation of this file.
45 #include "heatTransferModel.H"
53 namespace regionModels
55 namespace surfaceFilmModels
66 wordList thermoSingleLayer::hsBoundaryTypes()
78 bTypes[patchi] = fixedValueFvPatchField<scalar>::typeName;
125 hsBf[patchi] ==
hs(Tp, patchi);
162 YPrimary_[i].correctBoundaryConditions();
173 volScalarField::Boundary& hsSpPrimaryBf =
178 forAll(hsSpPrimaryBf, patchi)
185 hsSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
209 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
311 thermoSingleLayer::thermoSingleLayer
313 const word& modelType,
316 const word& regionType,
334 zeroGradientFvPatchScalarField::typeName
348 zeroGradientFvPatchScalarField::typeName
374 zeroGradientFvPatchScalarField::typeName
387 zeroGradientFvPatchScalarField::typeName
408 "primaryEnergyTrans",
416 zeroGradientFvPatchScalarField::typeName
419 deltaWet_(coeffs_.get<scalar>(
"deltaWet")),
420 hydrophilic_(coeffs_.get<
bool>(
"hydrophilic")),
421 hydrophilicDryScale_(0.0),
422 hydrophilicWetScale_(0.0),
436 this->mappedPushedFieldPatchTypes<scalar>()
465 this->mappedFieldAndInternalPatchTypes<scalar>()
484 if (coeffs().readIfPresent(
"Tmin", Tmin_))
486 Info<<
" limiting minimum temperature to " << Tmin_ <<
endl;
489 if (coeffs().readIfPresent(
"Tmax", Tmax_))
491 Info<<
" limiting maximum temperature to " << Tmax_ <<
endl;
494 if (thermo_.hasMultiComponentCarrier())
496 YPrimary_.setSize(thermo_.carrier().species().size());
498 forAll(thermo_.carrier().species(), i)
507 thermo_.carrier().species()[i],
515 pSp_.boundaryField().types()
523 coeffs_.readEntry(
"hydrophilicDryScale", hydrophilicDryScale_);
524 coeffs_.readEntry(
"hydrophilicWetScale", hydrophilicWetScale_);
529 transferPrimaryRegionThermoFields();
533 correctThermoFields();
538 deltaRho_ == delta_*rho_;
557 viscosity_->correct(pPrimary_, T_);
574 const scalar massSource,
575 const vector& momentumSource,
576 const scalar pressureSource,
577 const scalar energySource
591 <<
" energy = " << energySource <<
nl <<
nl;
593 hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
635 for (
int corr=1; corr<=
nCorr_; corr++)
693 <<
gMin(Tinternal) <<
", "
753 const label vapId = thermo_.carrierId(filmThermo_->name());
777 const scalar dt = time().deltaTValue();
779 forAll(intCoupledPatchIDs_, i)
781 const label filmPatchi = intCoupledPatchIDs_[i];
784 primaryMassTrans_.boundaryField()[filmPatchi];
786 toPrimary(filmPatchi, patchMass);
788 const label primaryPatchi = primaryPatchIDs()[i];
790 primaryMesh().boundaryMesh()[primaryPatchi].faceCells();
794 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.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool read()
Read control parameters from dictionary.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
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 Foam::string.
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
virtual ~thermoSingleLayer()
Destructor.
virtual void correct(scalarField &availableMass, volScalarField &massToTransfer)
Correct kinematic transfers.
injectionModelList injection_
Cloud injection.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual void preEvolveRegion()
Pre-evolve film hook.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient between film surface and primary.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimEnergy
Type gAverage(const FieldField< Field, Type > &f)
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
virtual void solveContinuity()
Solve continuity equation.
static autoPtr< heatTransferModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
volScalarField primaryEnergyTrans_
Film energy transfer.
autoPtr< phaseChangeModel > phaseChange_
Phase change.
Calculate the divergence of the given field.
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.
Kinematic form of single-cell layer surface film model.
volScalarField rho_
Density [kg/m3].
volScalarField sigma_
Surface tension [m/s2].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
dimensionedScalar pos0(const dimensionedScalar &ds)
volScalarField T_
Temperature - mean [K].
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
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].
scalar deltaTValue() const noexcept
Return time step value.
#define forAll(list, i)
Loop across all elements in list.
virtual void correctThermoFields()
Correct the thermo fields.
virtual void evolveRegion()
Evolve the film equations.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
List< word > wordList
A List of words.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
volScalarField cloudDiameterTrans_
Parcel diameters originating from film to cloud.
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.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
const dimensionSet dimArea(sqr(dimLength))
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
volScalarField delta_
Film thickness [m].
messageStream Info
Information stream (stdout output on master, null elsewhere)
#define DebugInFunction
Report an information message using Foam::Info.
A patch is a list of labels that address the faces in the global face list.
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const fvMesh & regionMesh() const
Return the region mesh database.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
virtual void info()
Provide some feedback.
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
SolverPerformance< Type > solve(faMatrix< Type > &, Istream &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
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.
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
volScalarField Ts_
Temperature - surface [K].
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
virtual void updateSubmodels()
Update the film sub-models.
virtual const volScalarField & T() const
Return the film mean temperature [K].
PtrList< volScalarField > YPrimary_
List of specie mass fractions [0-1].
Macros for easy insertion into run-time selection tables.
volScalarField TPrimary_
Temperature [K].
Mesh data needed to do the Finite Volume discretisation.
const uniformDimensionedVectorField & g
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
label nCorr_
Number of PISO-like correctors.
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.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
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].
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const TargetType * isA(const Type &t)
Check if dynamic_cast to TargetType is possible.
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.
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.
#define DebugInfo
Report an information message using Foam::Info.
virtual tmp< volScalarField::Internal > Srho() const
Return total mass source - Eulerian phase only.
This boundary condition provides a self-contained version of the mapped condition....
static autoPtr< filmRadiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Calculate the face-flux of the given field.
volScalarField rhoPrimary_
Density [kg/m3].
const dimensionedScalar e
Elementary charge.
volScalarField kappa_
Thermal conductivity [W/m/K].
bool hydrophilic_
Activation flag.
autoPtr< filmRadiationModel > radiation_
Radiation.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
transferModelList transfer_
Transfer with the continuous phase.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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.
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient between 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))
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].
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
Type gMax(const FieldField< Field, Type > &f)
static autoPtr< filmViscosityModel > New(surfaceFilmRegionModel &film, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
label nOuterCorr_
Number of outer correctors.
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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 dimensionSet dimless
Dimensionless.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.