Ball
-
class
itasca.ball.
Ball
- Objects of this type should not be created (instantiated) directly in Python. Use the module functions that return instances of this type.
-
contact_count
(all=False, type=None) → int. Get the number of contacts associated with this ball. If the optional keyword argument type is given, the count is limited to the contact types specified. The optional type keyword argument should be a Python type object (one of: itasca.BallBallContact, itasca.BallPebbleContact, itasca.PebblePebbleContact, itasca.BallFacetContact or itasca.PebbleFacetContact). If the optional keyword argument all is True the count includes virtual contacts.
-
contacts
([piece: ball, ]all=False, type=None) → tuple of Contact objects. Get a tuple of contacts associated with this ball. An optional argument can be included which is a piece object (a Ball, a Pebble or a Facet). If the optional keyword argument type is given, the returned list is limited to the contact types specified. The type keyword argument should be a Python type object (one of: itasca.BallBallContact, itasca.BallPebbleContact, itasca.PebblePebbleContact, itasca.BallFacetContact or itasca.PebbleFacetContact). If the (optional) keyword argument all is True the returned list includes virtual contacts.
-
damp
() → float. Get the ball local damping.
-
delete
() → None. Delete this ball.
-
density
() → float. Get the ball density.
-
disp
() → vec. Get the ball displacement (vector).
-
disp_x
() → float. Get the x-component of the ball displacement.
-
disp_y
() → float. Get the y-component of the ball displacement.
-
disp_z
() → float. Get the z-component of the ball displacement.
-
euler
() → vec. Get the ball orientation (vector).
-
euler_x
() → float. Get the x-component of the ball orientation.
-
euler_y
() → float. Get the y-component of the ball orientation.
-
euler_z
() → float. Get the z-component of the ball orientation.
-
extra
(slot: int) → any. Get the ball extra data in the given slot.
-
fix
(component: int) → bool. Get the ball fixity condition. The first argument is the vector component.
-
force_app
() → vec. Get the ball applied force (vector).
-
force_app_x
() → float. Get the x-component of the ball applied force.
-
force_app_y
() → float. Get the y-component of the ball applied force.
-
force_app_z
() → float. Get the z-component of the ball applied force.
-
force_contact
() → vec. Get the ball contact force (vector).
-
force_contact_x
() → float. Get the x-component of the ball contact force.
-
force_contact_y
() → float. Get the y-component of the ball contact force.
-
force_contact_z
() → float. Get the z-component of the ball contact force.
-
force_unbal
() → vec. Get the ball unbalanced force (vector).
-
force_unbal_x
() → float. Get the x-component of the ball unbalanced force.
-
force_unbal_y
() → float. Get the y-component of the ball unbalanced force.
-
force_unbal_z
() → float. Get the z-component of the ball unbalanced force.
-
fragment
() → int. Get the ball fragment ID.
-
group
([slot: str or int]) → str. Get the ball group name in a given slot.
-
group_remove
(group_name: str or int[, slot: str or int]) → bool. Remove from the given group from all group slots of the ball. One argument of type string, giving the group name, is required. The return value is a bool which is True if the group was removed from any slot, otherwise False.
-
groups
() → {slot: group_name}. Get a dictionary describing which groups this ball is part of. The keys of the dictionary are the slot names and the values are the group names.
-
has_prop
(property_name: str) → bool. Returns True if the ball has the given surface property.
-
id
() → int. Get the ball id.
-
in_group
(group_name: str or int[, slot: str or int]) → bool. Test if the ball is part of a given group. If the optional argument slot is given, only that slot is searched. Otherwise, all group slots are searched.
-
inside
(point: vec) → bool. Test whether a point is inside a ball.
-
mass
() → float. Get the ball inertial mass.
-
mass_real
() → float. Get the ball real (gravitational) mass.
-
moi
() → float. Get the ball moment of inertia.
-
moi_real
() → float. Get the ball real (gravitational) moment of inertia.
-
moment_app
() → vec. Get the ball applied moment (vector).
-
moment_app_x
() → float. Get the x-component of the ball applied moment.
-
moment_app_y
() → float. Get the y-component of the ball applied moment.
-
moment_app_z
() → float. Get the z-component of the ball applied moment.
-
moment_contact
() → vec. Get the ball contact moment (vector).
-
moment_contact_x
() → float. Get the x-component of the ball contact moment.
-
moment_contact_y
() → float. Get the y-component of the ball contact moment.
-
moment_contact_z
() → float. Get the z-component of the ball contact moment.
-
moment_unbal
() → vec. Get the ball unbalanced moment (vector).
-
moment_unbal_x
() → float. Get the x-component of the ball unbalanced moment.
-
moment_unbal_y
() → float. Get the y-component of the ball unbalanced moment.
-
moment_unbal_z
() → float. Get the z-component of the ball unbalanced moment.
-
pos
() → vec. Get the ball centroid location (vector).
-
pos_x
() → float. Get the x-component of the ball centroid location.
-
pos_y
() → float. Get the y-component of the ball centroid location.
-
pos_z
() → float. Get the z-component of the ball centroid location.
-
prop
(property_name: str) → any. Get a surface property value of this ball.
-
props
() → dict {str: any}. Get a dictionary of all the surface properties of this ball.
-
radius
() → float. Get the ball radius.
-
set_damp
(value: float) → None. Set the ball local damping.
-
set_density
(value: float) → None. Set the ball density.
-
set_disp
(value: vec) → None. Set the ball displacement (vector).
-
set_disp_x
(value: float) → None. Set the x-component of the ball displacement.
-
set_disp_y
(value: float) → None. Set the y-component of the ball displacement.
-
set_disp_z
(value: float) → None. Set the z-component of the ball displacement.
-
set_euler
(value: vec) → None. Set the ball orientation (vector).
-
set_euler_x
(value: float) → None. Set the x-component of the ball orientation.
-
set_euler_y
(value: float) → None. Set the y-component of the ball orientation.
-
set_euler_z
(value: float) → None. Set the z-component of the ball orientation.
-
set_extra
(slot: int, value: any) → None. Set the ball extra data in the given slot.
-
set_fix
(component: int, fix: bool) → None. Set the ball fixity condition. The first argument is the vector component to set and the second components is a the fixity flag.
-
set_force_app
(value: vec) → None. Set the ball applied force (vector).
-
set_force_app_x
(value: float) → None. Set the x-component of the ball applied force.
-
set_force_app_y
(value: float) → None. Set the y-component of the ball applied force.
-
set_force_app_z
(value: float) → None. Set the z-component of the ball applied force.
-
set_force_contact
(value: vec) → None. Set the ball contact force (vector).
-
set_force_contact_x
(value: float) → None. Set the x-component of the ball contact force.
-
set_force_contact_y
(value: float) → None. Set the y-component of the ball contact force.
-
set_force_contact_z
(value: float) → None. Set the z-component of the ball contact force.
-
set_fragment
(id: int) → None. Set ball fragment ID.
-
set_group
(group_name: str or int[, slot: str or int]) → None. Set the ball group name in a given slot.
-
set_moment_app
(value: vec) → None. Set the ball applied moment (vector).
-
set_moment_app_x
(value: float) → None. Set the x-component of the ball applied moment.
-
set_moment_app_y
(value: float) → None. Set the y-component of the ball applied moment.
-
set_moment_app_z
(value: float) → None. Set the z-component of the ball applied moment.
-
set_moment_contact
(value: vec) → None. Set the ball contact moment (vector).
-
set_moment_contact_x
(value: float) → None. Set the x-component of the ball contact moment.
-
set_moment_contact_y
(value: float) → None. Set the y-component of the ball contact moment.
-
set_moment_contact_z
(value: float) → None. Set the z-component of the ball contact moment.
-
set_pos
(value: vec) → None. Set the ball centroid location (vector).
-
set_pos_x
(value: float) → None. Set the x-component of the ball centroid location.
-
set_pos_y
(value: float) → None. Set the y-component of the ball centroid location.
-
set_pos_z
(value: float) → None. Set the z-component of the ball centroid location.
-
set_prop
(property_name: str, value: any) → None. Set a surface property of this ball.
-
set_radius
(value: float) → None. Set the ball radius.
-
set_spin
(value: vec) → None. Set the ball angular velocity (vector).
-
set_spin_x
(value: float) → None. Set the x-component of the ball angular velocity.
-
set_spin_y
(value: float) → None. Set the y-component of the ball angular velocity.
-
set_spin_z
(value: float) → None. Set the z-component of the ball angular velocity.
-
set_vel
(value: vec) → None. Set the ball velocity (vector).
-
set_vel_x
(value: float) → None. Set the x-component of the ball velocity.
-
set_vel_y
(value: float) → None. Set the y-component of the ball velocity.
-
set_vel_z
(value: float) → None. Set the z-component of the ball velocity.
-
spin
() → vec. Get the ball angular velocity (vector).
-
spin_x
() → float. Get the x-component of the ball angular velocity.
-
spin_y
() → float. Get the y-component of the ball angular velocity.
-
spin_z
() → float. Get the z-component of the ball angular velocity.
-
stress
() → tensor. Get the stress tensor arising from all contacts acting on the ball.
-
valid
() → bool. Returns True if this ball is live.
-
vel
() → vec. Get the ball velocity (vector).
-
vel_x
() → float. Get the x-component of the ball velocity.
-
vel_y
() → float. Get the y-component of the ball velocity.
-
vel_z
() → float. Get the z-component of the ball velocity.
-
Was this helpful? ... | 3DEC © 2019, Itasca | Updated: Feb 25, 2024 |