TwoTemperatureModelHook

Included in QATK.Dynamics

class TwoTemperatureModelHook(configuration, grid, electronic_specific_heat=None, electron_ion_coupling=None, electronic_thermal_conductivity=None, initial_electronic_temperature=None, electronic_stopping_friction=None, electronic_stopping_cutoff=None, source_term=None, tags=None, integration_steps=None, random_seed=None, measurement_interval=None, distribute_atoms_interval=None)

The TwoTemperatureModelHook is a hook function that implements the two temperature model.

Parameters:
  • configuration (BulkConfiguration) – The configuration for which to run the two temperature model. The unit cell must be orthogonal

  • grid (Grid) – The real space grid used to represent the electronic temperature field. A Grid can be created with one of the factory methods, e.g., Grid.createFromTag on the Grid

  • electronic_specific_heat (PhysicalQuantity of type energy/(temperature * volume)| callable that takes as input the temperature in each cell and returns the specific heat in each cell) – The specific heat of the electrons per volume. If None, the specific heat will be taken from the grid attribute ‘electronic_specific_heat’.

  • electron_ion_coupling (PhysicalQuantity of type power/(volume * temperature)) – The electron-ion coupling parameter which determines the strength of the coupling between the electronic and ionic subsystems.

  • electronic_thermal_conductivity (PhysicalQuantity of type power/(length * temperature)) – The thermal conductivity of the electrons. This has to be set either here or in the grid.

  • initial_electronic_temperature (PhysicalQuantity of type temperature) – The initial electronic temperature.

  • electronic_stopping_friction (PhysicalQuantity of type mass/time) – The friction coefficient for electron stopping. If this is specified, electronic_stopping_cutoff must also be specified.

  • electronic_stopping_cutoff (PhysicalQuantity of type velocity) – The cutoff velocity for electron stopping. Atoms with velocities above this cutoff will experience electronic stopping. If this is specified, electronic_stopping_friction must also be specified.

  • source_term (SourceTerm) – The source term for the two temperature model. This term represents the energy deposition into the electronic subsystem. If None, no source term is used.

  • tags (string or list of strings) – The tags of the atoms that are coupled to the two temperature model. If None, all atoms are coupled.

  • integration_steps (int) – During each MD step, integration_steps sub-steps will be used to integrate the heat equation. If None this will be determined automatically based on a stability criterion.

  • random_seed (int) – The random seed to use for the stochastic force calculation.

  • measurement_interval (int) – The number of MD steps between measurements of the electronic temperature.

  • distribute_atoms_interval (int) – The number of MD steps between redistributing atoms to the correct grid cells.

atomCellTemperatures(configuration)

Calculate the atomic temperatures in all the cells of the grid.

Parameters:

configuration (AtomicConfiguration) – The configuration to use.

Returns:

The atomic temperatures.

Return type:

PhysicalQuantity of type temperature

callInterval()
Returns:

The call interval of this hook function.

Return type:

int

electronCellTemperatures()

Returns the temperatures in all the cells of the grid.

Returns:

The electronic temperatures in all the cells of the grid.

Return type:

PhysicalQuantity of type temperature

electronIonFriction()

Returns the electron-ion friction coefficient.

Returns:

The electron-ion friction coefficient.

Return type:

PhysicalQuantity of type mass/time

electronicEnergy()

Calculate the total energy of the electronic system.

Returns:

The total energy of the electronic system.

Return type:

PhysicalQuantity of type energy

integrateHeat(time_step, force_change, velocities)

Integrate the heat equation one time_step forward.

Parameters:
  • time_step (PhysicalQuantity) – The time step for the integration.

  • force_change (PhysicalQuantity) – The change in forces on the atoms (i.e. sum of stochastic and friction forces).

  • velocities (PhysicalQuantity) – The velocities of the atoms.

temperatureSanityCheck()

Check that the electronic temperatures are valid (i.e. no NaNs or negative values). For badly chosen parameters this could happen.

uniqueString()

Return a unique string representing the state of the object.

Usage Examples

