42 namespace regionModels
44 namespace surfaceFilmModels
86 Info<<
"kinematicSingleLayer::resetPrimaryRegionSourceTerms()" <<
endl;
99 Info<<
"kinematicSingleLayer::" 100 <<
"transferPrimaryRegionThermoFields()" <<
endl;
116 Info<<
"kinematicSingleLayer::" 117 <<
"transferPrimaryRegionSourceFields()" <<
endl;
141 if (
time().outputTime())
143 scalar addedMassTotal = 0.0;
204 Info<<
"kinematicSingleLayer::updateSubmodels()" <<
endl;
244 <<
" time step continuity errors: sum local = " 245 << sumLocalContErr <<
", global = " << globalContErr
255 Info<<
"kinematicSingleLayer::solveContinuity()" <<
endl;
293 Info<<
"kinematicSingleLayer::solveMomentum()" <<
endl;
352 Info<<
"kinematicSingleLayer::solveThickness()" <<
endl;
377 - deltarUAf*phiAdd*rhof
432 kinematicSingleLayer::kinematicSingleLayer
434 const word& modelType,
437 const word& regionType,
438 const bool readFields
468 zeroGradientFvPatchScalarField::typeName
482 zeroGradientFvPatchScalarField::typeName
496 zeroGradientFvPatchScalarField::typeName
523 zeroGradientFvPatchScalarField::typeName
548 zeroGradientFvPatchScalarField::typeName
561 zeroGradientFvPatchScalarField::typeName
575 zeroGradientFvPatchScalarField::typeName
604 zeroGradientFvPatchScalarField::typeName
618 zeroGradientFvPatchScalarField::typeName
624 "cloudDiameterTrans",
632 zeroGradientFvPatchScalarField::typeName
650 this->mappedPushedFieldPatchTypes<vector>()
664 this->mappedPushedFieldPatchTypes<scalar>()
678 this->mappedPushedFieldPatchTypes<scalar>()
733 this->mappedFieldAndInternalPatchTypes<vector>()
747 this->mappedFieldAndInternalPatchTypes<scalar>()
761 this->mappedFieldAndInternalPatchTypes<scalar>()
775 this->mappedFieldAndInternalPatchTypes<scalar>()
831 const scalar massSource,
832 const vector& momentumSource,
833 const scalar pressureSource,
834 const scalar energySource
839 Info<<
"\nSurface film: " <<
type() <<
": adding to film source:" <<
nl 840 <<
" mass = " << massSource <<
nl 841 <<
" momentum = " << momentumSource <<
nl 842 <<
" pressure = " << pressureSource <<
endl;
857 Info<<
"kinematicSingleLayer::preEvolveRegion()" <<
endl;
880 Info<<
"kinematicSingleLayer::evolveRegion()" <<
endl;
907 for (
int corr=1; corr<=
nCorr_; corr++)
947 Info<<
"Film max Courant number: " << CoNum <<
endl;
993 "const volScalarField& kinematicSingleLayer::T() const" 1004 "const volScalarField& kinematicSingleLayer::Ts() const" 1015 "const volScalarField& kinematicSingleLayer::Tw() const" 1026 "const volScalarField& kinematicSingleLayer::Cp() const" 1037 "const volScalarField& kinematicSingleLayer::kappa() const" 1052 typeName +
":primaryMassTrans",
1084 scalar addedMassTotal = 0.0;
1088 Info<<
indent <<
"added mass = " << addedMassTotal <<
nl 1089 <<
indent <<
"current mass = " 1091 <<
indent <<
"min/max(mag(U)) = " <<
gMin(
mag(Uinternal)) <<
", " 1093 <<
indent <<
"min/max(delta) = " <<
gMin(deltaInternal) <<
", " 1094 <<
gMax(deltaInternal) <<
nl 1095 <<
indent <<
"coverage = " void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
const dimensionSet dimPressure
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
scalar addedMassTotal_
Cumulative mass added via sources [kg].
virtual const volScalarField & deltaRho() const
Return the film thickness*density (helper field) [kg/m3].
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
volVectorField Us_
Velocity - surface / [m/s].
label nCorr_
Number of PISO-like correctors.
virtual scalar CourantNumber() const
Courant number evaluation.
volScalarField rhoPrimary_
Density / [kg/m3].
dimensionedScalar totalMass
Mesh data needed to do the Finite Volume discretisation.
Calculate the snGrad of the given volField.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
volScalarField pSpPrimary_
Pressure / [Pa].
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const dimensionedScalar deltaSmall_
Small delta.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
virtual const volScalarField & rho() const
Return the film density [kg/m3].
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
volVectorField USpPrimary_
Momementum / [kg/m/s2].
volVectorField U_
Velocity - mean / [m/s].
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.
void setFluxRequired(const word &name) const
Ostream & indent(Ostream &os)
Indent stream.
virtual void evolveRegion()
Evolve the film equations.
virtual void info(Ostream &os)
Provide some info.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
const labelUList & faceCells() const
Return face-cell addressing.
volScalarField cloudMassTrans_
Film mass available for transfer to cloud.
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
tmp< volScalarField > mass() const
Return the current film mass.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
const dimensionSet dimArea(sqr(dimLength))
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
void size(const label)
Override size to be inconsistent with allocated storage.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
InternalField & internalField()
Return internal field.
virtual const volVectorField & Uw() const
Return the film wall velocity [m/s].
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimEnergy
const fvMesh & regionMesh() const
Return the region mesh database.
scalar cumulativeContErr_
Cumulative continuity error.
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.
const Time & time() const
Return the reference to the time database.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
volVectorField USp_
Momementum / [kg/m/s2].
const dimensionSet dimDensity
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
virtual void preEvolveRegion()
Pre-evolve region.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
virtual bool read()
Read control parameters from dictionary.
Selector class for relaxation factors, solver type and solution.
void constrainFilmField(Type &field, const typename Type::cmptType &value)
Constrain a film region master/slave boundaries of a field to a.
virtual const volScalarField & cloudMassTrans() const
Return the film mass available for transfer to cloud.
label readLabel(Istream &is)
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
Calculate the laplacian of the given field.
A patch is a list of labels that address the faces in the global face list.
volVectorField Uw_
Velocity - wall / [m/s].
static autoPtr< filmThermoModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
virtual void updateSubmodels()
Update the film sub-models.
label nNonOrthCorr_
Number of non-orthogonal correctors.
Type gSum(const FieldField< Field, Type > &f)
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
Switch momentumPredictor_
Momentum predictor.
volScalarField cloudDiameterTrans_
Parcel diameters originating from film to cloud.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
virtual void correctThermoFields()
Correct the thermo fields.
const double e
Elementary charge.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
virtual const volVectorField & U() const
Return the film velocity [m/s].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pu, const volScalarField &pp)
Solve for film velocity.
scalar deltaTValue() const
Return time step value.
fvVectorMatrix UEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
surfaceScalarField phid("phid", fvc::interpolate(psi)*( (mesh.Sf()&fvc::interpolate(HbyA)) +rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho) ))
A List with indirect addressing.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Reconstruct volField from a face flux field.
label nOuterCorr_
Number of outer correctors.
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
forceList forces_
List of film forces.
dictionary coeffs_
Model coefficients dictionary.
virtual const volScalarField & T() const
Return the film mean temperature [K].
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Macros for easy insertion into run-time selection tables.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.
const dimensionSet & dimensions() const
Return dimensions.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
solverPerformance solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
errorManip< error > abort(error &err)
const word & name() const
Return name.
virtual tmp< volScalarField > pp()
Implicit pressure source coefficient.
Type gMin(const FieldField< Field, Type > &f)
volScalarField delta_
Film thickness / [m].
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
volScalarField rho_
Density / [kg/m3].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const dictionary & solution() const
Return the solution dictionary.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
static autoPtr< filmTurbulenceModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected injection model.
virtual const surfaceScalarField & phi() const
Return the film flux [kg.m/s].
volScalarField rhoSp_
Mass / [kg/m2/s].
scalar deltaCoLimit_
Film thickness above which Courant number calculation in valid.
volVectorField UPrimary_
Velocity / [m/s].
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
tmp< volScalarField > A() const
Return the central coefficient.
solverPerformance solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
Calculate the divergence of the given field.
virtual void solveThickness(const volScalarField &pu, const volScalarField &pp, const fvVectorMatrix &UEqn)
Solve coupled velocity-thickness equations.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
void correctBoundaryConditions()
Correct boundary field.
virtual void info()
Provide some feedback.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const dimensionSet dimVolume(pow3(dimLength))
virtual ~kinematicSingleLayer()
Destructor.
virtual void continuityCheck()
Continuity check.
volScalarField mu_
Dynamic viscosity / [Pa.s].
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const Time & time_
Reference to the time database.
volScalarField rhoSpPrimary_
Mass / [kg/m2/s].
Base class for surface film models.
surfaceScalarField rhof(fvc::interpolate(rho,"div(phi,rho)"))
void max(const dimensioned< Type > &)
volScalarField sigma_
Surface tension / [m/s2].
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
injectionModelList injection_
Cloud injection.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField pSp_
Pressure / [Pa].
virtual bool read()
Read control parameters from dictionary.
dimensionedScalar pos(const dimensionedScalar &ds)
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.
virtual void updateSurfaceVelocities()
Update film surface velocities.
dimensionedScalar deltaT() const
Return time step.
virtual void preEvolveRegion()
Pre-evolve film hook.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void solveContinuity()
Solve continuity equation.
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
tmp< fvVectorMatrix > correct(volVectorField &U)
Return (net) force system.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
const dimensionSet dimVelocity
Volume integrate volField creating a volField.
scalarField availableMass_
Available mass for transfer via sub-models.
Type gMax(const FieldField< Field, Type > &f)
volScalarField muPrimary_
Viscosity / [Pa.s].
virtual const volScalarField & cloudDiameterTrans() const
Return the parcel diameters originating from film to cloud.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
virtual void correctAlpha()
Correct film coverage field.
volScalarField pPrimary_
Pressure / [Pa].
conserve internalField()+
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].