Stress Tensor Autocorrelation Function¶
This module calculates the autocorrelation of the off-diagonal elements of
the stess tensor :
By normalisation with the particle number , the result remains
finite in the thermodynamic limit. The stress tensor is obtained from
halmd.observables.thermodynamics.stress_tensor().
The shear viscosity is found from this autocorrelation via the
Green–Kubo relation
Note
The module returns the sum over all off-diagonal elements,
, analogously to
halmd.observables.dynamics.mean_square_displacement.
- class halmd.observables.dynamics.stress_tensor_autocorrelation(args)¶
Construct stress tensor autocorrelation function.
This module implements a halmd.observables.dynamics.correlation module.
Parameters: - args – keyword arguments
- args.thermodynamics – instance of halmd.observables.thermodynamics
- acquire()¶
Acquire stress tensor
Returns: Stress tensor sample
- correlate(first, second)¶
Correlate two stress tensor samples.
Parameters: - first – first phase space sample
- second – second phase space sample
Returns: stress tensor autocorrelation function between two samples.
- desc¶
Module description.
- connect(args)¶
Parameters: - args (table) – keyword arguments
- args.every – sampling interval
Returns: sequence of signal connections
Internal use only. This function is called upon registration by blocking_scheme:correlation().
Connect msv.group.particle:aux_enable() to the signal on_prepend_force of halmd.observables.sampler using the interval every.
- class writer(args)¶
Construct file writer.
Parameters: - args (table) – keyword arguments
- args.file – instance of file writer
- args.location (string table) – location within file (optional)
Returns: file writer as returned by file:writer().
The argument location specifies a path in a structured file format like H5MD given as a table of strings. It defaults to {"dynamics", self.label, "stress_tensor_autocorrelation"}.