Mass-Spring-Damper time response to step input

AI Thread Summary
The discussion focuses on solving a mass-spring-damper system's time response to a step input of 10 cm in an automotive dynamics context. The system is defined by a differential equation with specific initial conditions, where the mass is at equilibrium initially. The user encounters errors while using Wolfram Mathematica's DSolve and NDSolve functions, particularly related to variable assignments and function arguments. A key correction is identified, emphasizing the need to include the argument for the function x in the differential equation. The user aims to extend the solution to multi-degree-of-freedom systems for a comprehensive vehicle model.
hhspunter
Messages
1
Reaction score
0

Homework Statement



I am going to do some paraphrasing here, because the question is for automotive dynamics class, but is a pretty general question in its simplest form (1 degree of freedom):

Find the time response to a step input of y=10cm.

This is for a vertically oriented mass-spring-damper system, where the spring and damper are parallel, and the mass rests on top of the spring.

08-14-09_0026.jpg

Sorry for the poor quality, I can't find my camera so I had to use my phone.

Variables are:
x[t] and y[t], and their derivatives.
x refers to the position of the sprung mass where x=0 means the system is in equlibrium.
y refers to the position of the bottom of the spring.

Initial conditions:

x[0]=0
x'[0]=0.

For t>0, y=0.1 (in meters). For t less than/equal to 0, y=0.

Homework Equations



mx''+cx'+kx=ky+cy'


The Attempt at a Solution



I am using Wolfram Mathematica, so to solve the differential equation I assign values for m, c, and k. I use NDSolve, then write the equation, the initial conditions (x[0]=0, x'[0]=0), tell it to solve for x, and for 0<t<3. Now y'[t]=0 for t>0, so the cy' portion of the equation can be dropped. If I assign a value of 0.1 to y, and use DSolve, it gives an error, telling me that "0 cannot be used as a valiable" (it is getting the 0 from when I specify 0<t<3, verified by changing the lower bound of t). If I do not assign a value to y, I get the same result (after clearing all variables). If I use NDSolve, with or without an assigned value to y, I get an error message that "The fuction x appears with no arguements."

Here is my code, if it helps:
m = 1440/4;
k = 358*9.81/.15;
c = 1855;
y = 0.1;
DSolve[{m*x''[t] + c*x'[t] + k*x == k*y, x[0] == 0,
x'[0] == 0}, x, {t, 0, 3}]




Expansion of the problem
Now, I also need to be able to solve this same problem (step input of y=0.1meters) for multiple DOF systems. If I can solve it for a single DOF situation, I can develop similar equations of motion using matrices for m, c, and k. Hopefully I'll be able to apply the same strategy that ends up working for the 1DOF problem to the multiple DOF system (I need to go all the way up to a full-car model, with a double MSD in series on each corner of the car, plus a front and rear roll stiffness, but again I have the similar equations of motion as above).
 
Physics news on Phys.org
hhspunter said:
If I use NDSolve, with or without an assigned value to y, I get an error message that "The fuction x appears with no arguements."
That's because you forgot the argument for one occurrence of function x in DSolve. The needed correction is shown below in red
hhspunter said:
DSolve[{m*x''[t] + c*x'[t] + k*x[t][/color] == k*y, x[0] == 0,
x'[0] == 0}, x, {t, 0, 3}]
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top