MultiBondLib.PlanarMechanics.Parts

parts

Information


This package contains completely rigid components.

These components either define a mass and inertia or they define a fixed relationship.

Package Content

NameDescription
MultiBondLib.PlanarMechanics.Parts.Body Body comlete body model
MultiBondLib.PlanarMechanics.Parts.SimpleBody SimpleBody body element with mass and inertia
MultiBondLib.PlanarMechanics.Parts.Fixed Fixed wall element
MultiBondLib.PlanarMechanics.Parts.FixedTranslation FixedTranslation translational element


MultiBondLib.PlanarMechanics.Parts.Body MultiBondLib.PlanarMechanics.Parts.Body

comlete body model

MultiBondLib.PlanarMechanics.Parts.Body

Information


This is the model of a body representing a point with given mass and inertia tensor.

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.

General parameter

The mass and rotational inertia can be specified by the parameters m and J.

The parameter animation toggles the visualization

Initialization

In general, you can specify... Which of these variables do effectively appear in the inital equations can be defined by the parameter initType.

Visualization

The element is visualized by a sphere. Diameter and color of the sphere can be specified by the animation parameters.

Advanced settings

The activation of enforceStates enforces the joint to explicitely define integrators. This parameter is useful to choose the state variables in a kinematic loop.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
Massm1Mass of body [kg]
InertiaJ1Inertia of body [kg.m2]
Initialization
TempinitTypeMB.Types.Init.FreeType of initialization (defines usage of start values below)
Positionx_start[2]{0,0}initial position (x,y) [m]
Velocityv_start[2]{0,0}initial velocity (vx, vy) [m/s]
Accelerationa_start[2]{0,0}initial acceleration (ax, ay) [m/s2]
Anglephi_start0initial angle [rad]
AngularVelocityw_start0initial ang. velocity [rad/s]
AngularAccelerationz_start0initial ang. acc. [rad/s2]
Animation
if animation = true
DiametersphereDiameterplanarWorld.defaultBodyDiame... Diameter of sphere [m]
ColorsphereColor[3]planarWorld.defaultBodyColor Color of sphere
Advanced
BooleanenforceStatesfalseenforce x,y,phi and vx, vy, w as states

Connectors

TypeNameDescription
Frame_aframe_a 

Modelica definition

model Body "comlete body model" 
  
  import SI = Modelica.SIunits;
  import MB = Modelica.Mechanics.MultiBody;
  
  parameter Boolean animation=true "= true, if animation shall be enabled";
  parameter SI.Mass m = 1 "Mass of body";
  parameter SI.Inertia J = 1 "Inertia of body";
  
  parameter MB.Types.Init.Temp initType=MB.Types.Init.Free 
    "|Initialization||Type of initialization (defines usage of start values below)";
  parameter SI.Position x_start[2] = {0,0} 
    "|Initialization||initial position (x,y)";
  parameter SI.Velocity v_start[2] = {0,0} 
    "|Initialization||initial velocity (vx, vy)";
  parameter SI.Acceleration a_start[2] = {0,0} 
    "|Initialization||initial acceleration (ax, ay)";
  parameter SI.Angle phi_start = 0 "|Initialization||initial angle";
  parameter SI.AngularVelocity w_start = 0 
    "|Initialization||initial ang. velocity ";
  parameter SI.AngularAcceleration z_start = 0 
    "|Initialization||initial ang. acc.";
  
  parameter SI.Diameter sphereDiameter=planarWorld.defaultBodyDiameter 
    "|Animation|if animation = true| Diameter of sphere";
  parameter MB.Types.Color sphereColor=planarWorld.defaultBodyColor 
    "|Animation|if animation = true| Color of sphere";
  
  parameter Boolean enforceStates =  false 
    "|Advanced||enforce x,y,phi and vx, vy, w as states";
  
  Interfaces.Frame_a frame_a;
protected 
  SI.Force fz "dummy force in z-direction";
  Interfaces.Mech2MBG Mech2MBG1;
  Junctions.J1 J1_1;
  Bonds.MultiBond MultiBond1;
  Bonds.MultiBond MultiBond2;
  Bonds.MultiBond MultiBond3;
  Passive.I mass(I={m,m,J});
  
protected 
  outer PlanarWorld planarWorld;
protected 
  inner Defaults MBG_defaults(n=3);
  
  parameter Integer ndim=if planarWorld.enableAnimation and animation then 1 else 0;
  MB.Visualizers.Advanced.Shape sphere[ndim](
    each shapeType="sphere",
    each color=sphereColor,
    each length=sphereDiameter,
    each width=sphereDiameter,
    each height=sphereDiameter,
    each lengthDirection={1,0,0},
    each widthDirection={0,1,0},
    each r_shape=-{1,0,0}*sphereDiameter/2,
    each r={Mech2MBG1.q[1],Mech2MBG1.q[2],0},
    each R=MB.Frames.planarRotation({0,0,-1},Mech2MBG1.q[3],0));
  
  Sources.mSe mSe1;
  
public 
  Joints.PotentialFBM PotFBM(
    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);
