\( \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.gridpfacet module

Helper functions for creating cylinders, grids and membranes. For more details on this type of elements see [Effeindzourou2016], [Effeindzourou2015a], [Bourrier2013],.

For examples using GridConnections, see

- examples/grids/CohesiveGridConnectionSphere.py

- examples/grids/GridConnection_Spring.py

- examples/grids/Simple_Grid_Falling.py

- examples/grids/Simple_GridConnection_Falling.py

For examples using PFacets, see

- examples/pfacet/gts-pfacet.py

- examples/pfacet/mesh-pfacet.py

- examples/pfacet/pfacetcreators.py

yade.gridpfacet.chainedCylinder(begin=Vector3(0, 0, 0), end=Vector3(1, 0, 0), radius=0.2, dynamic=None, fixed=False, wire=False, color=None, highlight=False, material=-1, mask=1)

  Create and connect a chainedCylinder with given parameters. The shape generated by repeted calls of this function is the Minkowski sum of polyline and sphere.

  Parameters:

    - radius (Real) – radius of sphere in the Minkowski sum.

    - begin (Vector3) – first point positioning the line in the Minkowski sum

    - last (Vector3) – last point positioning the line in the Minkowski sum

  In order to build a correct chain, last point of element of rank N must correspond to first point of element of rank N+1 in the same chain (with some tolerance, since bounding boxes will be used to create connections.

  Returns:

    Body object with the ChainedCylinder shape.

  Note

  ChainedCylinder is deprecated and will be removed in the future, use GridConnection instead. See gridpfacet.cylinder and gridpfacet.cylinderConnection.

yade.gridpfacet.cylinder(begin=Vector3(0, 0, 0), end=Vector3(1, 0, 0), radius=0.2, nodesIds=[], cylIds=[], dynamic=None, fixed=False, wire=False, color=None, highlight=False, intMaterial=-1, extMaterial=-1, mask=1)

  Create a cylinder with given parameters. The shape corresponds to the Minkowski sum of line-segment and sphere, hence, the cylinder has rounded vertices. The cylinder (GridConnection) and its corresponding nodes (yref:GridNodes<GridNode>) are automatically added to the simulation. The lists with nodes and cylinder ids will be updated automatically.

  Parameters:

    - begin (Vector3) – first point of the Minkowski sum in the global coordinate system.

    - end (Vector3) – last point of the Minkowski sum in the global coordinate system.

    - radius (Real) – radius of sphere in the Minkowski sum.

    - nodesIds (list) – list with ids of already existing GridNodes. New ids will be added.

    - cylIds (list) – list with ids of already existing GridConnections. New id will be added.

    - intMaterial – Body.material used to create the interaction physics between the two GridNodes

    - extMaterial – Body.material used to create the interaction physics between the Cylinder (GridConnection) and other bodies (e.g., spheres interaction with the cylinder)

  See utils.sphere’s documentation for meaning of other parameters.

yade.gridpfacet.cylinderConnection(vertices, radius=0.2, nodesIds=[], cylIds=[], dynamic=None, fixed=False, wire=False, color=None, highlight=False, intMaterial=-1, extMaterial=-1, mask=1)

  Create a chain of cylinders with given parameters. The cylinders (GridConnection) and its corresponding nodes (yref:GridNodes<GridNode>) are automatically added to the simulation. The lists with nodes and cylinder ids will be updated automatically.

  Parameters:

    vertices ([Vector3]) – coordinates of vertices to connect in the global coordinate system.

  See gridpfacet.cylinder documentation for meaning of other parameters.

yade.gridpfacet.gmshPFacet(meshfile='file.mesh', shift=Vector3(0, 0, 0), scale=1.0, orientation=Quaternion((1, 0, 0), 0), radius=1.0, wire=True, fixed=True, materialNodes=-1, material=-1, color=None)

  Imports mesh geometry from .mesh file and automatically creates connected PFacet elements. For an example see examples/pfacet/mesh-pfacet.py.

  Parameters:

    - filename (string) – .gts file to read.

    - shift ([float,float,float]) – [X,Y,Z] parameter shifts the mesh.

    - scale (float) – factor scales the mesh.

    - orientation (quaternion) – orientation of the imported geometry.

    - radius (float) – radius used to create the PFacets.

    - materialNodes – specify Body.material of GridNodes. This material is used to make the internal connections.

    - material – specify Body.material of PFacets. This material is used for interactions with external bodies.

  See documentation of utils.sphere for meaning of other parameters.

  Returns:

    lists of GridNode ids nodesIds, GridConnection ids cylIds, and PFacet ids pfIds

  mesh files can easily be created with GMSH.

  Additional examples of mesh-files can be downloaded from http://www-roc.inria.fr/gamma/download/download.php

yade.gridpfacet.gridConnection(id1, id2, radius, wire=False, color=None, highlight=False, material=-1, mask=1, cellDist=None)

  Create a GridConnection by connecting two GridNodes.

  Parameters:

    - id1,id2 – the two GridNodes forming the cylinder.

    - radius (float) – radius of the cylinder. Note that the radius needs to be the same as the one for the GridNodes.

    - cellDist (Vector3) – for periodic boundary conditions, see Interaction.cellDist. Note: periodic boundary conditions for gridConnections are not yet implemented!

  See documentation of utils.sphere for meaning of other parameters.

  Returns:

    Body object with the GridConnection shape.

  Note

  The material of the GridNodes will be used to set the constitutive behaviour of the internal connection, i.e., the constitutive behaviour of the cylinder. The material of the GridConnection is used for interactions with other (external) bodies.

yade.gridpfacet.gridNode(center, radius, dynamic=None, fixed=False, wire=False, color=None, highlight=False, material=-1)

  Create a GridNode which is needed to set up GridConnections.

  See documentation of utils.sphere for meaning of parameters.

  Returns:

    Body object with the gridNode shape.

yade.gridpfacet.gtsPFacet(meshfile, shift=Vector3(0, 0, 0), scale=1.0, radius=1, wire=True, fixed=True, materialNodes=-1, material=-1, color=None)

  Imports mesh geometry from .gts file and automatically creates connected PFacet3 elements. For an example see examples/pfacet/gts-pfacet.py.

  Parameters:

    - filename (string) – .gts file to read.

    - shift ([float,float,float]) – [X,Y,Z] parameter shifts the mesh.

    - scale (float) – factor scales the mesh.

    - radius (float) – radius used to create the PFacets.

    - materialNodes – specify Body.material of GridNodes. This material is used to make the internal connections.

    - material – specify Body.material of PFacets. This material is used for interactions with external bodies.

  See documentation of utils.sphere for meaning of other parameters.

  Returns:

    lists of GridNode ids nodesIds, GridConnection ids cylIds, and PFacet ids pfIds

yade.gridpfacet.pfacet(id1, id2, id3, wire=True, color=None, highlight=False, material=-1, mask=1, cellDist=None)

  Create a PFacet element from 3 GridNodes which are already connected via 3 GridConnections:

  Parameters:

    - id1,id2,id3 – already with GridConnections connected GridNodes

    - wire (bool) – if `True`, top and bottom facet are shown as skeleton; otherwise facets are filled.

    - color (Vector3-or-None) – color of the PFacet; random color will be assigned if `None`.

    - cellDist (Vector3) – for periodic boundary conditions, see Interaction.cellDist. Note: periodic boundary conditions are not yet implemented for PFacets!

  See documentation of utils.sphere for meaning of other parameters.

  Returns:

    Body object with the PFacet shape.

  Note

  GridNodes and GridConnections need to have the same radius. This is also the radius used to create the PFacet

yade.gridpfacet.pfacetCreator1(vertices, radius, nodesIds=[], cylIds=[], pfIds=[], wire=False, fixed=True, materialNodes=-1, material=-1, color=None)

  Create a PFacet element from 3 vertices and automatically append to simulation. The function uses the vertices to create GridNodes and automatically checks for existing nodes.

  Parameters:

    - vertices ([Vector3,Vector3,Vector3]) – coordinates of vertices in the global coordinate system.

    - radius (float) – radius used to create the PFacets.

    - nodesIds (list) – list with ids of already existing GridNodes. New ids will be added.

    - cylIds (list) – list with ids of already existing GridConnections. New ids will be added.

    - pfIds (list) – list with ids of already existing PFacets. New ids will be added.

    - materialNodes – specify Body.material of GridNodes. This material is used to make the internal connections.

    - material – specify Body.material of PFacets. This material is used for interactions with external bodies.

  See documentation of utils.sphere for meaning of other parameters.

yade.gridpfacet.pfacetCreator2(id1, id2, vertex, radius, nodesIds=[], wire=True, materialNodes=-1, material=-1, color=None, fixed=True)

  Create a PFacet element from 2 already existing and connected GridNodes and one vertex. The element is automatically appended to the simulation.

  Parameters:

    - id1,id2 (int) – ids of already with GridConnection connected GridNodes.

    - vertex (Vector3) – coordinates of the vertex in the global coordinate system.

  See documentation of gridpfacet.pfacetCreator1 for meaning of other parameters.

yade.gridpfacet.pfacetCreator3(id1, id2, id3, cylIds=[], pfIds=[], wire=True, material=-1, color=None, fixed=True, mask=-1)

  Create a PFacet element from 3 already existing GridNodes which are not yet connected. The element is automatically appended to the simulation.

  Parameters:

    id1,id2,id3 (int) – id of the 3 GridNodes forming the PFacet.

  See documentation of gridpfacet.pfacetCreator1 for meaning of other parameters.

yade.gridpfacet.pfacetCreator4(id1, id2, id3, pfIds=[], wire=True, material=-1, color=None, fixed=True, mask=-1)

  Create a PFacet element from 3 already existing GridConnections. The element is automatically appended to the simulation.

  Parameters:

    id1,id2,id3 (int) – id of the 3 GridConnections forming the PFacet.

  See documentation of gridpfacet.pfacetCreator1 for meaning of other parameters.