MovingPhaseModel< BasePhaseModel > Class Template Reference

Class which represents a moving fluid phase. Holds the velocity, fluxes and turbulence model. Provides access to the turbulent quantities. More...

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

Public Member Functions

 MovingPhaseModel (const multiphaseInterSystem &fluid, const word &phaseName)
 
virtual ~MovingPhaseModel ()=default
 Destructor. More...
 
virtual void correct ()
 Correct the phase properties other than the thermo and turbulence. More...
 
virtual tmp< surfaceScalarFieldphi () const
 Constant access the volumetric flux. More...
 
virtual const surfaceScalarFieldphi ()
 Access the volumetric flux. More...
 
virtual tmp< surfaceScalarFieldalphaPhi () const
 Constant access the volumetric flux of the phase. More...
 
virtual surfaceScalarFieldalphaPhi ()
 Access the volumetric flux of the phase. More...
 
virtual tmp< volVectorFieldU () const
 Access const reference to U. More...
 
virtual tmp< surfaceScalarFielddiffNo () const
 Diffusion number. More...
 
 MovingPhaseModel (const phaseSystem &fluid, const word &phaseName, const label index)
 Construct from phase system and phase name. More...
 
virtual ~MovingPhaseModel ()=default
 Destructor. More...
 
virtual void correct ()
 Correct the phase properties other than the thermo and turbulence. More...
 
virtual void correctKinematics ()
 Correct the kinematics. More...
 
virtual void correctTurbulence ()
 Correct the turbulence. More...
 
virtual void correctEnergyTransport ()
 Correct the energy transport e.g. alphat. 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 tmp< surfaceScalarFieldphi () const
 Return the volumetric flux. More...
 
virtual surfaceScalarFieldphiRef ()
 Access the volumetric flux. More...
 
virtual tmp< surfaceScalarFieldalphaPhi () const
 Return the volumetric flux of the phase. More...
 
virtual surfaceScalarFieldalphaPhiRef ()
 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 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< volScalarFieldcontinuityErrorFlow () const
 Return the continuity error due to the flow field. More...
 
virtual tmp< volScalarFieldcontinuityErrorSources () const
 Return the continuity error due to any sources. More...
 
virtual tmp< volScalarFieldK () const
 Return the phase kinetic energy. More...
 
virtual tmp< volScalarFielddivU () 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< volScalarFieldmut () const
 Return the turbulent dynamic viscosity. More...
 
virtual tmp< volScalarFieldmuEff () const
 Return the effective dynamic viscosity. More...
 
virtual tmp< volScalarFieldnut () const
 Return the turbulent kinematic viscosity. More...
 
virtual tmp< volScalarFieldnuEff () const
 Return the effective kinematic viscosity. More...
 
virtual tmp< volScalarFieldkappaEff () const
 Return the effective thermal conductivity. More...
 
virtual tmp< scalarFieldkappaEff (const label patchi) const
 Return the effective thermal conductivity on a patch. More...
 
virtual tmp< volScalarFieldalphaEff () const
 Return the effective thermal diffusivity. More...
 
virtual tmp< scalarFieldalphaEff (const label patchi) const
 Return the effective thermal conductivity on a patch. More...
 
virtual tmp< volScalarFieldk () const
 Return the turbulent kinetic energy. More...
 
virtual tmp< volScalarFieldpPrime () const
 Return the phase-pressure'. More...
 

Protected Attributes

volVectorField U_
 Velocity field. More...
 
surfaceScalarField phi_
 Flux. More...
 
surfaceScalarField alphaRhoPhi_
 Mass flux. More...
 
tmp< volVectorFieldDUDt_
 Lagrangian acceleration field (needed for virtual-mass) More...
 
tmp< surfaceScalarFieldDUDtf_
 Lagrangian acceleration field on the faces (needed for virtual-mass) More...
 
tmp< volScalarFielddivU_
 Dilatation rate. More...
 
autoPtr< phaseCompressibleTurbulenceModelturbulence_
 Turbulence model. More...
 
volScalarField continuityErrorFlow_
 Continuity error due to the flow. More...
 
volScalarField continuityErrorSources_
 Continuity error due to any sources. 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 turbulence model. Provides access to the turbulent quantities.

Class which represents a moving fluid phase. Holds the velocity, fluxes and turbulence 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 turbulence model.

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

Source files

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

See also
StationaryPhaseModel
Source files

Definition at line 51 of file MovingPhaseModel.H.

Constructor & Destructor Documentation

◆ MovingPhaseModel() [1/2]

MovingPhaseModel ( const multiphaseInterSystem fluid,
const word phaseName 
)

Definition at line 41 of file MovingPhaseModel.C.

◆ ~MovingPhaseModel() [1/2]

virtual ~MovingPhaseModel ( )
virtualdefault

Destructor.

◆ MovingPhaseModel() [2/2]

