volumeInjection Class Reference

Volume injection model. This injects particles instantaneously within the volume of a set of cells. Particles are positioned randomly. More...

Inheritance diagram for volumeInjection:
Collaboration diagram for volumeInjection:

Public Member Functions

 TypeName ("volumeInjection")
 Runtime type information. More...
 
 volumeInjection (const word &name, const LagrangianMesh &mesh, const dictionary &modelDict, const dictionary &stateDict)
 Construct from components. More...
 
virtual void correct ()
 Correct the LagrangianModel. More...
 
LagrangianSubMesh modify (LagrangianMesh &mesh, const LagrangianSubMesh &) const
 Create new elements in the Lagrangian mesh. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
virtual bool read (const dictionary &modelDict)
 Read dictionary. More...
 
virtual void writeState (Ostream &os) const
 Write state. More...
 
virtual void writeProcessorState (Ostream &os) const
 Write state. More...
 
- Public Member Functions inherited from LagrangianInjection
 TypeName ("LagrangianInjection")
 Runtime type information. More...
 
 LagrangianInjection (const word &name, const LagrangianMesh &mesh)
 Construct from components. More...
 
virtual ~LagrangianInjection ()
 Destructor. More...
 
virtual bool addsSupToField (const word &fieldName, const word &eqnFieldName) const
 Return true if the LagrangianModel adds a source term to the. More...
 
