MovingPhaseModel< BasePhaseModel > Class Template Reference

Class which represents a moving fluid phase. Holds the velocity, fluxes and momentumTransport model and can generate the momentum equation. The interface is quite restrictive as it also has to support an equivalent stationary model, which does not store motion fields or a momentumTransport model. More...

Inheritance diagram for MovingPhaseModel< BasePhaseModel >:
Collaboration diagram for MovingPhaseModel< BasePhaseModel >:

Public Member Functions

 MovingPhaseModel (const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
 
virtual ~MovingPhaseModel ()
 Destructor. More...
 
virtual void correct ()
 Correct the phase properties other than the thermo. More...
 
virtual void correctContinuityError (const volScalarField &source)
 Correct the continuity error. More...
 
virtual void correctKinematics ()
 Correct the kinematics. More...
 
virtual void predictMomentumTransport ()
 Predict the momentumTransport. More...
 
virtual void predictThermophysicalTransport ()
 Predict the energy transport e.g. alphat. More...
 
virtual void correctMomentumTransport ()
 Correct the momentumTransport. More...
 
virtual void correctThermophysicalTransport ()
 Correct the energy transport e.g. alphat. More...
 
virtual void correctUf ()
 Correct the face velocity for moving meshes. More...
 
virtual bool stationary () const
 Return whether the phase is stationary. More...
 
virtual tmp< fvVectorMatrixUEqn ()
 Return the momentum equation. More...
 
virtual tmp< fvVectorMatrixUfEqn ()
 Return the momentum equation for the face-based algorithm. More...
 
virtual tmp< volVectorFieldU () const
 Return the velocity. More...
 
virtual volVectorFieldURef ()
 Access the velocity. More...
 
virtual const volVectorFieldURef () const
 Access the velocity. More...
 
virtual tmp< surfaceScalarFieldphi () const
 Return the volumetric flux. More...
 
virtual surfaceScalarFieldphiRef ()
 Access the volumetric flux. More...
 
virtual const surfaceScalarFieldphiRef () const
 Access the volumetric flux. More...
 
virtual const autoPtr< surfaceVectorField > & Uf () const
 Return the face velocity. More...
 
virtual surfaceVectorFieldUfRef ()
 Access the face velocity. More...
 
virtual const surfaceVectorFieldUfRef () const
 Access the face velocity. More...
 
virtual tmp< surfaceScalarFieldalphaPhi () const
 Return the volumetric flux of the phase. More...
 
virtual surfaceScalarFieldalphaPhiRef ()
 Access the volumetric flux of the phase. More...
 
virtual const surfaceScalarFieldalphaPhiRef () const
 Access the volumetric flux of the phase. More...
 
virtual tmp< surfaceScalarFieldalphaRhoPhi () const
 Return the mass flux of the phase. More...
 
virtual surfaceScalarFieldalphaRhoPhiRef ()
 Access the mass flux of the phase. More...
 
virtual const surfaceScalarFieldalphaRhoPhiRef () const
 Access the mass flux of the phase. More...
 
virtual tmp< volVectorFieldDUDt () const
 Return the substantive acceleration. More...
 
virtual tmp< surfaceScalarFieldDUDtf () const
 Return the substantive acceleration on the faces. More...
 
virtual tmp< volScalarFieldcontinuityError () const
 Return the continuity error. More...
 
virtual tmp< volScalarFieldK () const
 Return the phase kinetic energy. More...
 
virtual const autoPtr< volScalarField > & divU () const
 Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) More...
 
virtual void divU (tmp< volScalarField > divU)
 Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi)) More...
 
virtual tmp< volScalarFieldk () const
 Return the turbulent kinetic energy. More...
 
virtual tmp< volScalarFieldpPrime () const
 Return the phase-pressure'. More...
 
virtual tmp< scalarFieldkappaEff (const label patchi) const
 Return the effective thermal conductivity on a patch. More...
 
virtual tmp< fvScalarMatrixdivq (volScalarField &he) const
 Return the source term for the energy equation. More...
 
virtual tmp< fvScalarMatrixdivj (volScalarField &Yi) const
 Return the source term for the given specie mass-fraction. More...
 

