45 #include "heatTransferModel.H" 55 namespace regionModels
57 namespace surfaceFilmModels
91 volScalarField::Boundary& heBf =
thermo_->he().boundaryFieldRef();
115 YPrimary_[i].correctBoundaryConditions();
137 hSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
278 const word& modelType,
281 const word& regionType,
282 const bool readFields
300 "primaryEnergyTrans",
308 zeroGradientFvPatchScalarField::typeName
356 this->mappedFieldAndInternalPatchTypes<scalar>()
402 primarySpecieThermo.
species()[i],
410 this->mappedFieldAndInternalPatchTypes<scalar>()
459 const scalar massSource,
460 const vector& momentumSource,
461 const scalar pressureSource,
462 const scalar energySource
576 <<
gMin(Tinternal) <<
", " 594 refCast<const heRhoThermopureMixtureliquidProperties>(
thermo())
595 .cellThermoMixture(0).properties();
597 const label vapId = primarySpecieThermo.
species()[liquidThermo.name()];
630 SYi[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
669 Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
virtual tmp< volScalarField::Internal > Ts() const
Return the film surface temperature [K].
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient between wall and film [W/m^2/K].
volScalarField TPrimary_
Temperature [K].
autoPtr< phaseChangeModel > phaseChange_
Phase change.
#define forAll(list, i)
Loop across all elements in list.
virtual void preEvolveRegion()
Pre-evolve film hook.
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
const dimensionedScalar deltaSmall_
Small delta.
thermoSingleLayer(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word ®ionType, const bool readFields=true)
Construct from components.
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.
Ostream & indent(Ostream &os)
Indent stream.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
volVectorField primaryMomentumTrans_
Film momentum transfer.
virtual void correctCoverage()
Correct film coverage field.
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)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
volScalarField::Internal continuityErr_
Current continuity error caused by delta_ bounding.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< fvScalarMatrix > q(volScalarField &h) const
Return the wall/surface heat transfer term for the enthalpy equation.
tmp< volScalarField > pc()
Capillary pressure.
void size(const label)
Override size to be inconsistent with allocated storage.
static autoPtr< radiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
bool hydrophilic_
Activation flag.
volScalarField::Internal hSp_
Energy [J/m2/s].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField::Internal USp_
Momentum [kg/m/s^2].
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.
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.
const dimensionSet dimless
volScalarField coverage_
Film coverage indicator, 1 = covered, 0 = uncovered [].
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient between 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.
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionedScalar h
Planck constant.
virtual tmp< volScalarField > Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
Macros for easy insertion into run-time selection tables.
const dimensionSet dimLength
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pc, const volScalarField &pe)
Solve for film velocity.
virtual void info()
Provide some feedback.
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Calculate the first temporal derivative.
autoPtr< rhoThermo > thermo_
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
virtual void updateSubmodels()
Update the film sub-models.
virtual void correct(scalarField &availableMass, volScalarField &massToTransfer, volVectorField &momentumToTransfer)
Correct kinematic transfers.
virtual void info()
Provide some feedback.
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.
Calculate the face-flux of the given field.
static word groupName(Name name, const word &group)
Base-class for fluid thermodynamic properties.
#define DebugInFunction
Report an information message using Foam::Info.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
scalar deltaTValue() const
Return time step value.
volVectorField U_
Velocity - mean [m/s].
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
volScalarField hSpPrimary_
Energy [J/m2/s].
const volScalarField & coverage() const
Return the film coverage, 1 = covered, 0 = uncovered [].
static const word null
An empty word.
const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
The thermophysical properties of a liquid.
const fluidThermo & primaryThermo_
Reference to the primary region thermo.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual void solveAlpha(const fvVectorMatrix &UEqn, const volScalarField &pc, const volScalarField &pe)
Solve for film volume fraction and thickness.
virtual tmp< volScalarField::Internal > SYi(const label i) const
Return mass source for specie i - Eulerian phase only.
scalar hydrophilicWetScale_
Length scale applied to deltaWet_ to determine when a dry.
tmp< volScalarField > pe()
Explicit pressure.
volScalarField delta_
Film thickness [m].
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...
autoPtr< momentumTransportModel > momentumTransport_
Momentum transport model.
Calculate the divergence of the given field.
volScalarField rhoPrimary_
Density [kg/m^3].
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
static const word dictName
Name of the thermophysical properties dictionary.
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)
Type gMax(const FieldField< Field, Type > &f)
const rhoThermo & thermo() const
Film thermo.
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const dimensionSet dimEnergy
const Field< Type > & field() const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
volScalarField primaryEnergyTrans_
Film energy transfer.
const dimensionSet dimMass
word name(const complex &)
Return a string representation of a complex.
transferModelList transfer_
Transfer with the continuous phase.
kinematicSingleLayer(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word ®ionType, const bool readFields=true)
Construct from components.
dictionary coeffs_
Model coefficients dictionary.
virtual bool read()
Read control parameters from dictionary.
Calculate the matrix for the divergence of the given field and flux.
virtual void correctHforMappedT()
Correct sensible enthalpy for mapped temperature fields.
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
virtual void predictDelta()
Predict delta_ from the continuity equation.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
scalar deltaWet_
Threshold film thickness beyond which the film is considered 'wet'.
virtual const volScalarField & T() const =0
Temperature [K].
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
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 [kg m/s].
virtual ~thermoSingleLayer()
Destructor.
volScalarField::Internal rhoSp_
Mass [kg/m^2/s].
Mesh data needed to do the Finite Volume discretisation.
volScalarField alpha_
Film volume fraction in the cell layer [].
virtual void preEvolveRegion()
Pre-evolve film hook.
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].
virtual void correct(scalarField &availableMass, volScalarField &massToEject, volScalarField &diameterToEject)
Correct.
const dimensionSet dimVolume
void correctBoundaryConditions()
Correct boundary field.
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
static autoPtr< heatTransferModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change 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.
const volScalarField & rho() const
Return the film density [kg/m^3].
virtual tmp< volScalarField::Internal > Tw() const
Return the film wall temperature [K].
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
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.
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.
autoPtr< radiationModel > radiation_
Radiation.
const dictionary & coeffs() const
Return the model coefficients dictionary.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
ejectionModelList ejection_
Cloud ejection.
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
Calculate the matrix for implicit and explicit sources.
addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh)
volScalarField::Internal pSp_
Pressure [Pa].
const dimensionSet dimTemperature
const speciesTable & species() const
Return the table of species.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.