Calculating the length of a cord line based on forces

58 views Asked by At

In 3D, I need to find the cord length based on forces that describe the cord. I tried to do this, based on the following code with the following inputs: H the constant horizontal force q_verti the vertical force per unit length acting on the cord (e.g. gravity) q_trans the transversal force per unit length acting on the cord (e.g. wind) displacement the distance between the two support points in horizontal direction dheight the difference in height between the two support points accuracy a number to fill the stepsize to approach this problem

def build_3D_line(H, q_verti, q_trans, displacement, dheight, accuracy):
"""
build_3D_line finds the length of a cord line, based on the horizontal force, 'H', and
forces per unit length 'q_verti', and 'q_trans' acting on the cord and the positions by which it is held,
described by the horizontal 'displacement' and 'dheight' the difference in height
between the support points.    
"""
from numpy import sqrt, linspace, absolute, concatenate

def find_nearest(arr, value):
    difference_array = absolute(arr-value)
    index = difference_array.argmin()
    return index

# First create a linear vector 'steps' that will describe the distance the cord travels (span length),
# starting from the lowest point of the line. 'steps' needs to be at least be able to reach both support points from the lowest sag,
# so having 'displacement' as end, should suffice. 
steps = linspace(0,displacement, accuracy)

# At the lowest sag vertical force  is 0.
# In the right orientation, the transversal force can also be defined as 0 at this point.
# The forces at this point would then be:
# F_hor   = H
# F_trans = 0
# F_vert  = 0
# 
# Any other position, with a certain span_length away form this point would
# then have forces
# F_hor   = H
# F_trans = q_trans * span_length
# F_vert  = q_verti * span_length
# Note that the horizontal force, H, is constant in the cord.
#
# The additional forces w.r.t. the lowest sag point are then given by:
force_V_half = q_verti * steps
force_T_half = q_trans * steps
force_H_half = 0       * steps

# Addition by the forces at the lowest sag, will then give the forces at any point:
force_verti_tot_half =    0  + force_V_half
force_trans_tot_half =    0  + force_T_half
force_long_tot_half  =    H  + force_H_half

# The tension force between every point is then given by the Pythagorean theorem, since this force is
# the combination of the 3D elements:
tension              = sqrt(force_verti_tot_half**2 + force_trans_tot_half**2 + force_long_tot_half**2)

# The factor to calculate distances form forces for each node is given as (similar triangles):
step_factor = steps/tension

# This gives the following direction steps for each node:
steps_V = step_factor*force_verti_tot_half
steps_T = step_factor*force_trans_tot_half
steps_H = step_factor*force_long_tot_half

# 'steps_H' describes the horizontal distance travelled for the entire line. 
# This should be equal to 'displacement'. Since steps_H start at 0, the amount of steps travelled
# for the entire displacement is given as:
hor_ind = find_nearest(steps_H, displacement) + 1

# When we copy the found steps in each direction to the other side, we get:
steps_V_2sides = concatenate((steps_V[::-1],   steps_V[1:]), axis = None)
steps_T_2sides = concatenate((steps_T[::-1],   steps_T[1:]), axis = None)
steps_H_2sides = concatenate((steps_H[::-1], - steps_H[1:]), axis = None)

# For vertical part of the line, it is given that it travels 'dheight' at a given 'distance'.
# With 'hor_ind' the amount of steps travelled, the difference in height at a given vertical
# distance from each point is given as:
dV = steps_V_2sides[hor_ind:] - steps_V_2sides[:-hor_ind]

# The first point at which the line is supported is then given at index point:
vert_ind = find_nearest(dV, dheight) + 1
# And the second point at: vert_ind+hor_ind

# The line, devided in these components is then given as:
steps_V_final = steps_V_2sides[vert_ind:vert_ind+hor_ind]
steps_T_final = steps_T_2sides[vert_ind:vert_ind+hor_ind]
steps_H_final = steps_H_2sides[vert_ind:vert_ind+hor_ind]

# Between each node, the following distance is travelled in each direction:
dV_steps = steps_V_final[1:] - steps_V_final[:-1]
dT_steps = steps_T_final[1:] - steps_T_final[:-1]
dH_steps = steps_H_final[1:] - steps_H_final[:-1]

# The Pythagorean theorem then gives the distance travelled between each node:
cord_parts = sqrt(dV_steps**2 + dT_steps**2 + dH_steps**2)

# The sum of all of these cord line part lengths, gives the total cord length:
length     = float(sum(cord_parts))
return length

I am slightly off in my calculation. When I take:

H = 8969.779999999999
q_verti =8.29
q_trans = 0
displacement = 233.40000000002328
dheight = 1.379999999999999
accuracy =10**5
length = build_3D_line(H, q_verti, q_trans, displacement, dheight, 100000)

I get: length = 233.84650993989436 Though this should be: 233.85685400689795 This seems like a small discrepancy, but according to the found length, the horizontal force should be: 8443.646980471909 based on:

horizontal_force = (L2*E*A) / (L1*(1 + eps_t*(T2 - T1))) + H1 - E*A

derived from F. Kiessling et al (ISBN 3-540-00297-9) with:

# L2:    The found length
# L1:    The reference length
# E:     Young's modulus = 127530000000
# A:     The area = 9.327e-05
# eps_t: The thermal elongation factor = 1.7e-5
# T1:    The reference temperature = 10
# T2:    The temperature in the new situation = 10

I am not sure what I'm doing wrong here. Does anybody see the mistake or can anyone provide me with a different approach to find the length of a cord line in 3D, based on the input. (I do have to admit, this might be very inefficient, but my math skills aren't that good.)

0

There are 0 answers