Determine the equivalent spring constant of the system shown in Figure 1.
Figure 1 - Spring system
From Figurre 1 it can be noticed that two springs with stiffness of \(k_1\) are parallely connected springs. So we can write the following:
$$k_{eq1} = k_1 + k_1 = 2k_1$$
These two springs are connected in series with a spring with stiffness \(k_2\). The equivalent stiffness of these three springs are:
$$\begin{eqnarray}\frac{1}{k_{eq2}} &=& \frac{1}{k_{eq1}} + \frac{1}{k_2} = \frac{1}{2k_1} + \frac{1}{k_2}\\ \frac{1}{k_{eq2}} &=& \frac{k_2 + 2k_1 }{2k_1k_2}\\k_{eq2} &=& \frac{2k_1k_2}{k_2 + 2k_1}\end{eqnarray}$$
The springs with equivalent stiffness of \(k_3\) are connected in parallel. The stiffness of these two springs can be written as:
$$ k_{eq3} = k_3 + k_3 = 2k_3$$
These two springs are connected in series with previous springs \(k_{eq2}\).
$$\begin{eqnarray}\frac{1}{k_{eq31}} &=& \frac{1}{k_{eq3}} + \frac{1}{k_{eq2}} = \frac{1}{2k_3} + \frac{1}{2k_1} + \frac{1}{k_2}\\ \frac{1}{k_{eq31}} &=& \frac{1}{2k_3} + \frac{k_2 + 2k_1 }{2k_1k_2}\\ \frac{1}{k_{eq31}} &=& \frac{k_1k_2 + k_2 k_3 + 2k_1k_3}{2k_1k_2k_3}\end{eqnarray}$$
The spring system (\(k_{eq31}\)) is connected in parallel with spring of stiffness \(k_4\) so we can write the following:
$$k_{eq4} = k_{eq31} + k_{4}$$
The previous system is connected in serial with the spring \(k_5\). So the \(k_{eq}\) is equal to:
$$\begin{eqnarray}\frac{1}{k_{eq}} &=& \frac{1}{k_{eq4}} + \frac{1}{k_5}\\ \frac{1}{k_{eq}} &=& \frac{k_5 + k_{eq4}}{k_{eq4}k_5}\\
k_{eq} &=& \frac{k_{eq4}k_5}{k_5 + k_{eq4}}\\ k_{eq} &=& \frac{(k_{eq31} + k_4)k_5}{k_5 + k_4 + k_{eq31}}\\
k_{eq} &=& \frac{\left(\frac{2k_1k_2k_3}{k_1k_2 + k_2k_3 + 2k_1k_3} + k_4\right)k_5}{k_5 + k_4 + \frac{2k_1k_2k_3}{k_1k_2 + k_2k_3 + 2k_1k_3}}\\ k_{eq} &=& \frac{k_2k_3k_4k_5 + 2k_1k_3k_4k_5 + k_1k_2k_4k_5 + 2k_1k_2k_3k_5}{k_2k_3k_4 + k_2k_3k_5 + 2k_1k_3k_4 + 2k_1k_3k_5 + k_1k_2k_4 + k_1k_2k_5 + 2k_1k_2k_3}\end{eqnarray}$$
To solve this example in Python the sympy library is required. The sympy library usually comes with the the anaconda python distribution. However, if you have installed only Python then you have to install the sympy library.
The first step is to create the symbols \(k_1,...,k_5\).
Solution in Python
To solve this example in Python the sympy library is required. The sympy library usually comes with the the anaconda python distribution. However, if you have installed only Python then you have to install the sympy library.
pip install sympyWhen sympy libarary is installed type in the follwing code in Python.
from sympy import symbols, simplifyThe symbols function will be used to create the variables in this case the spring constants \(k_1, k_2,..., k_5\). The simplify function will be used to simplify the equations of created equivalent spring stiffness.
The first step is to create the symbols \(k_1,...,k_5\).
k1,k2,k3,k4,k5 = symbols('k1,k2,k3,k4,k5')After symbols are created we can start solving the example step by step. The \(k_{eq1}\) is the equivalent stiffness of two springs \(k_1\) in parallel configuration.
keq1 = k1 + k1The output of the previous code will be:
print("keq1 = {}".format(keq1))
keq1 = 2*k1The \(k_2\) spring is connected with the two \(k_1\) springs in serial configuration. So we have two \(k_1\) spring in parallel cofiguration and the \(k_2\) spring connected with the previous system in the serial configuration.
keq2 = simplify(1/(1/keq1 + 1/k2))The result of the previous block of code for keq2 is:
print("keq2 = {}".format(keq2))
keq2 = 2*k1*k2/(2*k1 + k2)After the \(k_2\) spring there are two \(k_3\) springs connceted in parallel. The equivalent spring stiffness of these two spring can be calculated as:
keq3 = k3 + k3The output is given below:
print("keq3 = {}".format(keq3))
keq3 = 2*k3The keq2 and keq3 together are connected in serial configuration. The equivalent stiffness of such system (keq31) can be written as:
keq31 = simplify(1/(1/keq3 + 1/keq2))The otuput is given below.
print("keq31 = {}".format(keq31))
2*k1*k2*k3/(k1*k2 + k3*(2*k1 + k2))The entire system keq31 is placed in parallel configuration with k4 spring. The equivalent stiffness keq4 of such system can be wrritten as:
keq4 = simplify(keq31 + k4)The output of previous two lines of code is given below.
print("keq4 = {}".format(keq4))
keq4 = (2*k1*k2*k3 + k4*(k1*k2 + k3*(2*k1 + k2)))/(k1*k2 + k3*(2*k1 + k2))The previous system keq4 is connected with the k5 in the serial configuration. The spring stiffness of the entire system keq can be calculated as:
keq = simplify(1/(1/keq4 + 1/k5))The spring stiffness of the entire system is obtained after previous two lines of code are exectued.
print("keq = {}".format(keq))
keq = k5*(2*k1*k2*k3 + k4*(k1*k2 + k3*(2*k1 + k2)))/(2*k1*k2*k3 + k4*(k1*k2 + k3*(2*k1 + k2)) + k5*(k1*k2 + k3*(2*k1 + k2)))