MaMiCo 1.2
|
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 |
controles and regulates the kinetic energy of the MD system.
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
mdSolverInterface | interface to the md solver |
|
inline |
computes and returns the kinetic energy within a coupling cell
cell | coupling cell to compute the kinetic energy for |
|
inline |
computes and returns the temperature within a coupling cell
cell | coupling cell to compute the temperature in |
|
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.
cell | the coupling cell to set the kinetic energy in |
kineticEnergy | the value the kinetic energy shall be set to |
|
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)
cell | the coupling cell the temperature shall be applied in |
temperature | the value the temperature shall be set at |
|
private |
interface of the md solver