RBlock

class itasca.rblock.RBlock
Objects of this type should not be created (instantiated) directly in Python. Use the module functions that return instances of this type.
aspect_ratio() → float.

Get the rblock aspect ratio..

ball_pos() → vec.

Get the rblock ball radius (vector).

ball_pos_x() → float.

Get the x-component of the rblock ball radius.

ball_pos_y() → float.

Get the y-component of the rblock ball radius.

ball_radius() → float.

Get the rblock ball radius..

collide(object: rblock) → bool.

Get the intersection status of two rigid blocks.

contact_count(all=False, type=None) → int.

Get the number of contacts associated with this rblock. If the optional keyword argument type is given, the count 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 count includes virtual contacts.

contacts([piece: object, ]all=False, type=None) → Tuple of Contact objects.

Get a tuple of contacts associated with this rblock. An optional argument can be included which is a piece object (a Ball, a Pebble, an RBlock 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 rblock local damping.

delete() → None.

Delete this rblock.

density() → float.

Get the rblock density.

disp() → vec.

Get the rblock displacement (vector).

disp_x() → float.

Get the x-component of the rblock displacement.

disp_y() → float.

Get the y-component of the rblock displacement.

extra(slot: int) → any.

Get the rblock extra data in the given slot.

fix(component: int) → bool.

Get the rblock fixity condition. The integer degree-of-freedom cooresponds to the following order: in 3D: 0) x-velocity, 1) y-velocity, 2) z-velocity, 3) x-angular velocity, 4) y-angular velocity, 5) z-angular velocity. in 2D: 0) x-velocity, 1) y-velocity, 2) angular velocity. The return value is false for free and true for fixed conditions.

force_app() → vec.

Get the rblock applied force (vector).

force_app_x() → float.

Get the x-component of the rblock applied force.

force_app_y() → float.

Get the y-component of the rblock applied force.

force_contact() → vec.

Get the rblock contact force (vector).

force_contact_x() → float.

Get the x-component of the rblock contact force.

force_contact_y() → float.

Get the y-component of the rblock contact force.

force_unbal() → vec.

Get the rblock unbalanced force (vector).

force_unbal_x() → float.

Get the x-component of the rblock unbalanced force.

force_unbal_y() → float.

Get the y-component of the rblock unbalanced force.

fragment() → int.

Get the rblock fragment ID.

group([slot: str]) → str.

Get the rblock group name in a given slot.

group_remove(group_name: str) → bool.

Remove from the given group from all group slots of the rblock. 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 rblock 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 rblock has the given surface property.

id() → int.

Get the rblock id.

in_group(group_name: str[, slot: str]) → bool.

Test if the rblock 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 rblock.

mass() → float.

Get the rblock inertial mass.

mass_real() → float.

Get the rblock real (gravitational) mass.

moi() → tensor.

Get the rblock moment of intertia. In 2D the polar moment of intertial is used so the return value is a float.

moi_fix() → bool.

Get the moment of intertia fixity state. When activated, the rblock moment of inertia will not be automatically updated when a rblock is scaled, the volume is changed, or when the density is changed. This is activated automatically when either the volume or moment of inertia is set manually via the rblock attribute command or via the RBlock object methods vol(), moi_real() or moi_prinreal().

moi_prin_real() → vec.

Get the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method) (vector).

moi_prin_real_x() → float.

Get the x-component of the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method).

moi_prin_real_y() → float.

Get the y-component of the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method).

moi_real() → tensor.

Get the rblock real moment of intertia. In 2D the polar moment of intertial is used so the return value is a float.

moment_app() → float.

Get the rblock applied moment.

moment_contact() → float.

Get the rblock contact moment.

moment_unbal() → float.

Get the rblock unbalanced moment.

pos() → vec.

Get the rblock centroid location (vector).

pos_x() → float.

Get the x-component of the rblock centroid location.

pos_y() → float.

Get the y-component of the rblock centroid location.

prop(property_name: str) → any.

Get a surface property value of this rblock.

props() → dict {str: any}.

Get a dictionary of all the surface properties of this rblock.

rotate(axis: vec, rotation_angle: float) → None.

Rotate a rblock. The rotation point is the rblock position and it is rotated in a right handed sense about the given axis by rotation_angle degrees.

rotation() → float.

Get the rblock orientation.

rounding() → float.

Get the rblock rounding..

scale_sphere(diameter: float) → None.

Scale the rblock to an equivalent sphere. The rblock is scaled so that its {area in 2D; volume in 3D} is the same as a {circle in 2D; sphere in 3D} of the given diameter. If the volume or moment of inertia has been previously specified by the user either via rblock attribute or via the RBlock object methods (vol(), moi_prin_real() or moi_real()), the principal moment of inertial is in a fixed state and will not be scaled. See the Cump object moi_fix() method for further details.

