Dear lammpsusers and developers
The simulation box has three groups: low group, flow group and high group as followed. The lower group and upper group are in NVT ensemble with constant temperature.
The upper group has the velocity vx=1.0 along the x direction, and The lower group has the velocity vx=1.0 along the x direction . Thus the flow group is in shear flow.
The flow group is in NVE ensemble. The flow group is divided into divided into 15 lays, which is used for the statistical calculation of velocity and temperature. The lays have difficult stream velocity.
┌────┐
│ NVT │ upper group, T_2=cont, vx=1.0
├────┤
│ NVE │ flow group
├────┤
│ NVT │ lower group, T_1=cont, vx=1.0
└────┘
The every lay of the flow group has difficult stream velocity. The temp/profile and temp/com command are used to subtract out the effect of the stream velocity to the temperature calculation as followed. However, I failed.
1.

compute temp_lower lower temp/profile 0 1 1 xyz 1 1 1
compute_modify temp_lower dynamic yes
compute temp_upper upper temp/profile 0 1 1 xyz 1 1 1
compute_modify temp_upper dynamic yes
compute temp_flow flow temp/profile 0 1 1 xyz 1 15 1
compute_modify temp_flow dynamic yes
compute temp_1 flow temp/region 1
compute temp_2 flow temp/region 2
compute temp_3 flow temp/region 3
…
compute temp_13 flow temp/region 13
compute temp_14 flow temp/region 14
compute temp_15 flow temp/region 15

2.

compute temp_lower lower temp/com
compute temp_upper upper temp/com
compute temp_flow flow temp/com
compute temp_1 flow temp/region 1
compute temp_2 flow temp/region 2
compute temp_3 flow temp/region 3
…
compute temp_13 flow temp/region 13
compute temp_14 flow temp/region 14
compute temp_15 flow temp/region 15

Any suggestions and comments will be highly appreciated. Thanks in advance.
kind regards!

You’re not asking a very clear or narrow question. Just saying
I’m trying to do something complicated and it’s not working, isn’t
very illuminating. I would focus on trying to get separate
parts of your complicated problem working one at a time.
Steve