\( \usepackage{euler} % must be loaded before fontspec for the whole doc (below); this must be kept for pngmath, however \usepackage{hyperref} \usepackage{amsmath} \usepackage{amsbsy} %\usepackage{mathabx} \usepackage{underscore} \usepackage[all]{xy} % Metadata of the pdf output \hypersetup{pdftitle={Yade Documentation}} \hypersetup{pdfauthor={Smilauer, V., et al.}} \hypersetup{pdfkeywords={Discrete element method, granular materials, contact law, hydromechanical coupling}} % symbols \renewcommand{\mat}{\boldsymbol} \renewcommand{\vec}{\boldsymbol} \renewcommand{\tens}{\boldsymbol} %normalized and locfram here \def\normalized#1{\widehat{#1}} \def\locframe#1{\widetilde{#1}} % timestep \def\Dt{\Delta t} \def\Dtcr{\Dt_{\rm cr}} % algorithm complexity \def\bigO#1{{\mathcal{O}(#1)}} % variants for greek symbols \let\epsilon\varepsilon \let\theta\vartheta \let\phi\varphi % shorthands \let\sig\sigma \let\eps\epsilon % variables at different points of time \def\prev#1{#1^-} \def\pprev#1{#1^\ominus} \def\curr#1{#1^{\circ}} \def\nnext#1{#1^\oplus} \def\next#1{#1^+} % shorthands for geometry \def\currn{\curr{\vec{n}}} \def\currC{\curr{\vec{C}}} \def\uT{\vec{u}_T} \def\curruT{\curr{\vec{u}}_T} \def\prevuT{\prev{\vec{u}}_T} \def\currn{\curr{\vec{n}}} \def\prevn{\prev{\vec{n}}} % motion \def\pprevvel{\pprev{\dot{\vec{u}}}} \def\nnextvel{\nnext{\dot{\vec{u}}}} \def\curraccel{\curr{\ddot{\vec{u}}}} \def\prevpos{\prev{\vec{u}}} \def\currpos{\curr{\vec{u}}} \def\nextpos{\next{\vec{u}}} \def\curraaccel{\curr{\dot{\vec{\omega}}}} \def\pprevangvel{\pprev{\vec{\omega}}} \def\nnextangvel{\nnext{\vec{\omega}}} \def\loccurr#1{\curr{\locframe{#1}}} \def\numCPU{n_{\rm cpu}} \DeclareMathOperator{\Align}{Align} \DeclareMathOperator{\sign}{sgn} % sorting algorithms \def\isleq#1{\currelem{#1}\ar@/^/[ll]^{\leq}} \def\isnleq#1{\currelem{#1}\ar@/^/[ll]^{\not\leq}} \def\currelem#1{\fbox{$#1$}} \def\sortSep{||} \def\sortInv{\hbox{\phantom{||}}} \def\sortlines#1{\xymatrix@=3pt{#1}} \def\crossBound{||\mkern-18mu<} \)

# yade.bodiesHandling module

Miscellaneous functions, which are useful for handling bodies.

yade.bodiesHandling.facetsDimensions(idFacets=[], mask=-1)

  The function accepts the list of facet id’s or list of facets and calculates max and min dimensions, geometrical center.

  Parameters:

    - idFacets (list) – list of spheres

    - mask (int) – Body.mask for the checked bodies

  Returns:

    dictionary with keys `min` (minimal dimension, Vector3), `max` (maximal dimension, Vector3), `minId` (minimal dimension facet Id, Vector3), `maxId` (maximal dimension facet Id, Vector3), `center` (central point of bounding box, Vector3), `extends` (sizes of bounding box, Vector3), `number` (number of facets, int),

yade.bodiesHandling.sphereDuplicate(idSphere)

  The functions makes a copy of sphere

yade.bodiesHandling.spheresModify(idSpheres=[], mask=-1, shift=Vector3(0, 0, 0), scale=1.0, orientation=Quaternion((1, 0, 0), 0), copy=False)

  The function accepts the list of spheres id’s or list of bodies and modifies them: rotating, scaling, shifting. if copy=True copies bodies and modifies them. Also the mask can be given. If idSpheres not empty, the function affects only bodies, where the mask passes. If idSpheres is empty, the function search for bodies, where the mask passes.

  Parameters:

    - shift (Vector3) – Vector3(X,Y,Z) parameter moves spheres.

    - scale (float) – factor scales given spheres.

    - orientation (Quaternion) – orientation of spheres

    - mask (int) – Body.mask for the checked bodies

  Returns:

    list of bodies if copy=True, and Boolean value if copy=False

yade.bodiesHandling.spheresPackDimensions(idSpheres=[], mask=-1)

  The function accepts the list of spheres id’s or list of bodies and calculates max and min dimensions, geometrical center.

  Parameters:

    - idSpheres (list) – list of spheres

    - mask (int) – Body.mask for the checked bodies

  Returns:

    dictionary with keys `min` (minimal dimension, Vector3), `max` (maximal dimension, Vector3), `minId` (minimal dimension sphere Id, Vector3), `maxId` (maximal dimension sphere Id, Vector3), `center` (central point of bounding box, Vector3), `extends` (sizes of bounding box, Vector3), `volume` (volume of spheres, Real), `mass` (mass of spheres, Real), `number` (number of spheres, int),