# [lammps-users] fix thermal/conductivity & fix ave/time :how to get heat flux J(Q) ?

Dear all,
I have used the command "fix thermal/conductivity ", and induced temperature gradient in the system. But the post-process made me confused. I need your help.
I don’t know how to get the heat flux J(Q) (units:W/m^2), for example I utilize such command:
fix heat_swap all thermal/conductivity 10 z 20
fix e_exchange all ave/time 10 10000 100000 f_heat_swap file e_exchange.dat
the simulation box is 8820 (lattice constant is 2.87) ,dt=1e-15s ,units:metal
when I run 900000, the result is:

# TimeStep f_heat_swap

200000 766.162
300000 2301.22
400000 3847.39
500000 5401.44
600000 6974.92
700000 8566.84
800000 10180.1
900000 11804.5
The function of timestep and f_heat_swap is a straight line. How shall I get the heat flux? I want to know whether I could get the slope of this line, and divided the section area----obtain the heat flux J(W/mk).
Is there anything wrong? Any comments and suggestion will be highly appreciated.
Sincerely,
Maosheng

Hi Maosheng,

Just divide it by time, area of cross section and by two, the heat
flux goes in two directions.

German Samolyuk

Dear German Samolyuk，
Thank you for your letters. In the letters, you wrote “Just divide it by time, area of cross section and by two, the heat
flux goes in two directions”, did you mean if I run 900000 timestep(t=900000*dt), the f_heat_swap is 11804.5, and then
the heat flux J(Q)= 11804.5/2/t/area of cross section ? Am I right?
Best
Maosheng

# TimeStep f_heat_swap

200000 766.162
300000 2301.22
400000 3847.39
500000 5401.44
600000 6974.92
700000 8566.84
800000 10180.1
900000 11804.5

Dear Maosheng,
Yes, you are rigth.
Regards,
German

2010/12/1 maosheng chai <[email protected]...>: