54 const word& sourceName,
55 const word& modelType,
61 VoF_(mesh.lookupObject<solvers::compressibleVoF>(
solver::typeName)),
62 filmPatchName_(
dict.lookup(
"filmPatch")),
63 filmPatchi_(mesh.boundaryMesh().
findIndex(filmPatchName_)),
64 phaseName_(
dict.lookup(
"phase")),
67 phaseName_ == VoF_.
mixture.phase1Name()
73 phaseName_ == VoF_.
mixture.phase1Name()
80 dict.lookupOrDefault<scalar>(
"deltaFactorToFilm", 0.5)
84 dict.lookupOrDefault<scalar>(
"alphaToFilm", 0.1)
88 dict.lookupOrDefault<scalar>(
"transferRateCoeff", 0.1)
108 thermo_.rho()().
name(),
117 if (curTimeIndex_ == mesh().time().
timeIndex())
122 curTimeIndex_ = mesh().time().timeIndex();
125 const scalar deltaT = mesh().time().deltaTValue();
127 const fvPatch& VoFFilmPatch = mesh().boundary()[filmPatchi_];
142 refCast<const mappedFvPatchBaseBase>(VoFFilmPatch);
156 VoFFilmPatchMap.fromNeighbour
162 transferRate_ =
Zero;
166 const label celli = faceCells[facei];
171 &&
delta[facei] < 2*deltaFactorToFilm_/deltaCoeffs[facei]
172 &&
alpha[facei] < alphaToFilm_
175 transferRate_[celli] = transferRateCoeff_/deltaT;
181 template<
class Type,
class TransferRateFunc>
183 inline Foam::fv::VoFFilmTransfer::filmVoFTransferRate
185 TransferRateFunc transferRateFunc,
189 const fvPatch& VoFFilmPatch = mesh().boundary()[filmPatchi_];
195 refCast<const mappedFvPatchBaseBase>(VoFFilmPatch);
204 if (isType<filmVoFTransfer>(
fvModels[i]))
206 filmVoFPtr = &refCast<const filmVoFTransfer>(
fvModels[i]);
213 <<
"Cannot find filmVoFTransfer fvModel for the film region "
229 VoFFilmPatchMap.fromNeighbour
231 (filmVoFPtr->*transferRateFunc)()
234 return tSu/mesh().V();
250 if (&
rho == &thermo_.rho()())
254 filmVoFTransferRate<scalar>
277 <<
"Support for field " <<
rho.name() <<
" is not implemented"
296 if (&
he == &thermo_.he())
300 filmVoFTransferRate<scalar>
307 if (&
he == &eqn.
psi())
319 <<
"Support for field " <<
he.name() <<
" is not implemented"
341 filmVoFTransferRate<vector>
348 if (&
U == &eqn.
psi())
354 eqn -= alpha_()*
rho()*
U*transferRate_;
360 <<
"Support for field " <<
U.name() <<
" is not implemented"
366 template<
class Type,
class FieldType>
372 const fvPatch& VoFFilmPatch = mesh().boundary()[filmPatchi_];
383 alpha_()*transferRate_*mesh().V()*
f,
394 return TransferRate<scalar>(thermo_.rho()());
401 return TransferRate<scalar>(thermo_.rho()()*thermo_.he()());
408 return TransferRate<vector>(thermo_.rho()()*VoF_.U());
414 transferRate_.setSize(mesh().nCells());
420 transferRate_.setSize(mesh().nCells());
426 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 word & name() const
Return reference to name.
Finite volume model abstract base class.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label index() const
Return the index of this patch in the fvBoundaryMesh.
virtual const scalarField & deltaCoeffs() const
Return the face - cell distance coefficient.
virtual const labelUList & faceCells() const
Return faceCells.
Film<->VoF transfer model.
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.
VoFFilmTransfer(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void correct()
Solve the film and update the sources.
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.
virtual void addSup(const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn) const
Add implicit contribution to phase continuity equation.
tmp< scalarField > rhoTransferRate() const
Return the mass transfer rate.
Film<->VoF transfer model.
tmp< scalarField > heTransferRate() const
Return the energy transfer rate.
tmp< vectorField > UTransferRate() const
Return the momentum transfer rate.
tmp< scalarField > rhoTransferRate() const
Return the mass transfer rate.
Base class for fv patches that provide mapping between two fv patches.
const fvPatch & nbrFvPatch() const
Get the patch to map from.
const fvMesh & nbrMesh() const
Get the mesh for the region to map from.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
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.
Solver module for flow of compressible isothermal liquid films.
const volScalarField & delta
Film thickness.
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.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimTime
typename VolField< Type >::Internal VolInternalField
const dimensionSet dimMass
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
const dimensionSet dimVelocity
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.