These components are either define a mass and inertia or they define a fixed relationship.
Name | Description |
---|---|
Body | complete model of a body |
SimpleBody | simple model of a body |
Fixed | wall |
FixedRotation | fixed rotation |
FixedTranslation | fixed translation |
If the body model is not connected to any joint, its movement is defined to be free. Therefore this model includes a potential free-body movement joint and in consequences shares certain joint characterisitcs.
The inertia tensor is a symmetric 3x3 matrix and can be specified by the parameters I11, I12, ...
A non-zero value for the parameter GPIndex inserts the body into the gravity pool.
Make sure the integer value is unique and does not exceed the size of the gravity pool.
The parameter animation toggles the visualization
The activation of reinitByImpulse determines the state variables to be reinitialized in case of a force impulse. It is coupled by default with the parameter enforceStates. The selection of the reinitialization points must be done manually.
The orientation can either be expressed by the three cardan angles or by quaternions.
Which of these two variants is used, can be specified by the parameter useQuaternions. If cardan angles are chosen to be used, you can specify the sequence of rotation axis by the parameter sequence_angles.
Name | Default | Description |
---|---|---|
animation | true | = true, if animation shall be enabled |
m | 1 | mass of body [kg] |
GPIndex | 0 | Index of element in gravity pool (is zero if element is not in gravity pool) |
CPIndex | 0 | |
Inertia tensor (resolved in center of mass, parallel to frame_a) | ||
I_11 | 0.001 | (1,1) element of inertia tensor [kg.m2] |
I_22 | 0.001 | (2,2) element of inertia tensor [kg.m2] |
I_33 | 0.001 | (3,3) element of inertia tensor [kg.m2] |
I_21 | 0 | (2,1) element of inertia tensor [kg.m2] |
I_31 | 0 | (3,1) element of inertia tensor [kg.m2] |
I_32 | 0 | (3,2) element of inertia tensor [kg.m2] |
Initialization | ||
initType | MB.Types.Init.Free | Type of initialization (defines usage of start values below) |
x_start[3] | {0,0,0} | initial position [m] |
v_start[3] | {0,0,0} | initial velocity [m/s] |
a_start[3] | {0,0,0} | initial acceleration [m/s2] |
phi_start[3] | {0,0,0} | initial cardan angles in degree [deg] |
w_start[3] | {0,0,0} | initial angular velocity in deg/s [deg/s] |
z_start[3] | {0,0,0} | initial angular acceleration in deg/s2 [deg/s2] |
Advanced | ||
enforceStates | false | enforce Quaternions or cardan angles and w as states |
useQuaternions | true | use Quaternions instead of cardan angles |
sequence_angles | {1,2,3} | sequence of the cardan angles |
reinitByImpulse | enforceStates | reinit velocities by an impulse |
Animation | ||
if animation = true | ||
sphereDiameter | world3D.defaultBodyDiameter | Diameter of sphere [m] |
sphereColor | world3D.defaultBodyColor | Color of sphere |
model Body "complete model of a body" extends Mechanics3D.Parts.Body(redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Joints.PotentialFBM PotentialFBM1( initType=initType, x_start=x_start, v_start=v_start, a_start=a_start, phi_start=phi_start, w_start=w_start, z_start=z_start, enforceStates=enforceStates, useQuaternions=useQuaternions, sequence_angles=sequence_angles, reinitByImpulse = reinitByImpulse)); parameter Boolean reinitByImpulse = enforceStates "|Advanced||reinit velocities by an impulse"; parameter Integer CPIndex = 0; protected outer CollisionPool collisionPool; Real Va[3]; Real Wa[3]; equation if CPIndex > 0 then connect(frame_a, collisionPool.frames[CPIndex]); end if; when frame_a.contact then Va = frame_a.P.v; Wa = frame_a.P.w; end when; frame_a.F = m*2*(frame_a.Vm-Va); frame_a.T = Inert*2*(frame_a.Wm-Wa); end Body;
Different from the standard body model, this model does not contain a potential joint and therefore needs to be connected to a joint or fixation element.
The inertia tensor is a symmetric 3x3 matrix and can be specified by the parameters I11, I12, ...
A non-zero value for the parameter GPIndex inserts the body into the gravity pool.
Make sure the integer value is unique and does not exceed the size of the gravity pool.
The parameter animation toggles the visualization
Name | Default | Description |
---|---|---|
animation | true | = true, if animation shall be enabled |
m | 1 | mass of body [kg] |
GPIndex | 0 | Index of element in gravity pool (is zero if element is not in gravity pool) |
Inertia tensor (resolved in center of mass, parallel to frame_a) | ||
I_11 | 0.001 | (1,1) element of inertia tensor [kg.m2] |
I_22 | 0.001 | (2,2) element of inertia tensor [kg.m2] |
I_33 | 0.001 | (3,3) element of inertia tensor [kg.m2] |
I_21 | 0 | (2,1) element of inertia tensor [kg.m2] |
I_31 | 0 | (3,1) element of inertia tensor [kg.m2] |
I_32 | 0 | (3,2) element of inertia tensor [kg.m2] |
Animation | ||
if animation = true | ||
sphereDiameter | world3D.defaultBodyDiameter | Diameter of sphere [m] |
sphereColor | world3D.defaultBodyColor | Color of sphere |
model SimpleBody "simple model of a body" extends Mechanics3D.Parts.SimpleBody(redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IMech2MBG Mech2MBG1); protected Real Va[3]; Real Wa[3]; equation when frame_a.contact then Va = frame_a.P.v; Wa = frame_a.P.w; end when; frame_a.F = m*2*(frame_a.Vm-Va); frame_a.T = Inert*2*(frame_a.Wm-Wa); end SimpleBody;
Different from the standard body model, this model does not contain a potential joint and therefore needs to be connected to a joint or fixation element.
The inertia tensor is a symmetric 3x3 matrix and can be specified by the parameters I11, I12, ...
A non-zero value for the parameter GPIndex inserts the body into the gravity pool.
Make sure the integer value is unique and does not exceed the size of the gravity pool.
The parameter animation toggles the visualization
Name | Default | Description |
---|---|---|
r[3] | {0,0,0} | position of frame_b [m] |
model Fixed "wall" extends Mechanics3D.Parts.Fixed(redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.MBG2IMech MBG2Mech1); equation frame_b.Vm = zeros(3); frame_b.Wm = zeros(3); end Fixed;
Name | Default | Description |
---|---|---|
n[3] | {1,0,0} | rotation axis [m] |
angle | 0 | angle [deg] |
model FixedRotation "fixed rotation" extends Mechanics3D.Parts.FixedRotation(redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Interfaces.MBG2IMech MBG2Mech1); equation frame_a.contact = frame_b.contact; frame_a.F + frame_b.F = zeros(3); frame_a.Vm = frame_b.Vm; Rotation1.Rrel*frame_a.T + frame_b.T = zeros(3); Rotation1.Rrel*frame_a.Wm = frame_b.Wm; end FixedRotation;
Name | Default | Description |
---|---|---|
animation | true | = true, if animation shall be enabled |
r[3] | {1,0,0} | translational vector from frame a to b [m] |
Animation | ||
if animation = true | ||
shapeType | "cylinder" | Type of shape |
length | sqrt(r*r) | Length of shape [m] |
width | length/world3D.defaultWidthF... | Width of shape [m] |
height | width | Height of shape. [m] |
extra | 0.0 | Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape). |
color | world3D.defaultRodColor | Color of shape |
model FixedTranslation "fixed translation" extends Mechanics3D.Parts.FixedTranslation(redeclare Interfaces.IFrame_a frame_a, redeclare Interfaces.IFrame_b frame_b, redeclare Interfaces.IMech2MBG Mech2MBG1, redeclare Interfaces.MBG2IMech MBG2Mech1); protected Real R[3,3]; equation when frame_a.contact then R = frame_a.P.R; end when; frame_a.contact = frame_b.contact; frame_a.F + frame_b.F = zeros(3); frame_a.T + frame_b.T + cross(r,R*frame_b.F) = zeros(3); frame_a.Vm + transpose(R)*cross(frame_a.Wm,r) = frame_b.Vm; frame_a.Wm = frame_b.Wm; end FixedTranslation;