| Name | Description |
|---|---|
| model of a linear damper | |
| model of a linear spring |
MultiBondLib.Mechanics3DwithImpulses.Forces.Damping
The damper generates a counteracting force that is proportional to the relative velocity.
The damping coefficient can be set by the parameter d.
| Type | Name | Default | Description |
|---|---|---|---|
| Real | d | 0 | Damping constant [N.s/m] |
| Type | Name | Description |
|---|---|---|
| IFrame_a | frame_a | |
| IFrame_b | frame_b |
model Damping "model of a linear damper"
parameter Real d(
final unit="N.s/m",
final min=0) = 0 "Damping constant";
Interfaces.IFrame_a frame_a;
Interfaces.IFrame_b frame_b;
protected
Interfaces.ConnectContinousFrame ConnectContinousFrame1;
Interfaces.ConnectContinousFrame ConnectContinousFrame2;
Mechanics3D.Forces.Damping Damping1(d=d);
equation
connect(ConnectContinousFrame2.frame_b, frame_a);
connect(ConnectContinousFrame1.frame_b, frame_b);
connect(Damping1.frame_a, ConnectContinousFrame2.frame_a);
connect(Damping1.frame_b, ConnectContinousFrame1.frame_a);
end Damping;
MultiBondLib.Mechanics3DwithImpulses.Forces.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.
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | animation | true | animate spring |
| Real | c | 0 | Spring constant [N/m] |
| Position | s0 | 0 | rest length of spring [m] |
| Advanced | |||
| Position | s_small | 1e-4 | critical Spring length [m] |
| Animation | |||
| if animation = true | |||
| Distance | width | world3D.defaultForceWidth | Width of spring [m] |
| Distance | coilWidth | width/5 | Width of spring coil [m] |
| Integer | numberOfWindings | 5 | Number of spring windings |
| Color | color[3] | world3D.defaultForceElementC... | Color of spring |
| Type | Name | Description |
|---|---|---|
| IFrame_a | frame_a | |
| IFrame_b | frame_b |
model Spring "model of a linear spring"
import SI = Modelica.SIunits;
import MB = Modelica.Mechanics.MultiBody;
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= world3D.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= world3D.defaultForceElementColor
"|Animation|if animation = true| Color of spring";
Interfaces.IFrame_a frame_a;
Interfaces.IFrame_b frame_b;
protected
outer World3D world3D;
Interfaces.ConnectContinousFrame ConnectContinousFrame1;
Interfaces.ConnectContinousFrame ConnectContinousFrame2;
Mechanics3D.Forces.Spring Spring1(
animation=animation,
c=c,
s0=s0,
s_small=s_small,
width=width,
coilWidth=coilWidth,
numberOfWindings=numberOfWindings,
color=color);
equation
connect(ConnectContinousFrame2.frame_b, frame_a);
connect(ConnectContinousFrame1.frame_b, frame_b);
connect(Spring1.frame_b, ConnectContinousFrame1.frame_a);
connect(Spring1.frame_a, ConnectContinousFrame2.frame_a);
end Spring;