scale_vol(volume: float) → None.

Scale the rblock. The rblock is scaled so that its {volume per unit thickness in 2D; volume in 3D} is as specified. If the volume or moment of inertia has been previously specified by the user either via rblock attribute or via the RBlock object methods (vol(), moi_prin_real() or moi_real()), the principal moment of inertial is in a fixed state and will not be scaled. See the Cump object moi_fix() method for further details.

set_damp(value: float) → None.

Set the rblock local damping.

set_density(value: float) → None.

Set the rblock density.

set_disp(value: vec) → None.

Set the rblock displacement (vector).

set_disp_x(value: float) → None.

Set the x-component of the rblock displacement.

set_disp_y(value: float) → None.

Set the y-component of the rblock displacement.

set_extra(slot: int, value: any) → None.

Set the rblock extra data in the given slot.

set_fix(component: int, fixity: bool) → None.

Get the rblock fixity condition. The integer degree-of-freedom cooresponds to the following order: in 3D: 1) x-velocity, 2) y-velocity, 3) z-velocity, 4) x-angular velocity, 5) y-angular velocity, 6) z-angular velocity. in 2D: 1) x-velocity, 2) y-velocity, 3) angular velocity. The fixity value is false for free and true for fixed conditions.

set_force_app(value: vec) → None.

Set the rblock applied force (vector).

set_force_app_x(value: float) → None.

Set the x-component of the rblock applied force.

set_force_app_y(value: float) → None.

Set the y-component of the rblock applied force.

set_force_contact(value: vec) → None.

Set the rblock contact force (vector).

set_force_contact_x(value: float) → None.

Set the x-component of the rblock contact force.

set_force_contact_y(value: float) → None.

Set the y-component of the rblock contact force.

set_fragment(id: int) → None.

Set rblock fragment ID.

set_group(group_name: str[, slot: str]) → None.

Set the rblock group name in a given slot.

set_moi_fix(fixity: bool) → None.

Set the moment of intertia fixity state. When activated, the rblock moment of inertia will not be automatically updated when a rblock is scaled, the volume is changed, or when the density is changed. This is activated automatically when either the volume or moment of inertia is set manually via the rblock attribute command or via the RBlock object methods vol(), moi_real() or moi_prinreal().

set_moi_prin_real(value: vec) → None.

Set the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method) (vector).

set_moi_prin_real_x(value: float) → None.

Set the x-component of the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method).

set_moi_prin_real_y(value: float) → None.

Set the y-component of the rblock real principal moment of inertia. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method).

set_moi_real() → tensor.

Get the rblock real moment of intertia. In 2D the polar moment of intertial is used so the return value is a float. When modified no other rblock attributes are changed. The specification of the moment of inertia in this way results in the principal moments of inertia being in a fixed state so that they will not be automatically updated when scaling a rblock unless the user changes the fix state (see the RBlock moi_fix() method).

set_moment_app(value: float) → None.

Set the rblock applied moment.

set_moment_contact(value: float) → None.

Set the rblock contact moment.

set_pos(value: vec) → None.

Set the rblock centroid location (vector).

set_pos_x(value: float) → None.

Set the x-component of the rblock centroid location.

set_pos_y(value: float) → None.

Set the y-component of the rblock centroid location.

set_prop(property_name: str, value: any) → None.

Set a surface property of this rblock.

set_rotation(value: float) → None.

Set the rblock orientation.

set_spin(value: float) → None.

Set the rblock angular velocity.

set_vel(value: vec) → None.

Set the rblock velocity (vector).

set_vel_x(value: float) → None.

Set the x-component of the rblock velocity.

set_vel_y(value: float) → None.

Set the y-component of the rblock velocity.

set_vol(value: float) → None.

Set the rblock volume. In 2D this is the volume per unit thickness.

spin() → float.

Get the rblock angular velocity.

stress() → tensor.

Get the stress tensor arising from all contacts acting on the rblock.

to_global(value: vec) → vec.

Rotate a vector from principal system. The returned vector is in the global axis system.

to_prin(value: vec) → vec.

Rotate a vector to principal system.

valid() → bool.

Returns True if this rblock is live.

vel() → vec.

Get the rblock velocity (vector).

vel_x() → float.

Get the x-component of the rblock velocity.

vel_y() → float.

Get the y-component of the rblock velocity.

vol() → float.

Get the rblock volume. In 2D this is the volume per unit thickness.