|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
Class for controling the temperature of a flow. More...
#include <FlowThermostat.h>


Public Member Functions | |
| FlowThermostat (Model &model, double temperatureInit, double temperatureTarget, double maxTemperatureChange, int dimensions) | |
| Construct a flow thermostat for a model. More... | |
| double | calculateKineticEnergy () override |
| Helper method to calculate the current kinetic energy of the system. (Fixed particles excluded). More... | |
| std::array< double, 3 > | calculateAverageVelocity () |
| double | calculateTemperature () override |
| Helper method to calculate the current temperature of the system. More... | |
| void | setTemperatureOfTheSystemViaVelocityScaling () override |
| Set the temperature of the current system to targetTemperature. More... | |
| void | setTemperatureOfTheSystemViaGradualVelocityScaling () override |
| 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... | |
Public Member Functions inherited from Thermostat | |
| 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... | |
| void | setTargetTemperature (double targetTemperature) |
| virtual | ~Thermostat ()=default |
Additional Inherited Members | |
Protected Attributes inherited from Thermostat | |
| Model & | model |
| double | initTemperature |
| double | targetTemperature |
| double | maxTemperatureChange |
| int | dimensions |
Class for controling the temperature of a flow.
| FlowThermostat::FlowThermostat | ( | Model & | model, |
| double | temperatureInit, | ||
| double | temperatureTarget, | ||
| double | maxTemperatureChange, | ||
| int | dimensions | ||
| ) |
Construct a flow 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. |
| std::array< double, 3 > FlowThermostat::calculateAverageVelocity | ( | ) |
Helper method to calculate the current average velocity of the particles within the system. (Fixed particles excluded).


|
overridevirtual |
Helper method to calculate the current kinetic energy of the system. (Fixed particles excluded).
Implements Thermostat.


|
overridevirtual |
Helper method to calculate the current temperature of the system.
Implements Thermostat.


|
overridevirtual |
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.
Implements Thermostat.

|
overridevirtual |
Set the temperature of the current system to targetTemperature.
Implements Thermostat.