Protected Types

typedef MovingPhaseModelTransportThermoModel< typename BasePhaseModel::thermoModel >::type transportThermoModel
 Thermo type for the thermophysical transport model. More...
 

Protected Attributes

volVectorField U_
 Velocity field. More...
 
surfaceScalarField phi_
 Flux. More...
 
surfaceScalarField alphaPhi_
 Volumetric flux. More...
 
surfaceScalarField alphaRhoPhi_
 Mass flux. More...
 
autoPtr< surfaceVectorFieldUf_
 Face velocity field. More...
 
tmp< volVectorFieldDUDt_
 Lagrangian acceleration field (needed for virtual-mass) More...
 
tmp< surfaceScalarFieldDUDtf_
 Lagrangian acceleration field on the faces (needed for virtual-mass) More...
 
autoPtr< volScalarFielddivU_
 Dilatation rate. More...
 
autoPtr< phaseCompressible::momentumTransportModelmomentumTransport_
 Turbulence model. More...
 
autoPtr< PhaseThermophysicalTransportModel< phaseCompressible::momentumTransportModel, transportThermoModel > > thermophysicalTransport_
 Thermophysical transport model. More...
 
volScalarField continuityError_
 Continuity error. More...
 
tmp< volScalarFieldK_
 Kinetic Energy. More...
 

Detailed Description

template<class BasePhaseModel>
class Foam::MovingPhaseModel< BasePhaseModel >

Class which represents a moving fluid phase. Holds the velocity, fluxes and momentumTransport model and can generate the momentum equation. The interface is quite restrictive as it also has to support an equivalent stationary model, which does not store motion fields or a momentumTransport model.

Possible future extensions include separating the turbulent functionality into another layer.

See also
StationaryPhaseModel
Source files

Definition at line 80 of file MovingPhaseModel.H.

Member Typedef Documentation

◆ transportThermoModel

typedef MovingPhaseModelTransportThermoModel< typename BasePhaseModel::thermoModel >::type transportThermoModel
protected

Thermo type for the thermophysical transport model.

Definition at line 94 of file MovingPhaseModel.H.

Constructor & Destructor Documentation

◆ MovingPhaseModel()

◆ ~MovingPhaseModel()

~MovingPhaseModel
virtual

Destructor.

Definition at line 226 of file MovingPhaseModel.C.

Member Function Documentation

◆ correct()

void correct
virtual

Correct the phase properties other than the thermo.

and momentumTransport

Definition at line 244 of file MovingPhaseModel.C.

References Foam::MULES::correct().

Here is the call graph for this function:

◆ correctContinuityError()

void correctContinuityError ( const volScalarField source)
virtual

Correct the continuity error.

Definition at line 233 of file MovingPhaseModel.C.

References Foam::fvc::ddt(), Foam::fvc::div(), and rho.

Here is the call graph for this function:

◆ correctKinematics()

void correctKinematics
virtual

Correct the kinematics.

Definition at line 251 of file MovingPhaseModel.C.

References Foam::magSqr(), and U.

Referenced by MovingPhaseModel< BasePhaseModel >::MovingPhaseModel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ predictMomentumTransport()

void predictMomentumTransport
virtual

Predict the momentumTransport.

Definition at line 275 of file MovingPhaseModel.C.

◆ predictThermophysicalTransport()

void predictThermophysicalTransport
virtual

Predict the energy transport e.g. alphat.

Definition at line 283 of file MovingPhaseModel.C.

◆ correctMomentumTransport()

void correctMomentumTransport
virtual

Correct the momentumTransport.

Definition at line 291 of file MovingPhaseModel.C.

◆ correctThermophysicalTransport()

void correctThermophysicalTransport
virtual

Correct the energy transport e.g. alphat.

Definition at line 299 of file MovingPhaseModel.C.

◆ correctUf()

void correctUf
virtual

Correct the face velocity for moving meshes.

Definition at line 307 of file MovingPhaseModel.C.

References Foam::fvc::absolute(), Foam::fvc::interpolate(), fvMesh::magSf(), n, and fvMesh::Sf().

