Question with fix thermal/conductivity

fix 1 all nve
fix hss all thermal/conductivity 100 z 40 swap 1
fix hc all ave/time 500 1 500 f_hss file flux.dat

compute ke all ke/atom
variable temp atom c_ke/(1.5*8.617343e-5)
compute cc1 all chunk/atom bin/1d z lower 2
fix 101 all ave/chunk 1 400000 400000 cc1 v_temp file temp.profile.dat
run 3000000

This is example of fix thermal/conductivity

  1. I don’t know which command is causing a temperature gradient in the model
  2. I don’t know why the average temperature of model keeps rising in this command

I read the LAMMPS manual, but I don’t understand it
Thanks for help

Besides the lack of care in formatting your post, the code you provided is incomplete and your simulation cannot be reproduced.
As the time integrator is nve, the likely reason for a temperature rise is the dissipation of internal energy stored in the initial configuration. But again, this is an educated guess, given the lack of context.