Borrar filtros
Borrar filtros

Catenary at different height between 2 fixed points ?

100 visualizaciones (últimos 30 días)
VIGNESH BALAJI
VIGNESH BALAJI el 6 de Sept. de 2023
Comentada: VIGNESH BALAJI el 11 de Dic. de 2023
I am making a script to write catenary at different height.
I do get a catenary with different height with the below code. The problem is the cable length is not what I set initially, it changes. For example, I set a cable length of 15 m and when I got the result, it was 37 meters. I am not sure whether there is a problem in finding curvature or I need to add a term x-x0 and find x0 while computing y for the catenary. If I had to compute x0, can you suggest me a way to do it ?
P.S - I have attached the function file to check arclength
%% catenary parameters
% end points
x1 = 0
y1 = 5
x2 = 10
y2 = 2
horizontal_diff_distance = abs(x1-x2);
vertical_diff_distance = abs(y1-y2);
L = 15; % total cable length, follows min length check L = sqrt(horizontal_diff_distance^2 + vertical_diff_distance^2)
%% find curvature 'a'for catenary at different height
d = horizontal_diff_distance;
v = vertical_diff_distance;
fun = @(a) (- L + (a * sinh((d/(2*a)) + atanh(v/L))) + (a * sinh((d/(2*a)) - atanh(v/L)))); x0 = 0.15;
a = abs(fzero(fun,x0));
%fun = @(a) (- l/2 + a * sinh(d/(2*a))); x0 = 5.0;
%a = abs(fzero(fun,x0));
%% plot catenary
x=x1:0.01:x2;
y= a*cosh(x/a);
plot(x,y),xlabel('x'),ylabel('y');
%% cross check length of cateanry
length = arclength(x, y,'spline');
disp(length)
  2 comentarios
John D'Errico
John D'Errico el 6 de Sept. de 2023
Editada: John D'Errico el 6 de Sept. de 2023
The simple catenary curve that you are generating, thus a*cosh(x/a) has no reason for it to pass through the two points you designate.
Check that.
x1 = 0;
y1 = 5;
x2 = 10;
y2 = 2;
horizontal_diff_distance = abs(x1-x2);
vertical_diff_distance = abs(y1-y2);
L = 15; % total cable length, follows min length check L = sqrt(horizontal_diff_distance^2 + vertical_diff_distance^2)
%% find curvature 'a'for catenary at different height
d = horizontal_diff_distance;
v = vertical_diff_distance;
fun = @(a) (- L + (a * sinh((d/(2*a)) + atanh(v/L))) + (a * sinh((d/(2*a)) - atanh(v/L)))); x0 = 0.15;
a = abs(fzero(fun,x0));
a
a = 3.1691
plot([x1,x2],[y1,y2],'o')
hold on
fplot(@(x) a*cosh(x/a),[x1,x2])
So why would you expect arclengths to be consistent between the curves, when they do not satisy the requirements?
Essentially, the basic curve, y=a*cosh(x/a) is probably some variation of catenary curve, between two points at fixed height. I'd need to check that claim, but it I'll accept that as true. But y1 and y2 are not at fixed heights, so that basic curve has nothing to do with this problem.
VIGNESH BALAJI
VIGNESH BALAJI el 6 de Sept. de 2023
@John D'Errico My requirement is to draw a catenary curve between 2 points and not a random catenary curve.
The statement which you mentioned about arclength is wrong. Since I set the length of the curve in the program to be 15 meters. However I draw the catenary cuve between these 2 points is ok as long as the final length of the curve (arclength) is equal to what I mentioned in the program because I used this value for parameterization of curvature (steepness of the curve). Since the length is wrong in the end the physical meaning of this is I generated an extra length curve out of nowhere which shows there is something seriously wrong in this script.
It would be nice if you can suggest me the mistake i could have made

Iniciar sesión para comentar.

Respuestas (2)

David Hill
David Hill el 6 de Sept. de 2023
maximum a is minimum y. And the minimum cable length can be found using:
a=2;H=10;
minL=2*a*sinh(H/2/a)
minL = 24.2008
Use cable length > minimum cable length
H=10;%horizontal
L=30;%cable length
v=3;%vertical
fun=@(a)2*a/H*sinh(H/2/a)-sqrt(L^2-v^2)/H;
a=fzero(fun,1)
a = 1.7663
  1 comentario
VIGNESH BALAJI
VIGNESH BALAJI el 6 de Sept. de 2023
@David Hill If I use cable length as minimum cable length then the cable length increases while parametersing a. The physical meaning is I aam generating cable which is out of physical reality.
I however used the final answer which was mentioned there and I got a value of 256 meters whereas your set value is 30 meters.
This is the graph and this seems to be wrong.

Iniciar sesión para comentar.


DGM
DGM el 8 de Sept. de 2023
Here, I think this is what you're after. This is blindly based on this answer.
% input parameters
x0 = [0 10];
y0 = [5 2];
L = 15;
npoints = 100;
% initial calculations
dx = diff(x0);
dy = diff(y0);
xb = mean(x0);
yb = mean(y0);
% check for sane inputs
if L < sqrt(dx^2 + dy^2)
error('L is too short to span the distance at any tension')
end
% solve r = sinh(A)/A, for A>0
r = sqrt(L^2 - dy^2)/dx;
% these are the suggested initial estimates
if r<3
A0 = sqrt(6*(r-1));
else
A0 = log(2*r) + log(log(2*r));
end
A = fzero(@(A) sinh(A^2)./A^2 - r,A0)^2;
% catenary parameters
a = dx/(2*A);
b = xb - a*atanh(dy/L);
c = yb - L/(2*tanh(A));
% get point list
x = linspace(x0(1),x0(2),npoints);
y = a*cosh((x-b)/a) + c;
% plot the curve and specified endpoints
plot(x,y); hold on
plot(x0,y0,'o')
% verify arc length
length = arclength(x,y,'spline')
length = 15.0000
  7 comentarios
DGM
DGM el 10 de Dic. de 2023
As Torsten has already mentioned, all the answers (and the original question) assumed the length as an input, and any other explanation for the code I provided is already available at the link I included.
The arclength() function used to verify the results is something that John wrote and OP included above in the original question.
VIGNESH BALAJI
VIGNESH BALAJI el 11 de Dic. de 2023
@Katya Did you try to ask the derivation of it. I can show you the derivation of it. How we added the vertical seperation distance in the length formula similar to horizontal seperation distance of end points.

Iniciar sesión para comentar.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by