MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim > Class Template Reference

This class applies the Zhou boundary force to all molecules assuming a cut-off radius r_c=2.5. More...

#include <ZhouBoundaryForce.h>

Collaboration diagram for coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >:

Public Member Functions

 ZhouBoundaryForce (const double &density, const double &temperature, const double &epsilon, const double &sigma, const tarch::la::Vector< 2 *dim, bool > &boundary, const tarch::la::Vector< dim, double > &domainOffset, const tarch::la::Vector< dim, double > &domainSize, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 
 ~ZhouBoundaryForce ()
 
void beginCellIteration ()
 
void endCellIteration ()
 
void handleCell (LinkedCell &cell)
 
double getPotentialEnergy (const tarch::la::Vector< dim, double > &position) const
 
tarch::la::Vector< dim, double > getBoundaryForces (const tarch::la::Vector< dim, double > &position) const
 

Private Member Functions

double getPotentialEnergy (double rw) const
 
double getScalarBoundaryForce (double rw) const
 
double getP1 (const double &density, const double &temperature) const
 
double getP2 (const double &density, const double &temperature) const
 
double getP3 (const double &density, const double &temperature) const
 
double getQ1 (const double &density) const
 
double getQ2 (const double &density) const
 
double getQ3 (const double &density) const
 

Private Attributes

const tarch::la::Vector< 2 *dim, bool > _boundary
 
const tarch::la::Vector< dim, double > _domainLowerLeft
 
const tarch::la::Vector< dim, double > _domainUpperRight
 
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 
const double _p1
 
const double _p2
 
const double _p3
 
const double _q1
 
const double _q2
 
const double _q3
 
const double _forceFactor
 
const double _sigma
 
const unsigned int _energyResolution
 
double * _energyTable
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >

This class applies the Zhou boundary force to all molecules assuming a cut-off radius r_c=2.5.

applies the Zhou boundary force to all molecules assuming a cut-off radius r_c=2.5. We only consider molecules in the outermost coupling cell. Thus, the current method will only be employed to molecules within a distance=min(r_c,size of coupling cell). The force is based on the research paper: W.J. Zhou, H.B. Luan, Y.L. He, J. Sun, W.Q. Tao. A study on boundary force model used in multiscale simulations with non-periodic boundary condition Microfluid Nanofluid 16(3): 587-595, 2014

The force is computed based on an interpolation formula which has been obtained from various MD simulation runs at different temperature and density values. The investigated range is: 0.4*m*sigma-3<density<0.9*m*sigma-3, 1.3*eps/kB<temperature<3.9*eps/kB. Moreover, only 3D simulations have been considered in this study.

Template Parameters
LinkedCellcell type
dimNumber of dimensions; it can be 1, 2 or 3
Author
Philipp Neumann
Todo
Philipp please take a look on this class

Constructor & Destructor Documentation

◆ ZhouBoundaryForce()

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::ZhouBoundaryForce ( const double & density,
const double & temperature,
const double & epsilon,
const double & sigma,
const tarch::la::Vector< 2 *dim, bool > & boundary,
const tarch::la::Vector< dim, double > & domainOffset,
const tarch::la::Vector< dim, double > & domainSize,
coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface )
inline

currently, we support constant temperature and density and 3D only. To be extended

Parameters
density
temperature
epsilon
sigma
boundary
domainOffset
domainSize
mdSolverInterfaceFixed step width for numerical integration of boundary force term

◆ ~ZhouBoundaryForce()

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::~ZhouBoundaryForce ( )
inline

Destructor

Member Function Documentation

◆ beginCellIteration()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::beginCellIteration ( )
inline

empty function

◆ endCellIteration()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::endCellIteration ( )
inline

empty function

◆ getBoundaryForces()

template<class LinkedCell, unsigned int dim>
tarch::la::Vector< dim, double > coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getBoundaryForces ( const tarch::la::Vector< dim, double > & position) const
inline

checks the boundary flags for open boundaries. If an open boundary is encountered and this molecule is close to that boundary (distance smaller than 2.5, cf. Zhou paper), the respective force contribution in that dimension is added/subtracted.

Parameters
position
Returns
force

◆ getP1()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getP1 ( const double & density,
const double & temperature ) const
inlineprivate

computes and returns the coefficient p1 according to Zhou-paper

Parameters
density
temperature
Returns
p1

◆ getP2()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getP2 ( const double & density,
const double & temperature ) const
inlineprivate

computes and returns the coefficient p2 according to Zhou-paper

Parameters
density
temperature
Returns
p2

◆ getP3()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getP3 ( const double & density,
const double & temperature ) const
inlineprivate

computes and returns the coefficient p3 according to Zhou-paper

Parameters
density
temperature
Returns
p3

◆ getPotentialEnergy() [1/2]

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getPotentialEnergy ( const tarch::la::Vector< dim, double > & position) const
inline

returns the potential energy

Parameters
position
Returns
energy

◆ getPotentialEnergy() [2/2]

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getPotentialEnergy ( double rw) const
inlineprivate

perform interpolation between nearest energy lookup table values

Parameters
rw
Returns
nearest energy to the ????

◆ getQ1()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getQ1 ( const double & density) const
inlineprivate

computes and returns the coefficient q1 according to Zhou-paper

Parameters
density
Returns
q1

◆ getQ2()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getQ2 ( const double & density) const
inlineprivate

computes and returns the coefficient q2 according to Zhou-paper

Parameters
density
Returns
q2

◆ getQ3()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getQ3 ( const double & density) const
inlineprivate

computes and returns the coefficient q3 according to Zhou-paper

Parameters
density
Returns
q3

◆ getScalarBoundaryForce()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::getScalarBoundaryForce ( double rw) const
inlineprivate

evaluates the force expression for a scalar component of the force vector. We thus add up dimensional contributions if several boundaries are located beside each other.

Parameters
rw
Returns
Scalar boundary force

◆ handleCell()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::handleCell ( LinkedCell & cell)
inline

extracts position and force of each molecule, add boundary force and applies it to Molecule

Parameters
cell

Member Data Documentation

◆ _boundary

template<class LinkedCell, unsigned int dim>
const tarch::la::Vector<2 * dim, bool> coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::_boundary
private

an entry is true, if this is an open boundary. For enumeration of boundaries, see BoundaryForceConfiguration

◆ _domainLowerLeft

template<class LinkedCell, unsigned int dim>
const tarch::la::Vector<dim, double> coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::_domainLowerLeft
private

lower left corner of MD domain

◆ _domainUpperRight

template<class LinkedCell, unsigned int dim>
const tarch::la::Vector<dim, double> coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::_domainUpperRight
private

upper right corner of MD domain

◆ _forceFactor

template<class LinkedCell, unsigned int dim>
const double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::_forceFactor
private

factor to scale the force according to MD units

◆ _sigma

template<class LinkedCell, unsigned int dim>
const double coupling::cellmappings::ZhouBoundaryForce< LinkedCell, dim >::_sigma
private

factor to scale length according to MD units


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