33 namespace twoPhaseChangeModels
49 UInf_(
"UInf",
dimVelocity, twoPhaseChangeModelCoeffs_),
50 tInf_(
"tInf",
dimTime, twoPhaseChangeModelCoeffs_),
51 Cc_(
"Cc",
dimless, twoPhaseChangeModelCoeffs_),
52 Cv_(
"Cv",
dimless, twoPhaseChangeModelCoeffs_),
54 p0_(
"0", pSat().dimensions(), 0.0),
56 mcCoeff_(Cc_*mixture_.rho2()/tInf_),
57 mvCoeff_(Cv_*mixture_.rho2()/(0.5*mixture_.rho1()*
sqr(UInf_)*tInf_))
73 min(
max(mixture_.alpha1(), scalar(0)), scalar(1))
78 mcCoeff_*
sqr(limitedAlpha1)
79 *
max(p - pSat(), p0_)/
max(p - pSat(), 0.01*pSat()),
81 mvCoeff_*
min(p - pSat(), p0_)
94 min(
max(mixture_.alpha1(), scalar(0)), scalar(1))
99 mcCoeff_*
sqr(limitedAlpha1)*(1.0 - limitedAlpha1)
100 *
pos0(p - pSat())/
max(p - pSat(), 0.01*pSat()),
102 (-mvCoeff_)*limitedAlpha1*
neg(p - pSat())
117 twoPhaseChangeModelCoeffs_ = optionalSubDict(
type() +
"Coeffs");
119 twoPhaseChangeModelCoeffs_.lookup(
"UInf") >> UInf_;
120 twoPhaseChangeModelCoeffs_.lookup(
"tInf") >> tInf_;
121 twoPhaseChangeModelCoeffs_.lookup(
"Cc") >> Cc_;
122 twoPhaseChangeModelCoeffs_.lookup(
"Cv") >> Cv_;
124 mcCoeff_ = Cc_*mixture_.rho2()/tInf_;
125 mvCoeff_ = Cv_*mixture_.rho2()/(0.5*mixture_.rho1()*
sqr(UInf_)*tInf_);
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
defineTypeNameAndDebug(cavitationModel, 0)
virtual Pair< tmp< volScalarField > > mDotP() const
Return the mass condensation and vaporisation rates as coefficients.
virtual void correct()
Correct the Kunz phaseChange model.
Abstract base class for cavitation models.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Kunz(const immiscibleIncompressibleTwoPhaseMixture &mixture)
Construct for mixture.
const dimensionSet dimless
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
const dimensionSet dimTime
virtual Pair< tmp< volScalarField > > mDotAlphal() const
Return the mass condensation and vaporisation rates as a.
An ordered pair of two objects of type <T> with first() and second() elements.
virtual bool read()
Read the phaseProperties dictionary and update.
virtual void correct()=0
Correct the phaseChange model.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimVelocity
addToRunTimeSelectionTable(cavitationModel, Kunz, dictionary)
An immiscible incompressible two-phase mixture transport model.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual bool read()
Read the phaseProperties dictionary and update.