Particle repulsion for random distribution

Hello,

I’ve successfully generated 650 spheres at random positions within a flow region, whilst maintaining the walls in fixed positions. Initially (1.png) the particles overlap, but after the first timestep (2.png), the particles get thrown out beyond the walls (my script is attached as in.flowrandomrelax.couette).

I have tried to modify the approach using the micelle tutorial. The spheres I have generated are monodisperse, and it is possible to fit 650 spheres into the region size using a square lattice with a zero separation. Reducing the number of spheres doesn’t remove the problem, nor does reducing the A-factor in the soft pair style.

I created the spheres randomly:

create_atoms 1 random 650 90210 region_flow

I set the pair style to soft - I set a zero cutoff because I expect the separation to be negative. When the separation is zero I don’t want any repulsion, but I do want repulsion when the separation is negative (is that possible?). I also set the A factor to be small so the repulsion is small.

pair_style soft 0.0

pair_coeff * * 0.0 0.01

I also ramped the A factor from zero to 0.01

variable prefactor equal ramp(0,0.01)

fix 3 all adapt 1 pair soft a * * v_prefactor

I wondered if you know the cause of the excessive repulsion?

Kind regards,

Andrew

1.png

2.png

in.flowrandomrelax.couette (1.51 KB)

Hello,

I've successfully generated 650 spheres at random positions within a flow
region, whilst maintaining the walls in fixed positions. Initially (1.png)
the particles overlap, but after the first timestep (2.png), the particles
get thrown out beyond the walls (my script is attached as
in.flowrandomrelax.couette).

I have tried to modify the approach using the micelle tutorial. The
spheres I have generated are monodisperse, and it is possible to fit 650
spheres into the region size using a square lattice with a zero separation.
Reducing the number of spheres doesn't remove the problem, nor does
reducing the A-factor in the soft pair style.

I created the spheres randomly:

   create_atoms 1 random 650 90210 region_flow

I set the pair style to soft - I set a zero cutoff because I expect the
separation to be negative. When the separation is zero I don't want any
repulsion, but I do want repulsion when the separation is negative (is that
possible?). I also set the A factor to be small so the repulsion is small.

   pair_style soft 0.0

   pair_coeff * * 0.0 0.01

I also ramped the A factor from zero to 0.01

   variable prefactor equal ramp(0,0.01)

   fix 3 all adapt 1 pair soft a * * v_prefactor

I wondered if you know the cause of the excessive repulsion?

​with a cutoff of zero, you effectively turn off the soft potential.​

​please keep in mind, that the soft potential assumes point particles, not
extended particles. so what ever you set as diameter is ignored here.
instead, the soft (core) potential smoothly changes from A to 0 between
separation 0 and the cutoff.
you may need to tweak your cutoff to match your (average) diameter​. my
initial guess would be to use a cutoff of 10 for an effective diameter of
5.0.
it doesn't have to be perfect, consider that this is just the first step in
avoiding the worst overlaps due to random placements and with gradually
ramping of the prefactor, this usually works quite well. the magnitude of A
effectively controls how "soft" your particles are.

axel.