[lammps-users] Adding and removing molecules

Dear Chris,

Some ideas: (mostly in addition to what Axel had to say)

fix heat with the region keyword (http://lammps.sandia.gov/doc/fix_heat.html)
modifies velocities of atoms in a particular group and in a particular region every timestep,
such that a given amount of energy is added.
A crudest level of implementing what Axel suggested could be
to just define to regions of heat addition/removal at the two ends…
Better still, you could tweak the fix_heat.cpp file.
Also have a look at the velocity.cpp file (specifically at the create option)
to check how random velocity initialization, according to a particular distribution, is done.


> Hi all-

hi chris,

> I was wondering if there is a way using the current algorithms within lammps
> (and maybe using some clever LAMMPS script language) to remove molecules as
> they pass out of one side of the box and add them back into the other side

> of the box with a randomly distributed velocity?

i don't think this can be done without writing new code.

and if you look at molecules, LAMMPS currently more-or-less
requires that the total number remains constant. there are some

provisions to create individual atoms and creating/breaking
bonds, but nothing for angles, dihedrals etc.

with periodic boundary conditions, you essentially have
the feature of having molecules passing through one

face of the box and re-appearing on the other. what
you could implement would be some kind of "slipstream zone"
that would take atoms/molecules entering a predefined
region and adding/redistributing forces/velocities to them,

so the accelerate away from one side of the face to
the other before they get pushed back into the system.
you would probably have to combine this with a second,
"gooey zone" where the particles get slowed down again

and can re-enter the "normal" area without adding an
overall momentum to the system (unless that is desired).


> Cheers-
> Chris
> --
> Dr. Chris Lorenz

> Lecturer
> Materials Research Group
> Engineering Division
> King's College London
> Strand, London, WC2R 2LS
> United Kingdom
> 020 7848 2639 (phone)

Message: 2