phaseInterface Class Reference

Class to represent an interface between phases. Derivations can further specify the configuration of that interface; e.g., representing dispersal, displacement or sidedness. More...

Inheritance diagram for phaseInterface:
Collaboration diagram for phaseInterface:

Classes

class  const_iterator
 STL const_iterator. More...
 
class  iNew
 Class used for construction of PtrLists of phaseInterfaces. More...
 

Public Member Functions

 TypeName ("phaseInterface")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, phaseInterface, word,(const phaseSystem &fluid, const word &name),(fluid, name))
 
 phaseInterface (const phaseModel &phase1, const phaseModel &phase2)
 Construct from phases. More...
 
 phaseInterface (const Tuple2< const phaseModel &, const phaseModel & > &phases)
 Construct from phases. More...
 
 phaseInterface (const phaseSystem &fluid, const word &name)
 Construct from fluid and name. More...
 
 phaseInterface (const phaseSystem &fluid, const phaseInterfaceKey &name)
 Construct from fluid and key. More...
 
virtual autoPtr< phaseInterfaceclone () const
 Clone function. More...
 
virtual ~phaseInterface ()
 Destructor. More...
 
virtual word name () const
 Name. More...
 
template<class ModelType , class Derived >
const Derived & modelCast () const
 Cast to derived type for use in a model. More...
 
virtual const volScalarFieldalpha1 () const
 Return the volume fraction of phase 1. More...
 
virtual const volScalarFieldalpha2 () const
 Return the volume fraction of phase 2. More...
 
virtual const rhoThermothermo1 () const
 Return the thermo for phase 1. More...
 
virtual const rhoThermothermo2 () const
 Return the thermo for phase 2. More...
 
virtual const volScalarFieldrho1 () const
 Return the density of phase 1. More...
 
virtual const volScalarFieldrho2 () const
 Return the density of phase 2. More...
 
const phaseModelphase1 () const
 Return phase 1. More...
 
const phaseModelphase2 () const
 Return phase 2. More...
 
bool contains (const phaseModel &phase) const
 Return true if this phaseInterface contains the given phase. More...
 
const phaseModelotherPhase (const phaseModel &phase) const
 Return the other phase relative to the given phase. More...
 
label index (const phaseModel &phase) const
 Return the index of the given phase. Generates a FatalError if. More...
 
const phaseSystemfluid () const
 Return the phase system. More...
 
const fvMeshmesh () const
 Return the mesh. More...
 
const uniformDimensionedVectorFieldg () const
 Return gravitational acceleration. More...
 
tmp< volScalarFieldrho () const
 Average density. More...
 
tmp< volScalarFieldmagUr () const
 Relative velocity magnitude. More...
 
tmp< volScalarFieldsigma () const
 Surface tension coefficient. More...
 
const_iterator cbegin () const
 const_iterator set to the beginning of the pair More...
 
const_iterator cend () const
 const_iterator set to beyond the end of the pair More...
 
const_iterator begin () const
 const_iterator set to the beginning of the pair More...
 
const_iterator end () const
 const_iterator set to beyond the end of the pair More...
 
- Public Member Functions inherited from compressibleTwoPhases
 TypeName ("compressibleTwoPhases")
 Runtime type information. More...
 
 compressibleTwoPhases ()
 Default construct. More...
 
virtual ~compressibleTwoPhases ()
 Destructor. More...
 
const rhoThermothermo (const bool index) const
 Return the density of a given phase. More...
 
const volScalarFieldrho (const bool index) const
 Return the density of a given phase. More...
 
- Public Member Functions inherited from twoPhases
 TypeName ("twoPhases")
 Runtime type information. More...
 
 twoPhases ()
 Default construct. More...
 
virtual ~twoPhases ()
 Destructor. More...
 
const fvMeshmesh () const
 Access the mesh. More...
 
bool index (const word &name) const
 Return the index associated with a given phase name. More...
 
const volScalarFieldalpha (const bool index) const
 Return the volume-fraction of a given phase. More...
 

Static Public Member Functions

static const phaseModelgetPhase1 (const phaseModel &phase1, const phaseModel &phase2)
 Get a reference to phase1 after sorting the phases by index. More...
 
static const phaseModelgetPhase2 (const phaseModel &phase1, const phaseModel &phase2)
 Get a reference to phase2 after sorting the phases by index. More...
 
static bool addHeadSeparator (const word &separator)
 Add a head separator to the list. More...
 
static bool addOldSeparatorToSeparator (const word &oldSeparator, const word &separator)
 Add a old separator to separator to the table. More...
 
static wordList nameToNameParts (const phaseSystem &fluid, const word &name)
 Split an interface name and return all its parts. More...
 
static wordList nameToSeparators (const phaseSystem &fluid, const word &name)
 Split an interface name and return its separators. More...
 
static word separatorsToTypeName (const wordList &separators)
 Convert a list of separators into a type name. More...
 
static word nameToTypeName (const phaseSystem &fluid, const word &name)
 Convert an interface name into a type name. Essentially just. More...
 
static word namePartsToName (const phaseSystem &fluid, const wordList &nameParts)
 Convert interface name parts to an interface name. More...
 
static word oldNamePartsToName (const phaseSystem &fluid, const wordList &oldNameParts)
 Convert old-format interface name parts to an interface name. Used. More...
 
static Tuple2< const phaseModel &, const phaseModel & > identifyPhases (const phaseSystem &fluid, const word &name, const wordList &separators)
 Return references to the phases associated with a given name, and a. More...
 
static autoPtr< phaseInterfaceNew (const phaseSystem &fluid, const word &name)
 Select given fluid and name. More...
 
static autoPtr< phaseInterfaceNew (const phaseInterface &interface1, const phaseInterface &interface2)
 Select by combining two interfaces. More...
 
static word separator ()
 Return the separator that delimits this interface's name. More...
 

Detailed Description

Class to represent an interface between phases. Derivations can further specify the configuration of that interface; e.g., representing dispersal, displacement or sidedness.

Source files

Definition at line 56 of file phaseInterface.H.

Constructor & Destructor Documentation

◆ phaseInterface() [1/4]

phaseInterface ( const phaseModel phase1,
const phaseModel phase2 
)

Construct from phases.

Definition at line 339 of file phaseInterface.C.

◆ phaseInterface() [2/4]

phaseInterface ( const Tuple2< const phaseModel &, const phaseModel & > &  phases)

Construct from phases.

Definition at line 351 of file phaseInterface.C.

◆ phaseInterface() [3/4]

phaseInterface ( const phaseSystem fluid,
const word name 
)

Construct from fluid and name.

Definition at line 360 of file phaseInterface.C.

◆ phaseInterface() [4/4]

phaseInterface ( const phaseSystem fluid,
const phaseInterfaceKey name 
)

Construct from fluid and key.

Definition at line 370 of file phaseInterface.C.

◆ ~phaseInterface()

~phaseInterface ( )
virtual

Destructor.

Definition at line 388 of file phaseInterface.C.

Member Function Documentation

◆ getPhase1()

const Foam::phaseModel & getPhase1 ( const phaseModel phase1,
const phaseModel phase2 
)
static

Get a reference to phase1 after sorting the phases by index.

Definition at line 59 of file phaseInterface.C.

References phaseModel::index(), phaseInterface::phase1(), and phaseInterface::phase2().

Here is the call graph for this function:

◆ getPhase2()

const Foam::phaseModel & getPhase2 ( const phaseModel phase1,
const phaseModel phase2 
)
static

Get a reference to phase2 after sorting the phases by index.

Definition at line 69 of file phaseInterface.C.

References phaseModel::index().

Here is the call graph for this function:

◆ addHeadSeparator()

bool addHeadSeparator ( const word separator)
static

Add a head separator to the list.

Definition at line 79 of file phaseInterface.C.

References Foam::findIndex().

Here is the call graph for this function:

◆ addOldSeparatorToSeparator()

bool addOldSeparatorToSeparator ( const word oldSeparator,
const word separator 
)
static

Add a old separator to separator to the table.

Definition at line 93 of file phaseInterface.C.

◆ nameToNameParts()

Foam::wordList nameToNameParts ( const phaseSystem fluid,
const word name 
)
static

Split an interface name and return all its parts.

Definition at line 103 of file phaseInterface.C.

