Gforce
Model ElementGforce defines a general force and torque acting between two markers.
Class Name
Gforce
Description
The force and torque vectors are defined by their three components with respect to a third marker. The components may be defined using MotionSolve expressions or a user-defined subroutine. They may be a function of any system state and time.
Attribute Summary
Name | Property | Modifiable by command? | Designable? |
---|---|---|---|
id | Int () | ||
label | Str () | Yes | |
i | Reference (Marker) | Yes | Yes |
jfloat | Reference (Marker) | Yes | Yes |
rm | Reference (Marker) | Yes | Yes |
fx | Function () | Yes | Yes |
fy | Function () | Yes | Yes |
fz | Function () | Yes | Yes |
tx | Function () | Yes | Yes |
ty | Function () | Yes | Yes |
tz | Function () | Yes | Yes |
function | Function ("GFOSUB") | Yes | |
routine | Routine () | ||
active | Bool () | Yes |
Usage
- Force and Torque defined in a MotionSolve
expression.
Gforce (i=objMarker, j=objMarker, fx=expressionString, fy=expressionString, fz=expressionString, tx=expressionString, ty=expressionString, tz=expressionString, optional_attributes)
- Force and Torque defined in a compiled
DLL.
Gforce (i=objMarker, j=objMarker, function=userString, routine=string, optional_attributes)
- Force and Torque Python/Matlab
script.
Gforce (i=objMarker, j=objMarker, function=userString, routine=functionPointer, optional_attributes)
Attributes
- i
- Reference to an existing Marker object.
- j
- Reference to an existing floating Marker object.
- fx
- String defining a valid MotionSolve expression.
- fy
- String defining a valid MotionSolve expression.
- fz
- String defining a valid MotionSolve expression.
- tx
- String defining a valid MotionSolve expression.
- ty
- String defining a valid MotionSolve expression.
- tz
- String defining a valid MotionSolve expression.
- i
- Reference to an existing Marker object.
- j
- Reference to an existing floating Marker object.
- function
- String defining a valid user function MotionSolve expression.
- routine
- String
- i
- Reference to an existing Marker object.
- j
- Reference to an existing floating Marker object.
- function
- String defining a valid user function MotionSolve expression.
- routine
- Pointer to a callable function in Python.
- id
- Integer
- label
- String
- rm
- Reference to an existing Marker object.
- active
- Bool
Example
- Gforce defined via
expressions.
gfo1 = gforce (label="nonlinear bushing", i=m1801, jfloat=m1901, rm=m1903, fx="-1e3*DX(1801,1903,1903)", fy="-1e3*DY(1801,1903,1903)", fz="-1e3*DZ(1801,1903,1903)", tx="-5e3*AX(1801,1903) - 2*WX(1801,1903,1903)**, ty="-5e3*AY(1801,1903) - 2*WY(1801,1903,1903)**3" tz="-5e3*AZ(1801,1903) - 2*WZ(1801,1903,1903)**3" )
- Gforce defined in a Python
function.
# Define the user subroutine first def myGfosub (id, time, par, npar, dflag, iflag): i = par[0] j = par[1] k = par[2] kt= par[3] ct= par[4] # Get the state of the bushing dx = DX(i,j,j) dy = DY(i,j,j) dz = DZ(I,j,j) ax = AX(i,j) ay = AY(i,j) az = AZ(i,j) wx = WX(i,j,j) wy = WY(i,j,j) wz = WZ(i,j,j) # Compute force & torque fx = -k*dx fy = -k*dy fz = -k*dz tx = -kt*ax - ct*(wx**3) ty = -kt*ay - ct*(wy**3) tz = -kt*az - ct*(wz**3) return [fx, fy, fz, tx, ty, tz] # Define a bushing with nonlinear damping gfo2 = Gforce (label="nonlinear bushing", i=m1801, jfloat=m1901, rm=m1903, function="user(1801,1903,1000.0,5000.0, 2.0)", routine=myGfosub )
Comments
- See Properties for an explanation about what properties are, why they are used, and how you can extend these.
- For a more detailed explanation about Gforce, see Force: Two Body Scalar.