equation 
  {mSe1.s[1],mSe1.s[2],fz} = m*planarWorld.gravityAcceleration({Mech2MBG1.q[1],Mech2MBG1.q[2],0});
  mSe1.s[3] = 0;
  
  connect(Mech2MBG1.frame_a, frame_a);
  connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondCon1);
  connect(MultiBond1.MultiBondCon2, J1_1.MultiBondCon1);
  connect(MultiBond3.MultiBondCon2, J1_1.MultiBondCon2);
  connect(MultiBond2.MultiBondCon1, J1_1.MultiBondCon4);
  connect(mass.MultiBondCon1, MultiBond2.MultiBondCon2);
  connect(mSe1.MultiBondCon1, MultiBond3.MultiBondCon1);
  connect(PotFBM.frame_b, frame_a);
end Body;

MultiBondLib.PlanarMechanics.Parts.SimpleBody MultiBondLib.PlanarMechanics.Parts.SimpleBody

body element with mass and inertia

MultiBondLib.PlanarMechanics.Parts.SimpleBody

Information


This is the model of a body representing a point with given mass and inertia .

This model does not contain a potential joint and therefore needs to be connected to a joint or fixation element.

General parameter

The mass and rotational inertia can be specified by the parameters m and J.

The parameter animation toggles the visualization

Visualization

The element is visualized by a sphere. Diameter and color of the sphere can be specified by the animation parameters.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
Massm1Mass of body [kg]
InertiaJ1Inertia of body [kg.m2]
Animation
if animation = true
DiametersphereDiameterplanarWorld.defaultBodyDiame... Diameter of sphere [m]
ColorsphereColor[3]planarWorld.defaultBodyColor Color of sphere

Connectors

TypeNameDescription
Frame_aframe_a 

Modelica definition

model SimpleBody "body element with mass and inertia" 
  import SI = Modelica.SIunits;
  import MB = Modelica.Mechanics.MultiBody;
  
  parameter Boolean animation=true "= true, if animation shall be enabled";
  parameter SI.Mass m = 1 "Mass of body";
  parameter SI.Inertia J = 1 "Inertia of body";
  
  parameter SI.Diameter sphereDiameter=planarWorld.defaultBodyDiameter 
    "|Animation|if animation = true| Diameter of sphere";
  parameter MB.Types.Color sphereColor=planarWorld.defaultBodyColor 
    "|Animation|if animation = true| Color of sphere";
  
  Interfaces.Frame_a frame_a;
protected 
  SI.Force fz "dummy force in z-direction";
  Interfaces.Mech2MBG Mech2MBG1;
  Junctions.J1 J1_1;
  Bonds.MultiBond MultiBond1;
  Bonds.MultiBond MultiBond2;
  Bonds.MultiBond MultiBond3;
  Passive.I I1(     I={m,m,J});
  
protected 
  outer PlanarWorld planarWorld;
protected 
  inner Defaults MBG_defaults(n=3);
  
  parameter Integer ndim=if planarWorld.enableAnimation and animation then 1 else 0;
  MB.Visualizers.Advanced.Shape sphere[ndim](
    each shapeType="sphere",
    each color=sphereColor,
    each length=sphereDiameter,
    each width=sphereDiameter,
    each height=sphereDiameter,
    each lengthDirection={1,0,0},
    each widthDirection={0,1,0},
    each r_shape=-{1,0,0}*sphereDiameter/2,
    each r={Mech2MBG1.q[1],Mech2MBG1.q[2],0},
    each R=MB.Frames.planarRotation({0,0,-1},Mech2MBG1.q[3],0));
  
  Sources.mSe mSe1;
  
equation 
  {mSe1.s[1],mSe1.s[2],fz} = m*planarWorld.gravityAcceleration({Mech2MBG1.q[1],Mech2MBG1.q[2],0});
  mSe1.s[3] = 0;
  
  connect(Mech2MBG1.frame_a, frame_a);
  connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondCon1);
  connect(MultiBond1.MultiBondCon2, J1_1.MultiBondCon1);
  connect(MultiBond3.MultiBondCon2, J1_1.MultiBondCon2);
  connect(MultiBond2.MultiBondCon1, J1_1.MultiBondCon4);
  connect(I1.MultiBondCon1, MultiBond2.MultiBondCon2);
  connect(mSe1.MultiBondCon1, MultiBond3.MultiBondCon1);
end SimpleBody;

MultiBondLib.PlanarMechanics.Parts.Fixed MultiBondLib.PlanarMechanics.Parts.Fixed

wall element

MultiBondLib.PlanarMechanics.Parts.Fixed

Information


This is the model of a fixation point. It models a full translational and rotational fixation.

General parameter

The position and orientation of the fixation point can be specified by the parameters r and phi.

Visualization

The element isn't visualized.

Parameters

TypeNameDefaultDescription
Positionr[2]{0,0}Position [m]
Anglephi0Angle [rad]

Connectors

TypeNameDescription
Frame_bframe_b 

Modelica definition

