Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new compute command for the virial-velocity correlation function #4032

Open
luizfcpe opened this issue Jan 4, 2024 · 2 comments

Comments

@luizfcpe
Copy link

luizfcpe commented Jan 4, 2024

Summary

I would like to suggest the creation of a new compute command which calculates the virial-velocity correlation function. It should be possible to implement it by modifying the compute vacf command.

Detailed Description

The virial-velocity correlation function can be used to obtain the spectral decomposition of the heat current under non-equilibrium conditions, and thus obtain the spectral decomposition of the thermal conductivity. With the spectrally decomposed thermal conductivity it is possible to identify the contribution of different frequency vibrations to the thermal conductivity of systems under non-equilibrium conditions.

The virial-velocity correlation function takes the general form K(t)=\sum_{i=atoms in relevant group} <W_i(0) v_i(t)>, where i represents the atom index, W_i(0) is the virial part of the atomic stress tensor at the moment the compute is defined, and v_i(t) is the atomic velocity vector at instant t. The spectral heat current is proportional to the Fourier transform of the virial-velocity correlation function J(omega)~FT{K(t)}, and the spectral thermal conductivity is proportional to the spectral heat current: \kappa(omega)~J(omega)/(\Delta T/L), where (\Delta T/L) is the temperature gradient along the direction of heat transport.

The theoretical background is described in the following publications:
Role of anharmonic phonon scattering in the spectrally decomposed thermal conductance at planar interfaces. K. Sääskilahti et al, Phys. Rev. B 90, 134312 (2014) - Sec. II A
Vibrational mean free paths and thermal conductivity of amorphous silicon from non-equilibrium molecular dynamics simulations. K. Sääskilahti et al, AIP Advances 6, 121904 (2016) - Sec II
Mechanisms of temperature-dependent thermal transport in amorphous silica from machine-learning molecular dynamics. T. Liang et al, Phys. Rev. B 108, 184203 (2023) - Sec. IV - A, B, C

In principle, a compute virial-velocity correlation function could be created by modifying the already implemented compute vacf command. I could help with the implementation, but I do require assistance from an experienced LAMMPS developer.

@akohlmey
Copy link
Member

akohlmey commented Jan 4, 2024

In principle, a compute virial-velocity correlation function could be created by modifying the already implemented compute vacf command. I could help with the implementation, but I do require assistance from an experienced LAMMPS developer.

The majority of features in LAMMPS are contributed, especially those that are not in mainstream use (but even some of those). The logic behind this is the following: the person who wants a feature is also the one interested in making certain it is working correctly and has an application to test it on.

There is a large chunk of information about how to do LAMMPS development and how to work with git so that a feature can be implemented for the latest version and contributed to the LAMMPS distribution.

What kind of assistance are you looking for?

Without looking into details, it would be rather straightforward to create a modified compute style. In contrast to compute vacf you also need access to an instance of compute stress/atom with the required settings. This can be achieved by requiring to create such a compute instance in the input and then pass the compute ID as argument. Within the code the compute instance can then be looked up with modify->get_compute_by_id() and triggered as needed. There are several examples in the LAMMPS source code that do something like this.

Since compute stress/atom sets "timeflag = 1;" it also needs to be set for this compute. The storage capacity for the fix STORE/ATOM instance will have to be increased to also store the stress data from the initial step.

@luizfcpe
Copy link
Author

luizfcpe commented Jan 8, 2024

Thanks for the reply Axel. At the moment I do this calculation in a post processing step, which I find a bit cumbersome. However, I do have my doubts about the general interest for this feature. I am not quite fluent in C++, so I will have to catch up with that, as well as the information for LAMMPS developers. Your suggestions are already helpful. If I manage to implement this I will update the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants