LagrangianModel Class Reference

Base class for Lagrangian models. More...

Inheritance diagram for LagrangianModel:
Collaboration diagram for LagrangianModel:

Classes

class  iNew
 List construction class. More...
 

Public Types

enum class  modification : label { change = 0 , remove = 1 }
 Enumeration of the types of instantaneous modification. More...
 
typedef LagrangianMesh::elementGroup< modificationelementModification
 Class containing an element-index and a modification-enumeration. More...
 

Public Member Functions

 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< LagrangianModelclone () const
 Clone. More...
 
virtual ~LagrangianModel ()
 Destructor. More...
 
const wordname () const
 The source name. More...
 
const objectRegistrydb () const
 The database. More...
 
const LagrangianMeshmesh () const
 The mesh. More...
 
virtual wordList addSupFields () const
 Return the list of fields for which the LagrangianModel adds. More...
 
virtual bool addsSupToField (const word &) const
 Return true if the LagrangianModel adds a source term to the. More...
 
template<class Type , template< class > class PrimitiveField>
bool addsSupToField (const LagrangianSubField< Type, PrimitiveField > &field) 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 correct ()
 Correct the LagrangianModel. More...
 
virtual void preModify (const LagrangianMesh &mesh, DynamicList< elementModification > &elementModifications) const
 Identify elements in the Lagrangian mesh which are to be. More...
 
virtual LagrangianSubMesh modify (LagrangianMesh &mesh, const LagrangianSubMesh &modifiedMesh) const
 Instantaneously modify and/or create and remove elements in the. More...
 
virtual void calculate (const LagrangianSubScalarField &deltaT, const bool final)
 Solve equations and/or update continually changing properties. More...
 
virtual void addSup (const LagrangianSubScalarField &deltaT, LagrangianSubScalarField &S) const
 Add a fractional source term. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Add a source term to an equation. 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 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 AlphaRhoFieldType >
Foam::word fieldName (const AlphaRhoFieldType &alphaRhoField)
 
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...
 
virtual void writeState (Ostream &os) const
 Write state. More...
 
virtual void writeProcessorState (Ostream &os) const
 Write processor state. More...
 
