pyLBM.elements.Ellipsoid

class pyLBM.elements.Ellipsoid(center, v1, v2, v3, label=0, isfluid=False)

Class Ellipsoid

Parameters:

center : a list that contains the three coordinates of the center

v1 : a vector

v2 : a vector

v3 : a vector (v1, v2, and v3 have to be orthogonal)

label : list of one integer (default [0])

isfluid : boolean

  • True if the ellipsoid is added
  • False if the ellipsoid is deleted

Examples

the ellipsoid centered in (0, 0, 0) with v1=[3,0,0], v2=[0,2,0], and v3=[0,0,1]

>>> center = [0., 0., 0.]
>>> v1, v2, v3 = [3,0,0], [0,2,0], [0,0,1]
>>> Ellipsoid(center, v1, v2, v3)
    Ellipsoid([0 0 0], [3 0 0], [0 2 0], [0 0 1]) (solid)

Attributes

number_of_bounds (int) 1
center (numpy array) the coordinates of the center of the sphere
v1 (numpy array) the coordinates of the first vector
v2 (numpy array) the coordinates of the second vector
v3 (numpy array) the coordinates of the third vector
label (list of integers) the list of the label of the edge
isfluid (boolean) True if the ellipsoid is added and False if the ellipsoid is deleted

Methods

get_bounds() Get the bounds of the ellipsoid.
point_inside(grid) return a boolean array which defines
distance(grid, v[, dmax]) Compute the distance in the v direction between the ellipsoid and the points defined by (x, y, z).