particle_template superquadric command

Purpose

Command for defining superquadric particles such as capsules, ellipsoids, tablets or the like (examples).

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

particle_template [general_keywords] shape superquadric keyword value

General particle_template keywords are documented here. This document only describes the specific keywords for the definition of superquadric particles.

Return to the particle_template documentation.

Keyword

Description

semiaxis

obligatory; superquadric semi-axes along x, y and z

blockiness ^

obligatory; superquadric blockiness parameters (n1, n2)

scale *

factor for scaling up or down the semiaxis
default: 1; range: (0,∞); units: [-]

scale_axes *

vector with factors for scaling up or down the semiaxis in x, y and z direction
default: (1,1,1); range: (0,∞); units: [-]

* The keywords scale and scale_axes are mutually exclusive.

^ The contact detection algorithm that is employed for superquadrics is stable and accurate for n_1, n_2 \leq 8. For higher blockiness parameters, stability and accuracy is not guaranteed.

Examples

particle_template id mySuperquadric material tablets shape superquadric &
    semiaxis (0.05,0.04,0.06) blockiness (3,4)

Description

_images/superquadric.png

Superquadric shaped particles can be used to represent various shapes, such as spheres, (almost) dices, ellipsoids, tablets, etc. The semiaxis keyword defines the length of the three semi-axis along x, y and z in the used length units (by default, si), while the blockiness keyword defines the two blockiness parameters. The superquadric equation is given as follows:

(|\frac{x}{a}|^{n_2}+|\frac{y}{b}|^{n_2})^{n_1/n_2}+|\frac{z}{c}|^{n_1}=1

where a, b and c are the semi-axis lengths along x, y and z, while n_1 and n_2 are the blockiness parameters. In the present implementation, the blockiness parameters must be 2 or larger. A particle with the parameters a = b = c and n_1 = n_2 = 2 represents a sphere, while higher values of blockiness lead, qualitatively, to “blockier” particles.

The superquadric surface can be also expressed using the following parametric equations:

x(\eta, \omega) = a\, sign(\cos(\eta)) \left | \cos(\eta) \right | ^{2/n_1} sign(\cos(\omega)) \left| \cos(\omega) \right | ^{2/n_2}

y(\eta, \omega) = b\, sign(\cos(\eta)) \left | \cos(\eta) \right | ^{2/n_1} sign(\sin(\omega)) \left| \sin(\omega) \right | ^{2/n_2}

z(\eta, \omega) = c\, sign(\sin(\eta)) \left | \sin(\eta) \right | ^{2/n_1}

where \eta \in [-\pi/2, \pi/2] and \omega \in [-\pi, \pi].

Additional information

Simulations with superquadric particles