Skip to content

Commit 4105717

Browse files
authored
Merge pull request lammps#4689 from bbbaer/develop
fix ttm/thermal pull request
2 parents f084c98 + 5346563 commit 4105717

25 files changed

+2595
-5251
lines changed

doc/src/Commands_fix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ OPT.
257257
* :doc:`ttm <fix_ttm>`
258258
* :doc:`ttm/grid <fix_ttm>`
259259
* :doc:`ttm/mod <fix_ttm>`
260+
* :doc:`ttm/thermal <fix_ttm>`
260261
* :doc:`tune/kspace <fix_tune_kspace>`
261262
* :doc:`vector <fix_vector>`
262263
* :doc:`viscosity <fix_viscosity>`

doc/src/fix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ accelerated styles exist.
436436
* :doc:`ttm <fix_ttm>` - two-temperature model for electronic/atomic coupling (replicated grid)
437437
* :doc:`ttm/grid <fix_ttm>` - two-temperature model for electronic/atomic coupling (distributed grid)
438438
* :doc:`ttm/mod <fix_ttm>` - enhanced two-temperature model with additional options
439+
* :doc:`ttm/thermal <fix_ttm>` - a two-temperature model for thermal transport
439440
* :doc:`tune/kspace <fix_tune_kspace>` - auto-tune :math:`k`-space parameters
440441
* :doc:`vector <fix_vector>` - accumulate a global vector every *N* timesteps
441442
* :doc:`viscosity <fix_viscosity>` - Mueller-Plathe momentum exchange for viscosity calculation

doc/src/fix_ttm.rst

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.. index:: fix ttm
22
.. index:: fix ttm/grid
33
.. index:: fix ttm/mod
4+
.. index:: fix ttm/thermal
45

56
fix ttm command
67
===============
@@ -11,16 +12,20 @@ fix ttm/grid command
1112
fix ttm/mod command
1213
===================
1314

15+
fix ttm/thermal command
16+
=======================
17+
1418
Syntax
1519
""""""
1620

1721
.. code-block:: LAMMPS
1822
1923
fix ID group-ID ttm seed C_e rho_e kappa_e gamma_p gamma_s v_0 Nx Ny Nz keyword value ...
2024
fix ID group-ID ttm/mod seed init_file Nx Ny Nz keyword value ...
25+
fix ID group-ID ttm/thermal seed properties_file Nx Ny Nz keyword value ...
2126
2227
* ID, group-ID are documented in :doc:`fix <fix>` command
23-
* style = *ttm* or *ttm/grid* or *ttm/mod*
28+
* style = *ttm* or *ttm/grid* or *ttm/mod* or *ttm/thermal*
2429
* seed = random number seed to use for white noise (positive integer)
2530
* remaining arguments for fix ttm or fix ttm/grid
2631

@@ -45,6 +50,15 @@ Syntax
4550
Ny = number of thermal solve grid points in the y-direction (positive integer)
4651
Nz = number of thermal solve grid points in the z-direction (positive integer)
4752
53+
* remaining arguments for fix ttm/thermal:
54+
55+
.. parsed-literal::
56+
57+
properties_file = file with grid based TTM properties
58+
Nx = number of thermal solve grid points in the x-direction (positive integer)
59+
Ny = number of thermal solve grid points in the y-direction (positive integer)
60+
Nz = number of thermal solve grid points in the z-direction (positive integer)
61+
4862
* zero or more keyword/value(s) pairs may be appended
4963
* keyword = *set* or *infile* or *outfile*
5064

@@ -57,6 +71,12 @@ Syntax
5771
Nout = dump grid temperatures every this many timesteps
5872
file.out = filename to write grid temperatures to
5973
74+
* fix ttm/thermal supports an additional keyword: *source*
75+
76+
.. parsed-literal::
77+
*source* value = source
78+
source = volumetric heating term applied to electrons (energy/(time\*volume) units)
79+
6080
Examples
6181
""""""""
6282

@@ -65,6 +85,7 @@ Examples
6585
fix 2 all ttm 699489 1.0 1.0 10 0.1 0.0 2.0 1 12 1 infile initial outfile 1000 T.out
6686
fix 3 all ttm/grid 123456 1.0 1.0 1.0 1.0 1.0 5.0 5 5 5 infile Te.in
6787
fix 4 all ttm/mod 34277 parameters.txt 5 5 5 infile T_init outfile 10 T_out
88+
fix 5 all ttm/thermal 11111 properties.in 10 10 10 source 0.1 infile temps.in outfile 10 temps.out
6889
6990
Example input scripts using these commands can be found in examples/ttm.
7091

@@ -86,8 +107,8 @@ Matter papers: :ref:`(Duffy) <Duffy>` and :ref:`(Rutherford)
86107
a primary knock-on atom (PKA) was initialized with a high velocity to
87108
simulate a radiation event.
88109

89-
The description in this subsection applies to all 3 fix styles:
90-
*ttm*, *ttm/grid*, and *ttm/mod*.
110+
The description in this subsection applies to all 4 fix styles:
111+
*ttm*, *ttm/grid*, *ttm/mod*, and *ttm/thermal*.
91112

92113
Fix *ttm/grid* distributes the regular grid across processors consistent
93114
with the subdomains of atoms owned by each processor, but is otherwise
@@ -102,6 +123,13 @@ expensive computationally than fix *ttm* because it treats the thermal
102123
diffusion equation as non-linear. More details on fix *ttm/mod* are
103124
given below.
104125

126+
.. versionadded:: TBD
127+
128+
Fix *ttm/thermal* allows for electronic properties to be assigned
129+
independently to each TTM grid point and supports external heat sources
130+
to the electronic subsystem. More details on fix *ttm/thermal* are
131+
given below.
132+
105133
Heat transfer between the electronic and atomic subsystems is carried
106134
out via an inhomogeneous Langevin thermostat. Only atoms in the fix
107135
group contribute to and are affected by this heat transfer.
@@ -242,11 +270,11 @@ units setting in use, grid size and the current timestep.
242270
reads. The file has the same format as the file the *infile* option
243271
reads.
244272

245-
For the fix ttm and fix ttm/mod commands, the corresponding atomic
246-
temperature for atoms in each grid cell can be computed and output by
247-
the :doc:`fix ave/chunk <fix_ave_chunk>` command using the
248-
:doc:`compute chunk/atom <compute_chunk_atom>` command to create a 3d
249-
array of chunks consistent with the grid used by this fix.
273+
For the fix ttm, fix ttm/mod, and fix ttm/thermal commands, the
274+
corresponding atomic temperature for atoms in each grid cell can be
275+
computed and output by the :doc:`fix ave/chunk <fix_ave_chunk>` command
276+
using the :doc:`compute chunk/atom <compute_chunk_atom>` command to
277+
create a 3d array of chunks consistent with the grid used by this fix.
250278

251279
For the fix ttm/grid command the same thing can be done using the
252280
:doc:`fix ave/grid <fix_ave_grid>` command and its per-grid values can
@@ -354,12 +382,59 @@ ignored. The lines with the even numbers are treated as follows:
354382
355383
----------
356384

385+
**Additional details for fix ttm/thermal**
386+
387+
Fix *ttm/thermal* uses the heat diffusion equation with possible external
388+
heat sources (e.g. inductive heating). The effects of electron stopping
389+
have been removed:
390+
391+
.. math::
392+
393+
C_\mathrm{vol} \frac{\partial T_e}{\partial t} =
394+
\bigtriangledown (\kappa_\mathrm{eff} \bigtriangledown T_e) -
395+
g_p (T_e - T_a) + \eta s
396+
397+
where :math:`s` is the applied heating power density and :math:`\eta` is
398+
the absorption efficiency (0-1) defined for each ttm grid cell in the
399+
*properties.in* file. Also note that compared to the original *fix ttm*,
400+
it uses use a volumetric specific heat, :math:`C_\mathrm{vol}` , which
401+
represents the product of :math:`C_e \rho_e`.
402+
403+
:ref:`(Baer) <Baer>` defined :math:`\kappa_\mathrm{eff}` as an effective
404+
electronic thermal conductivity when two adjacent TTM cells (denoted by
405+
the subscripts *a* and *b*) have different conductivities as:
406+
407+
.. math::
408+
409+
\kappa_\mathrm{eff} = \frac{2 \kappa_a \kappa_b}{\kappa_a + \kappa_b}
410+
411+
The current fix *ttm/thermal* implementation allows TTM simulations with
412+
TTM cells that do not contain electrons (vacuum or insulators). Similar
413+
to *ttm/mod*, the absence of electrons is defined as the grid cells with
414+
zero electronic temperature.The numerical scheme does not allow energy
415+
exchange with such cells.
416+
417+
418+
The fix *ttm/thermal* parameter file *properties_file* uses a similar syntax
419+
as the keyword *infile*. The file is read in line by line and each ttm cell's
420+
properties are set. Comment lines are allowed and each line should have
421+
properties listed in the order:
422+
423+
.. parsed-literal::
424+
425+
ix iy iz C_vol kappa_e gamma_p eta
426+
427+
the grid must match the one declared in the fix and all grid points must have
428+
all properties set or *ttm/thermal* will exit with an error.
429+
430+
----------
431+
357432
Restart, fix_modify, output, run start/stop, minimize info
358433
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
359434

360-
The fix ttm and fix ttm/mod commands write the state of the electronic
361-
subsystem and the energy exchange between the subsystems to
362-
:doc:`binary restart files <restart>`. The fix ttm/grid command does
435+
The fix ttm, fix ttm/mod, and fix ttm/thermal commands write the state
436+
of the electronic subsystem and the energy exchange between the subsystems
437+
to :doc:`binary restart files <restart>`. The fix ttm/grid command does
363438
not yet support writing of its distributed grid to a restart file.
364439

365440
See the :doc:`read_restart <read_restart>` command for info on how to
@@ -462,3 +537,7 @@ Plasma Phys., 53, 129-139 (2013).
462537

463538
**(Pisarev)** V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26,
464539
475401 (2014).
540+
541+
.. _Baer:
542+
543+
**(Baer)** B Baer and D G Walker, J. Mol. Model, 31, 220 (2025)

0 commit comments

Comments
 (0)