A body of 50 [N] weight is suspended from a spring with stiffness of 4000 [N/m] and is subjected to a harmonic force of amplitude 60 [N] and frequency 6[Hz]. Calculate:
- The extension of the spring due to the suspended body.
- The static displacement of the spring due to the maximum applied force,
- the amplitude of forced motion of the weight.
The extension of the spring due the suspended body.
The weight of the body is 50[N] so we can write:
$$ G = 50.$$
The spring stiffness is equal to 4000 [N/m] which can be written as:
$$ k = 4000.$$
The extension of the spring due to the suspension of the body is calculated using the expression:
$$ \delta = \frac{G}{k} $$
Inserting the values in previous equation we obtain the extension:
$$ \delta = \frac{G}{k} = \frac{50}{4000} = 0.0125 [\mathrm{m}]$$
Solution in Python
The calculation of the deflection in Python is pretty simple we will start by dfining the weight and spring stiffness.
G = 50
k = 4000
Now when all input variables of extension formula is defined we can calcualte the extension.
delta = G/k
Now we can print out the result.
print("delta = {} [m]".format(delta))
The entire code for calculation of the extension is given below.
G = 50
k = 4000
delta = G/k
print("delta = {}[m]".format(delta)")
When the previous code is executed the following output is obtained.
delta = 0.0125[m]
The static displacement of the spring due to the maximum applied force,
The maximum applied force is 60 [N].
$$ F_{max} = 60 [N] $$
The spring stiffness is equal to 4000 [N/m].
$$ k= 4000 [N/m] $$
The static displacement can be calculated using formula.
$$ \delta_{st} = \frac{F_{max}}{k}$$
Inserting the values inside the previous expression the following solution is obtained.
$$ \delta_{st} = \frac{F_{max}}{k} = \frac{60}{4000} = 0.015 [m]$$
Solution in Python
To calculate the static displacement we need to define the maximum force and the constant.
F_max = 60
k = 4000
delta_st = F_max/k
print("F_max = {}".format(F_max))
The amplitude of forced motion of the weight
The amplitude of the forced motion of the body with 50 N weight is calculated using the expression:
$$ X = \delta_{st}\left|\frac{1}{1-\left(\frac{\omega}{\omega_n}\right)^2}\right|$$
where \(\omega\) is the given frequency (6 [Hz]) the \(\omega_n\) is calculated using the expression:
$$ \omega_n = \sqrt{\frac{k}{m}} = \sqrt{\frac{4000\cdot 9.81}{50}} = 28.0143 \left[\frac{\mathrm{rad}}{\mathrm{s}}\right]$$.
The \(\delta_{st}\) is static displacement calculated in previous step. Now we have all the data to calculate the amplitude:
$$ X = 0.015\frac{1}{1-\left(\frac{37.6992}{28.0143}\right)^2} = 0.018.$$
Solution in Pyhton
First we need to conver the natural frequency of 6 [Hz] to natural angular frequency.
import numpy as np
f = 6
omega = 2*np.pi*f
print("omega = {}[rad/s]".format(omega))
For omega_n we need spring constant and the mass. However, we dont have the mass so we will need to divide the weight by the 9.81 [m/s^2].
G = 50
g = 9.81
m = G/g
omega_n = np.sqrt(k/m)
print("omega_n = {}".format(omega_n))
Now we have all the data to calculate the amplitude X.
delta_st = 0.015
X = (1)/(1-(omega/omega_n)**2)
print("X = {}".format(X))