I am using fix ave/spatial to calculate temperature across different layers of a solid fluid domain. However, when I execute the code I get the error :
ERROR: Fix ave/spatial compute does not calculate per-atom values
The main part of the code related to the error is below. Please suggest where am I going wrong.
compute mobile flow temp
compute static wall temp
velocity all create 100 231451 units box
fix 1 all nve
fix 2 all temp/rescale 10 100 100 0.01 1.0
#fix_modify 2 temp mobile
fix 3 wall setforce 0.0 0.0 0.0
fix 4 flow ave/spatial 100 1000 100000 x 0.0 2.0 c_mobile vx vy vz norm sample units box file liquid.temp
The problem is that temp is not a per-atom compute style (see: http://lammps.sandia.gov/doc/compute.html ).
fix ave/spatial can only be used with per-atom compute styles (see: http://lammps.sandia.gov/doc/fix_ave_spatial.html ).
As Paul suggested, you need per atom compute style. you could use ke instead of temp in the compute. Then you could define the variable which rescales it to temperature and then print out that variable in your fix ave/spatial command.