ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | Static Public Member Functions | List of all members
WallPotential Class Reference

WallPotential exerts the force of a Lennard-Jones potential on the Lennard-Jones centers of particles. More...

#include <WallPotential.h>

Inheritance diagram for WallPotential:
PluginBase

Public Member Functions

void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method init will be called at the begin of the simulation. More...
 
void readXML (XMLfileUnits &xmlconfig) override
 reads in configuration from config.xml. see class doc for example .xml More...
 
void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep) override
 Method endStep will be called at the end of each time step. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName () override
 return the name of the plugin More...
 
void initializeLJ93 (const vector< Component > *components, double in_rhoWall, double in_sigWall, double in_epsWall, vector< double > in_xi, vector< double > in_eta, double in_yOffWall, double in_yWallCut)
 initialize the LJ93 potential and calculate potential energy at cutoff More...
 
void initializeLJ1043 (const vector< Component > *components, double in_rhoWall, double in_sigWall, double in_epsWall, vector< double > in_xi, vector< double > in_eta, double in_yOffWall, double in_yWallCut)
 initialize the LJ1043 potential and calculate potential energy at cutoff More...
 
void calcTSLJ_9_3 (ParticleContainer *partContainer)
 Calculate and add forces to lennard-jones-sites. Also calculate new potential energy addition. More...
 
void calcTSLJ_10_4 (ParticleContainer *partContainer)
 Calculate and add forces to lennard-jones-sites. Also calculate new potential energy addition. More...
 
void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 gets called during the force update step. calls the appropriate calculation function. More...
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method will be called first thing in a new timestep. More...
 
virtual void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
virtual void afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied here. More...
 
virtual void registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap)
 
virtual void accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Detailed Description

WallPotential exerts the force of a Lennard-Jones potential on the Lennard-Jones centers of particles.

The user can choose between a 9-3 or 10-4 potential via the config.xml
All significant values of these potentials can also be set there.
Components to be considered can be set via <component>
Their individual xi and eta can also be set in xml-format
The Potential is applied once per simulation step in the Plugin::afterForces call

Usage:

<plugin name="WallPotential">
<potential>93</potential>
<density>1.0</density>
<sigma>3.499976678</sigma>
<epsilon>0.8</epsilon>
<yoff>105.23725</yoff>
<ycut>17.49988339</ycut>
<width>34.99976678</width>
<delta>1</delta>
<component id="1">
<xi>1.0</xi>
<eta>1.0</eta>
</component>
</plugin>

Member Function Documentation

◆ calcTSLJ_10_4()

void WallPotential::calcTSLJ_10_4 ( ParticleContainer partContainer)

Calculate and add forces to lennard-jones-sites. Also calculate new potential energy addition.

Parameters
partContainer

LJ-10-4 potential applied in y-direction

◆ calcTSLJ_9_3()

void WallPotential::calcTSLJ_9_3 ( ParticleContainer partContainer)

Calculate and add forces to lennard-jones-sites. Also calculate new potential energy addition.

Parameters
partContainer

LJ-9-3 potential applied in y-direction

◆ endStep()

void WallPotential::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
inlineoverridevirtual

Method endStep will be called at the end of each time step.

This method will be called every time step passing the simstep as an additional parameter. It can be used e.g. to write per time step data to a file or perform additional computations.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ finish()

void WallPotential::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
inlineoverridevirtual

Method finish will be called at the end of the simulation.

This method will be called once at the end of the simulation. It can be used e.g. to closing output files or writing final statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ getPluginName()

std::string WallPotential::getPluginName ( )
inlineoverridevirtual

return the name of the plugin

Implements PluginBase.

◆ init()

void WallPotential::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
inlineoverridevirtual

Method init will be called at the begin of the simulation.

This method will be called once at the begin of the simulation just right before the main time step loop. It can be used e.g. to open output files or initialize statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ initializeLJ1043()

void WallPotential::initializeLJ1043 ( const vector< Component > *  components,
double  in_rhoWall,
double  in_sigWall,
double  in_epsWall,
std::vector< double >  in_xi,
std::vector< double >  in_eta,
double  in_yOffWall,
double  in_yWallCut 
)

initialize the LJ1043 potential and calculate potential energy at cutoff

Parameters
componentsvector of components
in_rhoWalldensity in wall
in_sigWallsigmal of wall
in_epsWallepsilon of wall
in_xivector for xi of components
in_etavector for eta of components
in_yOffWally-offset for wall
in_yWallCuty-cutoff relative to wall

◆ initializeLJ93()

void WallPotential::initializeLJ93 ( const vector< Component > *  components,
double  in_rhoWall,
double  in_sigWall,
double  in_epsWall,
std::vector< double >  in_xi,
std::vector< double >  in_eta,
double  in_yOffWall,
double  in_yWallCut 
)

initialize the LJ93 potential and calculate potential energy at cutoff

Parameters
componentsvector of components
in_rhoWalldensity in wall
in_sigWallsigmal of wall
in_epsWallepsilon of wall
in_xivector for xi
in_etavector for eta
in_yOffWally-offset for wall
in_yWallCuty-cutoff relative to wall

◆ readXML()

void WallPotential::readXML ( XMLfileUnits xmlconfig)
overridevirtual

reads in configuration from config.xml. see class doc for example .xml

Parameters
xmlconfigconfig.xml

Implements PluginBase.

◆ siteWiseForces()

void WallPotential::siteWiseForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
overridevirtual

gets called during the force update step. calls the appropriate calculation function.

Parameters
particleContainer
domainDecomp
simstep

Reimplemented from PluginBase.


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