void operator= (const stateModel &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

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 AlphaRhoFieldType >
static word fieldName (const AlphaRhoFieldType &alphaRhoField)
 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< LagrangianModelNew (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

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 &m, const LagrangianSubSubField< Type > &field, LagrangianEqn< Type > &eqn) const
 Add a source term to a mass-weighted equation. More...
 

Detailed Description

Base class for Lagrangian models.

Source files

Definition at line 56 of file LagrangianModel.H.

Member Typedef Documentation

◆ elementModification

Class containing an element-index and a modification-enumeration.

Definition at line 75 of file LagrangianModel.H.

Member Enumeration Documentation

◆ modification

enum modification : label
strong

Enumeration of the types of instantaneous modification.

Enumerator
change 
remove 

Definition at line 65 of file LagrangianModel.H.

Constructor & Destructor Documentation

◆ LagrangianModel() [1/2]

LagrangianModel ( const word name,
const LagrangianMesh mesh 
)

Construct from components.

Definition at line 62 of file LagrangianModel.C.

◆ LagrangianModel() [2/2]

LagrangianModel ( const LagrangianModel )
delete

Disallow default bitwise copy construction.

◆ ~LagrangianModel()

~LagrangianModel ( )
virtual

Destructor.

Definition at line 135 of file LagrangianModel.C.

Member Function Documentation

◆ addSupType() [1/2]

void addSupType ( const LagrangianSubScalarField deltaT,
const LagrangianSubSubField< Type > &  field,
LagrangianEqn< Type > &  eqn 
) const
protected

Add a source term to an equation.

Definition at line 40 of file LagrangianModel.C.

◆ addSupType() [2/2]

void addSupType ( const LagrangianSubScalarField deltaT,
const LagrangianSubScalarSubField m,
const LagrangianSubSubField< Type > &  field,
LagrangianEqn< Type > &  eqn 
) const
protected

Add a source term to a mass-weighted equation.

Definition at line 50 of file LagrangianModel.C.

◆ TypeName()

TypeName ( "LagrangianModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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.

◆ fieldName() [1/4]

static word fieldName ( const AlphaRhoFieldType &  alphaRhoField,
const AlphaRhoFieldTypes &...  alphaRhoFields 
)
static

Return the name of the field associated with a source term.

Referenced by LagrangianModels::addsSupToField(), LagrangianModel::fieldName(), and LagrangianModels::sourceTerm().

Here is the caller graph for this function:

◆ fieldName() [2/4]

static word fieldName ( const AlphaRhoFieldType &  alphaRhoField)
static

Return the name of the field associated with a source term (base.

condition for the above)

◆ fieldsName() [1/4]

static word fieldsName ( const AlphaRhoFieldType &  alphaRhoField,
const AlphaRhoFieldTypes &...  alphaRhoFields 
)
static

Return the name of the product of the fields associated with a.

source term

Referenced by LagrangianModels::sourceTerm().

Here is the caller graph for this function:

◆ fieldsName() [2/4]

static word fieldsName ( const AlphaRhoFieldType &  alphaRhoField)
static

Return the name of the product of the fields associated with a.

source term (base condition for the above)

◆ clone()

autoPtr<LagrangianModel> clone ( ) const
inline

Clone.

Definition at line 178 of file LagrangianModel.H.

References NotImplemented.

◆ New()

Foam::autoPtr< Foam::LagrangianModel > New ( const word name,
const LagrangianMesh mesh,
const dictionary modelDict 
)
static

◆ name()

◆ db()

const Foam::objectRegistry & db ( ) const
inlinevirtual

The database.

Implements stateModel.

Definition at line 36 of file LagrangianModelI.H.

◆ mesh()

const Foam::LagrangianMesh & mesh ( ) const
inline

The mesh.

Definition at line 42 of file LagrangianModelI.H.

Referenced by turbulentDispersion::initialiseTurbField().

Here is the caller graph for this function:

◆ addSupFields()

Foam::wordList addSupFields ( ) const
virtual

Return the list of fields for which the LagrangianModel adds.

source term to the transport equation

Reimplemented in turbulentDispersion, SaffmanMeiLift, pressureGradientForce, gravity, drag, and constantCoefficientVirtualMass.

Definition at line 141 of file LagrangianModel.C.

References List< word >::null().

Here is the call graph for this function:

◆ addsSupToField() [1/2]

bool addsSupToField ( const word fieldName) const
virtual

Return true if the LagrangianModel adds a source term to the.

given field's transport equation

Reimplemented in LagrangianSource, and LagrangianInjection.

Definition at line 147 of file LagrangianModel.C.

References Foam::findIndex().

Referenced by LagrangianModels::addsSupToField(), LagrangianModels::source(), and LagrangianModels::sourceTerm().

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

◆ addsSupToField() [2/2]

bool addsSupToField ( const LagrangianSubField< Type, PrimitiveField > &  field) const

Return true if the LagrangianModels adds a source term to the.

given field's transport equation

Definition at line 78 of file LagrangianModelTemplates.C.

References IOobject::name().

Here is the call graph for this function:

◆ postConstruct()

void postConstruct ( )
virtual

Do post construction steps which require access to other models.

Reimplemented in turbulentDispersion.

Definition at line 153 of file LagrangianModel.C.

◆ correct()

void correct ( )
virtual

Correct the LagrangianModel.

Reimplemented in volumeInjection, pointInjection, and patchInjection.

Definition at line 157 of file LagrangianModel.C.

◆ preModify()

void preModify ( const LagrangianMesh mesh,
DynamicList< elementModification > &  elementModifications 
) const
virtual

Identify elements in the Lagrangian mesh which are to be.

instantaneously modified or removed

Definition at line 161 of file LagrangianModel.C.

◆ modify()

Foam::LagrangianSubMesh modify ( LagrangianMesh mesh,
const LagrangianSubMesh modifiedMesh 
) const
virtual

Instantaneously modify and/or create and remove elements in the.

Lagrangian mesh

Reimplemented in volumeInjection, pointInjection, patchInjection, manualInjection, and diskInjection.

Definition at line 169 of file LagrangianModel.C.

◆ calculate()

void calculate ( const LagrangianSubScalarField deltaT,
const bool  final 
)
virtual

Solve equations and/or update continually changing properties.

Reimplemented in turbulentDispersion.

Definition at line 179 of file LagrangianModel.C.

◆ addSup()

void addSup ( const LagrangianSubScalarField deltaT,
LagrangianSubScalarField S 
) const
virtual

Add a fractional source term.

Definition at line 187 of file LagrangianModel.C.

Referenced by LagrangianModels::source(), and LagrangianModels::sourceTerm().

Here is the caller graph for this function:

◆ topoChange()

void topoChange ( const polyTopoChangeMap )
virtual

Add a source term to an equation.

Add a source term to a mass-weighted equation Update topology using the given map

Reimplemented in volumeInjection, pointInjection, and patchInjection.

Definition at line 201 of file LagrangianModel.C.

◆ mapMesh()

void mapMesh ( const polyMeshMap )
virtual

Update from another mesh using the given map.

Reimplemented in volumeInjection, pointInjection, and patchInjection.

Definition at line 205 of file LagrangianModel.C.

◆ distribute()

void distribute ( const polyDistributionMap )
virtual

Redistribute or update using the given distribution map.

Reimplemented in volumeInjection, pointInjection, and patchInjection.

Definition at line 209 of file LagrangianModel.C.

◆ read()

bool read ( const dictionary modelDict)
virtual

Read dictionary.

Reimplemented in volumeInjection, pointInjection, patchInjection, manualInjection, and diskInjection.

Definition at line 213 of file LagrangianModel.C.

Referenced by diskInjection::read(), manualInjection::read(), patchInjection::read(), pointInjection::read(), and volumeInjection::read().

Here is the caller graph for this function:

◆ write()

bool write ( const bool  write) const
virtual

Write data.

Definition at line 219 of file LagrangianModel.C.

References Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ operator=()

void operator= ( const LagrangianModel )
delete

Disallow default bitwise assignment.

◆ fieldName() [3/4]

Foam::word fieldName ( const AlphaRhoFieldType &  alphaRhoField,
const AlphaRhoFieldTypes &...  alphaRhoFields 
)

Definition at line 31 of file LagrangianModelTemplates.C.

References LagrangianModel::fieldName().

Here is the call graph for this function:

◆ fieldName() [4/4]

Foam::word fieldName ( const AlphaRhoFieldType &  alphaRhoField)

Definition at line 42 of file LagrangianModelTemplates.C.

References Foam::constant::atomic::group, and IOobject::groupName().

Here is the call graph for this function:

◆ fieldsName() [3/4]

Foam::word fieldsName ( const AlphaRhoFieldType &  alphaRhoField,
const AlphaRhoFieldTypes &...  alphaRhoFields 
)

Definition at line 55 of file LagrangianModelTemplates.C.

◆ fieldsName() [4/4]

Foam::word fieldsName ( const AlphaRhoFieldType &  alphaRhoField)

Definition at line 66 of file LagrangianModelTemplates.C.


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