****************** Volume creation ****************** First lets look at an very simple geometry description. The following example just describe a box that contains a sphere. .. code-block:: m6geo GEOM MODU 0 TYPE t1 BOX 10. 10. 10. VOLU v1 0 t1 material1 0. 0. 0. TYPE t2 SPHE 10. VOLU v2 v1 t2 material2 0. 0. 0. ENDM ENDG You can see two kind of entity: the volumes (``VOLU``) and the types (``TYPE``) that describe the shape of the volumes. Let's explaine this two entities. Volume syntax ============= The ``VOLU`` keyword creates an elementary volume. .. code-block:: m6geo :caption: Block syntax VOLU id cont type mat x y z =============== =========== Input parameter Description =============== =========== id Unique identifier within the current module cont A parent volume, i.e. a volume in which it is completely included type Corresponding shape mat_id Material composition that will fill the volume x y z Position within the module (the meaning of the position depends of the ``TYPE``) =============== =========== .. note:: - The type must be declared before the corresponding volume. - The parent volume must be declared before the corresponding volume. Type syntax =========== A TYPE is a concept that associates the following quantities within a given entity: - a three-dimensional convex shape (see below). - the dimensions of the shape. .. code-block:: m6geo :caption: Block syntax TYPE id shape args =============== =========== Input parameter Description =============== =========== id Shape (or Type) identifier shape Keywords associated to a predefined shape args Arguments related to the shape keyword (see below) =============== =========== A TYPE is created in a module and is labelled with a unique identifier within the module and can be used multiple times. Here are some examples: .. code-block:: m6geo :caption: examples * Type 1 is a sphere with a radius of 3.2 cm TYPE 1 SPHE 3.2 * Type 2 is a box with the following dimensions: * o 40.0 cm along the X-axis; * o 20.4 cm along the Y-axis; * o 13.2 cm along the Z-axis. TYPE 2 BOX 20. 10.2 6.6 * Type 3 is a cylinder parallel to X-axis, with a 12 cm radius and a height of 40.5 cm. TYPE 3 CYLX 12. 20.25 Available finite shapes ======================= Sphere ------ The ``SPHE`` keyword is used to describe a sphere whose radius is r. .. code-block:: m6geo :caption: Block syntax SPHE r The face identifier of the sphere is always 1. Ellipsoid --------- The ``ELLI`` keyword is used to describe an ellipsoid where the semi-principal axes align with the reference axes. .. code-block:: m6geo :caption: Block syntax ELLI a b c =============== =========== Input parameter Description =============== =========== a b c Semi-length along the X-axis / Y-axis / Z-axis =============== =========== .. drawio-image:: resources/ellipsoid.drawio.svg The face identifier of the sphere is always 1. Box --- The ``BOX`` and ``LBOX`` keywords are used to describe a rectangular parallelepiped for which the three sides are aligned with the reference axes. .. code-block:: :caption: Block syntax BOX a/2 b/2 c/2 LBOX a b c =============== =========== Input parameter Description =============== =========== a/2 b/2 c/2 Half-length of the side of the box along the X-axis / Y-axis / Z-axis a b c Length of the side of the box along the X-axis / Y-axis / Z-axis =============== =========== The numbering of the box faces is as follows: - face 1 in the -X-direction; - face 2 in the +X-direction; - face 3 in the -Y-direction; - face 4 in the +Y-direction; - face 5 in the -Z-direction; - face 6 in the +Z-direction. Cylinder -------- The ``CYL(X|Y|Z)`` keywords are used to describe a cylinder, with one of its axes parallel to a reference axis (respectively X-axis, Y-axis or Z-axis). .. code-block:: none :caption: Block syntax CYL(X|Y|Z) r h/2 =============== =========== Input parameter Description =============== =========== r Radius h/2 Half-height =============== =========== The numbering of the cylinder faces is as follows: - face 1 is the upper flat face; - face 2 is the curved lateral face; - face 3 is the the lower flat face. Hexagonal-section prism ----------------------- The ``HEX(X|Y|Z)`` keywords describe a hexagonal-section prism, with one of its axes parallel to a reference axis (X-axis, Y-axis, or Z-axis respectively). It can be created specifying: - either the base edge length; - or the diameter of the circle inscribed in the base. .. tip:: When defining a lattice with triangular pitch, this second syntax may be more useful, as the diameter of the circle inscribed in the base is equal to the pitch of the lattice) .. code-block:: none :caption: Block syntax HEXX ( a | DIAM d ) h/2 φy HEXY ( a | DIAM d ) h/2 φz HEXZ ( a | DIAM d ) h/2 φx =============== =========== Input parameter Description =============== =========== a Base edge length d Diameter of the circle inscribed in the base h/2 Half-heigth of the prism φ Azimuth of one of the base vertices relative to the X, Y, or Z reference axis (in degrees) =============== =========== Please note that the numbering of the faces is as follows: - the lateral faces are numbered from 1 to 6 in the direct (anticlockwise) direction (see figure below); - the lower face is number 7; - the upper face is number 8. .. drawio-image:: resources/hexagonalprism.drawio.svg Available infinite shapes ========================= Infinite shapes are defined as shapes that are bounded solely by the external volume of the module they belong to. To further define the boundaries of these shapes, geometric operators utilizing the ``TRUN`` and/or ``INTE`` keywords must be employed. Infinite cylinder ----------------- The ``CYLI`` keyword is used to describe an infinite cylinder along any axis. .. code-block:: none :caption: Block syntax CYLI r xa ya za xb yb zb =============== =========== Input parameter Description =============== =========== r Radius xa ya za Corrdinates of a point A located on the axis of the cylinder xb yb zb Corrdinates of a point B located on the axis of the cylinder =============== =========== .. drawio-image:: resources/cylinderI.drawio.svg .. collapse:: Example of using infinite cylinder .. literalinclude :: examples/04_cylinderI.m6 :language: m6geo | Cone ---- The ``CON(X|Y|Z)`` describe a cone with its axis parallel to a reference axis (X-axis, Y-axis, or Z-axis). Two syntaxes are available: - the first one utilizes the tangent value of the half-angle at the vertex of the cone; - the second option requires defining a value for this half-angle. .. code-block:: none :caption: Block syntax CON(X|Y|Z) ( tan(α) | ANGL α ) =============== =========== Input parameter Description =============== =========== tan(α) Tangent value of the half-angle at the vertex of the cone α Half-angle at the vertex of the cone (in degrees) =============== =========== The following figure illustrates the use of the ``CONZ`` keyword to create a Type. .. drawio-image:: resources/cone.drawio.svg Specifying tan(α) or α, the orientation of the cone is defined as follow: - if tan(α) > 0, then the opening of the cone is oriented towards the positive axis; - if tan(α) < 0, then the opening of the cone is oriented towards the negative axis. Plan ---- The ``PLA(X|Y|Z)`` keywords describe a convex space delimited by one or two planes parallel to one of the reference axes (respectively X-axis, Y-axis or Z-axis). The syntaxe allows to select two space definitions: - either a half-space above (using the ``SUPE`` keyword) or below (using the ``INFE`` keyword) the specified plane altitude *alt*; - or a space located between two planes whose altitudes are *alt-1* and *alt-2*. .. code-block:: none :caption: Block syntax PLA(X|Y|Z) ( ( SUPE | INFE ) alt | alt-1 alt-2 ) =============== =========== Input parameter Description =============== =========== ``SUPE`` Selects the half-space located above the plane altitude *alt* ``INFE`` Selects the half-space located below the plane altitude *alt* alt Plane altitude along the (X|Y|Z)-axis alt-1 First plane altitude along the (X|Y|Z)-axis alt-2 Second plane altitude along the (X|Y|Z)-axis =============== =========== .. note:: If the volume/hole centre is not (0,0,0) the type is translated around the volumes/holes center. The following figure illustrates the use of the ``PLA`` and ``INFE`` keywords: .. drawio-image:: resources/plan.drawio.svg .. collapse:: Example of defining plans .. literalinclude :: examples/04_plan.m6 :language: m6geo | Group of planes --------------- The ``MPLA`` keyword describes a convex space defined by *p* planes, each defined by 3 non-collinear points *ai*, *bi*, and *ci*. .. code-block:: none :caption: Block syntax MPLA p x-a1 y-a1 z-a1 x-b1 y-b1 z-b1 x-c1 y-c1 z-c1 (…) x-ai y-ai z-ai x-bi y-bi z-bi x-ci y-ci z-ci (…) x-ap y-ap z-ap x-bp y-bp z-bp x-cp y-cp z-cp xi yi zi =============== =========== Input parameter Description =============== =========== p Number of planes delimiting the space x-ai y-ai z-ai Coordinates of a point A located on the plane *i* x-bi y-bi z-bi Coordinates of a point B located on the plane *i* x-ci y-ci z-ci Coordinates of a point C located on the plane *i* xi yi zi Coordinates of an internal point I within the delimited space =============== =========== .. note:: When using an "MPLA-type" within a volume, the type is moved so that the internal point aligns with the corresponding volume center. In the following figure, the arrows depict the normal vectors for each plane, indicating the inward direction of the space determined by the internal point I. .. drawio-image:: resources/mpla.drawio.svg The faces are numbered in the same order as specified in the ``MPLA`` definition.