rohskopf / modecode

Massively parallel vibrational mode calculator.
21 stars 8 forks source link

Some concerns about the anharmonic phonon transport pathways #13

Open lighty23 opened 1 year ago

lighty23 commented 1 year ago

Hello Drew! I'm working on calculating the modal heat flux including anharmonic contribution. However, when I referred to the source file of modecode/lammps/compute_mode_heatflux.cpp, I found that the MCC3 file was not read (code shown below).

image

So, I'm not sure whether the anharmonic phonon transport pathways are calculated by the compute mode/heatflux in this repository?

rohskopf commented 1 year ago

Hey @lighty23 , the "heat flux" is a literal mode level heat flux that only takes into account harmonic contributions. It is different than the "anharmonic energy transfer" between modes, which is an entirely different quantity.

If you want the anharmonic transfer between modes, you want something like compute_mode_fv.cpp

The "fv" here means mode force times mode velocity.

Apologies for the LAMMPS files, they are heavily outdated and deprecated. Too much effort to maintain 😄

rohskopf commented 1 year ago

After rereading your message, you want the heat flux, with anharmonic terms.

I found that the heat flux was dominated by harmonic terms for the systems I was studying, so I left the 3rd order part out. Specifically with the heat flux (not intermode transfer which is obviously anharmonic).

lighty23 commented 1 year ago

Thanks a lot for your reply!

Recently, I've been studying your article "A computational framework for modeling and simulating vibrational mode dynamics", and I really want to get the calculation results K_nml and Q_nml (as shown in Figure 5) for the Si–Ge superlattice, which is very interesting to me😄.

So, is the example modecode/examples/heat_flux/Si_Ge_alloy_x=10 in this repository corresponding to the simulations conducted in your article?

rohskopf commented 1 year ago

The tools in this repo are required to obtain K_nml (MCC3s) and Q_nml. ModeCode gives the K_nml (MCC3s) while compute_mode_fv.cpp is old LAMMPS code for computing intermode power transfer.

Let me give some tips/advice on this.

A conclusion of my article was the simulating Q_nml is costly and not necessary if you want to determine where intermode transfer occurs. This is because mode triplets with the largest MCC3s that also obey certain frequency constraints are the ones where most transfer will occur. Specifically you can calculate the decay rates via Fermi's golden rule, instead of simulating Q_nml. See Equation 8 in the SI: image

Now Figure 10 in the SI is an example that shows this. Left side is Q_nml, right side is the Fermi golden rule decay rate: image

The point here is that once you have the MCC3s, they just gotta be plugged into that Fermi golden rule expression to predict where most energy will go. It is extremely inconvenient and data intensive to rely on simulating transfer between many pathways, so I recommend not doing that, and using the MCC3s in the decay rate expression instead.

So, is the example modecode/examples/heat_flux/Si_Ge_alloy_x=10 in this repository corresponding to the simulations conducted in your article?

No, that example is the heat flux which is different than the intermode power transfer Q_nml. Equation 11 of the SI writes the heat flux between regions of space A and B in terms of "mode spatial coupling constants" (SMCCs): image

Then Figure 16 of the SI shows that harmonic terms dominate this heat transfer: image

This is very convenient because we don't have enough memory on our computers to store all (or even the top) MCC3s for all modes!

Takeaways:

rohskopf commented 1 year ago

I calculate those decay rates (or "linewidths") with this function: https://github.com/rohskopf/modecode/blob/18b0a27a8b83fbdf1521faea6ca33b1d199dda1a/src/qhgk.cpp#L167

Which uses the generalized velocities (GVs) K_nm^\alpha above.

lighty23 commented 1 year ago

Very nice and professional advices! I'm going to try the QHGK method modecode/src/qhgk.cpp😄

lighty23 commented 1 year ago

I've tried the QHGK method (e.g., mpirun -np 64 modecode qhgk 0 300) on the example examples/Si_800atoms to calcalate its thermal conductivity and linewidths. However, the TC and linewidths are all -nan. What could be the reason for this?

image

image

rohskopf commented 1 year ago

It could be if the frequencies are zero. At one point I forced all negative freq to be zero, not sure if that's still the case. I would debug this with printf statements and find where the nan value starts.

lighty23 commented 1 year ago

Many thanks! The linewidths for non-zero frequencies are all -nan as well.

image

rohskopf commented 1 year ago

Yes but looking at Eq. 8 above, the linewidth sums over all frequencies. So linewidth of a given frequency includes inverse of all others.

If that's not it, then maybe the nan is coming from the distributions f or delta functions.