MaMiCo 1.2
|
This class applies the Zhou boundary force to all molecules assuming a cut-off radius r_c=2.5. More...
#include <ZhouBoundaryForce.h>
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 |
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.
LinkedCell | cell type |
dim | Number of dimensions; it can be 1, 2 or 3 |
|
inline |
currently, we support constant temperature and density and 3D only. To be extended
density | |
temperature | |
epsilon | |
sigma | |
boundary | |
domainOffset | |
domainSize | |
mdSolverInterface | Fixed step width for numerical integration of boundary force term |
|
inline |
Destructor
|
inline |
empty function
|
inline |
empty function
|
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.
position |
|
inlineprivate |
computes and returns the coefficient p1 according to Zhou-paper
density | |
temperature |
|
inlineprivate |
computes and returns the coefficient p2 according to Zhou-paper
density | |
temperature |
|
inlineprivate |
computes and returns the coefficient p3 according to Zhou-paper
density | |
temperature |
|
inline |
returns the potential energy
position |
|
inlineprivate |
perform interpolation between nearest energy lookup table values
rw |
|
inlineprivate |
computes and returns the coefficient q1 according to Zhou-paper
density |
|
inlineprivate |
computes and returns the coefficient q2 according to Zhou-paper
density |
|
inlineprivate |
computes and returns the coefficient q3 according to Zhou-paper
density |
|
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.
rw |
|
inline |
extracts position and force of each molecule, add boundary force and applies it to Molecule
cell |
|
private |
an entry is true, if this is an open boundary. For enumeration of boundaries, see BoundaryForceConfiguration
|
private |
lower left corner of MD domain
|
private |
upper right corner of MD domain
|
private |
factor to scale the force according to MD units
|
private |
factor to scale length according to MD units