[lammps-users] Variable mass problem

Hey all,
I’m a bit confused as to modeling the following situation.
suppose I’m dropping a particle of mass M from height H. The forces acting upon it include gravity and drag.
now, suppose i know the rate at which this particle ALSO loses its mass during that fall, say, dM/dt = -f(t).
how do I insert that into MD lammps simulation ?

let’s say I begin with F=dP/dt=mdv/dt + vdm/dt --> mg + Fdrag = mdv/dt + vdm/dt
so apparently it seems reasonable to work with this formulation (variable mass problem).
and yet, not sure as to how actually implement this into lammps ? can lammps work with variable particle mass ?

Thanks in advance !!
p.s i’m new into MD and just starting to mingle in this world

There is no command in LAMMPS that will change the
mass of a particle on-the-fly during a run. But it would
be simple to write a fix to do that.

I presume you are using granular particles with a per-atom
mass. So you can also use the set density command
which will reset the density (and mass) when it is encountered
in your input script. And the value you give it could be
a variable like $m, which would evaluate a formula (see
the variable command. And you could put that in a loop,
so that you run a few steps, reset the mass, run a few
steps, reset the mass, etc. You could also use the run
every command to make that happen every step (or less often)
with a one-liner.

Steve