I added a velocity say U on the random velocities of the atoms in the y direction. However, when I output the binned velocities using the command
Fix 1 all ave/spatial 200 50 10000 z lower 0.02 y lower 0.02 vy vz norm all units reduced file and plot the streamlines, I do not get a flow field with mean velocity equal to U but instead a value less than U. I wonder how the velocities are binned. Are the values of vy and vz for each bin shown in the output file the values per atom or the sum of the velocities of all the atoms within the bin? Thank you.
Why don't you first dump the velocities into a dump file
and examine them. I think you will find that fix ave/spatial
works just fine on whatever input (the velocities) it is given.
The velocities probably just aren't what you think they are.
I added a velocity say U on the random velocities of the atoms in the y
direction. However, when I output the binned velocities using the command
Fix 1 all ave/spatial 200 50 10000 z lower 0.02 y lower 0.02 vy vz norm all
units reduced file <filename> and plot the streamlines, I do not get a flow
field with mean velocity equal to U but instead a value less than U. I
wonder how the velocities are binned. Are the values of vy and vz for each
bin shown in the output file the values per atom or the sum of the
velocities of all the atoms within the bin? Thank you.
you don't say anything about your system/setup.
have you considered the fact, that the "kick" that you
added may have been dissipated over time?
In my simulation setup, I am imposing a velocity on a group of atoms. This
group is moved among the other atoms under Fix NVT. I am running the
simulation in metal units. The strange thing is although I specify a
velocity of 1.0 Angstrom/ps, I find that the velocities in the dump file is
5.3 instead. I have also visually estimated the velocity of the group of
atoms and found them to be roughly equal to the latter value. I wonder what
could give rise to this discrepancy. Thank you.
I would like to know whether there is any way I could instruct Lammps to
divide a region into bins and change the velocity of atoms lying in each
bin. I want to do this to impose a flow (for example, uniform flow) at one
end of the domain.
I would like to know whether there is any way I could instruct Lammps to
divide a region into bins and change the velocity of atoms lying in each
what about using the “velocity” command in combination with the
“ramp” option? that would be even better than bins, right?
bin. I want to do this to impose a flow (for example, uniform flow) at one
end of the domain.
hmm… wouldn’t it be easier to just use fix move to impose a flow?
you can use equal style variables to compute a position dependent
flow rate (=velocity)?
Thank you for your suggestion. But it seems that this method would not keep the fluctuating component of the velocity of an atom as it redefines the velocity of an atom entirely. Please correct me if I am wrong. What I would like to do is to make each bin possess a desired average velocity say U by subtracting the average velocity in the bin from all atoms in the bin and adding U to the same atoms.
Thank you for your suggestion. But it seems that this method would not keep the fluctuating component of the velocity of an atom as it redefines the velocity of an atom entirely. Please correct me if I am wrong. What I would like to do is to make each bin possess a desired average velocity say U by subtracting the average velocity in the bin from all atoms in the bin and adding U to the same atoms.
well, you can always write your own fix that does whatever you want.
however, it appears to me that you are applying for a position in the
Office of Complication of Simple Affairs (OCSA). you can use the
velocity command with the “sum yes” option to add kinetic energy
to particles. if you combine this with a fix setforce for example that
will zero out the force component in the direction that you want the
flow in, then particles will continue moving with that velocity. you
you absolutely need to you can first add a (gaussian) velocity distribution
and then add the flow velocity on top of that. in that scenario, the
other directions work as in a regular MD.
it is not very clear to me, what would be the benefit of your scheme.
If you want to do this initially, then the velocity command
has a "sum" option to let you use it multiple times and build
up different terms in the velocity (e.g. a flow + a thermal component).
If you want to do this dynamically during a run, then I think
that is thermostatting. You can look at compute temp/ramp
or compute temp/profile and either of them can be used as a "bias"
in a thermostat to control the thermal velocity after the bias
has been subtracted off. See section 6.16 of the doc pages for
details.
I have resigned from OCSA and applied for a position at the Office of Maintenance of Simple Affairs (OMSA). To impose a uniform flow, I followed your method of initializing the velocities from a Gaussian distribution and adding the flow velocity on top of that. I did this on atoms in one end of the simulation domain one lattice unit thick every 0.5ps. The flow velocity is 0.1-1.0A/ps. I thermostated (using fix NVT and compute temp/partial) the flow in the direction perpendicular to the flow. I have also tried using fix NVE. However, the velocity profile is not as expected. There is a drastic drop in velocity outside the region where the velocities of the atoms are reset as shown in the attachment. The region has a thickness of 0.02 in reduced unit and y is the flow direction. I would appreciate it if anyone from OMSA could provide advice.