Force (hwx.inspire)#
- class Force(features, location=None, direction=None, magnitude=None, isRemote=False, **kwds)#
Bases:
BoundaryCondition
A force is a push or a pull in a particular direction on a part, and is a type of load.
Forces can be applied to a point, edge, face, or hole center.
Once applied, distributed forces on certain types of features can be converted to bearing forces or traction forces.
# Name
Type
icon
str
# Name
Description
updatePosition
(self, m44)Update the position by multiplying input M44 matrix.
Example
from hwx import inspire model = inspire.newModel() block = model.createSolidBlock() # apply force on a face feature face = block.features[20] forceOnFace = inspire.Force(face, magnitude=10.0, loadCase='current') # apply force on a point feature point = block.features[1] forceOnPoint = inspire.Force( point, direction=[1, -1, -1], magnitude=10.0, loadCase='current' ) # apply force on a edge feature edge = block.features[11] forceOnEdge = inspire.Force(edge, magnitude=10.0, loadCase='current') print("Some forces values:") print("Force on face, direction:", forceOnFace.direction) print("Force on point, magnitude:", forceOnPoint.magnitude) print("Force on edge, location:", forceOnEdge.location) # modify forces by changing their attributes forceOnFace.direction = -face.normal forceOnPoint.magnitude = 50.0 forceOnEdge.location = [0.5, 0.25, 1.0] inspire.fitView() print("") print("Forces values after modification:") print("Force on face, direction:", forceOnFace.direction) print("Force on point, magnitude:", forceOnPoint.magnitude) print("Force on edge, location:", forceOnEdge.location)
- property magnitude#
The magnitude of the force.
- updatePosition(m44)#
Update the position by multiplying input M44 matrix.