Skip to content

Instantly share code, notes, and snippets.

@Opiprog
Last active December 17, 2015 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Opiprog/5518060 to your computer and use it in GitHub Desktop.
Save Opiprog/5518060 to your computer and use it in GitHub Desktop.
Math in Iptyhon
L = 500
Xi = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,0.8,0.85,0.9,0.92,0.94,0.96,0.98,0.99]
ai = [1,1.07,1.15,1.242,1.351,1.486,1.661,1.905,2.072,2.292,2.6,3.093,3.396,3.824,4.508,5.937,7.774]
bi = [1,0.936,0.878,0.822,0.769,0.717,0.664,0.608,0.578,0.544,0.507,0.461,0.438,0.412,0.378,0.328,0.287]
li = [0.75,0.748,0.743,0.734,0.721,0.703,0.678,0.644,0.622,0.594,0.559,0.51,0.484,0.452,0.41,0.345,0.288]
X = np.array(Xi)
a = np.array(ai)
b = np.array(bi)
l = np.array(li)
Ra1 = 25.04
Ra2 = 25.04
Rb1 = 25
Rb2 = 25
Ea = 2.3E+11
Eb = 2.3E+11
va = 0.3
vb = 0.3
E = (1-va**2)/Ea+(1-vb**2)/Eb
ga = (1/Ra1)-(1/Ra2)
gb = (1/Rb1)-(1/Rb2)
phi = 0
K = 1.5/((1/Ra1)+(1/Rb1)+(1/Ra2)+(1/Rb2))
c = a*((L*K*E)**(1/3))
D = b*((L*K*E)**(1/3))
G = (K/1.5) + (ga**2 + gb**2 + (2*ga*gb*cos(2*phi)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment