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:

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...
 
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...
 

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 55 of file phaseInterface.H.

Constructor & Destructor Documentation

◆ phaseInterface() [1/4]

phaseInterface ( const phaseModel phase1,
const phaseModel phase2 
)

Construct from phases.

◆ phaseInterface() [2/4]

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

Construct from phases.

◆ phaseInterface() [3/4]

phaseInterface ( const phaseSystem fluid,
const word name 
)

Construct from fluid and name.

◆ phaseInterface() [4/4]

phaseInterface ( const phaseSystem fluid,
const phaseInterfaceKey name 
)

Construct from fluid and key.

◆ ~phaseInterface()

virtual ~phaseInterface ( )
virtual

Destructor.

Member Function Documentation

◆ getPhase1()

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

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

◆ getPhase2()

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

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

◆ addHeadSeparator()

static bool addHeadSeparator ( const word separator)
static

Add a head separator to the list.

◆ addOldSeparatorToSeparator()

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

Add a old separator to separator to the table.

◆ nameToNameParts()

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

Split an interface name and return all its parts.

◆ nameToSeparators()

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

Split an interface name and return its separators.

◆ separatorsToTypeName()

static word separatorsToTypeName ( const wordList separators)
static

Convert a list of separators into a type name.

◆ nameToTypeName()

static 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.

◆ namePartsToName()

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

Convert interface name parts to an interface name.

◆ oldNamePartsToName()

static 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.

◆ identifyPhases()

static Tuple2<const phaseModel&, const 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

◆ TypeName()

TypeName ( "phaseInterface"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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

◆ clone()

virtual autoPtr<phaseInterface> clone ( ) const
virtual

Clone function.

◆ New() [1/2]

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

Select given fluid and name.

Referenced by phaseInterface::iNew::operator()().

Here is the caller graph for this function:

◆ New() [2/2]

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

Select by combining two interfaces.

◆ separator()

static word separator ( )
inlinestatic

Return the separator that delimits this interface's name.

Definition at line 262 of file phaseInterface.H.

References phaseInterface::name(), and word::null.

Here is the call graph for this function:

◆ name()

◆ modelCast()

◆ phase1()

const Foam::phaseModel & phase1 ( ) const
inline

Return phase 1.

Definition at line 30 of file phaseInterfaceI.H.

Referenced by phaseInterface::fluid(), phaseInterface::mesh(), and phaseInterface::modelCast().

Here is the caller graph for this function:

◆ phase2()

const Foam::phaseModel & phase2 ( ) const
inline

Return phase 2.

Definition at line 36 of file phaseInterfaceI.H.

Referenced by phaseInterface::modelCast().

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 42 of file phaseInterfaceI.H.

References phaseInterface::otherPhase().

Referenced by phaseInterface::modelCast().

Here is the call graph for this function:
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 49 of file phaseInterfaceI.H.

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

Referenced by phaseInterface::contains(), and phaseInterface::modelCast().

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 72 of file phaseInterfaceI.H.

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

Referenced by phaseInterface::g(), and phaseInterface::modelCast().

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

◆ fluid()

const Foam::phaseSystem & fluid ( ) const
inline

Return the phase system.

Definition at line 93 of file phaseInterfaceI.H.

References phaseModel::fluid(), and phaseInterface::phase1().

Referenced by phaseInterface::modelCast().

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

◆ mesh()

const Foam::fvMesh & mesh ( ) const
inline

Return the mesh.

Definition at line 99 of file phaseInterfaceI.H.

References DimensionedField< Type, GeoMesh >::mesh(), and phaseInterface::phase1().

Referenced by phaseInterface::modelCast().

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

◆ g()

const Foam::uniformDimensionedVectorField & g ( ) const
inline

Return gravitational acceleration.

Definition at line 106 of file phaseInterfaceI.H.

References phaseInterface::index().

Referenced by phaseInterface::modelCast().

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

◆ rho()

tmp<volScalarField> rho ( ) const

Average density.

Referenced by phaseInterface::modelCast().

Here is the caller graph for this function:

◆ magUr()

tmp<volScalarField> magUr ( ) const

Relative velocity magnitude.

Referenced by phaseInterface::modelCast().

Here is the caller graph for this function:

◆ sigma()

tmp<volScalarField> sigma ( ) const

Surface tension coefficient.

Referenced by phaseInterface::modelCast().

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 210 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 216 of file phaseInterfaceI.H.

◆ begin()

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

const_iterator set to the beginning of the pair

Definition at line 222 of file phaseInterfaceI.H.

◆ end()

const_iterator set to beyond the end of the pair

Definition at line 228 of file phaseInterfaceI.H.


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