50 namespace regionModels
52 namespace surfaceFilmModels
113 rhoSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
114 USpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
115 pSpPrimaryBf[
patchi] *= rpriMagSfdeltaT;
126 if (
time().writeTime())
128 scalar addedMassTotal = 0;
152 zeroGradientFvPatchScalarField::typeName
156 tpSp.
ref().primitiveFieldRef() =
pSp_;
157 tpSp.ref().correctBoundaryConditions();
243 if (totalMass.
value() > small)
262 Info<<
"time step continuity errors: sum local = " 264 <<
", global = " << globalContErr
414 alphaf*rhof*alpharAUf*rhogf
474 const word& modelType,
477 const word& regionType,
478 const bool readFields
500 this->mappedFieldAndInternalPatchTypes<scalar>()
517 zeroGradientFvPatchScalarField::typeName
623 zeroGradientFvPatchScalarField::typeName
638 zeroGradientFvPatchScalarField::typeName
653 zeroGradientFvPatchScalarField::typeName
660 "cloudDiameterTrans",
668 zeroGradientFvPatchScalarField::typeName
675 "primaryMomentumTrans",
683 zeroGradientFvPatchVectorField::typeName
782 this->mappedFieldAndInternalPatchTypes<vector>()
798 this->mappedFieldAndInternalPatchTypes<scalar>()
814 this->mappedFieldAndInternalPatchTypes<scalar>()
878 extrapolatedCalculatedFvPatchScalarField::typeName
884 tsigma.
ref().correctBoundaryConditions();
894 const scalar massSource,
895 const vector& momentumSource,
896 const scalar pressureSource,
897 const scalar energySource
901 <<
"\nSurface film: " <<
type() <<
": adding to film source:" <<
nl 902 <<
" mass = " << massSource <<
nl 903 <<
" momentum = " << momentumSource <<
nl 904 <<
" pressure = " << pressureSource <<
endl;
1023 scalar addedMassTotal = 0;
1027 Info<<
indent <<
"added mass = " << addedMassTotal <<
nl 1028 <<
indent <<
"current mass = " 1030 <<
indent <<
"min/max(mag(U)) = " <<
gMin(
mag(Uinternal)) <<
", " 1033 <<
indent <<
"min/max(delta) = " <<
gMin(deltaInternal) <<
", " 1034 <<
gMax(deltaInternal) <<
nl 1035 <<
indent <<
"coverage = " 1049 "thermoSingleLayer::Srho",
1074 Srho[cells[j]] += patchMass[j]/(V[cells[j]]*dt);
1126 SU[cells[j]] += patchMomentum[j]/(V[cells[j]]*dt);
virtual bool read()
Read control parameters from dictionary.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual bool read()
Read control parameters from dictionary.
tmp< volScalarField::Internal > mass() const
Return the current film mass.
Run-time selectable general function of one variable.
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.
virtual scalar maxDeltaT() const
Return the maximum time-step for stable operation.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const word & name() const
Return name.
Ostream & indent(Ostream &os)
Indent stream.
bool correctNonOrthogonal()
Non-orthogonal corrector loop.
const fvSchemes & schemes() const
Return the fvSchemes.
static autoPtr< momentumTransportModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected ejection model.
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.
volVectorField primaryMomentumTrans_
Film momentum transfer.
autoPtr< Function1< scalar > > sigma_
Surface tension function.
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)
const dimensionSet dimPressure
tmp< volScalarField > pc()
Capillary pressure.
void size(const label)
Override size to be inconsistent with allocated storage.
static autoPtr< viscosityModel > New(surfaceFilmRegionModel &film, const dictionary &dict, volScalarField &mu)
Return a reference to the selected phase change model.
Reconstruct volField from a face flux field.
wordList types() const
Return a list of the patch field types.
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].
tmp< surfaceScalarField > constrainPhiHbyA(const tmp< surfaceScalarField > &tphiHbyA, const volVectorField &U, const volScalarField &p)
Calculate the matrix for the laplacian of the field.
static autoPtr< rhoThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
void setFluxRequired(const word &name) const
volVectorField::Internal USp_
Momentum [kg/m/s^2].
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.
const dimensionSet dimless
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.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
virtual tmp< volScalarField::Internal > SYi(const label i) const
Return mass source for specie i - Eulerian phase only.
tmp< surfaceScalarField > rhog() const
Hydrostatic pressure coefficient.
virtual void evolveRegion()
Evolve the film equations.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
const dimensionSet dimLength
tmp< fvVectorMatrix > correct(volVectorField &U)
Return (net) force system.
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)
virtual void transferPrimaryRegionSourceFields()
Transfer source fields from the primary region to the film region.
Calculate the first temporal derivative.
autoPtr< rhoThermo > thermo_
Thermo package.
tmp< volVectorField::Internal > Uw() const
Return the film wall velocity [m/s].
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionSet dimTime
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 correct(scalarField &availableMass, volScalarField &massToTransfer, volVectorField &momentumToTransfer)
Correct kinematic transfers.
virtual void info()
Provide some feedback.
Type gSum(const FieldField< Field, Type > &f)
virtual tmp< volVectorField > primaryMomentumTrans() const
Return momentum transfer source - Eulerian phase only.
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.
virtual void info(Ostream &os)
Provide some info.
volScalarField p_
Pressure [Pa].
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
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.
static word groupName(Name name, const word &group)
#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 dimensionSet dimDensity
const dictionary & solution() const
Return the solution dictionary.
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.
static const word null
An empty word.
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].
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
autoPtr< momentumTransportModel > momentumTransport_
Momentum transport model.
Calculate the divergence of the given field.
const dimensionedVector & g() const
Return the acceleration due to gravity.
dimensionedScalar totalMass
volScalarField rhoPrimary_
Density [kg/m^3].
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
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)
const dimensionSet dimVelocity
scalar maxCo_
Optional maximum Courant number for stable film solution.
Type gMax(const FieldField< Field, Type > &f)
virtual void resetPrimaryRegionSourceTerms()
Reset source term fields.
const dimensionSet dimEnergy
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvModels.source(rho, U))
const Field< Type > & field() const
const dimensionSet dimMass
tmp< volScalarField > sigma() const
Return the surface tension coefficient [kg/s^2].
scalar cumulativeContErr_
Cumulative continuity error.
word name(const complex &)
Return a string representation of a complex.
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.
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.
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.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< volScalarField > rAU
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.
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...
virtual void correct(scalarField &availableMass, volScalarField &massToEject, volScalarField &diameterToEject)
Correct.
const dimensionSet dimVolume
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 volScalarField & rho() const
Return the film density [kg/m^3].
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.
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.
tmp< Type > constrainFilmField(const tmp< Type > &field, const typename Type::cmptType &value)
Constrain a film region master/slave boundaries of a field to a.
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.
ejectionModelList ejection_
Cloud ejection.
virtual scalar CourantNumber() const
Courant number.
autoPtr< viscosityModel > viscosity_
Viscosity model.
virtual tmp< volVectorField::Internal > SU() const
Return momentum source - Eulerian phase only.
dimensionedScalar deltaT() const
Return time step.
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].