[lammps-users] Using body/rounded/polyhedron with spherical body particles

Dear Lammps-Users,

In my simulation i would like to mix some body/rounded/polyhedron cubes with body/rounded/polyhedron spheres (both implemented acoording to the lammps manual).
The initialization works just fine but when I use the body/rounded/polyhedron pair style I get segmentation faults.

I’m fairly sure that it is because of the spheres as the simulation works fine when I only use cubes.

The simulation with both, cubes and spheres, works when i use the lj/cut pair style.

Is it even possible to use spheres with this pair style?
If not, are there any recommendations on how to model this system alternatively?

I use the lammps stable from the 29th of October 2020.

Kind regards,
Konstantin

Dear Lammps-Users,

In my simulation i would like to mix some body/rounded/polyhedron cubes with body/rounded/polyhedron spheres (both implemented acoording to the lammps manual).
The initialization works just fine but when I use the body/rounded/polyhedron pair style I get segmentation faults.

please provide a minimal example input deck that reproduces this.

I’m fairly sure that it is because of the spheres as the simulation works fine when I only use cubes.

The simulation with both, cubes and spheres, works when i use the lj/cut pair style.

Is it even possible to use spheres with this pair style?

it will treat each body as a point particle.

If not, are there any recommendations on how to model this system alternatively?

a segmentation fault is either due to a bug in the code or incorrect usage. without more information and a way to reproduce it, it is not possible to give a recommendation.

axel.

Thanks for the quick reply!

This is a minimal input script:

units nano

dimension 3

newton on

boundary p p p

atom_style body rounded/polyhedron 1 20

read_data data.sphere group lj

read_data data.cubes group cubes add append

velocity all create 100 156164 dist gaussian mom yes rot yes

variable cut_inner equal 0.7

variable k_n equal 100

variable k_na equal -20

variable c_n equal 1.0

variable c_t equal 1.0

variable mu equal 1.0

variable A_ua equal 1.0

pair_style body/rounded/polyhedron {c_n} {c_t} {mu} {A_ua} ${cut_inner}

pair_coeff * * {k_n} {k_na}

comm_modify vel yes

neighbor 0.5 bin

neigh_modify every 1 delay 0 check yes

timestep 0.0005

fix 1 all nve/body

thermo_style custom step

thermo 100

run 10000

I attached the data files for the cubes and the sphere.

BR

Konstantin

data.cubes (369 Bytes)

data.sphere (210 Bytes)

Thanks for the files.

The problem is in the body description for your sphere. It does not 100% follow the description in the body Howto. A single sphere has no edges and no faces, but you have one edge and one face listed. That causes a segmentation fault when the body pair style wants to access data that is not there. The body section should be instead as follows (note that “1 1 1” is replaced by “1 0 0”). which runs fine for me.

1 3 10
1 0 0
0.9 0.9 0.9 0 0 0
0 0 0
0.1

Axel.