41 template<
class BasePhaseModel>
45 word phiName(IOobject::groupName(
"phi", this->
name()));
50 U.mesh().time().timeName(),
57 Info<<
"Reading face flux field " << phiName <<
endl;
59 return tmp<surfaceScalarField>
66 U.mesh().time().timeName(),
77 Info<<
"Calculating face flux field " << phiName <<
endl;
81 U.boundaryField().size(),
82 calculatedFvPatchScalarField::typeName
87 if (!U.boundaryField()[
patchi].assignable())
89 phiTypes[
patchi] = fixedValueFvPatchScalarField::typeName;
93 return tmp<surfaceScalarField>
100 U.mesh().time().timeName(),
115 template<
class BasePhaseModel>
118 const phaseSystem& fluid,
119 const word& phaseName,
120 const bool referencePhase,
124 BasePhaseModel(fluid, phaseName, referencePhase, index),
129 IOobject::groupName(
"U", this->
name()),
142 IOobject::groupName(
"alphaPhi", this->
name()),
153 IOobject::groupName(
"alphaRhoPhi", this->
name()),
175 thermophysicalTransport_
177 PhaseThermophysicalTransportModel
180 typename BasePhaseModel::thermoModel
181 >::
New(turbulence_, this->thermo_)
187 IOobject::groupName(
"continuityError", this->
name()),
204 template<
class BasePhaseModel>
211 template<
class BasePhaseModel>
223 template<
class BasePhaseModel>
227 this->
fluid().MRF().correctBoundaryVelocity(U_);
231 template<
class BasePhaseModel>
234 BasePhaseModel::correctKinematics();
256 template<
class BasePhaseModel>
259 BasePhaseModel::correctTurbulence();
261 turbulence_->correct();
265 template<
class BasePhaseModel>
268 BasePhaseModel::correctEnergyTransport();
269 thermophysicalTransport_->correct();
273 template<
class BasePhaseModel>
280 template<
class BasePhaseModel>
291 +
fvm::SuSp(-this->continuityError(), U_)
293 + turbulence_->divDevTau(U_)
298 template<
class BasePhaseModel>
312 + turbulence_->divDevTau(U_)
317 template<
class BasePhaseModel>
325 template<
class BasePhaseModel>
333 template<
class BasePhaseModel>
341 template<
class BasePhaseModel>
349 template<
class BasePhaseModel>
357 template<
class BasePhaseModel>
365 template<
class BasePhaseModel>
373 template<
class BasePhaseModel>
381 template<
class BasePhaseModel>
390 return tmp<volVectorField>(DUDt_());
394 template<
class BasePhaseModel>
400 DUDtf_ =
byDt(phi_ - phi_.oldTime());
403 return tmp<surfaceScalarField>(DUDtf_());
407 template<
class BasePhaseModel>
411 return continuityError_;
415 template<
class BasePhaseModel>
428 return tmp<volScalarField>(K_());
432 template<
class BasePhaseModel>
436 return divU_.valid() ? tmp<volScalarField>(divU_()) : tmp<volScalarField>();
440 template<
class BasePhaseModel>
447 template<
class BasePhaseModel>
451 return thermophysicalTransport_->kappaEff(patchi);
455 template<
class BasePhaseModel>
459 return turbulence_->k();
463 template<
class BasePhaseModel>
467 return turbulence_->pPrime();
471 template<
class BasePhaseModel>
475 return thermophysicalTransport_->divq(he);
479 template<
class BasePhaseModel>
483 return thermophysicalTransport_->divj(Yi);
#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)
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.
PhaseCompressibleMomentumTransportModel< phaseModel > phaseCompressibleMomentumTransportModel
Typedef for phaseCompressibleMomentumTransportModel.
virtual surfaceScalarField & alphaRhoPhiRef()
Access the mass flux of the phase.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
virtual bool stationary() const
Return whether the phase is stationary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< volVectorField > DUDt() const
Return the substantive acceleration.
virtual tmp< surfaceScalarField > alphaPhi() const
Return the volumetric flux of the phase.
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for the given specie mass-fraction.
rhoReactionThermo & thermo
virtual void correctTurbulence()
Correct the turbulence.
GeometricField< vector, fvPatchField, volMesh > volVectorField
CGAL::Exact_predicates_exact_constructions_kernel K
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.
MovingPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual tmp< surfaceScalarField > alphaRhoPhi() const
Return the mass flux of the phase.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
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 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 > &)
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(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-8/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 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.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
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.
virtual void correctContinuityError(const volScalarField &source)
Correct the continuity error.
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 tmp< scalarField > kappaEff(const label patchi) const
Return the effective thermal conductivity on a patch.
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.