MovingPhaseModel ( const phaseSystem fluid,
const word phaseName,
const label  index 
)

Construct from phase system and phase name.

Definition at line 121 of file MovingPhaseModel.C.

◆ ~MovingPhaseModel() [2/2]

virtual ~MovingPhaseModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ correct() [1/2]

void correct ( )
virtual

Correct the phase properties other than the thermo and turbulence.

Definition at line 70 of file MovingPhaseModel.C.

References correct.

◆ phi() [1/3]

Foam::tmp< Foam::surfaceScalarField > phi ( ) const
virtual

Constant access the volumetric flux.

Definition at line 78 of file MovingPhaseModel.C.

◆ phi() [2/3]

const Foam::surfaceScalarField & phi ( )
virtual

Access the volumetric flux.

Definition at line 86 of file MovingPhaseModel.C.

◆ alphaPhi() [1/3]

Foam::tmp< Foam::surfaceScalarField > alphaPhi ( ) const
virtual

Constant access the volumetric flux of the phase.

Definition at line 94 of file MovingPhaseModel.C.

◆ alphaPhi() [2/3]

Foam::surfaceScalarField & alphaPhi ( )
virtual

Access the volumetric flux of the phase.

Definition at line 102 of file MovingPhaseModel.C.

◆ U() [1/2]

Foam::tmp< Foam::volVectorField > U ( ) const
virtual

Access const reference to U.

Definition at line 110 of file MovingPhaseModel.C.

◆ diffNo()

Foam::tmp< Foam::surfaceScalarField > diffNo ( ) const
virtual

Diffusion number.

Definition at line 118 of file MovingPhaseModel.C.

References Foam::dimless, Foam::name(), Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ correct() [2/2]

virtual void correct ( )
virtual

Correct the phase properties other than the thermo and turbulence.

◆ correctKinematics()

void correctKinematics ( )
virtual

Correct the kinematics.

Definition at line 226 of file MovingPhaseModel.C.

References Foam::magSqr(), and U.

Here is the call graph for this function:

◆ correctTurbulence()

void correctTurbulence ( )
virtual

Correct the turbulence.

Definition at line 250 of file MovingPhaseModel.C.

References correctTurbulence().

Here is the call graph for this function:

◆ correctEnergyTransport()

void correctEnergyTransport ( )
virtual

Correct the energy transport e.g. alphat.

Definition at line 259 of file MovingPhaseModel.C.

◆ stationary()

bool stationary ( ) const
virtual

Return whether the phase is stationary.

Definition at line 268 of file MovingPhaseModel.C.

◆ UEqn()

Foam::tmp< Foam::fvVectorMatrix > UEqn ( )
virtual

Return the momentum equation.

Definition at line 276 of file MovingPhaseModel.C.

References Foam::constant::atomic::alpha, Foam::fac::ddt(), Foam::fvc::DDt(), Foam::fac::div(), fluid, MRF, rho, Foam::fam::SuSp(), and thermo.

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 294 of file MovingPhaseModel.C.

References Foam::constant::atomic::alpha, Foam::fvc::DDt(), Foam::fac::div(), fluid, MRF, rho, Sp, Foam::fam::SuSp(), and thermo.

Here is the call graph for this function:

◆ U() [2/2]

virtual tmp<volVectorField> U ( ) const
virtual

Return the velocity.

◆ URef()

Foam::volVectorField & URef ( )
virtual

Access the velocity.

Definition at line 322 of file MovingPhaseModel.C.

◆ phi() [3/3]

virtual tmp<surfaceScalarField> phi ( ) const
virtual

Return the volumetric flux.

◆ phiRef()

Foam::surfaceScalarField & phiRef ( )
virtual

Access the volumetric flux.

Definition at line 338 of file MovingPhaseModel.C.

◆ alphaPhi() [3/3]

virtual tmp<surfaceScalarField> alphaPhi ( ) const
virtual

Return the volumetric flux of the phase.

◆ alphaPhiRef()

Foam::surfaceScalarField & alphaPhiRef ( )
virtual

Access the volumetric flux of the phase.

Definition at line 354 of file MovingPhaseModel.C.

◆ alphaRhoPhi()

Foam::tmp< Foam::surfaceScalarField > alphaRhoPhi ( ) const
virtual

Return the mass flux of the phase.

Definition at line 362 of file MovingPhaseModel.C.

◆ alphaRhoPhiRef()

Foam::surfaceScalarField & alphaRhoPhiRef ( )
virtual

Access the mass flux of the phase.

Definition at line 370 of file MovingPhaseModel.C.

◆ DUDt()

Foam::tmp< Foam::volVectorField > DUDt ( ) const
virtual

Return the substantive acceleration.

Definition at line 378 of file MovingPhaseModel.C.

References Foam::fac::ddt(), and Foam::fac::div().

Here is the call graph for this function:

