|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
Base class for controling the temperature of the simulated system. More...
#include <Thermostat.h>


Public Member Functions | |
| virtual double | calculateKineticEnergy ()=0 |
| Helper method to calculate the current kinetic energy of the system. More... | |
| virtual double | calculateTemperature ()=0 |
| Helper method to calculate the current temperature of the system. More... | |
| Thermostat (Model &model, double temperatureInit, double temperatureTarget, double maxTemperatureChange, int dimensions) | |
| Construct a thermostat for a model. More... | |
| void | initialiseSystem () |
| Set the temperature of the system to initTemperature before starting the simultion by applying Brownian Motion to all particles. More... | |
| virtual void | setTemperatureOfTheSystemViaVelocityScaling ()=0 |
| Set the temperature of the current system to targetTemperature. More... | |
| virtual void | setTemperatureOfTheSystemViaGradualVelocityScaling ()=0 |
| Set the temperature of the current system to targetTemperature, if the change in temperature does not exceed maxTemperatureChange. If it does, the temperature will only be adjusted by the value of maxTemperatureChange. More... | |
| void | setTargetTemperature (double targetTemperature) |
| virtual | ~Thermostat ()=default |
Protected Attributes | |
| Model & | model |
| double | initTemperature |
| double | targetTemperature |
| double | maxTemperatureChange |
| int | dimensions |
Base class for controling the temperature of the simulated system.
| Thermostat::Thermostat | ( | Model & | model, |
| double | temperatureInit, | ||
| double | temperatureTarget, | ||
| double | maxTemperatureChange, | ||
| int | dimensions | ||
| ) |
Construct a thermostat for a model.
| model | Model on which the thermostat is applied. |
| temperatureInit | The initial temperature of the system. |
| temperatureTarget | Temperature the system should reach and preserve |
| maxTemperatureChange | The maximal absolute temperature change that is allowed for one application of the thermostat. |
| dimensions | Number of dimensions in which the simulation takes place. |
|
virtualdefault |
|
pure virtual |
Helper method to calculate the current kinetic energy of the system.
Implemented in FlowThermostat, and DefaultThermostat.
|
pure virtual |
Helper method to calculate the current temperature of the system.
Implemented in FlowThermostat, and DefaultThermostat.
| void Thermostat::initialiseSystem | ( | ) |
Set the temperature of the system to initTemperature before starting the simultion by applying Brownian Motion to all particles.

|
inline |
Setter for testing purposes
|
pure virtual |
Set the temperature of the current system to targetTemperature, if the change in temperature does not exceed maxTemperatureChange. If it does, the temperature will only be adjusted by the value of maxTemperatureChange.
Implemented in FlowThermostat, and DefaultThermostat.
|
pure virtual |
Set the temperature of the current system to targetTemperature.
Implemented in FlowThermostat, and DefaultThermostat.
|
protected |
|
protected |
|
protected |
|
protected |
Paramters used in this thermostat: -model: Model on which this thermostat is applied -initTemperature: The initial temperature of the system -targetTemperature: Temperature the system should reach and preserve -maxTemperatureChange: The maximal absolute temperature change that is allowed for one application of the thermostat -dimensions: Number of dimensions in which the simulation takes place.
|
protected |