[lammps-users] compute tc command

I add “compute tc command” into lammps, the usage for it is like this:### compute tc commandSyntax:

<br>compute ID group-ID tc temp c_flux-ID v_factor_ac v_factor_tc portion mbig time_start out_frequency <br><br>

- ID, group-ID are documented in compute command
- tc = style name of this compute command
- temp = temperature value used for thermal conductivity calculation (temperature units)
- c_flux-ID = ID of a compute that calculates heat flux
- v_factor_ac = ID of a variable transform autocorrelation to the units desired
- v_factor_tc = ID of a variable transform thermal conductiviyt to the units desired
- portion = first(total heat flux: jc + jv) or second(just conductive portion
: jc only) for heat flux contribution
- mbig = the mbig value in Green Kubo thermal conductivity expression
- time_start = start timestep for “ac.dat” and “tc.dat” output(timestep units, not time units)
- out_frequency = output frequency for “ac.dat” and “tc.dat” (timestep units, not time units)

The command can output two files “ac.dat”(autocorrelation) and “tc.dat”(thermal conductivity), every “out_frequency” timesteps, and start at “time_start” timestep.
And the value returned from this command is thermal conductivity value at each timestep.
“v_factor_ac” and “v_factor_tc” can be used to transform dimensionless units to SI units for other units you desire.

For now enthalpy term has not been added to compute_heat_flux.cpp, so when computing thermal conductivity we also don’t include enthalpy term.

Usage: for example:

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom virial
variable factor_ac equal 1.0
variable factor_tc equal 1.3806504e-23*sqrt(1.67e-21/6.633e-26)/3.405e-10^2
compute jflux all heat/flux myKE myPE myStress
compute tc all tc 0.71 c_jflux v_factor_ac v_factor_tc first 10000 500000 100000


compute_tc.cpp (9.05 KB)

compute_tc.h (1.2 KB)