55 const word& sourceName,
56 const word& modelType,
62 film_(mesh.lookupObject<solvers::isothermalFilm>(
solver::typeName)),
66 dict.lookupOrDefault<scalar>(
"deltaFactorToVoF", 1.0)
70 dict.lookupOrDefault<scalar>(
"alphaToVoF", 0.5)
74 dict.lookupOrDefault<scalar>(
"transferRateCoeff", 0.1)
95 film_.thermo.he().name(),
103 if (curTimeIndex_ == mesh().time().
timeIndex())
108 curTimeIndex_ = mesh().time().timeIndex();
110 const scalar deltaT = mesh().time().deltaTValue();
115 const labelList& faceCells = film_.surfacePatch().faceCells();
129 const label patchiVoF = film_.surfacePatchMap().nbrFvPatch().index();
135 film_.surfacePatchMap().fromNeighbour
143 film_.surfacePatchMap().fromNeighbour
150 transferRate_ =
Zero;
154 const label celli = faceCells[facei];
158 delta[celli] > 2*deltaFactorToVoF_/deltaCoeffsVoF[facei]
159 || alphaVoF[facei] > alphaToVoF_
162 transferRate_[celli] = transferRateCoeff_/deltaT;
177 if (isType<VoFFilmTransfer>(
fvModels[i]))
181 refCast<const VoFFilmTransfer>(
fvModels[i])
186 VoFFilm.filmPatchIndex()
187 == film_.surfacePatchMap().nbrFvPatch().index()
190 VoFFilmPtr = &VoFFilm;
198 <<
"Cannot find VoFFilmTransfer fvModel for this film "
199 "in VoF region " << film_.surfacePatchMap().nbrMesh().name()
207 template<
class Type,
class TransferRateFunc>
209 inline Foam::fv::filmVoFTransfer::VoFToFilmTransferRate
211 TransferRateFunc transferRateFunc,
229 film_.surfacePatchMap().fromNeighbour
231 (VoFFilm(
fvModels).*transferRateFunc)()
234 return tSu/mesh().V();
250 if (&
alpha == &film_.alpha)
254 VoFToFilmTransferRate<scalar>
273 <<
"Support for field " <<
alpha.name() <<
" is not implemented"
292 if (&
he == &film_.thermo.he())
296 VoFToFilmTransferRate<scalar>
303 if (&
he == &eqn.
psi())
315 <<
"Support for field " <<
he.name() <<
" is not implemented"
338 VoFToFilmTransferRate<vector>
345 if (&
U == &eqn.
psi())
357 <<
"Support for field " <<
U.name() <<
" is not implemented"
363 template<
class Type,
class FieldType>
369 const labelList& faceCells = film_.surfacePatch().faceCells();
377 film_.alpha()*transferRate_*mesh().V()*
f,
388 return TransferRate<scalar>(
oneField());
395 return TransferRate<scalar>(film_.thermo.rho()());
402 return TransferRate<scalar>(film_.thermo.rho()()*film_.thermo.he()());
409 return TransferRate<vector>(film_.thermo.rho()()*film_.U());
415 transferRate_.setSize(mesh().nCells());
421 transferRate_.setSize(mesh().nCells());
427 transferRate_.setSize(mesh().nCells());
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A List with indirect addressing.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
Dimension set for the base types.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Finite volume model abstract base class.
Film<->VoF transfer model.
tmp< scalarField > heTransferRate() const
Return the energy transfer rate.
tmp< vectorField > UTransferRate() const
Return the momentum transfer rate.
const volScalarField & alpha() const
tmp< scalarField > rhoTransferRate() const
Return the mass transfer rate.
Film<->VoF transfer model.
filmVoFTransfer(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
tmp< scalarField > heTransferRate() const
Return the energy transfer rate.
virtual void correct()
Solve the film and update the sources.
tmp< scalarField > transferRate() const
Return the volume transfer rate.
virtual void addSup(const volScalarField &rho, const volScalarField &alpha, fvMatrix< scalar > &eqn) const
Add source to phase continuity equation.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
tmp< vectorField > UTransferRate() const
Return the momentum transfer rate.
tmp< scalarField > rhoTransferRate() const
Return the mass transfer rate.
A class representing the concept of a field of 1 used to avoid unnecessary manipulations for objects ...
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Abstract base class for run-time selectable region solvers.
Foam::fvModels & fvModels() const
Return the fvModels that are created on demand.
const fvMesh & mesh
Region mesh.
Solver module for 2 compressible, non-isothermal immiscible fluids using a VOF (volume of fluid) phas...
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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 dimensionSet dimEnergy
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
const dimensionSet dimMomentum
const dimensionSet dimTime
typename VolField< Type >::Internal VolInternalField
const dimensionSet dimMass
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.