MaMiCo 1.2
|
carries out velocity relaxation (similar to the SetMomentumMapping procedure). More...
#include <VelocityGradientRelaxation.h>
Public Member Functions | |
VelocityGradientRelaxation (double relaxationParam, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, const coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > *const couplingCells) | |
a simple constructor | |
virtual | ~VelocityGradientRelaxation () |
a dummy destructor | |
unsigned int | getTimeIntervalPerMomentumInsertion () const override |
returns the time step interval for the momentum insertion, always one for this method | |
void | insertMomentum (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 idx) const override |
insertes the momentum to the cells according to the params and velocity gradient relaxation method | |
![]() | |
MomentumInsertion (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface) | |
a simple constructor | |
virtual | ~MomentumInsertion () |
a simple destructor | |
Protected Attributes | |
const coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > *const | _couplingCells |
const double | _relaxationParam |
![]() | |
coupling::interface::MDSolverInterface< LinkedCell, dim > *const | _mdSolverInterface |
carries out velocity relaxation (similar to the SetMomentumMapping procedure).
Carries out velocity relaxation (similar to the SetMomentumMapping procedure). In this particular case, however, the velocity is relaxed within a one cell-wide strip around the molecular domain. For this purpose, the velocity that shall be imposed in average in the cells that are within a three cell-wide strip need to be known and stored in the microscopicMomentum-buffers (2 cells overlap with the MD simulation, and 1 more (ghost) cell layer surrounding the MD domain). The procedure then only considers molecules that are located between the midpoints of the cells which are in the two cell-wide boundary strip. For all these molecules, a second-order interpolation of the average velocity at their respective position is carried out and the molecules are then relaxed towards this particular velocity.
LinkedCell | the LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation |
dim | refers to the spacial dimension of the simulation, can be 1, 2, or 3 |
|
inline |
a simple constructor
relaxationParam | defines the strength of the relaxation; 1 means the molecules velocity is set to the new velocity; O.5 -> the velocity will be set to the avaerage of the old and the new velocity |
mdSolverInterface | interface for the md solver |
couplingCells | the coupling cells to apply the velocity gradient relaxation |
|
inlineoverridevirtual |
returns the time step interval for the momentum insertion, always one for this method
Implements coupling::MomentumInsertion< LinkedCell, dim >.
|
inlineoverridevirtual |
insertes the momentum to the cells according to the params and velocity gradient relaxation method
This method does not conserve the kinetic energy of the respective coupling cell. To conserve the energy as well, see the description of MomentumController on details how to do that.
cell | the coupling cell to insert momentum to |
idx | the coupling cell's index |
Implements coupling::MomentumInsertion< LinkedCell, dim >.
Reimplemented in coupling::VelocityGradientRelaxationTopOnly< LinkedCell, dim >.
|
protected |
the coupling cells to apply the velocity gradient relaxation
|
protected |
defines the strength of the relaxation; 1 means the molecules velocity is set to the new velocity; O.5 -> the velocity will be set to the avaerage of the old and the new velocity