Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SemiImplicitSource Class 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:
Collaboration graph
[legend]

Public Types

enum  volumeModeType { vmAbsolute, vmSpecific }
 

Public Member Functions

 TypeName ("SemiImplicitSource")
 
 SemiImplicitSource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
const volumeModeTypevolumeMode () const
 
volumeModeTypevolumeMode ()
 
virtual void addSup (fvMatrix< Type > &eqn, const label fieldi)
 
virtual void addSup (const volScalarField &rho, fvMatrix< Type > &eqn, const label fieldi)
 
virtual bool read (const dictionary &dict)
 

Static Public Attributes

static const Enum< volumeModeTypevolumeModeTypeNames_
 

Protected Member Functions

void setFieldData (const dictionary &dict)
 

Protected Attributes

volumeModeType volumeMode_
 
scalar VDash_
 
PtrList< Function1< Type > > Su_
 
PtrList< Function1< scalar > > Sp_
 

Detailed Description

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 165 of file SemiImplicitSource.H.

Member Enumeration Documentation

◆ volumeModeType

Enumerator
vmAbsolute 
vmSpecific 

Definition at line 189 of file SemiImplicitSource.H.

Constructor & Destructor Documentation

◆ SemiImplicitSource()

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

Definition at line 106 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

Definition at line 45 of file SemiImplicitSource.C.

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

Here is the call graph for this function:

◆ TypeName()

TypeName ( "SemiImplicitSource"  )

◆ volumeMode() [1/2]

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

Definition at line 27 of file SemiImplicitSourceI.H.

◆ volumeMode() [2/2]

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

Definition at line 35 of file SemiImplicitSourceI.H.

◆ addSup() [1/2]

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

◆ addSup() [2/2]

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

Definition at line 180 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

Definition at line 197 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

Definition at line 196 of file SemiImplicitSource.H.

◆ volumeMode_

volumeModeType volumeMode_
protected

Definition at line 204 of file SemiImplicitSource.H.

◆ VDash_

scalar VDash_
protected

Definition at line 207 of file SemiImplicitSource.H.

◆ Su_

PtrList<Function1<Type> > Su_
protected

Definition at line 210 of file SemiImplicitSource.H.

◆ Sp_

PtrList<Function1<scalar> > Sp_
protected

Definition at line 211 of file SemiImplicitSource.H.


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