45#include "heatTransferModel.H"
55namespace surfaceFilmModels
66wordList thermoSingleLayer::hsBoundaryTypes()
125 hsBf[patchi] ==
hs(Tp, patchi);
162 YPrimary_[i].correctBoundaryConditions();
178 forAll(hsSpPrimaryBf, patchi)
185 hsSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
209 else if ((
alpha_[i] > 0.5) && (
delta_[i] < hydrophilicDry))
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>()
574 const scalar massSource,
575 const vector& momentumSource,
576 const scalar pressureSource,
577 const scalar energySource
591 <<
" energy = " << energySource <<
nl <<
nl;
635 for (
int corr=1; corr<=
nCorr_; corr++)
693 <<
gMin(Tinternal) <<
", "
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const uniformDimensionedVectorField & g
const dimensionSet & dimensions() const
Return dimensions.
wordList types() const
Return a list of the patch types.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
scalar deltaTValue() const noexcept
Return time step value.
static word timeName(const scalar t, const int precision=precision_)
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
const speciesTable & species() const
Return the table of species.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< FieldField< Field, scalar > > q() const
Return q boundary fields.
This boundary condition provides a self-contained version of the mapped condition....
UPtrList< const labelUList > faceCells() const
Return a list of faceCells for each patch.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
const Time & time_
Reference to the time database.
const Time & time() const
Return the reference to the time database.
const dictionary & coeffs() const
Return the model coefficients dictionary.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
dictionary coeffs_
Model coefficients dictionary.
const fvMesh & regionMesh() const
Return the region mesh database.
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
Base class for film radiation models.
Base class for surface film viscosity models.
Base class for film heat transfer models.
Kinematic form of single-cell layer surface film model.
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
volScalarField rho_
Density [kg/m3].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
volVectorField U_
Velocity - mean [m/s].
virtual void solveContinuity()
Solve continuity equation.
volScalarField sigma_
Surface tension [m/s2].
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 rhoPrimary_
Density [kg/m3].
volScalarField pPrimary_
Pressure [Pa].
injectionModelList injection_
Cloud injection.
volScalarField rhoSp_
Mass [kg/m2/s].
volScalarField deltaRho_
Film thickness*density (helper field) [kg/m2].
volScalarField cloudDiameterTrans_
Parcel diameters originating from film to cloud.
transferModelList transfer_
Transfer with the continuous phase.
volScalarField delta_
Film thickness [m].
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
label nOuterCorr_
Number of outer correctors.
virtual void preEvolveRegion()
Pre-evolve film hook.
surfaceScalarField phi_
Mass flux (includes film thickness) [kg.m/s].
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
label nCorr_
Number of PISO-like correctors.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
virtual void info()
Provide some feedback.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
volScalarField pSp_
Pressure [Pa].
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
scalarField availableMass_
Available mass for transfer via sub-models.
virtual bool read()
Read control parameters from dictionary.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
Base class for surface film phase change models.
Base class for surface film models.
Thermodynamic form of single-cell layer surface film model.
volScalarField TPrimary_
Temperature [K].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
volScalarField kappa_
Thermal conductivity [W/m/K].
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient between wall and film [W/m2/K].
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
virtual tmp< fvScalarMatrix > q(volScalarField &hs) const
Return the wall/surface heat transfer term for the enthalpy equation.
virtual void updateSurfaceTemperatures()
Correct the film surface and wall temperatures.
autoPtr< filmRadiationModel > radiation_
Radiation.
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.
volScalarField Tw_
Temperature - wall [K].
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
virtual ~thermoSingleLayer()
Destructor.
virtual const volScalarField & T() const
Return the film mean temperature [K].
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
bool hydrophilic_
Activation flag.
volScalarField Cp_
Specific heat capacity [J/kg/K].
virtual void solveEnergy()
Solve energy equation.
volScalarField hsSp_
Energy [J/m2/s].
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
volScalarField hsSpPrimary_
Energy [J/m2/s].
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
volScalarField T_
Temperature - mean [K].
virtual void preEvolveRegion()
Pre-evolve film hook.
virtual void correctAlpha()
Correct film coverage field.
PtrList< volScalarField > YPrimary_
List of specie mass fractions [0-1].
volScalarField primaryEnergyTrans_
Film energy transfer.
scalar Tmax_
Maximum temperature limit (optional)
scalar Tmin_
Minimum temperature limit (optional)
scalar hydrophilicDryScale_
Length scale applied to deltaWet_ to determine when a wet.
virtual void correctThermoFields()
Correct the thermo fields.
virtual void info()
Provide some feedback.
virtual void updateSubmodels()
Update the film sub-models.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
const SLGThermo & thermo_
Reference to the SLGThermo.
volScalarField hs_
Sensible enthalpy [J/kg].
autoPtr< phaseChangeModel > phaseChange_
Phase change.
virtual tmp< volScalarField::Internal > Srho() const
Return total mass source - Eulerian phase only.
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient between film surface and primary.
virtual bool read()
Read control parameters from dictionary.
virtual void correctHsForMappedT()
Correct sensible enthalpy for mapped temperature fields.
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
virtual void evolveRegion()
Evolve the film equations.
volScalarField Ts_
Temperature - surface [K].
virtual void correct(scalarField &availableMass, volScalarField &massToTransfer)
Correct kinematic transfers.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the face-flux of the given field.
Calculate the laplacian of the given field.
#define DebugInfo
Report an information message using Foam::Info.
#define DebugInFunction
Report an information message using Foam::Info.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimEnergy
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const TargetType * isA(const Type &t)
Check if dynamic_cast to TargetType is possible.
const dimensionSet dimArea(sqr(dimLength))
messageStream Info
Information stream (stdout output on master, null elsewhere)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Type gAverage(const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Type gMin(const FieldField< Field, Type > &f)
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Type gMax(const FieldField< Field, Type > &f)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.