Joint

Joint

Class Joint()

Joint(parent='MODEL', name='Body_n', label='Body_n', active=True, 
type='BallJoint', b1=None, b2=None, origin=None, align_meth1='Point', align_pt1=None, 
align_vec1=None, align_meth2='Point', align_pt2=None, align_vec2=None, 
align_type='Inplane', inplane_type='Inplane', inline_type='Origin', ujoint_meth1='SHAFT', 
ujoint_meth2='SHAFT', ic_use_trans=False, ic_trans_disp=0, ic_trans_vel=0, 
ic_use_rot=False, ic_rot_disp=0, ic_rot_vel=0, pitch=0, allow_compliance=False, isbush=False)

A Joint.

Joints create lower pair constraints. A lower pair is an idealized form of constraint where the constraint can be represented using two reference frames, or coordinate systems, belonging to two different bodies. The origin, axis, or plane of one reference frame is said to be constrained with respect to the origin, axis, or plane of another reference frame.

Method:

getAssociatedGraphics

Keyword Arguments

Argument Data Type Description Default
name String The variable name. Joint_n, for next available integer n.
label String The descriptive label. Joint_n, for next available integer n.
parent Object The parent. MODEL
active Bool Used to activate or deactivate this entity. True
type Enum The type. One of BallJoint, UJoint, TransJoint, RevJoint, InlineJoint, FixedJoint, InplaneJoint, CylJoint, Planar, CVJoint, AtPointJoint, OrientJoint, ParallelAxesJoint, PerpAxesJoint or ScrewJoint. BallJoint
b1 Body The first constrained body. None
b2 Body The second constrained body. None
origin Point The origin. None
align_meth1 Enum Alignment method for axis 1. Applies to type RevJoint, TransJoint, UJoint, InlineJoint, InplaneJoint, CylJoint, PlanarJoint, CVJoint, ParallelAxesJoint, PerpAxesJoint or ScrewJoint. One of Point, Vector. Point
align_pt1 Point The point when align_meth1 is Point. None
align_vec1 Vector The vector when align_meth1 is Vector. None
align_meth2 Enum Alignment method for axis 2. Applies to type InplaneJoint, PlanarJoint, ParallelAxesJoint, UJoint, CVJoint or PerpAxesJoint. One of Point or Vector. Point
align_pt2 Point The point when align_meth2 is Point. None
align_vec2 Vector The vector when align_meth2 is Vector. None
align_type Enum Alignment of planar and parallel joints.One of Inplane or Normal. Inplane
inplane_type Enum Alignment of inplane joint. One of Inplane or Normal. Inplane
inline_type Enum Alignment method for second axis of inline joint. One of Origin or Axis. Origin
ujoint_meth1 Enum Orientation method for axis 1 of universal joint. One of SHAFT or CROSSPIN. SHAFT
ujoint_meth2 Enum Orientation method for axis 2 of universal joint. One of SHAFT or CROSSPIN. SHAFT
ic_use_trans Bool Translational initial conditions when true. Valid for joints of type TransJoint or CylJoint. False
ic_trans_disp Double Initial translational displacement. 0
ic_trans_vel Double Initial translational velocity. 0
ic_use_rot Bool Translational initial conditions when True. Valid for joints of type RevJoint or CylJoint. False
ic_rot_disp Double Initial rotational displacement of the joint. 0
ic_rot_vel Double Initial rotational displacement. 0
pitch Double The pitch for ScrewJoint. Pitch is the amount of translational displacement per revolution of the joint. 0
allow_compliance Bool Allow compliance. False
isbush Bool Use as a bushing. False

Instances

Instance Type Description
friction Friction The friction attribute to modify friction properties.
bush Bushing The bushing when isbush is True.

Notes

1. The parent parameter can only be initialized by the constructor and should not be modified directly.

2. Only parent can be used as a positional argument in the constructor.

3. Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.

Methods

getAssociatedGraphics()

Get all the graphics that are associated with this object.

Returns:

List of all graphic associated with this joint.

Return type:

(list)

Joint Pair

Class JointPair()

JointPair(parent='MODEL', name='JointPair_n', label='JointPair_n', active=True, sym='NONE')

Joint pair containing left and right instances of singles.

Keyword Arguments

Argument Data Type Description Default
name String The variable name. JointPair_n, for next available integer n.
label String The descriptive label. JointPair_n, for next available integer n.
parent Object The parent. MODEL
active Bool Defines if entity is activated when True or deactivated when False. True
sym Enum The symmetry of pair entity. Takes values 'LEFT' for left entity as master, 'RIGHT' for right entity as master or 'NONE' when it is not symmetric. NONE

Instances

Instance Type Description
l Point The left joint.
r Point The right joint.

Notes

Instance is a reference to an entity. You cannot modify an instance, but can modify its properties.

Friction

Class Friction()

Friction(**kwds)

Utility class to hold and modify friction properties for a joint.

Keyword Arguments