References List< T >::append(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, UList< T >::last(), Foam::name(), word::null, and phaseSystem::phases().

Referenced by sidedPhaseInterface::otherInterface().

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

◆ nameToSeparators()

Foam::wordList nameToSeparators ( const phaseSystem fluid,
const word name 
)
static

Split an interface name and return its separators.

Definition at line 179 of file phaseInterface.C.

References forAll, Foam::name(), and List< T >::size().

Here is the call graph for this function:

◆ separatorsToTypeName()

Foam::word separatorsToTypeName ( const wordList separators)
static

Convert a list of separators into a type name.

Definition at line 197 of file phaseInterface.C.

References forAll, List< T >::size(), and Foam::sort().

Here is the call graph for this function:

◆ nameToTypeName()

Foam::word nameToTypeName ( const phaseSystem fluid,
const word name 
)
static

Convert an interface name into a type name. Essentially just.

replaces valid phase names with a "<phase>" placeholder.

Definition at line 227 of file phaseInterface.C.

References Foam::name().

Here is the call graph for this function:

◆ namePartsToName()

Foam::word namePartsToName ( const phaseSystem fluid,
const wordList nameParts 
)
static

Convert interface name parts to an interface name.

Definition at line 237 of file phaseInterface.C.

References forAll, Foam::name(), and word::null.

Referenced by sidedPhaseInterface::otherInterface().

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

◆ oldNamePartsToName()

Foam::word oldNamePartsToName ( const phaseSystem fluid,
const wordList oldNameParts 
)
static

Convert old-format interface name parts to an interface name. Used.

in phaseSystem to provide backwards compatible input.

Definition at line 257 of file phaseInterface.C.

References forAll, DictionaryBase< IDLListType, T >::found(), Foam::name(), word::null, and phaseSystem::phases().

Referenced by phaseSystem::interfacialDict().

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

◆ identifyPhases()

Foam::Tuple2< const Foam::phaseModel &, const Foam::phaseModel & > identifyPhases ( const phaseSystem fluid,
const word name,
const wordList separators 
)
static

Return references to the phases associated with a given name, and a.

list of valid separators

Definition at line 291 of file phaseInterface.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::name(), phaseSystem::phases(), and List< T >::size().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "phaseInterface"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
phaseInterface  ,
word  ,
(const phaseSystem &fluid, const word &name ,
(fluid, name  
)

◆ clone()

Foam::autoPtr< Foam::phaseInterface > clone ( ) const
virtual

Clone function.

Definition at line 380 of file phaseInterface.C.

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

Here is the call graph for this function:

◆ New() [1/2]

Foam::autoPtr< Foam::phaseInterface > New ( const phaseSystem fluid,
const word name 
)
static

Select given fluid and name.

Definition at line 394 of file phaseInterface.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::name().

Referenced by phaseSystem::generateInterfacialModels(), phaseSystem::generateInterfacialValues(), phaseInterface::iNew::operator()(), and sidedPhaseInterface::otherInterface().

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

◆ New() [2/2]

Foam::autoPtr< Foam::phaseInterface > New ( const phaseInterface interface1,
const phaseInterface interface2 
)
static

Select by combining two interfaces.

Definition at line 417 of file phaseInterface.C.

References List< T >::append(), Pair< Type >::compare(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, phaseInterface::fluid(), phaseInterface::name(), Foam::New(), word::null, and List< T >::size().

Here is the call graph for this function:

◆ separator()

static word separator ( )
inlinestatic

Return the separator that delimits this interface's name.

Definition at line 265 of file phaseInterface.H.

References word::null.

Referenced by Foam::defineTypeNameAndDebugWithName().

Here is the caller graph for this function:

◆ name()

◆ modelCast()

const Derived& modelCast ( ) const
inline

Cast to derived type for use in a model.

Definition at line 278 of file phaseInterface.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and phaseInterface::name().

Here is the call graph for this function:

◆ alpha1()

const Foam::volScalarField & alpha1 ( ) const
inlinevirtual

Return the volume fraction of phase 1.

Implements twoPhases.

Definition at line 30 of file phaseInterfaceI.H.

References phaseInterface::phase1().

Here is the call graph for this function:

◆ alpha2()

const Foam::volScalarField & alpha2 ( ) const
inlinevirtual

Return the volume fraction of phase 2.

Implements twoPhases.

Definition at line 36 of file phaseInterfaceI.H.

◆ thermo1()

const Foam::rhoThermo & thermo1 ( ) const
inlinevirtual

Return the thermo for phase 1.

Implements compressibleTwoPhases.

Definition at line 42 of file phaseInterfaceI.H.

◆ thermo2()

const Foam::rhoThermo & thermo2 ( ) const
inlinevirtual

Return the thermo for phase 2.

Implements compressibleTwoPhases.

Definition at line 48 of file phaseInterfaceI.H.

◆ rho1()

const Foam::volScalarField & rho1 ( ) const
inlinevirtual

Return the density of phase 1.

Implements compressibleTwoPhases.

Definition at line 54 of file phaseInterfaceI.H.

◆ rho2()

const Foam::volScalarField & rho2 ( ) const
inlinevirtual

Return the density of phase 2.

Implements compressibleTwoPhases.

Definition at line 60 of file phaseInterfaceI.H.

◆ phase1()

const Foam::phaseModel & phase1 ( ) const
inline

Return phase 1.

Definition at line 66 of file phaseInterfaceI.H.

Referenced by TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefsWithoutL(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtL(), MomentumTransferPhaseSystem< BasePhaseSystem >::addDmdtUfs(), PhaseTransferPhaseSystem< BasePhaseSystem >::addDmdtYfs(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefsWithoutL(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtL(), PhaseTransferPhaseSystem< BasePhaseSystem >::addDmidtYf(), phaseInterface::alpha1(), PhaseTransferPhaseSystem< BasePhaseSystem >::d2mdtdps(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::d2mdtdps(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::dmdts(), PhaseTransferPhaseSystem< BasePhaseSystem >::dmdts(), PopulationBalancePhaseSystem< BasePhaseSystem >::dmdts(), MomentumTransferPhaseSystem< BasePhaseSystem >::dragCorrs(), phaseForces::execute(), phaseInterface::getPhase1(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::heatTransfer(), HeatTransferPhaseSystem< BasePhaseSystem >::L(), HeatTransferPhaseSystem< BasePhaseSystem >::Li(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialElimination(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialEliminationf(), blendingMethod::readParameters(), and phaseSystem::validateMassTransfer().

Here is the caller graph for this function:

◆ phase2()

const Foam::phaseModel & phase2 ( ) const
inline

Return phase 2.

Definition at line 72 of file phaseInterfaceI.H.

Referenced by TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtHefsWithoutL(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmdtL(), MomentumTransferPhaseSystem< BasePhaseSystem >::addDmdtUfs(), PhaseTransferPhaseSystem< BasePhaseSystem >::addDmdtYfs(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefs(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtHefsWithoutL(), HeatTransferPhaseSystem< BasePhaseSystem >::addDmidtL(), PhaseTransferPhaseSystem< BasePhaseSystem >::addDmidtYf(), PhaseTransferPhaseSystem< BasePhaseSystem >::d2mdtdps(), ThermalPhaseChangePhaseSystem< BasePhaseSystem >::d2mdtdps(), InterfaceCompositionPhaseChangePhaseSystem< BasePhaseSystem >::dmdts(), PhaseTransferPhaseSystem< BasePhaseSystem >::dmdts(), PopulationBalancePhaseSystem< BasePhaseSystem >::dmdts(), MomentumTransferPhaseSystem< BasePhaseSystem >::dragCorrs(), phaseInterface::getPhase1(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), HeatTransferPhaseSystem< BasePhaseSystem >::L(), HeatTransferPhaseSystem< BasePhaseSystem >::Li(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialElimination(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialEliminationf(), blendingMethod::readParameters(), and phaseSystem::validateMassTransfer().

Here is the caller graph for this function:

◆ contains()

bool contains ( const phaseModel phase) const
inline

Return true if this phaseInterface contains the given phase.

Definition at line 78 of file phaseInterfaceI.H.

Referenced by alphatPhaseChangeWallFunctionBase::activeInterface(), and continuous::fContinuous().

Here is the caller graph for this function:

◆ otherPhase()

const Foam::phaseModel & otherPhase ( const phaseModel phase) const
inline

Return the other phase relative to the given phase.

Generates a FatalError if this phaseInterface does not contain the given phase

Definition at line 84 of file phaseInterfaceI.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and phaseModel::name().

Referenced by sidedPhaseInterface::otherPhase().

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

◆ index()

Foam::label index ( const phaseModel phase) const
inline

Return the index of the given phase. Generates a FatalError if.

this phaseInterface does not contain the given phase

Definition at line 108 of file phaseInterfaceI.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and phaseModel::name().

Referenced by reactionDriven::addToNucleationRate(), BlendedInterfacialModel< ModelType >::BlendedInterfacialModel(), continuous::fContinuous(), phaseChange::R(), and SidedInterfacialModel< ModelType >::SidedInterfacialModel().

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

◆ fluid()

◆ mesh()

const Foam::fvMesh & mesh ( ) const
inline

Return the mesh.

Definition at line 135 of file phaseInterfaceI.H.

◆ g()

const Foam::uniformDimensionedVectorField & g ( ) const
inline

Return gravitational acceleration.

Definition at line 142 of file phaseInterfaceI.H.

◆ rho()

Foam::tmp< Foam::volScalarField > rho ( ) const

Average density.

Definition at line 503 of file phaseInterface.C.

◆ magUr()

Foam::tmp< Foam::volScalarField > magUr ( ) const

Relative velocity magnitude.

Definition at line 509 of file phaseInterface.C.

References Foam::mag(), and U.

Here is the call graph for this function:

◆ sigma()

Foam::tmp< Foam::volScalarField > sigma ( ) const

Surface tension coefficient.

Definition at line 515 of file phaseInterface.C.

Referenced by populationBalanceModel::sigmaWithContinuousPhase().

Here is the caller graph for this function:

◆ cbegin()

Foam::phaseInterface::const_iterator cbegin ( ) const
inline

const_iterator set to the beginning of the pair

Definition at line 246 of file phaseInterfaceI.H.

◆ cend()

Foam::phaseInterface::const_iterator cend ( ) const
inline

const_iterator set to beyond the end of the pair

Definition at line 252 of file phaseInterfaceI.H.

◆ begin()

Foam::phaseInterface::const_iterator begin ( ) const
inline

const_iterator set to the beginning of the pair

Definition at line 258 of file phaseInterfaceI.H.

◆ end()

const_iterator set to beyond the end of the pair

Definition at line 264 of file phaseInterfaceI.H.


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