SemiImplicitSource< Type > Class Template Reference

Applies semi-implicit source within a specified region for Type, where <Type>=Scalar/Vector/SphericalTensor/SymmTensor/Tensor. The injection rate coefficients are specified as pairs of Su-Sp coefficients, i.e.: More...

Collaboration diagram for SemiImplicitSource< Type >:
[legend]

Public Types

enum  volumeModeType { vmAbsolute, vmSpecific }
 Options for the volume mode type. 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...
 
volumeModeTypevolumeMode ()
 Return access to the volume mode. 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 Enum< volumeModeTypevolumeModeTypeNames_
 Names for volumeModeType. More...
 

Protected Member Functions

void setFieldData (const dictionary &dict)
 Set the local field data. More...
 

Protected Attributes

volumeModeType volumeMode_
 Volume mode. More...
 
scalar VDash_
 Volume normalisation. More...
 
PtrList< Function1< Type > > Su_
 Source field values. More...
 
PtrList< Function1< scalar > > Sp_
 

Detailed Description

template<class Type>
class Foam::fv::SemiImplicitSource< Type >

Applies semi-implicit source within a specified region for Type, where <Type>=Scalar/Vector/SphericalTensor/SymmTensor/Tensor. 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
Usage
Minimal example by using constant/fvOptions:
<Type>SemiImplicitSource1
{
    // Mandatory entries (unmodifiable)
    type                <Type>SemiImplicitSource;

    // Mandatory entries (runtime modifiable)
    volumeMode          <volumeModeType>;
    injectionRateSuSp
    {
        k           (30.7 0);
        epsilon     (1.5  0);

        // The injectionRate can also be specified as a Function1
        // by having dictionaries for the field entries instead
        k
        {
            // Time-ramp from 0 to 30.7 at time 5
            Su table
            (
                (0 0.0)
                (5 30.7)
            );
            Sp      0.0;
        }
        epsilon
        {
            Su      1.5;
            Sp      0.0;
        }
    }

    // Mandatory/Optional (inherited) entries
    ...
}

where the entries mean:

Property Description Type Reqd Dflt
type Type name: <Type>SemiImplicitSource word yes -
volumeMode Volume mode type word yes -
injectionRateSuSp Injection rate settings dictionary yes -

The inherited entries are elaborated in:

Options for the volumeMode entry:

      absolute  | Values are given as \<quantity\>
      specific  | Values are given as \<quantity\>/m3
See also
  • Foam::fvOption
Source files

Definition at line 169 of file SemiImplicitSource.H.

Member Enumeration Documentation

◆ volumeModeType

Options for the volume mode type.

Enumerator
vmAbsolute 
vmSpecific 

Definition at line 193 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 113 of file SemiImplicitSource.C.

References dict, and Foam::blockMeshTools::read().

Here is the call graph for this function:

Member Function Documentation

◆ setFieldData()

void setFieldData ( const dictionary dict)
protected

Set the local field data.

Definition at line 52 of file SemiImplicitSource.C.

References Foam::BitOps::count(), dict, Tuple2< T1, T2 >::first(), Tuple2< T1, T2 >::second(), and dictionary::set().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "SemiImplicitSource< Type >"  )

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 34 of file SemiImplicitSourceI.H.

◆ volumeMode() [2/2]

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

Return access to the volume mode.

Definition at line 42 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 Foam::expressions::patchExpr::debug, fvMatrix< Type >::dimensions(), Foam::dimVolume, Foam::endl(), Foam::Info, psi, fvMatrix< Type >::psi(), Sp, Su, Foam::fam::SuSp(), and Foam::Zero.

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 187 of file SemiImplicitSource.C.

References Foam::expressions::patchExpr::debug, 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 204 of file SemiImplicitSource.C.

References dict, and Foam::blockMeshTools::read().

Here is the call graph for this function:

Member Data Documentation

◆ volumeModeTypeNames_

const Foam::Enum< typename Foam::fv::SemiImplicitSource< Type >::volumeModeType > volumeModeTypeNames_
static

Names for volumeModeType.

Definition at line 200 of file SemiImplicitSource.H.

◆ volumeMode_

volumeModeType volumeMode_
protected

Volume mode.

Definition at line 208 of file SemiImplicitSource.H.

◆ VDash_

scalar VDash_
protected

Volume normalisation.

Definition at line 211 of file SemiImplicitSource.H.

◆ Su_

PtrList<Function1<Type> > Su_
protected

Source field values.

Definition at line 214 of file SemiImplicitSource.H.

◆ Sp_

PtrList<Function1<scalar> > Sp_
protected

Definition at line 215 of file SemiImplicitSource.H.


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