1

I was wondering how a mechanical stop can be modeled most efficiently.

I do a hydraulic simulation with a controlled hydraulic cylinder in OpenModelica. For the hydraulic cylinder I use the sweptVolume model from the Modelica Standard Library.
What bugs me about this model is that there is no mechanical stop if the piston reaches the bottom of the cylinder.

I tried several ideas with no good result. I tried to reset the displacement of the piston to zero, if it hits the bottom, via an if-expression. But this is not really a good option due to the fact that the volume is calculated using the piston's displacement.

I then tried to introduce a force that equals the force applied to the piston, if the piston hits the stop. This option didn't work either, because in this case the pressure inside the cylinder can not be calculated.

The third try was to use the MSL model of MassWithStopAndFriction linked to the translational flange of the sweptVolume model, but this model seems to be broken for me.

Now I count on you as a competent community to bring in some more ideas for me to test.

jrhodin
  • 659
  • 5
  • 14
  • Looks this question is more suitable for mechanical / dynamics flavour of stack exchange – Pramod S. Nikam Jul 29 '15 at 12:00
  • Have you tried with a "when" statement with reset on the displacement instead of an "if" expression? With reset I mean reset(displacement, 0). – Adrian Pop Jul 29 '15 at 12:47
  • 1
    @Orion: I thought most Modelica questions are in this flavour of stack exchange
    – Matthias Mayr Jul 29 '15 at 15:00
  • @Adrian Pop: Thanks for this suggestion. I tried the "when" statement and used reinit to set the displacement of the piston to zero. The when clause actually kicks in, but does not stop the movement of the piston. I guess the piston displacement is set to zero, but the force applied to it is not, so the piston moves on. – Matthias Mayr Jul 29 '15 at 15:06
  • Maybe then reinit the force too? – Adrian Pop Jul 29 '15 at 19:03
  • Did it, does not have any effect to to the force. I guess, because it is coming from another model. – Matthias Mayr Jul 30 '15 at 08:39

1 Answers1

1

Depending on your application, you may deploy the Hydraulics library? The library aims to model (compressible) fluid power systems and contains cylinders with end-stops. Its scope is different than the Fluid package you are using. Using when and/or if statements for this task, I'd strongly discourage from experience. You may get one cylinder to work, but using that in a larger system will definitely get you into numerical problems. Have a look at the Mechanics package and analyse if the ElastoGap can be of any use to you.

edren
  • 11
  • 2