Tetrapod Project
calculate_polynomials Namespace Reference

Variables

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

Variable Documentation

◆ Ttot

int calculate_polynomials.Ttot = 2

Definition at line 8 of file calculate_polynomials.py.

◆ amax

int calculate_polynomials.amax = 4

Definition at line 9 of file calculate_polynomials.py.

◆ Vrob

int calculate_polynomials.Vrob = 1

Definition at line 10 of file calculate_polynomials.py.

◆ dtot

int calculate_polynomials.dtot = 2

Definition at line 11 of file calculate_polynomials.py.

◆ Tr_poly_coeffs

tuple calculate_polynomials.Tr_poly_coeffs = (-dtot -Ttot*Vrob, (2/3)*amax*Ttot, -4/3 + (8/9 - 4/15)*amax)

Definition at line 13 of file calculate_polynomials.py.

◆ Tr_list

calculate_polynomials.Tr_list = poly.Polynomial(Tr_poly_coeffs).roots()

Definition at line 15 of file calculate_polynomials.py.

◆ Tr

calculate_polynomials.Tr = Tr_list[isreal(Tr_list)*(Tr_list>=0)][0]

Definition at line 22 of file calculate_polynomials.py.

◆ Th

int calculate_polynomials.Th = Ttot - 2*Tr

Definition at line 24 of file calculate_polynomials.py.

◆ a

int calculate_polynomials.a = -(2/3)*amax/(Tr**3)

Definition at line 26 of file calculate_polynomials.py.

◆ b

tuple calculate_polynomials.b = (4/3)*amax/Tr

Definition at line 27 of file calculate_polynomials.py.

◆ c

int calculate_polynomials.c = -Vrob

Definition at line 28 of file calculate_polynomials.py.

◆ coeffs

tuple calculate_polynomials.coeffs = (c, 0, b, 0, a)

Definition at line 30 of file calculate_polynomials.py.

◆ t1

calculate_polynomials.t1 = np.linspace(0, Tr, 50)

Definition at line 32 of file calculate_polynomials.py.

◆ t2

calculate_polynomials.t2 = np.linspace(Tr, Tr + Th, 100)

Definition at line 33 of file calculate_polynomials.py.

◆ t3

calculate_polynomials.t3 = np.linspace(Tr + Th, Ttot, 50)

Definition at line 34 of file calculate_polynomials.py.

◆ f

calculate_polynomials.f = poly.Polynomial(coeffs)

Definition at line 35 of file calculate_polynomials.py.

◆ f_int

calculate_polynomials.f_int = f.integ()

Definition at line 36 of file calculate_polynomials.py.

◆ x1

calculate_polynomials.x1 = f(t1)

Definition at line 37 of file calculate_polynomials.py.

◆ x2

calculate_polynomials.x2 = np.array([f(Tr)]*t2.shape[0])

Definition at line 38 of file calculate_polynomials.py.

◆ x3

calculate_polynomials.x3 = f(-t3 + Ttot)

Definition at line 39 of file calculate_polynomials.py.

◆ t

calculate_polynomials.t = np.concatenate((t1, t2, t3))

Definition at line 41 of file calculate_polynomials.py.

◆ x

calculate_polynomials.x = np.concatenate((x1, x2, x3))

Definition at line 42 of file calculate_polynomials.py.