Here is the call graph for this function:

◆ stationary()

bool stationary
virtual

Return whether the phase is stationary.

Definition at line 326 of file MovingPhaseModel.C.

◆ UEqn()

Return the momentum equation.

Definition at line 334 of file MovingPhaseModel.C.

References alpha(), Foam::fvc::DDt(), Foam::fvm::ddt(), Foam::fvm::div(), MRF(), rho, and Foam::fvm::SuSp().

Here is the call graph for this function:

◆ UfEqn()

Foam::tmp< Foam::fvVectorMatrix > UfEqn
virtual

Return the momentum equation for the face-based algorithm.

Definition at line 352 of file MovingPhaseModel.C.

References alpha(), Foam::fvc::ddt(), Foam::fvc::DDt(), Foam::fvm::div(), MRF(), rho, and Foam::fvm::SuSp().

Here is the call graph for this function:

◆ U()

Return the velocity.

Definition at line 371 of file MovingPhaseModel.C.

◆ URef() [1/2]

Foam::volVectorField & URef
virtual

Access the velocity.

Definition at line 379 of file MovingPhaseModel.C.

◆ URef() [2/2]

const Foam::volVectorField & URef
virtual

Access the velocity.

Definition at line 387 of file MovingPhaseModel.C.

◆ phi()

Return the volumetric flux.

Definition at line 395 of file MovingPhaseModel.C.

◆ phiRef() [1/2]

Foam::surfaceScalarField & phiRef
virtual

Access the volumetric flux.

Definition at line 403 of file MovingPhaseModel.C.

◆ phiRef() [2/2]

const Foam::surfaceScalarField & phiRef
virtual

Access the volumetric flux.

Definition at line 411 of file MovingPhaseModel.C.

◆ Uf()

const Foam::autoPtr< Foam::surfaceVectorField > & Uf
virtual

Return the face velocity.

Required for moving mesh cases

Definition at line 419 of file MovingPhaseModel.C.

◆ UfRef() [1/2]

Foam::surfaceVectorField & UfRef
virtual

Access the face velocity.

Required for moving mesh cases

Definition at line 427 of file MovingPhaseModel.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and GeometricField< Type, PatchField, GeoMesh >::null().

Here is the call graph for this function:

◆ UfRef() [2/2]

const Foam::surfaceVectorField & UfRef
virtual

Access the face velocity.

Required for moving mesh cases

Definition at line 446 of file MovingPhaseModel.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and GeometricField< Type, PatchField, GeoMesh >::null().

Here is the call graph for this function:

◆ alphaPhi()

Foam::tmp< Foam::surfaceScalarField > alphaPhi
virtual

Return the volumetric flux of the phase.

Definition at line 465 of file MovingPhaseModel.C.

◆ alphaPhiRef() [1/2]

Foam::surfaceScalarField & alphaPhiRef
virtual

Access the volumetric flux of the phase.

Definition at line 473 of file MovingPhaseModel.C.

◆ alphaPhiRef() [2/2]

const Foam::surfaceScalarField & alphaPhiRef
virtual

Access the volumetric flux of the phase.

Definition at line 481 of file MovingPhaseModel.C.

◆ alphaRhoPhi()

Foam::tmp< Foam::surfaceScalarField > alphaRhoPhi
virtual

Return the mass flux of the phase.

Definition at line 489 of file MovingPhaseModel.C.

◆ alphaRhoPhiRef() [1/2]

Foam::surfaceScalarField & alphaRhoPhiRef
virtual

Access the mass flux of the phase.

Definition at line 497 of file MovingPhaseModel.C.

◆ alphaRhoPhiRef() [2/2]

const Foam::surfaceScalarField & alphaRhoPhiRef
virtual

Access the mass flux of the phase.

Definition at line 505 of file MovingPhaseModel.C.

◆ DUDt()

Return the substantive acceleration.

Definition at line 513 of file MovingPhaseModel.C.

References Foam::fvc::absolute(), Foam::fvc::ddt(), Foam::fvc::div(), IOobject::groupName(), and Foam::name().

Here is the call graph for this function:

◆ DUDtf()

Return the substantive acceleration on the faces.

