Skip to content

plate

gripyth.meshing.plate

Meshing of simple plate specimens.

FUNCTION DESCRIPTION
default_elem_sets

Returns the default elements sets to select either all or none of them.

default_node_sets

Returns the default node sets to select edges and corners.

rectangular

Meshes a rectangular 2d plate specimen.

rectangular_notched

Meshes a rectangular plate with a notch (for the phase-field).

rectilinear_mesh

Creates a 2d rectilinear mesh from 1d x and y discretizations.

default_elem_sets

default_elem_sets(elements) -> dict[str, NDArray[int32]]

Returns the default elements sets to select either all or none of them.

default_node_sets

default_node_sets(
    nodes: NDArray[float64], geometry: Geometry
) -> dict[str, NDArray[int32]]

Returns the default node sets to select edges and corners.

rectangular

rectangular(
    L: float = 1.0,
    B: float = 1.0,
    t: float = 1.0,
    Nx: int = 10,
    Ny: int = 10,
) -> tuple[Mesh, Geometry]

Meshes a rectangular 2d plate specimen.

rectangular_notched

rectangular_notched(
    L: float = 1.0,
    B: float = 1.0,
    t: float = 1.0,
    Lref_x: float = 0,
    Lref_y: float = 0,
    Nx: int = 10,
    Ny: int = 10,
    Nref_x: int = 0,
    Nref_y: int = 0,
    x_notch: float = 0.5,
    Lnotch_y: float = 0.0,
    y_notch: float = 0.0,
    Lnotch_x: float = 0.0,
    sharp=False,
) -> tuple[Mesh, Geometry]

Meshes a rectangular plate with a notch (for the phase-field).

Parameters:

  • L: plate length
  • B: plate width
  • t: out-of-plane thickness
  • Lref_x: refinement length in x-direction (in center)
  • Lref_y: refinement length in y-direction (in center)
  • Nx: elements in x-direction
  • Ny: elements in y-direction
  • Nref_x: elements in the refined zone (x-direction)
  • Nref_y: elements in refined zone (y-direction)
  • x_notch: x-coordinate of the notch
  • Lnotch_y: length of notch in y-direction, (x_notch, 0) → (x_notch, Lnotch_y)
  • y_notch: y-coordinate of the notch
  • Lnotch_x: length of notch in x-direction, (y_notch, 0) → (y_notch, Lnotch_x)
  • sharp: Duplicate nodes across the notch?

rectilinear_mesh

rectilinear_mesh(
    x: NDArray[float64], y: NDArray[float64]
) -> tuple[NDArray[float64], NDArray[int32]]

Creates a 2d rectilinear mesh from 1d x and y discretizations.

x and y are points on the x- and y-axis defining the boundary locations between mesh elements. The values are assumed to be monotonically increasing. The mesh nodes are the intersection points of these boundaries, the mesh elements the rectangular areas between them. There will be one node for each combination (x, y), and one less element in each direction.

Nodes are numbered along the y-axis first, followed by the nodes at higher x-coordinates. For example, these are the node numbers for a 3×2 mesh:

y
↑    5  8  11
2 ┌──┬──┬──┐
  │  │  │  │
1 ├──┼──┼──┤
  │  │  │  │
0 └──┴──┴──┘→ x
     3  6  9

Returns:

  • nodes: The node coordinates as a 2d array with the (0-based) node number used as the first index and the node coordinates (x, y) referenced by the second.
  • elements: The nodal connectivity of the elements as a 2d array, the first index enumerating the elements, the second going over the four corners of the element in counter-clockwise order, and each entry being an index into nodes.