Tetrapod Project
calculate_polynomials.py File Reference

Go to the source code of this file.

Namespaces

 calculate_polynomials
 

Variables

int calculate_polynomials.Ttot = 2
 
int calculate_polynomials.amax = 4
 
int calculate_polynomials.Vrob = 1
 
int calculate_polynomials.dtot = 2
 
tuple calculate_polynomials.Tr_poly_coeffs = (-dtot -Ttot*Vrob, (2/3)*amax*Ttot, -4/3 + (8/9 - 4/15)*amax)
 
 calculate_polynomials.Tr_list = poly.Polynomial(Tr_poly_coeffs).roots()
 
 calculate_polynomials.Tr = Tr_list[isreal(Tr_list)*(Tr_list>=0)][0]
 
int calculate_polynomials.Th = Ttot - 2*Tr
 
int calculate_polynomials.a = -(2/3)*amax/(Tr**3)
 
tuple calculate_polynomials.b = (4/3)*amax/Tr
 
int calculate_polynomials.c = -Vrob
 
tuple calculate_polynomials.coeffs = (c, 0, b, 0, a)
 
 calculate_polynomials.t1 = np.linspace(0, Tr, 50)
 
 calculate_polynomials.t2 = np.linspace(Tr, Tr + Th, 100)
 
 calculate_polynomials.t3 = np.linspace(Tr + Th, Ttot, 50)
 
 calculate_polynomials.f = poly.Polynomial(coeffs)
 
 calculate_polynomials.f_int = f.integ()
 
 calculate_polynomials.x1 = f(t1)
 
 calculate_polynomials.x2 = np.array([f(Tr)]*t2.shape[0])
 
 calculate_polynomials.x3 = f(-t3 + Ttot)
 
 calculate_polynomials.t = np.concatenate((t1, t2, t3))
 
 calculate_polynomials.x = np.concatenate((x1, x2, x3))