MultiBondLib.PlanarMechanics.Forces

force elements

MultiBondLib.PlanarMechanics.Forces.Damping MultiBondLib.PlanarMechanics.Forces.Spring

Information


This package contains force elements.
These elements cause a force to act on or between mechanical elements.

Elements of this package do not create rigid connections and therefore do not close kinematic loops.

NameDescription
Damping a linear damper element
Spring a linear spring element


MultiBondLib.PlanarMechanics.Forces.Damping MultiBondLib.PlanarMechanics.Forces.Damping

a linear damper element

MultiBondLib.PlanarMechanics.Forces.Damping

Information


This is the model of a linear damper element.

The damper generates a counteracting force that is proportional to the relative velocity.

The damping coefficient can be set by the parameter d.


Parameters

NameDefaultDescription
d0Damping constant [N.s/m]

Modelica definition

model Damping "a linear damper element" 
  Interfaces.Frame_a frame_a;
  Interfaces.Frame_b frame_b;
  parameter Real d(
    final unit="N.s/m",
    final min=0) = 0 "Damping constant";
  
protected 
  inner Defaults MBG_defaults(n=3);
  
  Interfaces.MBG2Mech MBG2Mech1;
  Interfaces.Mech2MBG Mech2MBG1;
  
  Junctions.J0 J0_1(n=3);
  Bonds.MultiBond MultiBond1;
  Bonds.Utilities.MultiBondTail MultiBondTail1;
  Bonds.MultiBond MultiBond2;
  Bonds.MultiBond MultiBond3;
  Passive.R R1(n=3, R={d,d,0});
  
equation 
  connect(Mech2MBG1.frame_a, frame_a);
  connect(MBG2Mech1.frame_b, frame_b);
  connect(Mech2MBG1.MultiBondCon1, MultiBond1.MultiBondCon1);
  connect(MultiBond1.MultiBondCon2, J0_1.MultiBondCon1);
  connect(MultiBond2.MultiBondCon1, J0_1.MultiBondCon2);
  connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondCon1);
  connect(MultiBond3.MultiBondCon1, J0_1.MultiBondCon4);
  connect(R1.MultiBondCon1, MultiBond3.MultiBondCon2);
end Damping;

MultiBondLib.PlanarMechanics.Forces.Spring MultiBondLib.PlanarMechanics.Forces.Spring

a linear spring element

MultiBondLib.PlanarMechanics.Forces.Spring

Information


This is the model of a linear spring.

The spring generates a counteracting force that is linear dependent on the positional shift.

The spring coefficient can be set by the parameter c. The rest lenght can be specified by the parameter s0.

A spring with a rest length s0 unequal to zero, has a stiff behavior if its length is approaching zero. The parameter s_small in the advanced menu reduces this stiffness for spring lengths ranging from zero up to s_small.

Visualization

This element is visualized by a coil. Further specifications can be made by the parameters in the animation group.

Parameters

NameDefaultDescription
animationtrueanimate spring
c0Spring constant [N/m]
s00rest length of spring [m]
Advanced
s_small1e-4critical Spring length [m]
Animation
if animation = true
widthplanarWorld.defaultForceWidth Width of spring [m]
coilWidthwidth/5 Width of spring coil [m]
numberOfWindings5 Number of spring windings
colorplanarWorld.defaultForceElem... Color of spring

Modelica definition

model Spring "a linear spring element" 
  import SI = Modelica.SIunits;
  import MB = Modelica.Mechanics.MultiBody;
  
  Interfaces.Frame_a frame_a;
  Interfaces.Frame_b frame_b;
  
  parameter Boolean animation = true "animate spring";
  
  parameter Real c(
    final unit="N/m",
    final min=0) = 0 "Spring constant";
  
  parameter SI.Position s0 = 0 "rest length of spring";
  parameter SI.Position s_small = 1e-4 "|Advanced||critical Spring length";
  
  parameter SI.Distance width=planarWorld.defaultForceWidth 
    "|Animation|if animation = true| Width of spring";
  parameter SI.Distance coilWidth=width/5 
    "|Animation|if animation = true| Width of spring coil";
  parameter Integer numberOfWindings=5 
    "|Animation|if animation = true| Number of spring windings";
  parameter MB.Types.Color color=planarWorld.defaultForceElementColor 
    "|Animation|if animation = true| Color of spring";
  
  SI.Position s;
  SI.Position sx;
  SI.Position sy;
  SI.Force fx;
  SI.Force fy;
  
protected 
  outer PlanarWorld planarWorld;
  
  inner Defaults MBG_defaults(n=3);
  Interfaces.MBG2Mech MBG2Mech1;
  Interfaces.Mech2MBG Mech2MBG1;
  Junctions.J0 J0_1(n=3);
  Bonds.MultiBond MultiBond1;
  Bonds.Utilities.MultiBondTail MultiBondTail1;
  Bonds.MultiBond MultiBond2;
  Modelica.Blocks.Sources.Constant noTorque(k=0);
  Sources.mSe mSe1(n=3);
  Bonds.MultiBond MultiBond3;
  
  parameter Integer ndim=if planarWorld.enableAnimation and animation then 1 else 0;
  MB.Visualizers.Advanced.Shape springShape[ndim](
    each shapeType="spring",
    each color=color,
    each length=s,
    each width=width,
    each height=coilWidth,
    each lengthDirection={-sx,-sy,0},
    each widthDirection={0,0,1},
    each r_shape={0,0,0},
    each r={Mech2MBG1.q[1],Mech2MBG1.q[2],0},
    each extra=numberOfWindings,
    each R=MB.Frames.planarRotation({0,0,-1},0,0));
  
equation 
  {sx,sy} = Mech2MBG1.q[1:2] - MBG2Mech1.q[1:2];
  s = sqrt((sx^2) + (sy^2));
  fx = if s >= s_small then c*sx - s0*c*(sx/s) else c*sx - s0*c*(sx/s_small);
  fy = if s >= s_small then c*sy - s0*c*(sy/s) else c*sy - s0*c*(sy/s_small);
  mSe1.s[1] = fx;
  mSe1.s[2] = fy;
  
  connect(Mech2MBG1.frame_a, frame_a);
  connect(MBG2Mech1.frame_b, frame_b);
  connect(Mech2MBG1.MultiBondCon1, MultiBond1.MultiBondCon1);
  connect(MultiBond1.MultiBondCon2, J0_1.MultiBondCon1);
  connect(MultiBond2.MultiBondCon1, J0_1.MultiBondCon2);
  connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondCon1);
  connect(MultiBond3.MultiBondCon2, J0_1.MultiBondCon4);
  connect(mSe1.MultiBondCon1, MultiBond3.MultiBondCon1);
  connect(mSe1.s[3], noTorque.y);
end Spring;

HTML-documentation generated by Dymola Thu Feb 23 12:19:35 2006.