46 #include "heatTransferModel.H" 54 namespace regionModels
56 namespace surfaceFilmModels
66 wordList thermoSingleLayer::hBoundaryTypes()
162 YPrimary_[i].correctBoundaryConditions();
184 hSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
315 const word& modelType,
318 const word& regionType,
319 const bool readFields
337 zeroGradientFvPatchScalarField::typeName
352 zeroGradientFvPatchScalarField::typeName
379 zeroGradientFvPatchScalarField::typeName
393 zeroGradientFvPatchScalarField::typeName
415 "primaryEnergyTrans",
423 zeroGradientFvPatchScalarField::typeName
471 this->mappedFieldAndInternalPatchTypes<scalar>()
524 this->mappedFieldAndInternalPatchTypes<scalar>()
581 const scalar massSource,
582 const vector& momentumSource,
583 const scalar pressureSource,
584 const scalar energySource
703 <<
gMin(Tinternal) <<
", " 717 "thermoSingleLayer::Srho",
742 Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
761 "thermoSingleLayer::Srho(" +
Foam::name(i) +
")",
788 Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
803 "thermoSingleLayer::Sh",
827 Sh[cells[j]] += patchEnergy[j]/(V[cells[j]]*dt);
volScalarField Ts_
Temperature - surface [K].
virtual bool read()
Read control parameters from dictionary.
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 between wall and film [W/m^2/K].
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.
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.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
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.
virtual void correctCoverage()
Correct film coverage field.
static autoPtr< filmRadiationModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
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.
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.
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].
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...
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.
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.
static autoPtr< filmViscosityModel > New(surfaceFilmRegionModel &film, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
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.
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
Macros for easy insertion into run-time selection tables.
volScalarField sigma_
Surface tension [m/s^2].
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.
volScalarField rho_
Density [kg/m^3].
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Calculate the first temporal derivative.
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.
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.
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.
volScalarField h_
Sensible enthalpy [J/kg].
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
#define DebugInFunction
Report an information message using Foam::Info.
volScalarField pPrimary_
Pressure [Pa].
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].
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.
volScalarField hSpPrimary_
Energy [J/m2/s].
const volScalarField & coverage() const
Return the film coverage, 1 = covered, 0 = uncovered [].
const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
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.
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.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
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...
const SLGThermo & thermo_
Reference to the SLGThermo.
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.
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)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const Field< Type > & field() const
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.
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.
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
virtual bool read()
Read control parameters from dictionary.
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
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.
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 [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.
virtual void updateSurfaceVelocities()
Update film surface velocities.
virtual const volScalarField & h() const
Return the film sensible enthalpy [J/kg].
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.
autoPtr< filmViscosityModel > viscosity_
Viscosity model.
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.
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.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
autoPtr< filmMomentumTransportModel > turbulence_
Turbulence model.
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
Calculate the matrix for implicit and explicit sources.
volScalarField::Internal pSp_
Pressure [Pa].
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.
virtual const volScalarField & T() const
Return the film mean temperature [K].
virtual const volScalarField & Tw() const
Return the film wall temperature [K].