I am having trouble constraining translational motion using a prismatic joint in Modelica. My goal is to make a body stop after it has moved a certain distance (x meters). Ideally, I want the motion to stop suddenly, but it’s also acceptable if it stops gradually.
Here’s what I have tried so far:
-
I am using a BodyBox, a Prismatic joint, and a constant Force to drive the motion.
-
I have tried implementing a reverse force to stop the motion. While it stops, the body then moves in the reverse direction because the force is constant.
-
I have successfully implemented stopping the exertion of force after the body moves 1 meter, but since the force was already applied, it stops accelerating, but the velocity remains the same.
I am aware of using a damper, but I need the damper to only engage after the body has moved x meters. I don’t want the damper to affect the system from the beginning.
Could someone provide a solution or guide me on how to implement this in Modelica? A graphical implementation would be very helpful. How can I gradually stop the motion without causing the body to move in the reverse direction or maintain its velocity?
Thank you!
above stops force exertion after 1m, below exerts force in reverse-direction after 1m
xrp. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.