pyLBM.elements.
Cylinder_Triangle
(center, v1, v2, w, label=0, isfluid=False)¶Class Cylinder_Triangle
Parameters: | center : a list that contains the three coordinates of the center v0 : a list of the three coordinates of the first vector that defines the triangular section v1 : a list of the three coordinates of the second vector that defines the triangular section w : a list of the three coordinates of the vector that defines the direction of the side label : list of three integers (default [0,0,0] for the bottom, the top and the side) isfluid : boolean
|
---|
Examples
the vertical canonical cylinder centered in (0, 0, 1/2)
>>> center = [0., 0., 0.5]
>>> v0, v1 = [1., 0., 0.], [0., 1., 0.]
>>> w = [0., 0., 1.]
>>> Cylinder_Triangle(center, v0, v1, w)
Cylinder_Triangle([0 0 0.5], [1 0 0], [0 1 0], [0 0 1]) (solid)
Attributes
number_of_bounds | (int) 5 |
center | (numpy array) the coordinates of the center of the cylinder |
v0 | (list of doubles) the three coordinates of the first vector that defines the base section |
v1 | (list of doubles) the three coordinates of the second vector that defines the base section |
w | (list of doubles) the three coordinates of the vector that defines the direction of the side |
label | (list of integers) the list of the label of the edge |
isfluid | (boolean) True if the cylinder is added and False if the cylinder is deleted |
Methods
get_bounds () |
Get the bounds of the cylinder. |
point_inside (grid) |
return a boolean array which defines |
distance (grid, v[, dmax]) |
Compute the distance in the v direction between the cylinder and the points defined by (x, y, z). |