Ok, I've solved it but
ohh boy is it a
headache... I didn't want to, but I've solved it using multivariate Newton-Raphson method.
I decided to pick two equations that included the following variables:
- ## T_1## or ##T_2## depending on which is higher as this is a limiting factor. As it has been proved that the higher pole holds the highest tension ##(N)##,
- ##\Delta x##, is the horizontal separation between the poles##(m)##,
- ##\Delta y##, is the vertical separation between the poles##(m)##,
- ##w_o##, is the per unit mass ##(kg/m)##,
- ##g##, gravity ##(9.81 \frac {m} {s^2})##.
The unknowns:
- ##s##, the cable length ##(m)##,
- ##a##, the catenary constant ##unitless##,
- ##x_1## and ##x_2##, the horizontal length between the lowest point of the catenary ##(m)##.
These are the only variables I am to use, the rest are assumptions except for the height of each pole (##y_1## or ##y_2##), which should not affect the problem as the equation for a catenary given in the form ##y = a \cosh {\frac {x} {a}}##, if calculated at each end of the catenary, ##x_1## and ##x_2## does not yield the height ##y_1## and ##y_2## respectfully.
In reality, the first equation is derived from :
$$\begin{align} \nonumber
y(x) & = a \cosh {\frac {x} {a}} + y_0 \\
y_2 & = a \cosh {\frac {x_2} {a}} + y_0\\
y_1 & = a \cosh {\frac {-x_1} {a}} + y_0\\
\Delta x & = x_2 - x_1 \\
\Delta y & = y_2 - y_1
\end{align}$$
The first equation comes from substituting Equation ##(7)## and ##(8)## into ##(10)##, which yields the following:
$$\begin{align}
\Delta y & = a \cosh {\frac {x_2} {a}} - a \cosh {\frac {-x_1} {a}} \\
\end{align}$$
After substituting in ##\Delta x - x_2## for ##-x_1## (##x_1## was chosen here arbitrarily):
$$\begin{align}
\Delta y & = a \cosh {\frac {x_2} {a}} - a \cosh {\frac {\Delta x - x_2} {a}} \\
\end{align}$$
The next equation derives from the summation of the ##y## components of each pole's tension. We know that the summation of the weight of the catenary, ##W = w_o gs## is:
$$\begin{align}
W & = w_o g s \\
T_{1y} & = T_1 \sin {\theta_1} \\
T_{2y} & = T_2 \sin {\theta_2} \\
W & = T_{1y} + T_{2y}\\
w_o g s & = T_1 \sin {\theta_1} + T_2 \sin {\theta_2} \\
\end{align}$$
Given that the summation of horizontal forces on the catenary equal zero, another substitution can be made to reduce number of variables:
$$\begin{align}
T_{1x} & = T_1 cos(\theta_1) \\
T_{2x} & = T_2 cos(\theta_2) \\
\sum {T_x} & = 0 \\
T_1 cos(\theta_1) - T_2 cos(\theta_2) & = 0\\
T_2 cos(\theta_2) & = T_1 cos(\theta_1) \\
T_2 = T_1 \frac {cos(\theta_1)} {cos(\theta_2)} \\
\end{align}$$
Substitute ##T_1 \frac {cos(\theta_1)} {cos(\theta_2)}## for ##T_2## to get the following equation:
$$\begin{align}
w_o g s & = T_1 \sin {\theta_1} + T_1 \frac {cos(\theta_1)} {cos(\theta_2)} \sin {\theta_2} \\
w_o g s & = T_1 \sin {\theta_1} + T_1 \cos{\theta_1} \tan{\theta_2} \\
\end{align}$$
Now, there is a ways to go before this equation is complete, we still have:
- the two angles, ##\theta_1## and ##\theta_2## and
- the cable length, ##s##.
To eliminate the cable length, the length of the cable from the lowest point to one of the poles is generically given by ## s = a \sinh {\frac {x} {a}}##. By adding the two sides of the cable together, the following equation is yielded:
$$\begin{align}
s_2 & = a \sinh {\frac {x_2} {a}} \\
s_1 & = a \sinh {\frac {-x_1} {a}} \\
s & = s_1 + s_2 \\
s & = a \sinh {\frac {x_2} {a}} + a \sinh {\frac {-x_1} {a}}\\
s & = a \sinh {\frac {x_2} {a}} + a \sinh {\frac {\Delta x - x_2} {a}}\\
\end{align}$$
Visiting equation ##(25)## and substituting ##(30)## into ##(25)##:
$$
w_o g (a \sinh {\frac {x_2} {a}} + a \sinh {\frac {\Delta x - x_2} {a}}) = T_1 \sin {\theta_1} + T_1 \cos{\theta_1} \tan{\theta_2}
$$
Now comes the use of the
derivative in post #7:
$$
\theta = \tan^{-1} \left(\sinh \left( \frac {x} {a} \right) \right)
$$
Now, this next assumption is bold, but I think is justified given that the line follows a continuous path. Since we have the vertical ##\Delta y## and horizontal ##\Delta x## distance, I assumed that the angle difference between the two is simple and addition of a constant as shown below:
$$
\Delta \theta = \tan^{-1} \left( \frac {\Delta y} {\Delta x} \right)
$$
If pole one were to be higher than pole 2, the slope of the line would be negative, therefore the resultant of the equation above will be negative and the angle of pole 1 will be higher than the angle of pole 2. The following equations can be substituted:
$$\begin{align}
\theta_1 & = \tan^{-1} \left(\sinh \left( \frac {-x_1} {a} \right) \right) - \Delta \theta\\
\theta_2 & = \tan^{-1} \left(\sinh \left( \frac {x_2} {a} \right) \right) + \Delta \theta\\
\theta_1 & = \tan^{-1} \left(\sinh \left( \frac {\Delta x - x_2} {a} \right) \right) - \tan^{-1} \left( \frac {\Delta y} {\Delta x} \right)\\
\theta_2 & = \tan^{-1} \left(\sinh \left( \frac {x_2} {a} \right) \right) + \tan^{-1} \left( \frac {\Delta y} {\Delta x} \right)\\
\end{align}$$
Okay, now we come to substitute in the above equations to get the final equation:
$$\begin{align}
T_1\left(\sin\left(\arctan\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)+\tan\left(\arctan\left(\sinh\left(\dfrac{x_2}{a}\right)\right)+\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)\cos\left(\arctan\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)\right)-gm\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)a+\sinh\left(\dfrac{x_2}{a}\right)a\right) = 0
\end{align}$$
So now that we have our two equations ##(12)## and ##(35)##, we may now take partials with respect to ##a## and ##x_2##.
$$\begin{align}
f_1(a, x_2) & = 0 = T_1\left(\sin\left(\arctan\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)+\tan\left(\arctan\left(\sinh\left(\dfrac{x_2}{a}\right)\right)+\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)\cos\left(\arctan\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\dfrac{y_\text{t}}{x_\text{t}}\right)\right)\right)-gm\left(\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)a+\sinh\left(\dfrac{x_2}{a}\right)a\right)\\
f_2(a, x_2) & = 0 = a\cosh\left(\dfrac{x_2}{a}\right)-a\cosh\left(\dfrac{x_\text{t}-x_2}{a}\right)-y_\text{t}\\
\frac {\delta} {\delta a} \left[ f_1(a, x_2) \right] & =
T_1\left(\dfrac{\left(x_\text{t}-x_2\right)\tan\left(\arctan\left(\sinh\left(\frac{x_2}{a}\right)\right)+\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\sin\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_\text{t}-x_2}{a}\right)}{\left(\sinh^2\left(\frac{x_\text{t}-x_2}{a}\right)+1\right)a^2}-\dfrac{\left(x_\text{t}-x_2\right)\cos\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_\text{t}-x_2}{a}\right)}{\left(\sinh^2\left(\frac{x_\text{t}-x_2}{a}\right)+1\right)a^2}-\dfrac{x_2\sec^2\left(\arctan\left(\sinh\left(\frac{x_2}{a}\right)\right)+\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cos\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_2}{a}\right)}{\left(\sinh^2\left(\frac{x_2}{a}\right)+1\right)a^2}\right)-gm\left(-\dfrac{\left(x_\text{t}-x_2\right)\cosh\left(\frac{x_\text{t}-x_2}{a}\right)}{a}-\dfrac{x_2\cosh\left(\frac{x_2}{a}\right)}{a}+\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)+\sinh\left(\dfrac{x_2}{a}\right)\right)\\
\frac {\delta} {\delta x_2} \left[ f_1(a, x_2) \right] & = T_1\left(\dfrac{\sin\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_\text{t}-x_2}{a}\right)\tan\left(\arctan\left(\sinh\left(\frac{x_2}{a}\right)\right)+\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)}{a\left(\sinh^2\left(\frac{x_\text{t}-x_2}{a}\right)+1\right)}+\dfrac{\cos\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_2}{a}\right)\sec^2\left(\arctan\left(\sinh\left(\frac{x_2}{a}\right)\right)+\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)}{a\left(\sinh^2\left(\frac{x_2}{a}\right)+1\right)}-\dfrac{\cos\left(\arctan\left(\sinh\left(\frac{x_\text{t}-x_2}{a}\right)\right)-\arctan\left(\frac{y_\text{t}}{x_\text{t}}\right)\right)\cosh\left(\frac{x_\text{t}-x_2}{a}\right)}{a\left(\sinh^2\left(\frac{x_\text{t}-x_2}{a}\right)+1\right)}\right)-gm\left(\cosh\left(\dfrac{x_2}{a}\right)-\cosh\left(\dfrac{x_\text{t}-x_2}{a}\right)\right)\\
\frac {\delta} {\delta a} \left[ f_2(a, x_2) \right] & = \dfrac{\left(x_\text{t}-x_2\right)\sinh\left(\frac{x_\text{t}-x_2}{a}\right)}{a}-\dfrac{x_2\sinh\left(\frac{x_2}{a}\right)}{a}-\cosh\left(\dfrac{x_\text{t}-x_2}{a}\right)+\cosh\left(\dfrac{x_2}{a}\right) \\
\frac {\delta} {\delta x_2} \left[ f_2(a, x_2) \right] & =
\sinh\left(\dfrac{x_2}{a}\right)+\sinh\left(\dfrac{x_\text{t}-x_2}{a}\right)\\
\end{align}$$
What a mess and I am sure I could simplify, but, who cares when I am just going to put this into code and let it iterate.
Using the basic multivariat Newton-Raphson setup, we should be able to iterate.
Below is the test code I used in Python with some success (
see below the code for future work):
[CODE lang="python" title="Catenary Newton-Raphson Solver" highlight="25-26"]from numpy import *
from numpy import *
import numpy
import matplotlib.pyplot as plt
def func1(a, x_2):
return t_1*(sin(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t)) + cos(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*tan(arctan(sinh((x_2)/a))+arctan(y_t/x_t))) - g*m*(a*sinh(x_2/a)+a*sinh((x_t-x_2)/a))
def func2(a, x_2):
return a*cosh(x_2/a)-a*cosh((x_t-x_2)/a)-y_t
def dfunc1_da(a, x_2):
return t_1*(((x_t-x_2)*tan(arctan(sinh(x_2/a))+arctan(y_t/x_t))*sin(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh((x_t-x_2)/a))/((pow(sinh((x_t-x_2)/a),2)+1)*a*a)-((x_t-x_2)*cos(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh((x_t-x_2)/a))/((pow(sinh((x_t-x_2)/a),2)+1)*a*a)-(x_2*pow(1/cos((arctan(sinh(x_2/a))+arctan(y_t/x_t))),2)*cos(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh(x_2/a))/((pow(sinh(x_2/a),2)+1)*a*a))-(g*m*((sinh((x_t-x_2)/a)+sinh(x_2/a))*a+(x_2-x_t)*cosh((x_t-x_2)/a)-x_2*cosh(x_2/a)))/a
def dfunc1_dx_2(a, x_2):
return t_1*((sin(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh((x_t-x_2)/a)*tan(arctan(sinh(x_2/a))+arctan(y_t/x_t)))/(a*(pow(sinh((x_t-x_2)/a),2)+1))+(cos(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh(x_2/a)*pow(1/cos((arctan(sinh(x_2/a))+arctan(y_t/x_t))),2)/(a*(pow(sinh(x_2/a),2)+1))-(cos(arctan(sinh((x_t-x_2)/a))-arctan(y_t/x_t))*cosh((x_t-x_2)/a))/(a*(pow(sinh((x_t-x_2)/a),2)+1)))) - g*m*(cosh(x_2/a)-cosh((x_t-x_2)/a))
def dfunc2_da(a, x_2):
return ((x_t-x_2)*sinh((x_t-x_2)/a))/a-(x_2*sinh(x_2/a))/a-cosh((x_t-x_2)/a)+cosh(x_2/a)
def dfunc2_dx_2(a, x_2):
return sinh(x_2/a)+sinh((x_t-x_2)/a)##Pole 1 is higher than pole 2, thus pole one's tension is the limiting factor.
##If pole 2 is higher than pole 1, this will still solve with the tension in pole 1 as the limiting factor.
x_t = 10 ##meters
y_1 = 15 ##meters
y_2 = 13 ##meters
y_t = y_2 - y_1 ##meters
t_1 = 120 ##Newtons
g = 9.81 ##m/s^2
m = 1.00 ##kg/m
iter_max = 300
i = 0
tolerance = 1e-3
error = 1
x_2_min = 1e-6
a_min = 1e-12
x = matrix([[x_t],[x_t/2+x_2_min]])
while i < iter_max and error > tolerance:
disp(x.T)
J = zeros([2,2])
f = zeros([2,1])
J[0,0] = dfunc1_da(x[0,0], x[1,0])
J[1,0] = dfunc2_da(x[0,0], x[1,0])
J[0,1] = dfunc1_dx_2(x[0,0], x[1,0])
J[1,1] = dfunc2_dx_2(x[0,0], x[1,0])
f[0,0] = func1(x[0,0], x[1,0])
f[1,0] = func2(x[0,0], x[1,0])
x = x - matmul(linalg.inv(J),f)
f[0,0] = func1(x[0,0], x[1,0])
f[1,0] = func2(x[0,0], x[1,0])
i = i + 1
error = abs(numpy.max(f))
disp("error: %.3f" % (error))
disp(x)
disp("total iterations: %i" % (i))
a = x[0,0]
x_2 = x[1,0]
x_1 = x_t - x_2
x = numpy.linspace(-x_1, x_2, 200)
y = []
y_0 = y_1 - a*cosh(-x_1/a)
for val in x:
y.append(a*cosh((val)/a) + y_0)
plt.plot(x, y)
theta_1 = arctan(sinh((x_t - x_2)/a))-arctan(y_t/x_t)
theta_2 = arctan(sinh((x_2)/a))+arctan(y_t/x_t)
t_2 = t_1*cos(theta_1)/cos(theta_2)
plt.title("a: %.3f, x_2: %.1f, T_2: %.2f" % (a, x_2, t_2))
plt.grid(True)
plt.ylim([0, numpy.max(y)*1.05])
plt.show()
plt.close()
[/CODE]
In this code, there are a couple of things to consider and I need your help to figure-out the following...
- The tension must be a minimum or it will not converge. What is this value and how can one calculate the minimum tension for this to converge?
- In the code, you will see that the variable matrix x, contains the catenary constant, ##a## in the first row (position x[0,0]) and ##x_2## in the second row (position x[1,0]).
- The solver will not converge if the initial value of ##a## is small, however I cannot determine why. For this issue I am sure there is a way to determine the best initial guess.
- The ##x_2##, when the tension is high enough, can be greater than ##\Delta x## which surprised me, but makes sense. I just didn't see that coming.
- I am curious as to how we could formulate this code as such so I don't have to rewrite for the case where pole 2 is greater than pole 1. I know I could just switch the poles and the solution is the same, but my brain is fried.
I wrote this up quickly but have spent a long time on this outside of this forum. I would love your help moving forward if you could.
Thanks,
Tanner H.