51 namespace regionModels
53 namespace surfaceFilmModels
105 volScalarField::Boundary& rhoSpPrimaryBf =
108 volVectorField::Boundary& USpPrimaryBf =
111 volScalarField::Boundary& pSpPrimaryBf =
124 rhoSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
125 USpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
126 pSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
137 if (
time().writeTime())
139 scalar addedMassTotal = 0;
163 zeroGradientFvPatchScalarField::typeName
167 tpSp.
ref().primitiveFieldRef() =
pSp_;
168 tpSp.ref().correctBoundaryConditions();
248 if (totalMass.
value() > small)
267 Info<<
"time step continuity errors: sum local = " 269 <<
", global = " << globalContErr
403 alphaf*rhof*alpharAUf*rhogf
463 const word& modelType,
466 const word& regionType,
467 const bool readFields
490 zeroGradientFvPatchScalarField::typeName
505 zeroGradientFvPatchScalarField::typeName
520 zeroGradientFvPatchScalarField::typeName
639 zeroGradientFvPatchScalarField::typeName
654 zeroGradientFvPatchScalarField::typeName
669 zeroGradientFvPatchScalarField::typeName
676 "cloudDiameterTrans",
684 zeroGradientFvPatchScalarField::typeName
783 this->mappedFieldAndInternalPatchTypes<vector>()
798 this->mappedFieldAndInternalPatchTypes<scalar>()
813 this->mappedFieldAndInternalPatchTypes<scalar>()
828 this->mappedFieldAndInternalPatchTypes<scalar>()
887 const scalar massSource,
888 const vector& momentumSource,
889 const scalar pressureSource,
890 const scalar energySource
894 <<
"\nSurface film: " <<
type() <<
": adding to film source:" <<
nl 895 <<
" mass = " << massSource <<
nl 896 <<
" momentum = " << momentumSource <<
nl 897 <<
" pressure = " << pressureSource <<
endl;
976 Info<<
"Film max Courant number: " << CoNum <<
endl;
1006 scalar addedMassTotal = 0;
1010 Info<<
indent <<
"added mass = " << addedMassTotal <<
nl 1011 <<
indent <<
"current mass = " 1013 <<
indent <<
"min/max(mag(U)) = " <<
gMin(
mag(Uinternal)) <<
", " 1015 <<
indent <<
"min/max(delta) = " <<
gMin(deltaInternal) <<
", " 1016 <<
gMax(deltaInternal) <<
nl 1017 <<
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.
tmp< volScalarField::Internal > mass() const
Return the current film mass.
bool finalNonOrthogonalIter() const
Flag to indicate the last non-orthogonal iteration.
surfaceFilmRegionModel(const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word ®ionType)
Construct from type name, mesh and gravity vector.
#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.
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.
bool correctNonOrthogonal()
Non-orthogonal corrector loop.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
virtual void continuityCheck()
Continuity check.
volScalarField primaryMassTrans_
Film mass available for transfer to the primary region.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual ~kinematicSingleLayer()
Destructor.
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)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< volScalarField > pc()
Capillary pressure.
void size(const label)
Override size to be inconsistent with allocated storage.
Reconstruct volField from a face flux field.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
virtual void transferPrimaryRegionThermoFields()
Transfer thermo fields from the primary region to the film region.
virtual void correctCoverage()
Correct film coverage field.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
virtual void updateContinuityErr()
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].
Calculate the matrix for the laplacian of the field.
void setFluxRequired(const word &name) const
static autoPtr< filmThermoModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
volVectorField::Internal USp_
Momentum [kg/m/s^2].
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
volVectorField::Internal Us_
Velocity - surface [m/s].
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.
volScalarField coverage_
Film coverage indicator, 1 = covered, 0 = uncovered [].
scalar addedMassTotal_
Cumulative mass added via sources [kg].
volVectorField USpPrimary_
Primary region tangential momentum source [kg m/s].
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.
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)
tmp< surfaceScalarField > rhog() const
Hydrostatic pressure coefficient.
virtual void evolveRegion()
Evolve the film equations.
Macros for easy insertion into run-time selection tables.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
tmp< fvVectorMatrix > correct(volVectorField &U)
Return (net) force system.
volScalarField sigma_
Surface tension [m/s^2].
virtual tmp< fvVectorMatrix > solveMomentum(const volScalarField &pc, const volScalarField &pe)
Solve for film velocity.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
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.
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 const volScalarField & cloudMassTrans() const
Return the film mass available for transfer to cloud.
virtual void preEvolveRegion()
Pre-evolve region.
const labelUList & faceCells() const
Return face-cell addressing.
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.
#define DebugInFunction
Report an information message using Foam::Info.
Calculate the laplacian of the given field.
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)
Calculate the matrix for the first temporal derivative.
scalar deltaTValue() const
Return time step value.
volVectorField U_
Velocity - mean [m/s].
const Type & value() const
Return const reference to value.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const volVectorField & nHat() const
Return the patch normal vectors.
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.
virtual void solveAlpha(const fvVectorMatrix &UEqn, const volScalarField &pc, const volScalarField &pe)
Solve for film volume fraction and thickness.
tmp< volVectorField > constrainHbyA(const tmp< volVectorField > &tHbyA, const volVectorField &U, const volScalarField &p)
volScalarField pSpPrimary_
Primary region normal momentum source (pressure) [kg m/s].
tmp< volScalarField > pe()
Explicit pressure.
volScalarField delta_
Film thickness [m].
const dimensionSet dimPressure
Calculate the divergence of the given field.
dimensionedScalar totalMass
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)
Type gMax(const FieldField< Field, Type > &f)
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const Field< Type > & field() const
scalar cumulativeContErr_
Cumulative continuity error.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvOptions(rho, U))
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].
virtual void updateSubmodels()
Update the film sub-models.
Calculate the matrix for the divergence of the given field and flux.
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 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)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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)
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 [kg m/s].
volScalarField::Internal rhoSp_
Mass [kg/m^2/s].
Mesh data needed to do the Finite Volume discretisation.
surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"))
volScalarField alpha_
Film volume fraction in the cell layer [].
A List with indirect addressing.
bool momentumPredictor() const
Flag to indicate to solve for momentum.
virtual void updateSurfaceVelocities()
Update film surface velocities.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet & dimensions() const
Return const reference to dimensions.
void correctBoundaryConditions()
Correct boundary field.
tmp< surfaceScalarField > gGradRho() const
Hydrostatic pressure coefficient gradient.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
volScalarField rhoSpPrimary_
Primary region mass source [kg].
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
dimensioned< scalar > mag(const dimensioned< Type > &)
surfaceScalarField phiU_
Film velocity flux [m^3/s].
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.
const doubleScalar e
Elementary charge.
volVectorField::Internal Uw_
Velocity - wall [m/s].
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.
const dimensionedVector & g_
Acceleration due to gravity [m/s^2].
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
tmp< volScalarField > rAU
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.
tmp< Type > constrainFilmField(const tmp< Type > &field, const typename Type::cmptType &value)
Constrain a film region master/slave boundaries of a field to a.
static autoPtr< filmMomentumTransportModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected injection model.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
virtual scalar CourantNumber() const
Courant number evaluation.
autoPtr< filmMomentumTransportModel > turbulence_
Turbulence model.
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)
Calculate the matrix for implicit and explicit sources.
volScalarField::Internal pSp_
Pressure [Pa].
virtual void correctThermoFields()
Correct the thermo fields.
const dimensionSet dimVelocity