I've got a catenary equation $$y = a\cosh(x/a)$$ and I'm trying to divide it into $n$ segments of equal length to use it in some FEM code. I know the formula for the arc length between two points, but since it involves integration, inverting it seems a little hard. Is there a direct way to find the points on this curve that I want?
-
Taking the vertex as the origin, the direct method one can use is to find the arc length from line integral as mentioned in the question, another approach that might help is thinking a physical problem, the hanging cable of uniform mass density is a catenary in uniform gravitational field, so one might use the force balance till a point on the finite element to find tension as function of length(y axis balance) and tension in terms of slope of curve(X axis) I.e. in terms of X coordinate. Similarly torque balance or other equilibrium conditions might help. – Bijayan Ray Aug 20 '21 at 19:54
-
2The arclength is simply $s=a\sinh \dfrac{x}{a}=\pm \sqrt{y^2-a^2}$ – Ng Chung Tak Aug 20 '21 at 20:18
1 Answers
This post: How to construct a catenary of a specified length through two specified points provides all the background.
Specifically, it provides the more general formula for a Catenary $$f(x) = a \, \cosh\left(\frac{x−b}{a}\right)+c$$
and the length of the curve, which is given by the integral between the starting $x$ coordinate $x_{start}$ and the ending $x$ coordinate $x_{end}$
$$L=a \, \left[\sinh\left(\frac{x_{end}−b}{a}\right)−\sinh\left(\frac{x_{start}−b}{a}\right)\right]. $$
At this point, it is assumed that the following are known - i.e. were specified or have been calculated: $L$, $x_{start}$, $x_{end}$, $a$, $b$ (the original question indicated that $b=0$).
Divide $L$ by the desired number so that the length of each segment is $\delta L$ (note that this general solution will allow for any pattern of segments by substituting $\delta L_n$ as appropriate, provided that $\sum_{i=1}^n \delta L_n = L$)
Calculate $L_n = L_{start} + n\ \delta L$ and note that this is $\sinh\left(\frac{x_n−b}{a}\right)$.
Express the hyperbolic as an exponential, substituting $w = \frac{x_n−b}{a}$ giving $2L_n = e^w - e^{-w}$
Square this and multiply by $e^{2w}$ giving: $4L_n^2e^{2w} = e^{4w} - 2e^{2w}$
Let $t = e^{2w}$ and rearrange to give a readily solvable quadratic: $t^2 - (2+4 L_n^2)t + 1 = 0$
Using the root with the same sign as $L_n$ will give $x_n = \frac{a}{2} \ln(\text{root}) + b$ from which $y_n$ can be calculated.
Thus, points equally spaced along the curve can be calculated as $\{x_n, y_n\}$