www.cemf.ir
insertionRegion Class Reference

This class defines all the necessary enteties for defining an insertion region. More...

+ Inheritance diagram for insertionRegion:
+ Collaboration diagram for insertionRegion:

Public Member Functions

 TypeInfoNV ("insertionRegion")
 Type info. More...
 
 insertionRegion (const word &name, const insertion &instn)
 Construct from a dictionary. More...
 
 ~insertionRegion ()=default
 Destructor. More...
 
const auto & name () const
 Const ref to name of the region. More...
 
const auto & type () const
 return type of insertion region More...
 
const auto & dict () const
 
const auto & Insertion () const
 
const pointStructurepStruct () const
 
bool insertionTime (uint32 iter, real t, real dt) const
 
uint32 numberToBeInserted (uint32 iter, real t, real dt)
 
uint32 addToNumInserted (uint32 newInserted)
 
uint32 totalInserted () const
 
auto & mixture ()
 
auto & pRegion ()
 
const auto & setFieldList () const
 
bool write (dictionary &dict) const
 read from dictionary More...
 

Private Member Functions

bool readInsertionRegion (const dictionary &dict)
 read from dictionary More...
 
bool writeInsertionRegion (dictionary &dict) const
 write to dictionary More...
 
bool readSetFieldDict ()
 

Private Attributes

const word name_
 name of this region More...
 
const dictionarydict_
 insertion region dictionary More...
 
const insertioninsertion_
 ref to insertion More...
 
baseTimeControl tControl_
 time control for insertion events More...
 
real rate_
 rate of insertion More...
 
uint32 numInserted_ = 0
 number of inserted particles More...
 
word type_
 type of insertion region More...
 
uniquePtr< peakableRegionpRegion_ = nullptr
 peakable region of points More...
 
uniquePtr< shapeMixturemixture_ = nullptr
 mixture of shapes More...
 
uniquePtr< dictionarysetFieldDict_ = nullptr
 dictionary for set field More...
 
anyList setFieldList_
 list of (filedName type value) for the fields More...
 

Detailed Description

This class defines all the necessary enteties for defining an insertion region.

Insertion region information are supplied through a dictionary in a file. For example:

{
    type        cylinderRegion; // type of insertion region
    rate        15000;  // insertion rate (particles/s)
    startTime   0;      // (s)
    endTime     0.5;    // (s)
    interval    0.025;  // (s)

    cylinderRegionInfo
    {
        radius  0.09;           // radius of cylinder (m)
        p1      (0.0 0.0 0.10); // (m,m,m)
        p2      (0.0 0.0 0.11); // (m,m,m)
    }

    setFields
    {
        velocity    realx3 (0.0 0.0 -0.6); // initial velocity of inserted
particles
    }

    mixture
    {
        lightSphere 1; // mixture composition of inserted particles
    }
} 

More information on the above dictionary entries can be found in the table below.

Parameter Type Description Optional [default value]
type word type of the insertion region with name ### No
rate real rate of insertion (particle/s) No
startTime real start of insertion (s) No
endTime real end of insertion (s) No
interval real time interval between successive insertions (s) No
###Info dictionary data for insertion region No
setFields dictionary set field for inserted particles (s) Yes [empty

dictionray] | | mixture | dictionary | mixture of particles to be inserted (s) | No |

Definition at line 86 of file insertionRegion.hpp.

Constructor & Destructor Documentation

◆ insertionRegion()

insertionRegion ( const word name,
const insertion instn 
)

Construct from a dictionary.

Definition at line 152 of file insertionRegion.cpp.

References insertionRegion::dict_, fatalExit, and insertionRegion::readInsertionRegion().

+ Here is the call graph for this function:

◆ ~insertionRegion()

~insertionRegion ( )
default

Destructor.

Member Function Documentation

◆ readInsertionRegion()

◆ writeInsertionRegion()

bool writeInsertionRegion ( dictionary dict) const
private

write to dictionary

Definition at line 102 of file insertionRegion.cpp.

References dictionary::add(), dictionary::addDict(), and dictionary::subDictOrCreate().

Referenced by insertionRegion::write().

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

◆ readSetFieldDict()

bool readSetFieldDict ( )
private

Definition at line 137 of file insertionRegion.cpp.

References pFlow::readOneEtrty().

Referenced by insertionRegion::readInsertionRegion().

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

◆ TypeInfoNV()

TypeInfoNV ( "insertionRegion"  )

Type info.

◆ name()

const auto& name ( ) const
inline

Const ref to name of the region.