- Public Member Functions inherited from LagrangianModel
 TypeName ("LagrangianModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, LagrangianModel, dictionary,(const word &name, const LagrangianMesh &mesh, const dictionary &modelDict, const dictionary &stateDict),(name, mesh, modelDict, stateDict))
 Declare run-time constructor selection table. More...
 
 LagrangianModel (const word &name, const LagrangianMesh &mesh)
 Construct from components. More...
 
 LagrangianModel (const LagrangianModel &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< LagrangianModel > clone () const
 Clone. More...
 
virtual ~LagrangianModel ()
 Destructor. More...
 
const word & name () const
 The source name. More...
 
const objectRegistry & db () const
 The database. More...
 
const Time & time () const
 Return time. More...
 
const LagrangianMesh & mesh () const
 The mesh. More...
 
virtual wordList addSupFields () const
 Return the list of fields for which the LagrangianModel adds. More...
 
template<class Type , template< class > class PrimitiveField, template< class > class PrimitiveEqnField>
bool addsSupToField (const LagrangianSubField< Type, PrimitiveField > &field, const LagrangianSubField< Type, PrimitiveEqnField > &eqnfield) const
 Return true if the LagrangianModels adds a source term to the. More...
 
virtual void postConstruct ()
 Do post construction steps which require access to other models. More...
 
virtual void preModify (const LagrangianMesh &mesh, DynamicList< elementModification > &elementModifications) const
 Identify elements in the Lagrangian mesh which are to be. More...
 
virtual void calculate (const LagrangianSubScalarField &deltaT, const bool final)
 Solve equations and/or update continually changing properties. More...
 
virtual void preAddSup (const LagrangianSubScalarField &deltaT, const bool final)
 Hook before source evaluation. More...
 
virtual void addSup (const LagrangianSubScalarField &deltaT, LagrangianEqn< scalar > &eqn) const
 Add a fractional source term. More...
 
virtual void postAddSup (const LagrangianSubScalarField &deltaT, const bool final)
 Add a source term to an equation. More...
 
virtual bool write (const bool write) const
 Write data. More...
 
void operator= (const LagrangianModel &)=delete
 Disallow default bitwise assignment. More...
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
Foam::word fieldName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 
template<class Type , class GeoMesh , template< class > class PrimitiveField>
const Foam::word & fieldName (const GeometricField< Type, GeoMesh, PrimitiveField > &field)
 
template<class Type , class GeoMesh , template< class > class PrimitiveField>
const Foam::word & fieldName (const DimensionedField< Type, GeoMesh, PrimitiveField > &field)
 
template<class Type , template< class > class PrimitiveField>
Foam::word fieldName (const DimensionedField< Type, LagrangianSubMesh, PrimitiveField > &field)
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
Foam::word fieldsName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 
template<class AlphaRhoFieldType >
Foam::word fieldsName (const AlphaRhoFieldType &alphaRhoField)
 
- Public Member Functions inherited from stateModel
 stateModel ()
 Construct null. More...
 
 stateModel (const stateModel &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~stateModel ()
 Destructor. More...
 
bool writeState (const bool write) const
 Write state. More...
 
void operator= (const stateModel &)=delete
 Disallow default bitwise assignment. More...
 

Additional Inherited Members

- Public Types inherited from LagrangianModel
enum class  modification : label { change = 0 , remove = 1 }
 Enumeration of the types of instantaneous modification. More...
 
typedef LagrangianMesh::elementGroup< modification > elementModification
 Class containing an element-index and a modification-enumeration. More...
 
- Static Public Member Functions inherited from LagrangianModel
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static word fieldName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 Return the name of the field associated with a source term. More...
 
template<class Type , class GeoMesh , template< class > class PrimitiveField>
static const word & fieldName (const GeometricField< Type, GeoMesh, PrimitiveField > &)
 Return the name of the field associated with a source term (base. More...
 
template<class Type , class GeoMesh , template< class > class PrimitiveField>
static const word & fieldName (const DimensionedField< Type, GeoMesh, PrimitiveField > &)
 Return the name of the field associated with a source term (base. More...
 
template<class Type , template< class > class PrimitiveField>
static word fieldName (const DimensionedField< Type, LagrangianSubMesh, PrimitiveField > &)
 Return the name of the field associated with a source term (base. More...
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static word fieldsName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 Return the name of the product of the fields associated with a. More...
 
template<class AlphaRhoFieldType >
static word fieldsName (const AlphaRhoFieldType &alphaRhoField)
 Return the name of the product of the fields associated with a. More...
 
static autoPtr< LagrangianModel > New (const word &name, const LagrangianMesh &mesh, const dictionary &modelDict)
 Selector. More...
 
- Static Public Member Functions inherited from stateModel
static dictionary stateDict (const word &name, const objectRegistry &db)
 Construct and return the state dictionary for reading. More...
 
- Protected Member Functions inherited from LagrangianInjection
void checkLocation (const LagrangianMesh::location, const point &) const
 Check the location and error or warn as appropriate. More...
 
void checkLocation (const List< LagrangianMesh::location > &, const List< point > &) const
 Check the locations and error or warn as appropriate. More...
 
- Protected Member Functions inherited from LagrangianModel
template<class Type >
void addSupType (const LagrangianSubScalarField &deltaT, const LagrangianSubSubField< Type > &field, LagrangianEqn< Type > &eqn) const
 Add a source term to an equation. More...
 
template<class Type >
void addSupType (const LagrangianSubScalarField &deltaT, const LagrangianSubScalarSubField &vOrM, const LagrangianSubSubField< Type > &field, LagrangianEqn< Type > &eqn) const
 Add a source term to a volume or mass-weighted equation. More...
 
- Static Protected Member Functions inherited from LagrangianInjection
template<class ... OtherFields>
static void filter (barycentricField &coordinates, labelField &celli, labelField &facei, labelField &faceTrii, OtherFields &... otherFields)
 Filter out injected elements that are on other processes. These. More...
 

Detailed Description

Volume injection model. This injects particles instantaneously within the volume of a set of cells. Particles are positioned randomly.

Usage
Property Description Required? Default
cellZone The name of the cell zone yes
number The number to inject if numberDensity is </td>
not specified
numberDensity The number to inject per unit </td>
volume if number is not </td>
specified
time The time at which to inject no 0

Example specification:

    <LagrangianModelName>
    {
        type        volumeInjection;
        cellZone    bed;
        numberDensity 2 [mm^-3];
        time        0.01;
    }
See also
Foam::generatedCellZone
Source files

Definition at line 110 of file volumeInjection.H.

Constructor & Destructor Documentation

◆ volumeInjection()

volumeInjection ( const word &  name,
const LagrangianMesh &  mesh,
const dictionary &  modelDict,
const dictionary &  stateDict 
)

Construct from components.

Definition at line 79 of file volumeInjection.C.

Member Function Documentation

◆ TypeName()

TypeName ( "volumeInjection"  )

Runtime type information.

◆ correct()

void correct ( )
virtual

Correct the LagrangianModel.

Reimplemented from LagrangianModel.

Definition at line 102 of file volumeInjection.C.

References TimeState::deltaT(), mesh, fvMesh::time(), and dimensioned< Type >::value().

Here is the call graph for this function:

◆ modify()

◆ topoChange()

void topoChange ( const polyTopoChangeMap &  map)
virtual

Update topology using the given map.

Reimplemented from LagrangianModel.

Definition at line 314 of file volumeInjection.C.

◆ mapMesh()

void mapMesh ( const polyMeshMap &  map)
virtual

Update from another mesh using the given map.

Reimplemented from LagrangianModel.

Definition at line 320 of file volumeInjection.C.

◆ distribute()

void distribute ( const polyDistributionMap &  map)
virtual

Redistribute or update using the given distribution map.

Reimplemented from LagrangianModel.

Definition at line 326 of file volumeInjection.C.

◆ read()

bool read ( const dictionary &  modelDict)
virtual

Read dictionary.

Reimplemented from LagrangianModel.

Definition at line 335 of file volumeInjection.C.

References LagrangianModel::read().

Here is the call graph for this function:

◆ writeState()

void writeState ( Ostream &  os) const
virtual

Write state.

Reimplemented from stateModel.

Definition at line 349 of file volumeInjection.C.

References Foam::writeEntry(), and stateModel::writeState().

Here is the call graph for this function:

◆ writeProcessorState()

void writeProcessorState ( Ostream &  os) const
virtual

Write state.

Reimplemented from stateModel.

Definition at line 357 of file volumeInjection.C.

References Foam::writeEntry(), and stateModel::writeProcessorState().

Here is the call graph for this function:

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