[lammps-users] Question on implementing a new ellipsoidal region

Dear all

I am trying to implement a new “ellipsoid” region by suitably adapting the most recent region_sphere.cpp & region_sphere.h files. My goal is to be able to define ellipsoidal regions in lammps by using only built-in commands.

I am currently struggling to understand how the structure Contact should be modified/ look like for the case of ellipsoidal regions. The distance r and the vector from the surface to the particle (delx, dely, delz) are straightforward to translate from the spherical to the ellipsoidal case. Nevertheless, it is not clear how to compute the values of the iwall, varflag and radius variables. The first two variables are related to wall properties and I cannot understand to which wall they are referring to. As for the last variable, I am not sure how the curvature of the region at contact point is defined.

Any thought and advice is highly appreciated

Thanks
Evangelos Voyiatzis

iwall is to enumerate distinct surfaces of a region, so that the edges can be treated accordingly. this is important for fix wall/gran/region.
region block has 6, region cylinder 3, region plane and region sphere have just one of those and your ellipsoid should have only one like a sphere, too.
varflag is set to 1 if the position or shape of a given contact surface depends on a variable, so that the variable can be re-evaluated before processing the interactions with that region.
i think to determine delx, dely, delz and radius you could just approximate that part of your ellipsoid with a sphere (i.e. determine a suitable center and radius) and then compute those values just the same as for the spherical region.

Thanks a lot for the prompt and clear reply !

Στις Σάβ, 31 Ιουλ 2021 στις 2:25 μ.μ., ο/η Axel Kohlmeyer <[email protected]> έγραψε: