Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
SemiImplicitSource Class Reference

Semi-implicit source, described using an input dictionary. The injection rate coefficients are specified as pairs of Su-Sp coefficients, i.e. More...

Collaboration diagram for SemiImplicitSource:
Collaboration graph
[legend]

Public Types

enum  volumeModeType { vmAbsolute, vmSpecific }
 Enumeration for volume types. More...
 

Public Member Functions

 TypeName ("SemiImplicitSource")
 Runtime type information. More...
 
 SemiImplicitSource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
const volumeModeTypevolumeMode () const
 Return const access to the volume mode. More...
 
const List< Tuple2< Type, scalar > > & injectionRate () const
 Return const access to the source field values. More...
 
volumeModeTypevolumeMode ()
 Return access to the volume mode. More...
 
List< Tuple2< Type, scalar > > & injectionRate ()
 Return access to the source field values. More...
 
virtual void addSup (fvMatrix< Type > &eqn, const label fieldI)
 Add explicit contribution to equation. More...
 
virtual void addSup (const volScalarField &rho, fvMatrix< Type > &eqn, const label fieldI)
 Add explicit contribution to compressible equation. More...
 
virtual bool read (const dictionary &dict)
 Read source dictionary. More...
 

Static Public Attributes

static const wordList volumeModeTypeNames_
 Word list of volume mode type names. More...
 

Protected Member Functions

volumeModeType wordToVolumeModeType (const word &vtName) const
 Helper function to convert from a word to a volumeModeType. More...
 
word volumeModeTypeToWord (const volumeModeType &vtType) const
 Helper function to convert from a volumeModeType to a word. More...
 
void setFieldData (const dictionary &dict)
 Set the local field data. More...
 

Protected Attributes

volumeModeType volumeMode_
 Volume mode. More...
 
scalar VDash_
 Volume normalisation. More...
 
List< Tuple2< Type, scalar > > injectionRate_
 Source field values. More...
 

Detailed Description

Semi-implicit source, described using an input dictionary. The injection rate coefficients are specified as pairs of Su-Sp coefficients, i.e.

\[ S(x) = S_u + S_p x \]

where

$ S(x) $ = net source for field 'x'
$ S_u $ = explicit source contribution
$ S_p $ = linearised implicit contribution

Example of the source specification:

    <Type>SemiImplicitSourceCoeffs
    {
        volumeMode      absolute; // specific
        injectionRateSuSp
        {
            k           (30.7 0);
            epsilon     (1.5  0);
        }
    }

Valid options for the volumeMode entry include:

See also
Foam::fvOption
Source files

Definition at line 95 of file SemiImplicitSource.H.

Member Enumeration Documentation

◆ volumeModeType

Enumeration for volume types.

Enumerator
vmAbsolute 
vmSpecific 

Definition at line 122 of file SemiImplicitSource.H.

Constructor & Destructor Documentation

◆ SemiImplicitSource()

SemiImplicitSource ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from components.

Definition at line 112 of file SemiImplicitSource.C.

References dict, and Foam::read().

Here is the call graph for this function:

Member Function Documentation

◆ wordToVolumeModeType()

Foam::fv::SemiImplicitSource< Type >::volumeModeType wordToVolumeModeType ( const word vtName) const
protected

Helper function to convert from a word to a volumeModeType.

Definition at line 46 of file SemiImplicitSource.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, and Foam::nl.

Here is the call graph for this function:

◆ volumeModeTypeToWord()

Foam::word volumeModeTypeToWord ( const volumeModeType vtType) const
protected

Helper function to convert from a volumeModeType to a word.

Definition at line 69 of file SemiImplicitSource.C.

◆ setFieldData()

void setFieldData ( const dictionary dict)
protected

Set the local field data.

Definition at line 85 of file SemiImplicitSource.C.

References dict, and forAllConstIter().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "SemiImplicitSource"  )

Runtime type information.

◆ volumeMode() [1/2]

const Foam::fv::SemiImplicitSource< Type >::volumeModeType & volumeMode ( ) const
inline

Return const access to the volume mode.

Definition at line 32 of file SemiImplicitSourceI.H.

◆ injectionRate() [1/2]

const Foam::List< Foam::Tuple2< Type, Foam::scalar > > & injectionRate ( ) const
inline

Return const access to the source field values.

Definition at line 40 of file SemiImplicitSourceI.H.

◆ volumeMode() [2/2]

Foam::fv::SemiImplicitSource< Type >::volumeModeType & volumeMode ( )
inline

Return access to the volume mode.

Definition at line 48 of file SemiImplicitSourceI.H.

◆ injectionRate() [2/2]

Foam::List< Foam::Tuple2< Type, Foam::scalar > > & injectionRate ( )
inline

Return access to the source field values.

Definition at line 56 of file SemiImplicitSourceI.H.

◆ addSup() [1/2]

void addSup ( fvMatrix< Type > &  eqn,
const label  fieldI 
)
virtual

Add explicit contribution to equation.

Definition at line 132 of file SemiImplicitSource.C.

References fvMatrix::dimensions(), Foam::dimVolume, Foam::endl(), UIndirectList::first(), Foam::Info, psi, fvMatrix::psi(), Foam::fvc::Sp(), Foam::fvc::Su(), and Foam::fvc::SuSp().

Here is the call graph for this function:

◆ addSup() [2/2]

void addSup ( const volScalarField rho,
fvMatrix< Type > &  eqn,
const label  fieldI 
)
virtual

Add explicit contribution to compressible equation.

Definition at line 195 of file SemiImplicitSource.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Read source dictionary.

Definition at line 31 of file SemiImplicitSourceIO.C.

References dict, and Foam::read().

Here is the call graph for this function:

Field Documentation

◆ volumeModeTypeNames_

const Foam::wordList volumeModeTypeNames_
static

Word list of volume mode type names.

Definition at line 129 of file SemiImplicitSource.H.

◆ volumeMode_

volumeModeType volumeMode_
protected

Volume mode.

Definition at line 137 of file SemiImplicitSource.H.

◆ VDash_

scalar VDash_
protected

Volume normalisation.

Definition at line 140 of file SemiImplicitSource.H.

◆ injectionRate_

List<Tuple2<Type, scalar> > injectionRate_
protected

Source field values.

Definition at line 143 of file SemiImplicitSource.H.


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