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

carries out velocity relaxation (similar to the SetMomentumMapping procedure). More...

#include <VelocityGradientRelaxation.h>

Inheritance diagram for coupling::VelocityGradientRelaxation< LinkedCell, dim >:
Collaboration diagram for coupling::VelocityGradientRelaxation< LinkedCell, dim >:

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
 
- Public Member Functions inherited from coupling::MomentumInsertion< LinkedCell, dim >
 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
 
- Protected Attributes inherited from coupling::MomentumInsertion< LinkedCell, dim >
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::VelocityGradientRelaxation< LinkedCell, dim >

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.

Author
Philipp Neumann
Template Parameters
LinkedCellthe LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation
dimrefers to the spacial dimension of the simulation, can be 1, 2, or 3

Constructor & Destructor Documentation

◆ VelocityGradientRelaxation()

template<class LinkedCell, unsigned int dim>
coupling::VelocityGradientRelaxation< LinkedCell, dim >::VelocityGradientRelaxation ( double relaxationParam,
coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface,
const coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > *const couplingCells )
inline

a simple constructor

Parameters
relaxationParamdefines 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
mdSolverInterfaceinterface for the md solver
couplingCellsthe coupling cells to apply the velocity gradient relaxation

Member Function Documentation

◆ getTimeIntervalPerMomentumInsertion()

template<class LinkedCell, unsigned int dim>
unsigned int coupling::VelocityGradientRelaxation< LinkedCell, dim >::getTimeIntervalPerMomentumInsertion ( ) const
inlineoverridevirtual

returns the time step interval for the momentum insertion, always one for this method

Returns
the time step interval for momentum insertion

Implements coupling::MomentumInsertion< LinkedCell, dim >.

◆ insertMomentum()

template<class LinkedCell, unsigned int dim>
void coupling::VelocityGradientRelaxation< LinkedCell, dim >::insertMomentum ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 idx ) const
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.

Parameters
cellthe coupling cell to insert momentum to
idxthe coupling cell's index

Implements coupling::MomentumInsertion< LinkedCell, dim >.

Reimplemented in coupling::VelocityGradientRelaxationTopOnly< LinkedCell, dim >.

Member Data Documentation

◆ _couplingCells

template<class LinkedCell, unsigned int dim>
const coupling::datastructures::CouplingCellWithLinkedCells<LinkedCell, dim>* const coupling::VelocityGradientRelaxation< LinkedCell, dim >::_couplingCells
protected

the coupling cells to apply the velocity gradient relaxation

◆ _relaxationParam

template<class LinkedCell, unsigned int dim>
const double coupling::VelocityGradientRelaxation< LinkedCell, dim >::_relaxationParam
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


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