[lammps-users] Defining different values for velocity

Hello,

I defined two different groups in the input file and for the second group, I considered velocity 20 times as much as the first group, but the result did not change.

This Part in my input file:

group all-PF6 type 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19 20 21 22 23 24 25 26 27 28
group PF6 type 16 17

velocity all-PF6 create 293 12345 mom yes rot yes dist gaussian
velocity PF6 create 5860 12346 mom yes rot yes dist gaussian

I need to know that it is correct to apply different velocities?

Thanks in advance

Hello,

I defined two different groups in the input file and for the second group, I considered velocity 20 times as much as the first group, but the result did not change.

what result?

This Part in my input file:

group all-PF6 type 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19 20 21 22 23 24 25 26 27 28
group PF6 type 16 17

velocity all-PF6 create 293 12345 mom yes rot yes dist gaussian
velocity PF6 create 5860 12346 mom yes rot yes dist gaussian

I need to know that it is correct to apply different velocities?

Syntactically, those two lines are correct. However, that doesn’t say anything about the rest of your input which may have commands that make those commands ineffective or override them.

if you want to know for certain, you need to write out the velocities into a dump file and check them. E.g. with a little python script.

Dear Dr. Axel Kohlmeyer,

Thank you very much for your prompt reply.

actually, I want the anion to reach the end of the cell at the same time as the cation under the electric field.
Because its mass is 20 times that of a cation, I assumed the velocity of the anion to be 20 times that of the cation(all molecules of system except anion), but nothing changed compared to the case where the velocity was the same for the whole system.

As you said, by defining the velocity of the groups in the dump, I will check their velocities.

best regards

Dear Dr. Axel Kohlmeyer,

Thank you very much for your prompt reply.

actually, I want the anion to reach the end of the cell at the same time as the cation under the electric field.
Because its mass is 20 times that of a cation, I assumed the velocity of the anion to be 20 times that of the cation(all molecules of system except anion), but nothing changed compared to the case where the velocity was the same for the whole system.

the problem is that you did read the documentation for the velocity command well enough. the way you use it you do assign higher velocities to individual atoms in the one group compared to the other. but that does not mean that those groups have a net velocity as a group. in fact, with the “mom yes” you do remove any of such center of mass velocities.

As you said, by defining the velocity of the groups in the dump, I will check their velocities.

which should confirm what I just said. to assign a net velocity to the group you need to use the velocity “set” command. and you may want to do this with the “add” option so you add a center of mass velocity to a group of atoms that is otherwise equilibrated to a given temperature.
for setups like this, you also have to watch out for using a thermostat as that will affect such velocities significantly and in particular since they will significantly increase the global temperature. the thermostat will then cool down all motions and you will get a system very difference from what you intend to simulate. LAMMPS has all kinds of provisions for those cases, but they need to be used properly and that requires careful studying of the documentation.

axel.

Great!
Thanks dear Dr. Axel Kohlmeyer for the help and clarification.
I will carefully review all the things you said.

All the best