Simple Dynamics Help: Modeling a Rod-Mass-Spring System in C++

  • Thread starter weiszed
  • Start date
  • Tags
    Dynamics
In summary, the system oscillates back and forth between x=0 and a displacement of a few cm due to the friction between the mass and the pvc sleeve.
  • #1
weiszed
11
0
My model is similar to a piston: a rod is connected to a steel cylindrical mass within a pvc pipe. The other end of the mass is connected to a spring which is fixed at its other end. One pulls on the rod to create tension and a displacement of a few centimeters while their arm is connected to a device that measures voltage potentials. I then have to model the system in C++ and do the same voltage potential test with a haptic device to determine if the system is a good simulation.

My problem arises in that it has been a considerable amount of time since I have taken dynamics. I realize this is a relatively simple problem, but I have not used it since. Can anyone assist me with the characteristic equations for this system?

I need to be reminded how to model friction, intertia, displacement, etc. Pulling forces do not exceed 5 N. Probably shouldn't have sold that dynamics book after all :-/
 
Engineering news on Phys.org
  • #2
More information would be nice, like is the spring on the top of the system with gravity pulling down on the mass? so you pull down on the mass, decompress the spring, then let go and it oscillates to a stop? is there friction between the mass and the pvc sleeve, is the sleeve just there to keep it from bouncing all over the place? also the mass is solid right? and at the top of the pvc sleeve, there is adequate room for air to move in and out, making a more ideal free space model? We would also need to know the spring constant and length, to fulfill Hooke's law.


I would measure the spring length, then connect the mass. the mass is going to pull on the spring (if the spring is mounted at the top). (the restoring force of a spring is proportional to its total elongation)

If your system is similar to what i picture, you should be able to google a differential equation example of a stretched spring.


sorry if that didn't help, just bored answering post that have no replies.
 
  • #3
hxtasy said:
More information would be nice, like is the spring on the top of the system with gravity pulling down on the mass? so you pull down on the mass, decompress the spring, then let go and it oscillates to a stop? is there friction between the mass and the pvc sleeve, is the sleeve just there to keep it from bouncing all over the place? also the mass is solid right? and at the top of the pvc sleeve, there is adequate room for air to move in and out, making a more ideal free space model? We would also need to know the spring constant and length, to fulfill Hooke's law.


I would measure the spring length, then connect the mass. the mass is going to pull on the spring (if the spring is mounted at the top). (the restoring force of a spring is proportional to its total elongation)

If your system is similar to what i picture, you should be able to google a differential equation example of a stretched spring.


sorry if that didn't help, just bored answering post that have no replies.

Sorry, I didn't make it clear enough. There is a good amount of friction from the fit so there is no oscillation, but the spring is strong enough to pull the mass back to or near enough to the starting position. The entire system is horizontal as well. The mass is made of 1040 steel so I'm having trouble finding the coefficient of friction between that and PVC since the two aren't commonly paired. The end of the "piston" is open so air pressure is negligible. The spring constant is around .5 lbf/in and about an inch long.

I am making some progress with the characteristic equation now but am having trouble with the coefficient of friction component (mu*N). Any idea on how to compute the normal force from an interference fit?
 
  • #4
Hmm can I use Lame's equations for the interference stress then multiply by the surface area for the normal force?

That would just give me F(t) = mass·dv/dt + k·x + mu·N
Did I leave anything out?
 
  • #5
So you are going to pull on this thing, and the spring is going to pull it back to the X not startin posistion? in this case i would imagine it would be moving really slow back to the start posisition? I think with that kind of friction I'm no longer sure how to approach the problem.

You are simulating this in C++, how? just mathematically?
 
  • #6
So initially it is at rest (x=0) and I pull on it so that it translates a few cm's. I then pull less and less on it until it returns to x=0 at which point the amount of friction present disallows oscillation. The point of this is to measure the voltage potential in the forearm muscles during the linear action.

As far as the C++, yeah. The program's name I believe is Open Haptic and it needs mathematical constraints before simulation is possible.
 
  • #7
Wait so are you acuatlly measuring EMG signals in your arm? Why don't you just hold some weights, a one pound weight, a two pound weight, etc. You don't need to move your arm nessesarily to get a voltage change, the force that your arm has to exert is proportional to the nerve signals sent from your brain.
 
  • #8
The experiment is an analysis of the hypothesis that simple dynamic systems with < 3 degrees of freedom can be correctly simulated by haptic simulations. It's an opener to a catheter insertion simulation research project.
 
  • #9
Yeah that is not in my area of knowledge. It seems like it is going to get pretty sophisticated to measure that small of a movement change. I know one person at our college is doing a project with a prosthetic arm, and went through a lot just to get it to move up and down with impulses from your brain to an EMG sensor on your forearm.
 
  • #10
Hi weiszed,
Not too sure exactly what you're doing, but sounds like you're trying to determine the force on a piston that has weight, friction, an interference fit, a spring on it, ... (did I miss anything?)

Can you simply measure it? Get a weight scale (fish scale for example) and apply the load in the same way you would during the test. For things like this, it might be easier just to measure it.
 
  • #11
I'm sorry, did I say interference fit? I meant slip fit. I'm simply trying to express the force exerted as a function of friction, spring coefficient, velocity, etc. I already know the general amount of force that will be exerted but I have to tell a computer how to react to input with a formula.
 

1. What is a rod-mass-spring system?

A rod-mass-spring system is a type of mechanical system that consists of a mass attached to a rod and connected to a spring. This system is commonly used to model the motion of objects in one-dimensional space, such as pendulums and springs.

2. How can I model a rod-mass-spring system in C++?

To model a rod-mass-spring system in C++, you will need to use the principles of simple dynamics and Newton's laws of motion. You will also need to understand how to use vectors and matrices to represent the system's motion and calculate the forces acting on the system.

3. What are the key components of a rod-mass-spring system?

The key components of a rod-mass-spring system include the mass, the rod, and the spring. The mass represents the object being modeled, while the rod and spring act as the connections between the mass and the fixed point.

4. How can I simulate the motion of a rod-mass-spring system in C++?

To simulate the motion of a rod-mass-spring system in C++, you will need to use numerical integration techniques, such as Euler's method or Runge-Kutta methods. These methods allow you to calculate the position and velocity of the mass at each time step, based on the forces acting on the system.

5. What are some real-world applications of rod-mass-spring systems?

Rod-mass-spring systems have a wide range of real-world applications, including in shock absorbers, suspension systems, and mechanical watches. They are also commonly used in physics experiments and simulations to study the behavior of dynamic systems.

Similar threads

Replies
12
Views
761
  • Advanced Physics Homework Help
Replies
15
Views
2K
  • Mechanical Engineering
Replies
16
Views
1K
  • Mechanical Engineering
Replies
9
Views
1K
Replies
9
Views
888
  • Introductory Physics Homework Help
Replies
8
Views
257
Replies
4
Views
906
  • Mechanical Engineering
Replies
2
Views
2K
Replies
6
Views
1K
  • STEM Academic Advising
Replies
4
Views
724
Back
Top