There are mainly three types of force elements:
Elements of this package do not create rigid connections and therefore do not close kinematic loops.
Name | Description |
---|---|
Damping | linear damping element |
Spring | linear spring element |
WorldForce | world force acting on frame |
WorldTorque | world torque acting on frame |
SoftImpuls_SphereSphere | soft impact between two spheres |
The damper generates a counteracting force that is proportional to the relative velocity.
The damping coefficient can be set by the parameter d.
Name | Default | Description |
---|---|---|
d | 0 | Damping constant [N.s/m] |
model Damping "linear damping element" parameter Real d( final unit="N.s/m", final min=0) = 0 "Damping constant"; Interfaces.Frame_a frame_a; Interfaces.Frame_b frame_b; protected inner Defaults MBG_defaults(n=3); Interfaces.Mech2MBG Mech2MBG1; Interfaces.MBG2Mech MBG2Mech1; Junctions.J0 J0_1(n=3); Passive.R R1(R={d}, n=3); Junctions.J0 J0_2(n=3); Sources.Se Se1(n=3, e0={0}); Bonds.MultiBond MultiBond8; Bonds.MultiBond MultiBond3; Bonds.MultiBond MultiBond1; Bonds.MultiBond MultiBond2; Bonds.MultiBond MultiBond4; Bonds.MultiBond MultiBond5; Bonds.Utilities.MultiBondTail MultiBondTail2; Bonds.Utilities.MultiBondTail MultiBondTail1; Bonds.Utilities.MultiBondTail MultiBondTail3; Bonds.Utilities.MultiBondTail MultiBondTail4; equation connect(Mech2MBG1.frame_a, frame_a); connect(MultiBond1.MultiBondCon2, J0_1.MultiBondCon1); connect(MultiBond4.MultiBondCon2,J0_2. MultiBondCon1); connect(MultiBond8.MultiBondCon2, J0_2.MultiBondCon3); connect(MultiBond8.MultiBondCon1, Se1.MultiBondCon1); connect(MultiBond5.MultiBondCon2, J0_2.MultiBondCon2); connect(J0_1.MultiBondCon2, MultiBond2.MultiBondCon2); connect(MBG2Mech1.frame_b, frame_b); connect(MultiBond3.MultiBondCon1, J0_1.MultiBondCon4); connect(R1.MultiBondCon1, MultiBond3.MultiBondCon2); connect(MultiBond4.MultiBondCon1, Mech2MBG1.MultiBondConRot); connect(MultiBond5.MultiBondCon1, MBG2Mech1.MultiBondConRot); connect(MultiBond2.MultiBondCon1, MBG2Mech1.MultiBondConTrans); connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondConTrans); end Damping;
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.
Name | Default | Description |
---|---|---|
animation | true | animate spring |
c | 0 | Spring constant [N/m] |
s0 | 0 | rest length of spring [m] |
Advanced | ||
s_small | 1e-4 | critical Spring length [m] |
Animation | ||
if animation = true | ||
width | world3D.defaultForceWidth | Width of spring [m] |
coilWidth | width/5 | Width of spring coil [m] |
numberOfWindings | 5 | Number of spring windings |
color | world3D.defaultForceElementC... | Color of spring |
model Spring "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= 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"; SI.Distance s; SI.Distance d[3]; SI.Force f[3]; protected outer World3D world3D; inner Defaults MBG_defaults(n=3); Interfaces.MBG2Mech MBG2Mech1; Interfaces.Mech2MBG Mech2MBG1; Junctions.J0 J0_1(n=3); Junctions.J0 J0_2(n=3); Sources.Se Se1(n=3, e0={0}); Sources.mSe mSe1(n=3); Bonds.MultiBond MultiBond8; Bonds.MultiBond MultiBond3; Bonds.MultiBond MultiBond1; Bonds.MultiBond MultiBond2; Bonds.MultiBond MultiBond4; Bonds.MultiBond MultiBond5; Bonds.Utilities.MultiBondTail MultiBondTail2; Bonds.Utilities.MultiBondTail MultiBondTail1; Bonds.Utilities.MultiBondTail MultiBondTail3; Bonds.Utilities.MultiBondTail MultiBondTail4; parameter Integer ndim=if world3D.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=d, each widthDirection={0,0,1}, each r_shape={0,0,0}, each r=MBG2Mech1.x, each extra=numberOfWindings, each R=MB.Frames.Orientation(T=identity(3),w=zeros(3))); equation d = Mech2MBG1.x - MBG2Mech1.x; s = sqrt(d*d); f = if s >= s_small then c*d - s0*c*(d/s) else c*d - s0*c*(d/s_small); mSe1.s = f; connect(Mech2MBG1.frame_a, frame_a); connect(MBG2Mech1.frame_b, frame_b); connect(MultiBond1.MultiBondCon2, J0_1.MultiBondCon1); connect(MultiBond4.MultiBondCon2,J0_2. MultiBondCon1); connect(MultiBond5.MultiBondCon2, J0_2.MultiBondCon2); connect(MultiBond3.MultiBondCon2, J0_1.MultiBondCon4); connect(mSe1.MultiBondCon1, MultiBond3.MultiBondCon1); connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondConTrans); connect(MultiBond8.MultiBondCon2, J0_2.MultiBondCon3); connect(Se1.MultiBondCon1, MultiBond8.MultiBondCon1); connect(MultiBond5.MultiBondCon1, MBG2Mech1.MultiBondConRot); connect(MultiBond4.MultiBondCon1, Mech2MBG1.MultiBondConRot); connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondConTrans); connect(MultiBond2.MultiBondCon1, J0_1.MultiBondCon2); end Spring;
The force is resolved in the inertial system
Name | Default | Description |
---|---|---|
f[3] | {1,0,0} | world force [N] |
model WorldForce "world force acting on frame" import SI = Modelica.SIunits; import MB = Modelica.Mechanics.MultiBody; Interfaces.Frame_b frame_b; parameter SI.Force f[3] = {1,0,0} "world force"; protected outer World3D world3D; inner Defaults MBG_defaults(n=3); Interfaces.MBG2Mech MBG2Mech1; Bonds.MultiBond MultiBond1; Sources.Se Se1(n=3, e0=f); Sources.Se Se2(n=3, e0={0}); Bonds.MultiBond MultiBond4; equation connect(MBG2Mech1.frame_b, frame_b); connect(MultiBond1.MultiBondCon2, MBG2Mech1.MultiBondConRot); connect(Se2.MultiBondCon1, MultiBond1.MultiBondCon1); connect(MultiBond4.MultiBondCon2, MBG2Mech1.MultiBondConTrans); connect(Se1.MultiBondCon1, MultiBond4.MultiBondCon1); end WorldForce;
The torque is resolved in the inertial system
Name | Default | Description |
---|---|---|
t[3] | {1,0,0} | world force [N.m] |
model WorldTorque "world torque acting on frame" import SI = Modelica.SIunits; import MB = Modelica.Mechanics.MultiBody; Interfaces.Frame_b frame_b; parameter SI.Torque t[3] = {1,0,0} "world force"; protected outer World3D world3D; inner Defaults MBG_defaults(n=3); Interfaces.MBG2Mech MBG2Mech1; Bonds.MultiBond MultiBond1; Sources.Se Se1(e0={0}); Sources.Se Se2(n=3, e0=t); Bonds.MultiBond MultiBond4; Passive.mTF_effort mTF_effort1; Bonds.MultiBond MultiBond2; equation connect(MBG2Mech1.frame_b, frame_b); connect(Se2.MultiBondCon1, MultiBond1.MultiBondCon1); connect(MultiBond4.MultiBondCon2, MBG2Mech1.MultiBondConTrans); connect(Se1.MultiBondCon1, MultiBond4.MultiBondCon1); connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondConRot); connect(mTF_effort1.MultiBondCon2, MultiBond2.MultiBondCon1); connect(mTF_effort1.MultiBondCon1, MultiBond1.MultiBondCon2); connect(mTF_effort1.M, MBG2Mech1.R); end WorldTorque;
The spheres are supposed to suround the two connector with the radii ra and rb.
The collision characteristics can be specified by the coefficients of the virtual spring and damper.
Name | Default | Description |
---|---|---|
c | 0 | Spring constant [N/m] |
d | 0 | Damping constant [N.s/m] |
ra | 1 | radius of sphere at frame a [m] |
rb | 1 | radius of sphere at frame b [m] |
Advanced | ||
s_small | 1e-4 | critical Spring length [m] |
model SoftImpuls_SphereSphere "soft impact between two spheres" import SI = Modelica.SIunits; import MB = Modelica.Mechanics.MultiBody; Interfaces.Frame_a frame_a; Interfaces.Frame_b frame_b; parameter Real c( final unit="N/m", final min=0) = 0 "Spring constant"; parameter Real d( final unit="N.s/m", final min=0) = 0 "Damping constant"; parameter SI.Radius ra = 1 "radius of sphere at frame a"; parameter SI.Radius rb = 1 "radius of sphere at frame b"; parameter SI.Position s_small = 1e-4 "|Advanced||critical Spring length"; // parameter Real muR "friction coefficient"; // parameter SI.Velocity vAdhesion "range of Adhesion"; SI.Distance s; SI.Distance r[3]; Real eR[3]; SI.Force fI[3]; // SI.Force fR[3]; // SI.Velocity deltaV[3]; // SI.Velocity vR[3]; protected outer World3D world3D; protected inner Defaults MBG_defaults(n=3); protected Interfaces.MBG2Mech MBG2Mech1; Interfaces.Mech2MBG Mech2MBG1; protected Junctions.J0 J0_1(n=3); Junctions.J0 J0_2(n=3); Sources.Se Se1(n=3, e0={0}); Sources.mSe mSe1(n=3); Bonds.MultiBond MultiBond8; Bonds.MultiBond MultiBond3; Bonds.MultiBond MultiBond1; Bonds.MultiBond MultiBond2; Bonds.MultiBond MultiBond4; Bonds.MultiBond MultiBond5; Bonds.Utilities.MultiBondTail MultiBondTail2; Bonds.Utilities.MultiBondTail MultiBondTail1; Bonds.Utilities.MultiBondTail MultiBondTail3; Bonds.Utilities.MultiBondTail MultiBondTail4; equation r = Mech2MBG1.x - MBG2Mech1.x; s = sqrt(r*r); eR = if s >= s_small then r/s else r/s_small; fI = if (s-ra-rb) < 0 then c*(s-ra-rb)*eR else zeros(3); // deltaV = Mech2MBG1.MultiBondConTrans.f - MBG2Mech1.MultiBondConTrans.f; // vR = deltaV - eR*(deltaV*eR); // fR = if sqrt(vR*vR) > vAdhesion then sqrt(fI*fI)*muR*vR/sqrt(vR*vR) else // sqrt(fI*fI)*muR*(vR/vAdhesion); // mSe1.s = fI+fR; mSe1.s = fI; connect(Mech2MBG1.frame_a, frame_a); connect(MBG2Mech1.frame_b, frame_b); connect(MultiBond1.MultiBondCon2, J0_1.MultiBondCon1); connect(MultiBond4.MultiBondCon2,J0_2. MultiBondCon1); connect(MultiBond5.MultiBondCon2, J0_2.MultiBondCon2); connect(MultiBond3.MultiBondCon2, J0_1.MultiBondCon4); connect(mSe1.MultiBondCon1, MultiBond3.MultiBondCon1); connect(MultiBond1.MultiBondCon1, Mech2MBG1.MultiBondConTrans); connect(MultiBond8.MultiBondCon2, J0_2.MultiBondCon3); connect(Se1.MultiBondCon1, MultiBond8.MultiBondCon1); connect(MultiBond5.MultiBondCon1, MBG2Mech1.MultiBondConRot); connect(MultiBond4.MultiBondCon1, Mech2MBG1.MultiBondConRot); connect(MultiBond2.MultiBondCon2, MBG2Mech1.MultiBondConTrans); connect(MultiBond2.MultiBondCon1, J0_1.MultiBondCon2); end SoftImpuls_SphereSphere;