[lammps-users] Temp calculation and chunk temp output in shock propagation simulation

Hi,
I am studying shock propagation in Cu. The temperature that it is calculating is very high (approx 3 times), which is not expected. Ie. 2km/s flyer impact target, the temperature is 3000k,while in literature it is aroud 1000K. Other values of pressure etc are absolutely fine. By the way, I use " fix ave/chunk temp" command to calculate.
I feel the problem is that the calculation of kinetic energy is also adding centre of mass velocity and hence the temperature is high. So I tried to use the “compute temp/chunk com yes + fix ave/time” command, but the output results don’t have per chunk temperature information.
Can I know how to solve this issue. The script is attached.

My question is (1)how to calculate temperature exclude centre of mass velocity (2)how to output per chunk temperature
Regards,

Yuntian

---------- define computes ---------

compute c0 sample chunk/atom bin/1d z lower 6.6 units box
compute Stemp sample temp/chunk c0 com yes
fix Stemp_profile sample ave/time {Nevery} {Nrepeat} {Nfreq} c0 v_Stemp file Stemp.profile mode vector fix Stemp2_profile sample ave/chunk {Nevery} {Nrepeat} {Nfreq} c0 temp file Stemp2.profile

[

iswangyt

[email protected]

](头像签名)

签名由 网易邮箱大师 定制

Your fix ave/time command is (very obviously) incorrect.
what happens, if you change it to?

fix Stemp_profile sample ave/time {Nevery} {Nrepeat} ${Nfreq} c_Stemp file Stemp.profile mode vector

axel.

Dear Axel,
Thank you so much for your replying. I have changed the fix command as you give, the output is like this:

Time-averaged data for fix Stemp_profile

TimeStep Number-of-rows

Row c_Stemp

0 6
1 1032.42
2 1024.91
3 1375.92
4 1.34183
5 1.93064
6 2.84112
200 6
1 1060.19
2 1057.81
3 1226.26
4 -4.43003
5 3.83519
6 -3.20931

It done’t output every chunk’s temperature at each timestep, and that’s what I cannot solve for these days.
When I use “fix Stemp2_profile sample ave/chunk {Nevery} {Nrepeat} ${Nfreq} c0 temp file Stemp2.profile”
the output style is like this, but the temperature is too high (about 3 times than the literature).

Chunk-averaged data for fix Stemp_profile and group file

Timestep Number-of-chunks Total-count

Chunk Coord1 Ncount v_Stemp

0 83 160000

28 0.877334 2400 3596.14
29 7.47733 3199 309.731
30 14.0773 2401 302.226
31 20.6773 3200 297.988
32 27.2773 3152 301.082
33 33.8773 2448 297.677
34 40.4773 3200 304.43
35 47.0773 2574 299.53

Here is my modified command:
compute c0 sample chunk/atom bin/1d z lower 6.6 units box
compute Stemp sample temp/chunk c0 com yes
fix Stemp_profile sample ave/time {Nevery} {Nrepeat} ${Nfreq} c_Stemp file Stemp.profile mode vector
Is it possible to output every chunk’s temperature like the"fix ave/chunk temp" command? If it is possible, can you give me some advices? It really confused me.
Thank you
Regards
Yuntian

On 2/7/2021 21:22,Axel Kohlmeyer[email protected] wrote:

since you have an atomic system you can compute the per-atom “temperature” with COM correction directly and then use fix ave/chunk to output it and thus emulate the behavior of fix ave/chunk temp with something like this:

compute vcom sample reduce ave vx vy vz

0.40090737171925654268 is force->mvv2e/(force->boltz3), i.e. the factor required to get the temperature from massv**2 in metal units

variable tatomcom atom 0.40090737171925654268mass((vx-c_vcom[1])^2+(vy-c_vcom[2])^2+(vz-c_vcom[3])^2)

fix Stemp2_profile sample ave/chunk {Nevery} {Nrepeat} ${Nfreq} c0 v_tatomcom file Stemp.profile

Dear Dr Axel,
Thank you so much for your replying and the command you give. You really help me a lot. I will try this method.

Best regards.
Yuntian

On 2/7/2021 23:27,Axel Kohlmeyer[email protected] wrote: