28 #include "phaseCompressibleTurbulenceModel.H" 39 #include "surfaceInterpolate.H" 44 template<
class BasePhaseModel>
48 word phiName(IOobject::groupName(
"phi", this->
name()));
53 U.mesh().time().timeName(),
60 Info<<
"Reading face flux field " << phiName <<
endl;
62 return tmp<surfaceScalarField>
69 U.mesh().time().timeName(),
80 Info<<
"Calculating face flux field " << phiName <<
endl;
84 U.boundaryField().size(),
85 calculatedFvPatchScalarField::typeName
88 forAll(U.boundaryField(), i)
92 isA<fixedValueFvPatchVectorField>(U.boundaryField()[i])
93 || isA<slipFvPatchVectorField>(U.boundaryField()[i])
94 || isA<partialSlipFvPatchVectorField>(U.boundaryField()[i])
97 phiTypes[i] = fixedValueFvPatchScalarField::typeName;
101 return tmp<surfaceScalarField>
108 U.mesh().time().timeName(),
123 template<
class BasePhaseModel>
126 const phaseSystem& fluid,
127 const word& phaseName,
131 BasePhaseModel(fluid, phaseName, index),
136 IOobject::groupName(
"U", this->
name()),
149 IOobject::groupName(
"alphaPhi", this->
name()),
160 IOobject::groupName(
"alphaRhoPhi", this->
name()),
186 IOobject::groupName(
"continuityErrorFlow", this->
name()),
193 continuityErrorSources_
197 IOobject::groupName(
"continuityErrorSources", this->
name()),
214 template<
class BasePhaseModel>
221 template<
class BasePhaseModel>
226 this->
fluid().MRF().correctBoundaryVelocity(U_);
232 continuityErrorSources_ = - (this->
fluid().fvOptions()(*
this,
rho)&rho);
236 template<
class BasePhaseModel>
239 BasePhaseModel::correctKinematics();
261 template<
class BasePhaseModel>
264 BasePhaseModel::correctTurbulence();
266 turbulence_->correct();
270 template<
class BasePhaseModel>
273 BasePhaseModel::correctEnergyTransport();
275 turbulence_->correctEnergyTransport();
279 template<
class BasePhaseModel>
286 template<
class BasePhaseModel>
297 +
fvm::SuSp(- this->continuityError(), U_)
299 + turbulence_->divDevRhoReff(U_)
304 template<
class BasePhaseModel>
317 +
fvm::SuSp(- this->continuityErrorSources(), U_)
319 + turbulence_->divDevRhoReff(U_)
324 template<
class BasePhaseModel>
332 template<
class BasePhaseModel>
340 template<
class BasePhaseModel>
348 template<
class BasePhaseModel>
356 template<
class BasePhaseModel>
364 template<
class BasePhaseModel>
372 template<
class BasePhaseModel>
380 template<
class BasePhaseModel>
388 template<
class BasePhaseModel>
397 return tmp<volVectorField>(DUDt_());
401 template<
class BasePhaseModel>
407 DUDtf_ =
byDt(phi_ - phi_.oldTime());
410 return tmp<surfaceScalarField>(DUDtf_());
414 template<
class BasePhaseModel>
418 return continuityErrorFlow_ + continuityErrorSources_;
422 template<
class BasePhaseModel>
426 return continuityErrorFlow_;
430 template<
class BasePhaseModel>
434 return continuityErrorSources_;
438 template<
class BasePhaseModel>
452 return tmp<volScalarField>(K_());
456 template<
class BasePhaseModel>
460 return divU_.valid() ? tmp<volScalarField>(divU_()) : tmp<volScalarField>();
464 template<
class BasePhaseModel>
471 template<
class BasePhaseModel>
475 return turbulence_->mut();
479 template<
class BasePhaseModel>
483 return turbulence_->muEff();
487 template<
class BasePhaseModel>
491 return turbulence_->nut();
495 template<
class BasePhaseModel>
499 return turbulence_->nuEff();
503 template<
class BasePhaseModel>
507 return turbulence_->kappaEff();
511 template<
class BasePhaseModel>
515 return turbulence_->kappaEff(patchi);
519 template<
class BasePhaseModel>
523 return turbulence_->alphaEff();
527 template<
class BasePhaseModel>
531 return turbulence_->alphaEff(patchi);
535 template<
class BasePhaseModel>
539 return turbulence_->k();
543 template<
class BasePhaseModel>
547 return turbulence_->pPrime();
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< volScalarField > divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
tmp< GeometricField< Type, fvPatchField, volMesh > > DDt(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &psi)
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual surfaceScalarField & alphaRhoPhiRef()
Access the mass flux of the phase.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual tmp< volScalarField > alphaEff() const
Return the effective thermal diffusivity.
virtual bool stationary() const
Return whether the phase is stationary.
MovingPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< volScalarField > mut() const
Return the turbulent dynamic viscosity.
virtual tmp< volVectorField > DUDt() const
Return the substantive acceleration.
virtual tmp< surfaceScalarField > alphaPhi() const
Return the volumetric flux of the phase.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
rhoReactionThermo & thermo
virtual void correctTurbulence()
Correct the turbulence.
GeometricField< vector, fvPatchField, volMesh > volVectorField
CGAL::Exact_predicates_exact_constructions_kernel K
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
virtual tmp< volScalarField > k() const
Return the turbulent kinetic energy.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Calculate the first temporal derivative.
virtual tmp< surfaceScalarField > alphaRhoPhi() const
Return the mass flux of the phase.
virtual tmp< fvVectorMatrix > UfEqn()
Return the momentum equation for the face-based algorithm.
virtual ~MovingPhaseModel()
Destructor.
Calculate the face-flux of the given field.
static word groupName(Name name, const word &group)
virtual surfaceScalarField & phiRef()
Access the volumetric flux.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
virtual tmp< volScalarField > muEff() const
Return the effective dynamic viscosity.
virtual tmp< volScalarField > continuityErrorSources() const
Return the continuity error due to any sources.
virtual tmp< volScalarField > continuityErrorFlow() const
Return the continuity error due to the flow field.
virtual volVectorField & URef()
Access the velocity.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
Calculate the divergence of the given field.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
virtual tmp< volScalarField > nut() const
Return the turbulent kinematic viscosity.
virtual tmp< volScalarField > kappaEff() const
Return the effective thermal conductivity.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/ubuntu/OpenFOAM-6/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()
virtual tmp< volScalarField > nuEff() const
Return the effective kinematic viscosity.
virtual void correct()
Correct the phase properties other than the thermo and turbulence.
virtual tmp< volVectorField > U() const
Return the velocity.
word name(const complex &)
Return a string representation of a complex.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
tmp< volScalarField > byDt(const volScalarField &vf)
const dimensionSet dimDensity
virtual tmp< volScalarField > continuityError() const
Return the continuity error.
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
virtual tmp< volScalarField > K() const
Return the phase kinetic energy.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual surfaceScalarField & alphaPhiRef()
Access the volumetric flux of the phase.
virtual tmp< fvVectorMatrix > UEqn()
Return the momentum equation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual void correctKinematics()
Correct the kinematics.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux.
A class for managing temporary objects.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual tmp< surfaceScalarField > DUDtf() const
Return the substantive acceleration on the faces.
Calculate the matrix for implicit and explicit sources.