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;
255 <<
"Surface film: " <<
type() <<
nl 256 <<
" time step continuity errors: sum local = " 257 << sumLocalContErr <<
", global = " << globalContErr
443 kinematicSingleLayer::kinematicSingleLayer
445 const word& modelType,
448 const word& regionType,
449 const bool readFields
479 zeroGradientFvPatchScalarField::typeName
493 zeroGradientFvPatchScalarField::typeName
507 zeroGradientFvPatchScalarField::typeName
534 zeroGradientFvPatchScalarField::typeName
559 zeroGradientFvPatchScalarField::typeName
572 zeroGradientFvPatchScalarField::typeName
586 zeroGradientFvPatchScalarField::typeName
615 zeroGradientFvPatchScalarField::typeName
629 zeroGradientFvPatchScalarField::typeName
635 "cloudDiameterTrans",
643 zeroGradientFvPatchScalarField::typeName
661 this->mappedPushedFieldPatchTypes<vector>()
675 this->mappedPushedFieldPatchTypes<scalar>()
689 this->mappedPushedFieldPatchTypes<scalar>()
744 this->mappedFieldAndInternalPatchTypes<vector>()
758 this->mappedFieldAndInternalPatchTypes<scalar>()
772 this->mappedFieldAndInternalPatchTypes<scalar>()
786 this->mappedFieldAndInternalPatchTypes<scalar>()
842 const scalar massSource,
843 const vector& momentumSource,
844 const scalar pressureSource,
845 const scalar energySource
851 <<
"\nSurface film: " <<
type() <<
": adding to film source:" <<
nl 852 <<
" mass = " << massSource <<
nl 853 <<
" momentum = " << momentumSource <<
nl 854 <<
" pressure = " << pressureSource <<
endl;
919 for (
int corr=1; corr<=
nCorr_; corr++)
959 Info<<
"Film max Courant number: " << CoNum <<
endl;
1054 typeName +
":primaryMassTrans",
1086 scalar addedMassTotal = 0.0;
1090 Info<<
indent <<
"added mass = " << addedMassTotal <<
nl 1091 <<
indent <<
"current mass = " 1093 <<
indent <<
"min/max(mag(U)) = " <<
gMin(
mag(Uinternal)) <<
", " 1095 <<
indent <<
"min/max(delta) = " <<
gMin(deltaInternal) <<
", " 1096 <<
gMax(deltaInternal) <<
nl 1097 <<
indent <<
"coverage = " virtual bool read()
Read control parameters from dictionary.
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const dictionary & solution() const
Return the solution dictionary.
#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.
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
Ostream & indent(Ostream &os)
Indent stream.
const Time & time() const
Return the reference to the time database.
virtual void continuityCheck()
Continuity check.
static autoPtr< filmTurbulenceModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected injection model.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
const double e
Elementary charge.
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)
void setFluxRequired(const word &name) const
surfaceScalarField rhof(fvc::interpolate(rho,"div(phi,rho)"))
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.
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.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
volVectorField USp_
Momementum / [kg/m/s2].
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
virtual const volScalarField & cloudDiameterTrans() const
Return the parcel diameters originating from film to cloud.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
volScalarField muPrimary_
Viscosity / [Pa.s].
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
virtual const volVectorField & U() const
Return the film velocity [m/s].
const dimensionedScalar phi0
Magnetic flux quantum: default SI units: [Wb].
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual const volVectorField & Uw() const
Return the film wall velocity [m/s].
Calculate the snGrad of the given volField.
scalarField availableMass_
Available mass for transfer via sub-models.
virtual const volScalarField & rho() const
Return the film density [kg/m3].
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/s2].
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.
const polyBoundaryMesh & boundaryMesh() const
Return boundary 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.
const fvMesh & regionMesh() const
Return the region mesh database.
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].
volScalarField sigma_
Surface tension / [m/s2].
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
volScalarField rho_
Density / [kg/m3].
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
Switch momentumPredictor_
Momentum predictor.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimVolume(pow3(dimLength))
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
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.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual void preEvolveRegion()
Pre-evolve region.
A class for handling words, derived from string.
SolverPerformance< Type > solve(fvMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Calculate the face-flux of the given field.
Calculate the laplacian of the given field.
forceList forces_
List of film forces.
volScalarField pPrimary_
Pressure / [Pa].
virtual const volScalarField & T() const
Return the film mean temperature [K].
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
volVectorField U_
Velocity - mean / [m/s].
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
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.
tmp< volScalarField > A() const
Return the central coefficient.
volScalarField pSpPrimary_
Pressure / [Pa].
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.
volScalarField delta_
Film thickness / [m].
const dimensionSet dimPressure
label nNonOrthCorr_
Number of non-orthogonal correctors.
volScalarField pSp_
Pressure / [Pa].
errorManip< error > abort(error &err)
surfaceScalarField phid("phid", fvc::interpolate(psi)*(fvc::flux(HbyA)+rhorAUf *fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)))
label readLabel(Istream &is)
virtual scalar CourantNumber() const
Courant number evaluation.
const dimensionSet & dimensions() const
Return dimensions.
virtual tmp< volScalarField > pu()
Explicit pressure source contribution.
virtual bool read()
Read control parameters from dictionary.
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
Calculate the divergence of the given field.
dimensionedScalar totalMass
volScalarField rhoPrimary_
Density / [kg/m3].
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
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 const volScalarField & deltaRho() const
Return the film thickness*density (helper field) [kg/m3].
virtual const volVectorField & nHat() const
Return the patch normal vectors.
virtual void correctAlpha()
Correct film coverage field.
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
scalar deltaTValue() const
Return time step value.
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
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 & cloudMassTrans() const
Return the film mass available for transfer to cloud.
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< volScalarField > mass() const
Return the current film mass.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensionedScalar deltaT() const
Return time step.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
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)
const labelUList & faceCells() const
Return face-cell addressing.
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.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
A List with indirect addressing.
virtual void updateSurfaceVelocities()
Update film surface velocities.
Base class for surface film models.
label nOuterCorr_
Number of outer correctors.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void correctBoundaryConditions()
Correct boundary field.
volScalarField rhoSpPrimary_
Mass / [kg/m2/s].
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual const surfaceScalarField & phi() const
Return the film flux [kg.m/s].
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
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.
Selector class for relaxation factors, solver type and solution.
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.
A patch is a list of labels that address the faces in the global face list.
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
volScalarField rhoSp_
Mass / [kg/m2/s].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
static autoPtr< filmThermoModel > New(surfaceFilmModel &owner, const dictionary &dict)
Return a reference to the selected phase change model.
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 word & name() const
Return name.
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
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