pycatenary.utils module

pycatenary.utils.get_root_a(L, d, h, a0=1.0, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.newton_raphson(f, df, x0, tol=1e-06, maxit=1000)

Root finding algorithm (for transcendental equations)

Parameters
  • f (function) – must be a function (so f(x) = 0 returns the required x)

  • df (function) – derivative of the function f (df/dx)

  • x0 (double) – initial guess of x

  • tol (double) – tolerance

  • maxit (int) – maximum number of iterations

Returns

x – root

Return type

double

pycatenary.utils.bisection(f, int1, int2, tol=1e-06, maxit=1000)

Root finding algorithm (for transcendental equations)

Parameters
  • f (function) – must be a function (so f(x) = 0 returns the required x)

  • int1 (double) – lower end value

  • int2 (double) – lower end value

  • tol (double) – tolerance

  • maxit (int) – maximum number of iterations

Returns

x – root

Return type

double

pycatenary.utils.nofloor_rigid(d, h, L, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.nofloor_elastic(d, h, L, w, EA, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.fully_lifted_elastic(d, h, L, w, EA, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.fully_lifted_rigid(d, h, L, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.partly_lifted_elastic(d, h, L, w, EA, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.partly_lifted_rigid(d, h, L, tol=1e-06, maxit=1000, int1=1e-06, int2=1e+16)
pycatenary.utils.straight_elastic(d, h, L, w, EA, H_low=0, H_high=10000000000.0, tol=1e-06, maxit=1000)