Search code examples
modelicaopenmodelica

on the using of MassWithStopAndFriction and hard stops in OpenModelica


I have a question about hard stops in Modelica.Mechanics.Translational.Components.MassWithStopAndFriction. As I can understand mass should not move outside interval (smin, smax) But it actually does in my example that I include here:

model ActuatorMechanics 
  Modelica.Mechanics.Translational.Sources.Force force; 
  Modelica.Mechanics.Translational.Components.MassWithStopAndFriction mass(m=1,F_prop=0,F_Coulomb=10, smax=0.1, smin=0, L=0.01); 
  Modelica.Mechanics.Translational.Components.Spring spring(c=1000); 
  Modelica.Mechanics.Translational.Components.Fixed fixed; 
  Modelica.Mechanics.Translational.Sensors.PositionSensor sens_pos; 
equation 
  connect(force.flange, mass.flange_a); 
  connect(mass.flange_b, spring.flange_a); 
  connect(spring.flange_b, fixed.flange); 
  connect(sens_pos.flange, mass.flange_a); 
  force.f = 100; 
end ActuatorMechanics; 

simulate(ActuatorMechanics)
plot(mass.flange_a.s)

Am I doing something wrong?


Solution

  • This was a bug in OpenModelica. It's working since r11060 and a regression test has been added.