MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::configurations::ParticleInsertionConfiguration Class Reference

configuration for particle insertion algorithm (e.g.: USHER). More...

#include <ParticleInsertionConfiguration.h>

Inheritance diagram for coupling::configurations::ParticleInsertionConfiguration:
Collaboration diagram for coupling::configurations::ParticleInsertionConfiguration:

Public Types

enum  ParticleInsertionType { USHER = 0 , NO_INSERTION = 1 }
 

Public Member Functions

 ParticleInsertionConfiguration ()
 
virtual ~ParticleInsertionConfiguration ()
 
void parseSubtag (tinyxml2::XMLElement *node)
 
std::string getTag () const
 
bool isValid () const
 
template<class LinkedCell, unsigned int dim>
coupling::ParticleInsertion< LinkedCell, dim > * interpreteConfiguration (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface) const
 
ParticleInsertionType getParticleInsertionType () const
 
- Public Member Functions inherited from tarch::configuration::Configuration
virtual ~Configuration ()
 

Protected Member Functions

 ParticleInsertionConfiguration (unsigned int insertDeleteMassEveryTimestep, double rSigmaCoeff, double meanPotentialEnergyFactor, double uOverlapCoeff, double stepRefCoeff, unsigned int iterMax, unsigned int restartMax, double tolerance, double offsetFromOuterBoundary, ParticleInsertionType particleInsertionType)
 

Private Attributes

unsigned int _insertDeleteMassEveryTimestep
 
double _rSigmaCoeff
 
double _meanPotentialEnergyFactor
 
double _uOverlapCoeff
 
double _stepRefCoeff
 
unsigned int _iterMax
 
unsigned int _restartMax
 
double _tolerance
 
double _offsetFromOuterBoundary
 
ParticleInsertionType _particleInsertionType
 

Static Private Attributes

static const std::string INSERT_DELETE_MASS_EVERY_TIMESTEP
 
static const std::string RSIGMA_COEFF
 
static const std::string MEAN_POTENTIAL_ENERGY_FACTOR
 
static const std::string UOVERLAP_COEFF
 
static const std::string STEPREF_COEFF
 
static const std::string ITER_MAX
 
static const std::string RESTART_MAX
 
static const std::string TOLERANCE
 
static const std::string OFFSET_FROM_OUTER_BOUNDARY
 

Detailed Description

configuration for particle insertion algorithm (e.g.: USHER).

configuration for particle insertion algorithm (e.g.: USHER). Derive from the class tarch::configuration::Configuration

Template Parameters
dimNumber of dimensions; it can be 1, 2 or 3
Author
Philipp Neumann

Member Enumeration Documentation

◆ ParticleInsertionType

particle insertion types that are implemented.

Enumerator
USHER 

Usher

NO_INSERTION 

no particle insertion

Constructor & Destructor Documentation

◆ ParticleInsertionConfiguration()

coupling::configurations::ParticleInsertionConfiguration::ParticleInsertionConfiguration ( )
inline

Constructor, initializes the class

◆ ~ParticleInsertionConfiguration()

virtual coupling::configurations::ParticleInsertionConfiguration::~ParticleInsertionConfiguration ( )
inlinevirtual

Destructor

Member Function Documentation

◆ getParticleInsertionType()

ParticleInsertionType coupling::configurations::ParticleInsertionConfiguration::getParticleInsertionType ( ) const
inline

Returns the particle insertion type.

Returns
_particleInsertionType

◆ getTag()

std::string coupling::configurations::ParticleInsertionConfiguration::getTag ( ) const
virtual

Returns name of xml tag that is associated to the configuration.

Returns
name of xml tag that is associated to the configuration

Implements tarch::configuration::Configuration.

◆ interpreteConfiguration()

template<class LinkedCell, unsigned int dim>
coupling::ParticleInsertion< LinkedCell, dim > * coupling::configurations::ParticleInsertionConfiguration::interpreteConfiguration ( coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface) const
inline

Returns particle insertion config

Template Parameters
LinkedCelltype of the cell
dimNumber of dimensions; it can be 1, 2 or 3
Parameters
mdSolverInterface
Returns
particle insertion config

◆ isValid()

bool coupling::configurations::ParticleInsertionConfiguration::isValid ( ) const
virtual

checks if the configuration is valid. This operation usually fails, if e.g. 1. parseSubtag() hasn't been called, i.e. configuration has not been used, or 2. parseSubtag() failed due to a wrong file. 3. If a tag ain't optional and parseSubtag() was not called (first case)

Returns
_isValid

Implements tarch::configuration::Configuration.

◆ parseSubtag()

void coupling::configurations::ParticleInsertionConfiguration::parseSubtag ( tinyxml2::XMLElement * node)
virtual

parseSubtag

Parameters
node

Implements tarch::configuration::Configuration.

Member Data Documentation

◆ _insertDeleteMassEveryTimestep

unsigned int coupling::configurations::ParticleInsertionConfiguration::_insertDeleteMassEveryTimestep
private

used to trigger mass insertion/deletion actions only every X time steps. For NoParticleInsertion, a value of 1 is used since this is irrelevant in this case. If the value is not specified in the configuration, a default value of 1 is used.

◆ _iterMax

unsigned int coupling::configurations::ParticleInsertionConfiguration::_iterMax
private

maximum number of USHER iteration steps within one insertion cycle

◆ _offsetFromOuterBoundary

double coupling::configurations::ParticleInsertionConfiguration::_offsetFromOuterBoundary
private

enables valid particle positions only if the particle is at least at this distance from an outer boundary. This is useful since open boundary forces are not considered in the current USHER implementation. Inserting a particle close to an outer open boundary may thus result in very strong forces and, thus, yield instabilities.

◆ _particleInsertionType

ParticleInsertionType coupling::configurations::ParticleInsertionConfiguration::_particleInsertionType
private

type of particle insertion algorithm

◆ _restartMax

unsigned int coupling::configurations::ParticleInsertionConfiguration::_restartMax
private

maximum number of USHER restarts, that is USHER insertion cycles

◆ _rSigmaCoeff

double coupling::configurations::ParticleInsertionConfiguration::_rSigmaCoeff
private

r_sigma value. In the USHER paper, this value resembles the respective parameter for choosing the stepsize when two particles overlap. In the paper, it is stated that it should be close to unity (in sigma units; the parameter here is also used in sigma units of the respective molecules) and is chosen to be 0.9. If the parameter is not defined in the config, _rSigmaCoeff is also set to 0.9.

◆ _stepRefCoeff

double coupling::configurations::ParticleInsertionConfiguration::_stepRefCoeff
private

coefficient determining a reference step size when stepping towards the right energy level. From the USHER paper (Usher - An algorithm for particle insertion in dense fluids), this coefficient is optimally chosen to be 0.1 (in sigma units; this configuration also determines this parameter in sigma units). Thus, the parameter is set to 0.1, if it is not defined within the configuration.

◆ _tolerance

double coupling::configurations::ParticleInsertionConfiguration::_tolerance
private

tolerance for USHER stopping criterion. If this is not specified, we set it to _meanPotentialEnergyFactor*2.0.

◆ _uOverlapCoeff

double coupling::configurations::ParticleInsertionConfiguration::_uOverlapCoeff
private

overlap energy. If not defined in the config, this value is set to 10^4. It is typically given in units of epsilon (energy parameter of the LJ fluid).


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