Below are two examples of running a molecular dynamics simulation with the Two-Temperature Model Hook. The first example models the heat transport in a copper slab. The second example illustrates a more complex setup including an interface between two materials. The materials are assigned different thermal properties and the electronic thermal conductance across the interface is also specified. In both examples the NonEquilibriumMomentumExchangeHook is used to create a temperature gradient across the entire system.

lattice = bulk_configuration.primitiveVectors()

grid = TwoTemperatureModelRegion.createGridFromTag(
    bulk_configuration,
    tags=["left", "right"],
    number_of_cells=[1, 1, 20],
    initial_electronic_temperature=300 * Kelvin,
    electron_ion_coupling=2.6e17 * Watt / (meter**3 * Kelvin),
    electronic_specific_heat=29040 * Joule / (meter**3 * Kelvin),
    electronic_thermal_conductivity=401 * Watt / meter / Kelvin,
    grid_size=[lattice[0][0], lattice[1][1], Automatic],
)

ttm_hook = TwoTemperatureModelHook(
    configuration=bulk_configuration,
    grid=grid,
    measurement_interval=1000,
)

ttm_conductivity.py

interface_conductance = 2.5e-10 * Watt / Kelvin / Angstrom**2
interface = TwoTemperatureModelInterface(conductance=interface_conductance)

grid = TwoTemperatureModelRegion.createSlabFromTags(
    bulk_configuration,
    tags=["cu", "ag"],
    number_of_cells=[10, 10],
    electronic_thermal_conductivity=[401, 429] * Watt / meter / Kelvin,
    electron_ion_coupling=[2.6e17, 2.7e16] * Watt / (meter**3 * Kelvin),
    electronic_specific_heat=[96.8 * 300, 62.8 * 300] * Joule / (meter**3 * Kelvin),
    z_bounds=[Automatic, Automatic],
    initial_electronic_temperature=[300, 300] * Kelvin,
    interfaces=[interface],
)

ttm_hook = TwoTemperatureModelHook(
    configuration=bulk_configuration,
    grid=grid,
    measurement_interval=1000,
    distribute_atoms_interval=None
)

ttm_interface.py

Notes

The Two-Temperature Model[1][2]Hook is used to include the electronic contribution to the thermal conductance in molecular dynamics simulations. This is achieved by coupling the atomic system to an electronic temperature field, which is described by the Two-Temperature Model (TTM). The TTM accounts for the energy exchange between the atomic lattice and the electronic subsystem, allowing for a more accurate representation of thermal transport in materials where electronic effects are significant. The electronic temperature field is represented on a grid (see TwoTemperatureModelRegion) and the coupling between the atomic and electronic systems is handled through the TTM equations.

The Two-Temperature Model requires several parameters related to the electronic properties of the material, such as the electronic specific heat capacity, electronic thermal conductivity, and electron-phonon coupling constant. These parameters can be set either when creating the TwoTemperatureModelHookParameters class, or when creating the TwoTemperatureModelRegion using one of the helper methods. Setting the parameters when creating the TwoTemperatureModelRegion as in the usage examples above allows one to specify different electronic properties for different regions of the simulation cell. This way one can model interfaces between different materials.

To simulate systems where atoms are expected to move between cells one would set the distribute_atoms_interval parameter to a non-zero value. This will periodically reassign atoms to cells based on their current positions. Setting this parameter to a small value may impact performance (especially for large systems), so it should be chosen based on the expected atomic mobility in the simulation.

Note that only orthogonal cells are currently supported with the Two-Temperature Model Hook.

Algorithm Details

The spatial and temporal evolution of the electronic temperature is computed using a finite volume method, solving the heat diffusion equation with source terms that account for the energy exchange between the electronic and atomic subsystems. The atomic system is evolved using standard molecular dynamics techniques, with the forces on the atoms modified to include the effects of the electronic temperature field.

The heat equation for the electronic temperature \(T_e\) is given by:

\[C_e \frac{\partial T_e}{\partial t} = \underbrace{\nabla \cdot (k_e \nabla T_e)}_{Flux} - \underbrace{G (T_e - T_l)}_{Coupling}\]

where \(C_e\) is the electronic specific heat capacity, \(k_e\) is the electronic thermal conductivity, \(G\) is the electron-phonon coupling constant, and \(T_l\) is the lattice (atomic) temperature.