Processing math: 100%

FVSDOF-SYS Example 2 - Natural period of spring max system

Consider a spring mass system with natural period of 0.45 [s]. Calculate the new period if a spring constant is icreased by 10, 50, 100, 200, 500\%. τ1=0.21[s]=2πmkτ10=2πm1.1k=2π(0.21k2π)1.1k=0.21k1.1k=0.20022714374157435[s] τ20=2πm1.5k=2π(0.21k2π)1.5k=0.21k1.5k=0.17146428199482247[s] τ30=2πm2k=2π(0.21k2π)2k=0.21k2k=0.14849242404917495[s] τ40=2πm3k=2π(0.21k2π)3k=0.21k3k=0.12124355652982141[s] τ50=2πm5k=2π(0.21k2π)5k=0.21k5k=0.09391485505499116[s]

Solution in Pyhton

For this example we will also need two libraries matplotlib and numpy.
import numpy as np
import matplotlib.pyplot as plt
We have a constant value (natural period) that we will define as:
tau_0 = 0.21
Then we will define the increase of the spring constant or spring stiffness as list:
Spring_Const = [1.1, 1.5, 2, 3, 5]
Then we will define the empty list named tau_res.
tau_res = []
Now we will create a for loop that will calculate new natural period and store its value into the taur_res list.
for i in range(len(Spring_Const)): 
    res = tau_0/np.sqrt(Spring_Const[i])
    tau_res.append(res)
The np.sqrt is the square root function from the numpy library. Now we can plot results in which we will show how natural period changes versus spring constant inscrease:
plt.rcParams["font.family"] = "Times New Roman"
SMALL_SIZE = 20
MEDIUM_SIZE = 22
BIGGER_SIZE = 24
plt.rc('font', size=SMALL_SIZE) # controls default text sizes
plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title
SpringPER = [10,50,100,200,500]
plt.figure(figsize=(12,8))
plt.plot(SpringPER, tau_res)
plt.xlabel("Spring Constant Increase [%]")
plt.ylabel("Natural period [s]")
plt.grid(True)
plt.xlim(0,500)
plt.ylim(0,0.21)
plt.show()
2024-02-05T05:34:25.097148 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Figure 1 - The natural period versus spring constant increase.
As seen from Figure 1 as the spring constant or spring stiffness increases the natural period of the system decreases from initial 0.2002 up to 0.09 [s] when spring constant increased from 10 up to 500%.

Nema komentara:

Objavi komentar