Definition at line 533 of file MovingPhaseModel.C.

References Foam::byDt(), IOobject::groupName(), and Foam::name().

Here is the call graph for this function:

◆ continuityError()

Foam::tmp< Foam::volScalarField > continuityError
virtual

Return the continuity error.

Definition at line 551 of file MovingPhaseModel.C.

◆ K()

Return the phase kinetic energy.

Definition at line 559 of file MovingPhaseModel.C.

References IOobject::groupName(), Foam::magSqr(), Foam::name(), and U.

Here is the call graph for this function:

◆ divU() [1/2]

const Foam::autoPtr< Foam::volScalarField > & divU
virtual

Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))

Definition at line 577 of file MovingPhaseModel.C.

◆ divU() [2/2]

void divU ( tmp< volScalarField divU)
virtual

Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi))

Definition at line 584 of file MovingPhaseModel.C.

References IOobject::groupName(), Foam::name(), and tmp< T >::ptr().

Here is the call graph for this function:

◆ k()

Return the turbulent kinetic energy.

Definition at line 601 of file MovingPhaseModel.C.

◆ pPrime()

Foam::tmp< Foam::volScalarField > pPrime
virtual

Return the phase-pressure'.

(derivative of phase-pressure w.r.t. phase-fraction)

Definition at line 609 of file MovingPhaseModel.C.

◆ kappaEff()

Foam::tmp< Foam::scalarField > kappaEff ( const label  patchi) const
virtual

Return the effective thermal conductivity on a patch.

Definition at line 617 of file MovingPhaseModel.C.

References patchi.

◆ divq()

Foam::tmp< Foam::fvScalarMatrix > divq ( volScalarField he) const
virtual

Return the source term for the energy equation.

Definition at line 625 of file MovingPhaseModel.C.

References he().

Here is the call graph for this function:

◆ divj()

Foam::tmp< Foam::fvScalarMatrix > divj ( volScalarField Yi) const
virtual

Return the source term for the given specie mass-fraction.

equation

Definition at line 633 of file MovingPhaseModel.C.

Member Data Documentation

◆ U_

volVectorField U_
protected

Velocity field.

Definition at line 100 of file MovingPhaseModel.H.

Referenced by MovingPhaseModel< BasePhaseModel >::MovingPhaseModel().

◆ phi_

surfaceScalarField phi_
protected

◆ alphaPhi_

surfaceScalarField alphaPhi_
protected

Volumetric flux.

Definition at line 106 of file MovingPhaseModel.H.

◆ alphaRhoPhi_

surfaceScalarField alphaRhoPhi_
protected

Mass flux.

Definition at line 109 of file MovingPhaseModel.H.

◆ Uf_

autoPtr<surfaceVectorField> Uf_
protected

Face velocity field.

Definition at line 112 of file MovingPhaseModel.H.

Referenced by MovingPhaseModel< BasePhaseModel >::MovingPhaseModel().

◆ DUDt_

tmp<volVectorField> DUDt_
mutableprotected

Lagrangian acceleration field (needed for virtual-mass)

Definition at line 115 of file MovingPhaseModel.H.

◆ DUDtf_

tmp<surfaceScalarField> DUDtf_
mutableprotected

Lagrangian acceleration field on the faces (needed for virtual-mass)

Definition at line 118 of file MovingPhaseModel.H.

◆ divU_

autoPtr<volScalarField> divU_
protected

Dilatation rate.

Definition at line 121 of file MovingPhaseModel.H.

◆ momentumTransport_

autoPtr<phaseCompressible::momentumTransportModel> momentumTransport_
protected

Turbulence model.

Definition at line 124 of file MovingPhaseModel.H.

◆ thermophysicalTransport_

Thermophysical transport model.

Definition at line 134 of file MovingPhaseModel.H.

◆ continuityError_

volScalarField continuityError_
protected

Continuity error.

Definition at line 137 of file MovingPhaseModel.H.

◆ K_

tmp<volScalarField> K_
mutableprotected

Kinetic Energy.

Definition at line 140 of file MovingPhaseModel.H.


The documentation for this class was generated from the following files: