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

controles and regulates the kinetic energy of the MD system. More...

#include <KineticEnergyController.h>

Public Member Functions

 KineticEnergyController (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 a simple constructor
 
 ~KineticEnergyController ()
 a simple destructor
 
double computeKineticEnergy (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell) const
 computes and returns the kinetic energy within a coupling cell
 
double computeTemperature (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell) const
 computes and returns the temperature within a coupling cell
 
void setKineticEnergy (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, const double &kineticEnergy) const
 sets the kinetic energy within a coupling cell to the input value.
 
void setTemperature (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, const double &temperature) const
 sets the temperature within the cell to 'temperature'.
 

Private Attributes

coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 

Detailed Description

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

controles and regulates the kinetic energy of the MD system.

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

◆ KineticEnergyController()

template<class LinkedCell, unsigned int dim>
coupling::KineticEnergyController< LinkedCell, dim >::KineticEnergyController ( coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
inline

a simple constructor

Parameters
mdSolverInterfaceinterface to the md solver

Member Function Documentation

◆ computeKineticEnergy()

template<class LinkedCell, unsigned int dim>
double coupling::KineticEnergyController< LinkedCell, dim >::computeKineticEnergy ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell) const
inline

computes and returns the kinetic energy within a coupling cell

Parameters
cellcoupling cell to compute the kinetic energy for
Returns
the kinetic energy in the cell

◆ computeTemperature()

template<class LinkedCell, unsigned int dim>
double coupling::KineticEnergyController< LinkedCell, dim >::computeTemperature ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell) const
inline

computes and returns the temperature within a coupling cell

Parameters
cellcoupling cell to compute the temperature in
Returns
the temperature in the cell

◆ setKineticEnergy()

template<class LinkedCell, unsigned int dim>
void coupling::KineticEnergyController< LinkedCell, dim >::setKineticEnergy ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
const double & kineticEnergy ) const
inline

sets the kinetic energy within a coupling cell to the input value.

Therefore, the mean velocity is computed first. Afterwards the deviation from the mean velocity are rescaled such that momentum is conserved.

Parameters
cellthe coupling cell to set the kinetic energy in
kineticEnergythe value the kinetic energy shall be set to

◆ setTemperature()

template<class LinkedCell, unsigned int dim>
void coupling::KineticEnergyController< LinkedCell, dim >::setTemperature ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
const double & temperature ) const
inline

sets the temperature within the cell to 'temperature'.

Here we just scale the deviation from the mean velocity accordingly, i.e. we set: v_molecule = v_mean + sqrt(temperature/current_temperature)*(v_molecule-v_mean)

Parameters
cellthe coupling cell the temperature shall be applied in
temperaturethe value the temperature shall be set at

Member Data Documentation

◆ _mdSolverInterface

template<class LinkedCell, unsigned int dim>
coupling::interface::MDSolverInterface<LinkedCell, dim>* const coupling::KineticEnergyController< LinkedCell, dim >::_mdSolverInterface
private

interface of the md solver


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