model Fixed "wall element" 
  import SI = Modelica.SIunits;
  
  parameter SI.Position r[2] = {0,0} "Position";
  parameter SI.Angle phi = 0 "Angle";
  
protected 
  inner Defaults MBG_defaults(n=3);
protected 
  Interfaces.MBG2Mech MBG2Mech1;
  Bonds.MultiBond MultiBond1;
  Sources.Sf Sf1(n=3, f0={0});
  Modelica.Blocks.Sources.Constant ConstantFixed[3](k={r[1],r[2],phi});
public 
  Interfaces.Frame_b frame_b;
  
equation 
  defineRoot(frame_b.P);
  connect(MBG2Mech1.frame_b, frame_b);
  connect(ConstantFixed.y, MBG2Mech1.q);
  connect(MultiBond1.MultiBondCon2, MBG2Mech1.MultiBondCon1);
  connect(Sf1.MultiBondCon1, MultiBond1.MultiBondCon1);
end Fixed;

MultiBondLib.PlanarMechanics.Parts.FixedTranslation MultiBondLib.PlanarMechanics.Parts.FixedTranslation

translational element

MultiBondLib.PlanarMechanics.Parts.FixedTranslation

Information


This is the model of a massless rod. It defines a fixed translation between the two connected frames.

General parameter

The rod can be specified by a parameter vector r. r is resolved in the body system and points from frame a to frame b.

Visualization

The element is normally visualized as cylinder. Anyhow the visualization can be changed by the according parameters.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
Positionr[2]{1,0}translational vector from frame a to b [m]
Animation
if animation = true
ShapeTypeshapeType"cylinder" Type of shape
Lengthlengthsqrt(r*r) Length of shape [m]
Distancewidthlength/planarWorld.defaultWi... Width of shape [m]
Distanceheightwidth Height of shape. [m]
Realextra0.0 Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape).
Colorcolor[3]planarWorld.defaultRodColor Color of shape

Connectors

TypeNameDescription
Frame_aframe_a 
Frame_bframe_b 

Modelica definition

model FixedTranslation "translational element" 
  import SI = Modelica.SIunits;
  import MB = Modelica.Mechanics.MultiBody;
  parameter Boolean animation=true "= true, if animation shall be enabled";
  parameter SI.Position r[2] = {1,0} "translational vector from frame a to b";
  
  parameter Modelica.Mechanics.MultiBody.Types.ShapeType shapeType="cylinder" 
    "|Animation|if animation = true| Type of shape";
  parameter SI.Length length=sqrt(r*r) 
    "|Animation|if animation = true| Length of shape";
  parameter SI.Distance width=length/planarWorld.defaultWidthFraction 
    "|Animation|if animation = true| Width of shape";
  parameter SI.Distance height=width 
    "|Animation|if animation = true| Height of shape.";
  parameter Real extra=0.0 
    "|Animation|if animation = true| Additional parameter depending on shapeType (see docu of Visualizers.Advanced.Shape).";
  parameter Modelica.Mechanics.MultiBody.Types.Color color=planarWorld.defaultRodColor 
    "|Animation|if animation = true| Color of shape";
  
  Interfaces.Frame_a frame_a;
  Interfaces.Frame_b frame_b;
protected 
  outer PlanarWorld planarWorld;
  Interfaces.Mech2MBG Mech2MBG1;
  Interfaces.MBG2Mech MBG2Mech1;
  Bonds.MultiBond MultiBond1;
  Bonds.MultiBond MultiBond2;
  Bonds.Utilities.MultiBondTail MultiBondTail1;
  
  AdditionalMBG.Translation TranslationFixed(d=r);
  AdditionalMBG.translationalTF translationalTF1(d=r);
  
  parameter Integer ndim=if planarWorld.enableAnimation and animation then 1 else 0;
  MB.Visualizers.Advanced.Shape rod[ndim](
    each shapeType="cylinder",
    each color=color,
    each length=length,
    each width=width,
    each height=height,
    each lengthDirection={r[1],r[2],0},
    each widthDirection={0,0,1},
    each r_shape={0,0,0},
    each r={Mech2MBG1.q[1],Mech2MBG1.q[2],0},
    each R=MB.Frames.planarRotation({0,0,-1},Mech2MBG1.q[3],0));
  
  inner Defaults MBG_defaults(n=3);
equation 
  defineBranch(frame_a.P, frame_b.P);
  connect(MBG2Mech1.frame_b, frame_b);
  connect(Mech2MBG1.frame_a, frame_a);
  connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondCon1);
  connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondCon1);
  connect(Mech2MBG1.q, TranslationFixed.q1);
  connect(TranslationFixed.q2, MBG2Mech1.q);
  connect(translationalTF1.MultiBondCon1, MultiBond1.MultiBondCon2);
  connect(translationalTF1.MultiBondCon2, MultiBond2.MultiBondCon1);
  connect(translationalTF1.phi, Mech2MBG1.q[3]);
end FixedTranslation;

HTML-documentation generated by Dymola Thu Aug 31 09:47:37 2006.