Argument Data Type Description Default
use_friction Bool Use friction properties when True. False
transition_vel Double Specifies the velocity threshold for the transition from dynamic friction to static friction. 0.1
mu_dynamic Double The coefficient of friction when the slip velocity is greater than transition_vel. 0.25
mu_static Double The coefficient of friction when the slip velocity is less than transition_vel. 0.3
max_deformation Double Specifies the maximum creep that can occur in a joint during the stiction regime. Only for SolverMode ADAMS. 0.01
use_static Enum One of ACTIVE_STATIC or INACTIVE_STATIC. ACTIVE_STATIC
effect Enum Specifies the frictional effect included in the friction model. One of STICTION_AND_SLIDING, STICTION_ONLY or SLIDING_ONLY. STICTION_AND_SLIDING
preload_input Enum Specifies if force preload is an input to the friction model. One of PRELOAD or NO_PRELOAD. PRELOAD
reaction_force_input Enum Specifies if joint reaction force is an input to the friction model. One of REACTION_FORCE or NO_REACTION_FORCE. REACTION_FORCE
bending_moment_input Enum Specifies if bending moment is an input to the friction model. This property is applicable to revolute, translational, cylindrical and universal joints. One of BENDING_MOMENT or NO_BENDING_MOMENT. BENDING_MOMENT
torsional_moment_input Enum Specifies if torsional moment is an input to the friction model. This property is applicable to translational joint only. One of TORSIONAL_MOMENT or NO_TORSIONAL_MOMENT. TORSIONAL_MOMENT
f_preload Double Specifies the joint's preload friction force. Applicable for translational and cylindrical joints only. 0
t_preload Double Specifies the joint's preload friction torque. Applicable for revolute, cylindrical, universal and ball joints only. 0
ball_radius Double Specifies the radius of the ball joint. Applicable for ball joint only. 1
pin_radius Double Specifies the radius of the pin. Applicable for revolute, cylindrical and universal joints only. 1
friction_arm Double Specifies the moment arm used to compute axial friction torque. Applicable for revolute and universal joints only. 1
bending_reaction_arm Double Specifies the moment arm used to compute the contribution of bending moment on friction torque. Applicable for revolute and universal joints only. 1
reaction_arm Double Specifies the moment arm of the reaction torque. Applicable for translational joint only. 1
initial_overlap Double Specifies the initial overlap of the sliding bodies. Applicable for translational and cylindrical joints only. 1000
rot_constraint Enum Specifies the rotational constraint in the universal joint on which the friction acts. One of I_YOKE, Y_YOKE or BOTH. Applicable for universal joint only. I_YOKE
overlap_delta Enum Specifies the change in overlap in the sliding bodies connected by the joint. One of INCREASE, DECREASE or CONSTANT. CONSTANT
bristle_stiffness Double Specifies the bristle stiffness in the LuGre model. It models the stiffness resisting micro-deformation in the friction element. 100
damping_effects Double Specifies the LuGre damping coefficient for the stiction regime. 0.316
viscous_effects Double Specifies the coefficient for the viscous damping force that occurs when relative sliding actually begins. 0.0004

Notes

You cannot create instances of the Friction class. This class is used to modify the friction properties of a joint.

Examples

========
Create and modify attributes of a Joint.
>>> from hw import mview
>>> #Create a Ball joint and references
>>> j1 = mview.Joint(name = 'j1', type = 'BallJoint')
>>> body1 = mview.Body(label = 'refbody')
>>> #Set values for attributes
>>> j1.b1 = body1
>>> j1.b2 = 'B_Ground'
>>> j1.origin = mview.getModel().P_Global_Origin
>>> #Get values of attributes
>>> j1.friction.use_friction
False
>>> #Set multiple values at once
>>> j1.friction.setValues(use_friction = True,mu_static = 0.5)
>>> #Get list of properties/atrributes for all types of joints
>>> j1.getPropertyNames()
['name', 'label', 'note', 'num', 'id', 'active', 'ifstate', 'varname', 'sym', 'type', 'b1', 'b2',
'origin', 'align_meth1', 'align_pt1', 'align_vec1', 'align_meth2', 'align_pt2', 'align_vec2',
'align_type', 'inplane_type', 'inline_type', 'ujoint_meth1', 'ujoint_meth2', 'ic_use_trans',
'ic_trans_disp', 'ic_trans_vel', 'ic_use_rot', 'ic_rot_disp', 'ic_rot_vel', 'pitch',
'allow_compliance', 'isbush', 'bush', 'friction', 'i', 'j', 'joint_i', 'joint_j']
>>> #Create a compliant joint
>>> j2 = mview.Joint(type = 'RevJoint',allow_compliance = True)
>>> j2.b1 = body1
>>> j2.setValues(b1 = body1,b2 = 'B_Ground',origin = 'P_Global_Origin')
>>> j2.align_meth1 = 'VECTOR'
>>> j2.align_vec1 = 'V_Global_Z'
>>> #Set bushing properties
>>> j2.isbush = True
>>> #Linear value of stiffness
>>> j2.bush.kx.lin = 100
>>> j2.bush.cty.type = 'CRV'
>>> #Nonlinear curve value for damping
>>> c1 = mview.Curve(x_type = 'VALUE',y_type = 'VALUE',x_value = [0,1],y_value = [10,20])
>>> j2.bush.cty.crv = c1
>>> #Set interpolation type and independent variable
>>> j2.bush.cty.int_type = 'CUBIC'
>>> j2.bush.cty.indep_var = '`TIME`'
>>> #These steps can be repeated for any type of joint, with associated properties