55 const word& sourceName,
56 const word& modelType,
81 mixture_.alpha1().name(),
82 mixture_.alpha2().name(),
99 if (&
alpha == &mixture_.alpha1() || &
alpha == &mixture_.alpha2())
105 &
alpha == &alpha1 ? mixture_.rho1() : mixture_.rho2();
107 const scalar
s = &
alpha == &alpha1 ? +1 : -1;
114 cavitation_->mDot12Alpha()
120 (&
alpha == &alpha1 ? vDot1Alpha2 : vDot2Alpha1)
121 -
fvm::Sp(vDot1Alpha2 + vDot2Alpha1, eqn.
psi());
125 else if (eqn.
psi().name() ==
"p_rgh")
129 cavitation_->mDot12P()
140 fvm::Sp(
s*(vDot1P - vDot2P), eqn.psi())
141 +
s*(vDot1P - vDot2P)*
rho*gh
142 -
s*(vDot1P - vDot2P)*cavitation_->pSat();
150 cavitation_->mDot12Alpha()
155 eqn +=
s*(vDot1 - vDot2);
161 <<
"Support for field " <<
alpha.name() <<
" is not implemented"
184 if (&
U == &eqn.
psi())
196 <<
"Support for field " <<
U.name() <<
" is not implemented"
222 cavitation_->correct();
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
An ordered pair of two objects of type <T> with first() and second() elements.
Abstract base class for cavitation models.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Finite volume model abstract base class.
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
virtual void correct()
Correct the cavitation model.
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.
virtual void addSup(const volScalarField &alpha, fvMatrix< scalar > &eqn) const
Add a source to the phase continuity equation.
VoFCavitation(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
Class to represent a mixture of two constant density phases.
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.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the matrix for implicit and explicit sources.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
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< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.