pylbm.Geometry

class pylbm.Geometry(dico, need_validation=True)

Create a geometry that defines the fluid part and the solid part.

Parameters
dicodict
dictionary that contains the following key:value
  • box : a dictionary for the definition of the computed box

  • elements : a list of elements (optional)

need_validationbool

boolean to specify if the dictionary has to be validated (optional)

Notes

The dictionary that defines the box should contains the following key:value

  • x : a list of the bounds in the first direction

  • y : a list of the bounds in the second direction (optional)

  • z : a list of the bounds in the third direction (optional)

  • labelan integer or a list of integers

    (length twice the number of dimensions) used to label each edge (optional)

Examples

see demo/examples/geometry/

Attributes
dimint

number of spatial dimensions (1, 2, or 3)

boundsndarray

the bounds of the box in each spatial direction

box_labellist
a list of the four labels for the

left, right, bottom, top, front, and back edges

list_elemlist

a list that contains each element added or deleted in the box

Methods

add_elem(self, elem)

add a solid or a fluid part in the domain

list_of_elements_labels(self)

Get the list of all the labels used in the geometry.

list_of_labels(self)

Get the list of all the labels used in the geometry.

visualize(self[, viewer_app, figsize, …])

plot a view of the geometry