ThermalConductivity

class ThermalConductivity(md_trajectory, start_time=None, end_time=None, atom_selection=None, direction_index=None, time_resolution=None, info_panel=None, bin_size=None, heat_source_tag_name=None, heat_sink_tag_name=None, buffer_length=None)

Class for calculating the thermal conductivity by means of an MD simulation.

Parameters:
  • md_trajectory (MDTrajectory | BulkConfiguration) – An MDTrajectory or single bulk configuration to calculate the temperature profile for.

  • start_time (PhysicalQuantity of type time) – The start time.
    Default: 0.0 * fs

  • end_time (PhysicalQuantity of type time) – The end time.
    Default: The last time frame.

  • atom_selection (PeriodicTableElement | str | list of ints) – Only include contributions from this selection. The atoms can be selected by element i.e. PeriodicTableElement, tag or a list of atomic indices.
    Default: All atoms.

  • direction_index (int) – The index of the cell vector along which the profile should be calculated. Has to be an element of [0, 1, 2].
    Default: 2

  • time_resolution (PhysicalQuantity of type time) – The time interval between snapshots in the MD trajectory that are included in the analysis.

  • info_panel (InfoPanel (Plot2D)) – Info panel to show the calculation progress.
    Default: No info panel

  • bin_size (PhysicalQuantity of type length) – The bin size, which determines the resolution of the profile.
    Default: 2.0 * Angstrom

  • heat_source_tag_name (str) – Name of the heat source tag.
    Default: heat_source

  • heat_sink_tag_name (str) – Name of the heat sink tag.
    Default: heat_sink

  • buffer_length (PhysicalQuantity of type length) – A small buffer length if needed after the heat source and heat sink.
    Default: 2.0 * Angstrom

areaOfConfiguration(configuration, direction_index=None)

This function calculates the surface area of a configuration.

Parameters:
  • configuration (BulkConfiguration) – The initial configuration on which the heat flow simulation will be performed.

  • direction_index (int) – The index of the cell vector along which the profile should be calculated. Has to be an element of [0, 1, 2].
    Default: 2

Returns:

The area of the configuration.

Return type:

PhysicalQuantity of type area

slopeFromTemperatureProfile(md_trajectory, temperature_profile, direction_index=None, heat_source_tag_name=None, heat_sink_tag_name=None, buffer_length=None)

This function calculates the slope from the temperature profile.

Parameters:
  • md_trajectory (MDTrajectory | BulkConfiguration) – The MDTrajectory or configuration to calculate the slope for.

  • temperature_profile (class:~.TemperatureProfile) – The temperature profile data as a histogram.

  • direction_index (int) – The index of the cell vector along which the profile should be calculated. Has to be an element of [0, 1, 2].
    Default: 2.

  • heat_source_tag_name (str) – Name of the heat source tag.
    Default: heat_source.

  • heat_sink_tag_name (str) – Name of the heat sink tag.
    Default: heat_sink.

  • buffer_length (PhysicalQuantity of type length) – If needed a small buffer length after the heat source and heat sink.
    Default: 2.0 * Angstrom.

Returns:

The slope of the temperature profile.

Return type:

PhysicalQuantity of type temperature per length

Usage Examples

Load an MDTrajectory, calculate the ThermalConductivity along the z-axis, and print the results:

md_trajectory = nlread('md_trajectory.hdf5', MDTrajectory)[0]
thermal_conductivity=ThermalConductivity(
    md_trajectory,
    start_time=10*picosecond,
    end_time=md_trajectory.lastTime(),
    time_resolution=md_trajectory.timeInterval(),
    heat_source_tag_name='heat_source',
    heat_sink_tag_name='heat_sink',
)

thermal_conductivity.py

Notes

  • The MD calculation should be done with NonEquilibriumMomentumExchange as a measurement_hook.

  • Since the TemperatureProfile is always calculated along the specified Cartesian axis, it is recommended to use an orthogonal cell.

  • The temperature values of empty bins in the profile are set to zero.

  • In the presence of constraints the atom_selection parameter should be used to exclude constrained atoms from the analysis.

  • ThermalConductivity can only can be calculated for bulk configurations.