43 namespace regionModels
45 namespace surfaceFilmModels
119 volScalarField::Boundary& rhoSpPrimaryBf =
122 volVectorField::Boundary& USpPrimaryBf =
125 volScalarField::Boundary& pSpPrimaryBf =
138 rhoSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
139 USpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
140 pSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
152 if (
time().writeTime())
154 scalar addedMassTotal = 0.0;
237 <<
"Surface film: " <<
type() <<
nl 238 <<
" time step continuity errors: sum local = " 239 << sumLocalContErr <<
", global = " << globalContErr
427 const word& modelType,
430 const word& regionType,
431 const bool readFields
461 zeroGradientFvPatchScalarField::typeName
475 zeroGradientFvPatchScalarField::typeName
489 zeroGradientFvPatchScalarField::typeName
516 zeroGradientFvPatchScalarField::typeName
541 zeroGradientFvPatchScalarField::typeName
554 zeroGradientFvPatchScalarField::typeName
568 zeroGradientFvPatchScalarField::typeName
597 zeroGradientFvPatchScalarField::typeName
611 zeroGradientFvPatchScalarField::typeName
617 "cloudDiameterTrans",
625 zeroGradientFvPatchScalarField::typeName
643 this->mappedPushedFieldPatchTypes<vector>()
657 this->mappedPushedFieldPatchTypes<scalar>()
671 this->mappedPushedFieldPatchTypes<scalar>()
726 this->mappedFieldAndInternalPatchTypes<vector>()
740 this->mappedFieldAndInternalPatchTypes<scalar>()
754 this->mappedFieldAndInternalPatchTypes<scalar>()
768 this->mappedFieldAndInternalPatchTypes<scalar>()
826 const scalar massSource,
827 const vector& momentumSource,
828 const scalar pressureSource,
829 const scalar energySource
835 <<
"\nSurface film: " <<
type() <<
": adding to film source:" <<
nl 836 <<
" mass = " << massSource <<
nl 837 <<
" momentum = " << momentumSource <<
nl 838 <<
" pressure = " << pressureSource <<
endl;
903 for (
int corr=1; corr<=
nCorr_; corr++)
943 Info<<
"Film max Courant number: " << CoNum <<
endl;
1063 scalar addedMassTotal = 0.0;
1067 Info<<
indent <<
"added mass = " << addedMassTotal <<
nl 1068 <<
indent <<
"current mass = " 1070 <<
indent <<
"min/max(mag(U)) = " <<
gMin(
mag(Uinternal)) <<
", " 1072 <<
indent <<
"min/max(delta) = " <<
gMin(deltaInternal) <<
", " 1073 <<
gMax(deltaInternal) <<
nl 1074 <<
indent <<
"coverage = " virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
virtual bool read()
Read control parameters from dictionary.
surfaceFilmRegionModel(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word ®ionType)
Construct from type name, mesh and gravity vector.
virtual const volVectorField & U() const
Return the film velocity [m/s].
#define forAll(list, i)
Loop across all elements in list.
volVectorField Us_
Velocity - surface [m/s].
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.
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.
virtual const volScalarField & deltaRho() const
Return the film thickness*density (helper field) [kg/m^3].
virtual void continuityCheck()
Continuity check.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual ~kinematicSingleLayer()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
void size(const label)
Override size to be inconsistent with allocated storage.
Reconstruct volField from a face flux field.
volVectorField USp_
Momementum [kg/m/s^2].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
volScalarField muPrimary_
Viscosity [Pa.s].
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
void setFluxRequired(const word &name) const
static autoPtr< filmThermoModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual tmp< volScalarField::Internal > Srho() const
Return total mass source - Eulerian phase only.
Calculate the snGrad of the given volField.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
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.
scalar addedMassTotal_
Cumulative mass added via sources [kg].
volVectorField USpPrimary_
Momementum [kg/m/s^2].
const Time & time() const
Return the reference to the time database.
injectionModelList injection_
Cloud injection.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual void info(Ostream &os)
Provide some info.
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
addToRunTimeSelectionTable(surfaceFilmRegionModel, kinematicSingleLayer, mesh)
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, const fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
virtual void evolveRegion()
Evolve the film equations.
Macros for easy insertion into run-time selection tables.
virtual void solveContinuity()
Solve continuity equation.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
tmp< fvVectorMatrix > correct(volVectorField &U)
Return (net) force system.
volScalarField deltaRho_
Film thickness*density (helper field) [kg/m^2].
volScalarField sigma_
Surface tension [m/s^2].
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &, const dimensionSet &, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return a temporary field constructed from name, mesh, dimensionSet.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
volScalarField rho_
Density [kg/m^3].
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Switch momentumPredictor_
Momentum predictor.
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.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
virtual void info()
Provide some feedback.
Type gSum(const FieldField< Field, Type > &f)
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
virtual const volScalarField & cloudMassTrans() const
Return the film mass available for transfer to cloud.
virtual void preEvolveRegion()
Pre-evolve region.
static autoPtr< filmTurbulenceModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected injection model.
const labelUList & faceCells() const
Return face-cell addressing.
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
tmp< volScalarField > mass() const
Return the current film mass.
A class for handling words, derived from string.
virtual const volScalarField & cloudDiameterTrans() const
Return the parcel diameters originating from film to cloud.
Calculate the face-flux of the given field.
Calculate the laplacian of the given field.
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.
forceList forces_
List of film forces.
const dictionary & solution() const
Return the solution dictionary.
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].
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
virtual const surfaceScalarField & phi() const
Return the film flux [kg m/s].
const fvMesh & regionMesh() const
Return the region mesh database.
Volume integrate volField creating a volField.
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.
volScalarField pSpPrimary_
Pressure [Pa].
volScalarField delta_
Film thickness [m].
const dimensionSet dimPressure
label nNonOrthCorr_
Number of non-orthogonal correctors.
volScalarField pSp_
Pressure [Pa].
errorManip< error > abort(error &err)
label readLabel(Istream &is)
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
Calculate the divergence of the given field.
dimensionedScalar totalMass
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
volScalarField rhoPrimary_
Density [kg/m^3].
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
virtual void info(Ostream &os)
Provide some info.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
volVectorField Uw_
Velocity - wall [m/s].
label nCorr_
Number of PISO-like correctors.
Type gMax(const FieldField< Field, Type > &f)
virtual void correctAlpha()
Correct film coverage field.
virtual const volScalarField & hs() const
Return the film surface enthalpy [J/kg].
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
scalar cumulativeContErr_
Cumulative continuity error.
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.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const dimensionSet dimDensity
dictionary coeffs_
Model coefficients dictionary.
volVectorField UPrimary_
Velocity [m/s].
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
virtual void updateSubmodels()
Update the film sub-models.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m^2].
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< volScalarField > A() const
Return the central coefficient.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
volScalarField mu_
Dynamic viscosity [Pa.s].
virtual const volVectorField & Uw() const
Return the film wall velocity [m/s].
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const Time & time_
Reference to the time database.
void max(const dimensioned< Type > &)
surfaceScalarField phi_
Mass flux (includes film thickness) [kg m/s].
Mesh data needed to do the Finite Volume discretisation.
surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"))
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
A List with indirect addressing.
virtual void updateSurfaceVelocities()
Update film surface velocities.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
label nOuterCorr_
Number of outer correctors.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
void correctBoundaryConditions()
Correct boundary field.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
volScalarField rhoSpPrimary_
Mass [kg/m^2/s].
dimensioned< scalar > mag(const dimensioned< Type > &)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
Selector class for relaxation factors, solver type and solution.
const doubleScalar e
Elementary charge.
virtual const volScalarField & rho() const
Return the film density [kg/m^3].
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
void constrainFilmField(Type &field, const typename Type::cmptType &value)
Constrain a film region master/slave boundaries of a field to a.
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.
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
A patch is a list of labels that address the faces in the global face list.
volScalarField rhoSp_
Mass [kg/m^2/s].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual const volScalarField & T() const
Return the film mean temperature [K].
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
virtual scalar CourantNumber() const
Courant number evaluation.
dimensionedScalar deltaT() const
Return time step.
scalar deltaCoLimit_
Film thickness above which Courant number calculation in valid.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimArea(sqr(dimLength))
virtual void correctThermoFields()
Correct the thermo fields.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionSet dimVelocity