Definition at line 151 of file insertionRegion.hpp.

References insertionRegion::name_.

◆ type()

const auto& type ( ) const
inline

return type of insertion region

Definition at line 157 of file insertionRegion.hpp.

References insertionRegion::type_.

◆ dict()

const auto& dict ( ) const
inline

Definition at line 162 of file insertionRegion.hpp.

References insertionRegion::dict_.

Referenced by insertionRegion::readInsertionRegion(), and insertionRegion::write().

+ Here is the caller graph for this function:

◆ Insertion()

const auto& Insertion ( ) const
inline

Definition at line 167 of file insertionRegion.hpp.

References insertionRegion::insertion_.

◆ pStruct()

const pFlow::pointStructure & pStruct ( ) const

Definition at line 168 of file insertionRegion.cpp.

References insertion::pStruct().

+ Here is the call graph for this function:

◆ insertionTime()

bool insertionTime ( uint32  iter,
real  t,
real  dt 
) const
inline

Definition at line 174 of file insertionRegion.hpp.

References insertionRegion::tControl_, and baseTimeControl::timeEvent().

+ Here is the call graph for this function:

◆ numberToBeInserted()

pFlow::uint32 numberToBeInserted ( uint32  iter,
real  t,
real  dt 
)

Definition at line 174 of file insertionRegion.cpp.

◆ addToNumInserted()

uint32 addToNumInserted ( uint32  newInserted)
inline

Definition at line 181 of file insertionRegion.hpp.

References insertionRegion::numInserted_.

◆ totalInserted()

uint32 totalInserted ( ) const
inline

Definition at line 186 of file insertionRegion.hpp.

References insertionRegion::numInserted_.

◆ mixture()

auto& mixture ( )
inline

Definition at line 191 of file insertionRegion.hpp.

References insertionRegion::mixture_.

◆ pRegion()

auto& pRegion ( )
inline

Definition at line 196 of file insertionRegion.hpp.

References insertionRegion::pRegion_.

◆ setFieldList()

const auto& setFieldList ( ) const
inline

Definition at line 201 of file insertionRegion.hpp.

References insertionRegion::setFieldList_.

◆ write()

bool write ( dictionary dict) const
inline

read from dictionary

write to dictionary

Definition at line 217 of file insertionRegion.hpp.

References insertionRegion::dict(), and insertionRegion::writeInsertionRegion().

+ Here is the call graph for this function:

Member Data Documentation

◆ name_

const word name_
private

name of this region

Definition at line 91 of file insertionRegion.hpp.

Referenced by insertionRegion::name().

◆ dict_

const dictionary& dict_
private

insertion region dictionary

Definition at line 94 of file insertionRegion.hpp.

Referenced by insertionRegion::dict(), and insertionRegion::insertionRegion().

◆ insertion_

const insertion& insertion_
private

ref to insertion

Definition at line 97 of file insertionRegion.hpp.

Referenced by insertionRegion::Insertion(), and insertionRegion::readInsertionRegion().

◆ tControl_

baseTimeControl tControl_
private

time control for insertion events

Definition at line 100 of file insertionRegion.hpp.

Referenced by insertionRegion::insertionTime().

◆ rate_

real rate_
private

rate of insertion

Definition at line 103 of file insertionRegion.hpp.

Referenced by insertionRegion::readInsertionRegion().

◆ numInserted_

uint32 numInserted_ = 0
private

◆ type_

word type_
private

type of insertion region

Definition at line 109 of file insertionRegion.hpp.

Referenced by insertionRegion::readInsertionRegion(), and insertionRegion::type().

◆ pRegion_

uniquePtr<peakableRegion> pRegion_ = nullptr
private

peakable region of points

Definition at line 112 of file insertionRegion.hpp.

Referenced by insertionRegion::pRegion(), and insertionRegion::readInsertionRegion().

◆ mixture_

uniquePtr<shapeMixture> mixture_ = nullptr
private

mixture of shapes

Definition at line 115 of file insertionRegion.hpp.

Referenced by insertionRegion::mixture(), and insertionRegion::readInsertionRegion().

◆ setFieldDict_

uniquePtr<dictionary> setFieldDict_ = nullptr
private

dictionary for set field

Definition at line 118 of file insertionRegion.hpp.

Referenced by insertionRegion::readInsertionRegion().

◆ setFieldList_

anyList setFieldList_
private

list of (filedName type value) for the fields

Definition at line 121 of file insertionRegion.hpp.

Referenced by insertionRegion::setFieldList().


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