◆ DUDtf()

Foam::tmp< Foam::surfaceScalarField > DUDtf ( ) const
virtual

Return the substantive acceleration on the faces.

Definition at line 391 of file MovingPhaseModel.C.

References Foam::byDt().

Here is the call graph for this function:

◆ continuityError()

Foam::tmp< Foam::volScalarField > continuityError ( ) const
virtual

Return the continuity error.

Definition at line 404 of file MovingPhaseModel.C.

◆ continuityErrorFlow()

Foam::tmp< Foam::volScalarField > continuityErrorFlow ( ) const
virtual

Return the continuity error due to the flow field.

Definition at line 412 of file MovingPhaseModel.C.

◆ continuityErrorSources()

Foam::tmp< Foam::volScalarField > continuityErrorSources ( ) const
virtual

Return the continuity error due to any sources.

Definition at line 420 of file MovingPhaseModel.C.

◆ K()

Foam::tmp< Foam::volScalarField > K ( ) const
virtual

Return the phase kinetic energy.

Definition at line 428 of file MovingPhaseModel.C.

References Foam::magSqr(), Foam::name(), Foam::New(), and U.

Here is the call graph for this function:

◆ divU() [1/2]

Foam::tmp< Foam::volScalarField > divU ( ) const
virtual

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

Definition at line 445 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 452 of file MovingPhaseModel.C.

References divU.

◆ mut()

Foam::tmp< Foam::volScalarField > mut ( ) const
virtual

Return the turbulent dynamic viscosity.

Definition at line 460 of file MovingPhaseModel.C.

◆ muEff()

Foam::tmp< Foam::volScalarField > muEff ( ) const
virtual

Return the effective dynamic viscosity.

Definition at line 468 of file MovingPhaseModel.C.

◆ nut()

Foam::tmp< Foam::volScalarField > nut ( ) const
virtual

Return the turbulent kinematic viscosity.

Definition at line 476 of file MovingPhaseModel.C.

◆ nuEff()

Foam::tmp< Foam::volScalarField > nuEff ( ) const
virtual

Return the effective kinematic viscosity.

Definition at line 484 of file MovingPhaseModel.C.

◆ kappaEff() [1/2]

Foam::tmp< Foam::volScalarField > kappaEff ( ) const
virtual

Return the effective thermal conductivity.

Definition at line 492 of file MovingPhaseModel.C.

◆ kappaEff() [2/2]

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

Return the effective thermal conductivity on a patch.

Definition at line 500 of file MovingPhaseModel.C.

◆ alphaEff() [1/2]

Foam::tmp< Foam::volScalarField > alphaEff ( ) const
virtual

Return the effective thermal diffusivity.

Definition at line 508 of file MovingPhaseModel.C.

◆ alphaEff() [2/2]

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

Return the effective thermal conductivity on a patch.

Definition at line 516 of file MovingPhaseModel.C.

◆ k()

Foam::tmp< Foam::volScalarField > k ( ) const
virtual

Return the turbulent kinetic energy.

Definition at line 524 of file MovingPhaseModel.C.

◆ pPrime()

Foam::tmp< Foam::volScalarField > pPrime ( ) const
virtual

Return the phase-pressure'.

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

Definition at line 532 of file MovingPhaseModel.C.

Member Data Documentation

◆ U_

volVectorField U_
protected

Velocity field.

Definition at line 69 of file MovingPhaseModel.H.

◆ phi_

surfaceScalarField phi_
protected

Flux.

Definition at line 74 of file MovingPhaseModel.H.

◆ alphaRhoPhi_

surfaceScalarField alphaRhoPhi_
protected

Mass flux.

Definition at line 84 of file MovingPhaseModel.H.

◆ DUDt_

tmp<volVectorField> DUDt_
mutableprotected

Lagrangian acceleration field (needed for virtual-mass)

Definition at line 89 of file MovingPhaseModel.H.

◆ DUDtf_

tmp<surfaceScalarField> DUDtf_
mutableprotected

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

Definition at line 94 of file MovingPhaseModel.H.

◆ divU_

tmp<volScalarField> divU_
protected

Dilatation rate.

Definition at line 99 of file MovingPhaseModel.H.

◆ turbulence_

autoPtr<phaseCompressibleTurbulenceModel> turbulence_
protected

Turbulence model.

Definition at line 104 of file MovingPhaseModel.H.

◆ continuityErrorFlow_

volScalarField continuityErrorFlow_
protected

Continuity error due to the flow.

Definition at line 109 of file MovingPhaseModel.H.

◆ continuityErrorSources_

volScalarField continuityErrorSources_
protected

Continuity error due to any sources.

Definition at line 114 of file MovingPhaseModel.H.

◆ K_

tmp<volScalarField> K_
mutableprotected

Kinetic Energy.

Definition at line 119 of file MovingPhaseModel.H.


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