Go to the documentation of this file.
29 #include "phaseSystem.H"
41 #include "surfaceInterpolate.H"
46 template<
class BasePhaseModel>
50 word phiName(IOobject::groupName(
"phi", this->
name()));
55 U.mesh().time().timeName(),
62 Info<<
"Reading face flux field " << phiName <<
endl;
64 return tmp<surfaceScalarField>
71 U.mesh().time().timeName(),
82 Info<<
"Calculating face flux field " << phiName <<
endl;
86 U.boundaryField().size(),
87 calculatedFvPatchScalarField::typeName
94 isA<fixedValueFvPatchVectorField>(
U.boundaryField()[i])
95 || isA<slipFvPatchVectorField>(
U.boundaryField()[i])
96 || isA<partialSlipFvPatchVectorField>(
U.boundaryField()[i])
99 phiTypes[i] = fixedValueFvPatchScalarField::typeName;
103 return tmp<surfaceScalarField>
110 U.mesh().time().timeName(),
125 template<
class BasePhaseModel>
129 const word& phaseName,
133 BasePhaseModel(
fluid, phaseName, index),
138 IOobject::groupName(
"U", this->
name()),
151 IOobject::groupName(
"alphaPhi", this->
name()),
162 IOobject::groupName(
"alphaRhoPhi", this->
name()),
188 IOobject::groupName(
"continuityErrorFlow", this->
name()),
195 continuityErrorSources_
199 IOobject::groupName(
"continuityErrorSources", this->
name()),
208 phi_.writeOpt() = IOobject::AUTO_WRITE;
216 template<
class BasePhaseModel>
223 template<
class BasePhaseModel>
228 this->
fluid().MRF().correctBoundaryVelocity(U_);
234 continuityErrorSources_ = - (this->
fluid().fvOptions()(*
this,
rho)&rho);
238 template<
class BasePhaseModel>
241 BasePhaseModel::correctKinematics();
263 template<
class BasePhaseModel>
268 turbulence_->correct();
272 template<
class BasePhaseModel>
275 BasePhaseModel::correctEnergyTransport();
277 turbulence_->correctEnergyTransport();
281 template<
class BasePhaseModel>
288 template<
class BasePhaseModel>
299 +
fvm::SuSp(- this->continuityError(), U_)
301 + turbulence_->divDevRhoReff(U_)
306 template<
class BasePhaseModel>
319 +
fvm::SuSp(- this->continuityErrorSources(), U_)
321 + turbulence_->divDevRhoReff(U_)
326 template<
class BasePhaseModel>
334 template<
class BasePhaseModel>
342 template<
class BasePhaseModel>
350 template<
class BasePhaseModel>
358 template<
class BasePhaseModel>
366 template<
class BasePhaseModel>
374 template<
class BasePhaseModel>
382 template<
class BasePhaseModel>
390 template<
class BasePhaseModel>
403 template<
class BasePhaseModel>
409 DUDtf_ =
byDt(phi_ - phi_.oldTime());
416 template<
class BasePhaseModel>
420 return continuityErrorFlow_ + continuityErrorSources_;
424 template<
class BasePhaseModel>
428 return continuityErrorFlow_;
432 template<
class BasePhaseModel>
436 return continuityErrorSources_;
440 template<
class BasePhaseModel>
448 IOobject::groupName(
"K", this->
name()),
457 template<
class BasePhaseModel>
465 template<
class BasePhaseModel>
472 template<
class BasePhaseModel>
476 return turbulence_->mut();
480 template<
class BasePhaseModel>
484 return turbulence_->muEff();
488 template<
class BasePhaseModel>
492 return turbulence_->nut();
496 template<
class BasePhaseModel>
500 return turbulence_->nuEff();
504 template<
class BasePhaseModel>
508 return turbulence_->kappaEff();
512 template<
class BasePhaseModel>
516 return turbulence_->kappaEff(patchi);
520 template<
class BasePhaseModel>
524 return turbulence_->alphaEff();
528 template<
class BasePhaseModel>
532 return turbulence_->alphaEff(patchi);
536 template<
class BasePhaseModel>
540 return turbulence_->k();
544 template<
class BasePhaseModel>
548 return turbulence_->pPrime();
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
A class for handling words, derived from Foam::string.
virtual tmp< volScalarField > kappaEff() const
Return the effective thermal conductivity.
A class for managing temporary objects.
virtual tmp< volScalarField > continuityErrorSources() const
Return the continuity error due to any sources.
const dimensionSet dimDensity
virtual tmp< surfaceScalarField > alphaPhi() const
Return the volumetric flux of the phase.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
virtual bool stationary() const
Return whether the phase is stationary.
psiReactionThermo & thermo
static word timeName(const scalar t, const int precision=precision_)
virtual tmp< volScalarField > continuityError() const
Return the continuity error.
Calculate the divergence of the given field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Dimension set for the base types.
virtual tmp< volScalarField > mut() const
Return the turbulent dynamic viscosity.
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Calculate the matrix for the divergence of the given field and flux.
virtual tmp< volScalarField > nuEff() const
Return the effective kinematic viscosity.
#define forAll(list, i)
Loop across all elements in list.
tmp< faMatrix< Type > > SuSp(const areaScalarField &sp, const GeometricField< Type, faPatchField, areaMesh > &vf)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual surfaceScalarField & phiRef()
Access the volumetric flux.
CGAL::Exact_predicates_exact_constructions_kernel K
List< word > wordList
A List of words.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual surfaceScalarField & alphaPhiRef()
Access the volumetric flux of the phase.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux.
MovingPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
virtual void correctTurbulence()
Correct the turbulence.
virtual tmp< volScalarField > k() const
Return the turbulent kinetic energy.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
virtual tmp< volVectorField > U() const
Return the velocity.
virtual tmp< volScalarField > alphaEff() const
Return the effective thermal diffusivity.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluid correctTurbulence()
virtual tmp< fvVectorMatrix > UfEqn()
Return the momentum equation for the face-based algorithm.
virtual tmp< fvVectorMatrix > UEqn()
Return the momentum equation.
virtual tmp< surfaceScalarField > DUDtf() const
Return the substantive acceleration on the faces.
virtual void correctKinematics()
Correct the kinematics.
Calculate the matrix for implicit and explicit sources.
virtual volVectorField & URef()
Access the velocity.
const fvMesh & mesh() const
Return the mesh.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual ~MovingPhaseModel()
Destructor.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual tmp< volScalarField > K() const
Return the phase kinetic energy.
virtual void correct()
Correct the phase properties other than the thermo and turbulence.
virtual tmp< surfaceScalarField > alphaRhoPhi() const
Return the mass flux of the phase.
virtual tmp< volScalarField > pPrime() const
Return the phase-pressure'.
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Calculate the face-flux of the given field.
virtual tmp< volScalarField > divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
virtual surfaceScalarField & alphaRhoPhiRef()
Access the mass flux of the phase.
virtual tmp< volScalarField > nut() const
Return the turbulent kinematic viscosity.
virtual tmp< volScalarField > continuityErrorFlow() const
Return the continuity error due to the flow field.
const Time & time() const
Return the top-level database.
Calculate the first temporal derivative.
virtual tmp< volScalarField > muEff() const
Return the effective dynamic viscosity.
Class to represent a system of phases and model interfacial transfers between them.
bool valid() const noexcept
virtual tmp< volVectorField > DUDt() const
Return the substantive acceleration.
tmp< volScalarField > byDt(const volScalarField &vf)
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
Calculate the matrix for the first temporal derivative.
tmp< GeometricField< Type, fvPatchField, volMesh > > DDt(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &psi)