Last active
August 29, 2015 14:06
-
-
Save nuclearsandwich/1ecc247fd7002ad47eb8 to your computer and use it in GitHub Desktop.
moar physics crap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m = 1.67e-27 | |
me = 9.11e-31 | |
x = 0.03 | |
x0 = 0 | |
v0 = 4.7e6 | |
v = 0 | |
e = 1.6e-19 | |
a = (v0*v0) / (2 * x) | |
efield = (m*v0*v0) / (2*x*e) | |
#t = v0 / a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k = 8.98e9 | |
qr = -12.5e-9 | |
ql = -6.25e-9 | |
rAr = 10.0e-2 | |
rAl = 15e-2 | |
rBl = 10e-2 | |
rBr = 35e-2 | |
e = 1.6e-19 | |
efieldA = -(k*qr)/(rAr * rAr) + (k*ql)/(rAl*rAl) | |
efieldB = -(k*qr)/(rBr * rBr) - (k*ql)/(rBl*rBl) | |
forceA = efieldA * e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k = 8.98e9 | |
m = 59.0 | |
g = 9.81 | |
efield = 150 | |
q = m*g / efield | |
f = (k*q*q)/(130 * 130) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 0.02 | |
m = 1.67e-27 | |
me = 9.11e-31 | |
y = 0.005 | |
e = 1.6e-19 | |
v = 2e6 | |
t = x / v | |
efield = (2*me*y)/(t*t*e) | |
y = (efield * e * t * t)/(2*m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def magnitude i, j | |
Math.sqrt(i*i + j*j) | |
end | |
def unit i, j | |
mag = magnitude(i,j) | |
"#{i/mag}i + #{j/mag}j" | |
end | |
unit 0.12, 0.12 | |
unit -1.1, 2.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k = 8.98e9 | |
q1 = 2e-9 | |
q2 = 5e-9 | |
r1 = 0.20 | |
r2 = 0.6 | |
e = 1.6e-19 | |
efield1 = (k*q1)/(r1*r1) + (k*q2)/(r2*r2) | |
r1 = 1.2 | |
r2 = 0.4 | |
efield2 = (k*q1)/(r1*r1) - (k*q2)/(r2*r2) | |
r1 = 0.2 | |
r2 = 1.0 | |
efield3 = -1 * (k*q1)/(r1*r1) + (k*q2)/(r2*r2) | |
f1 = efield1 * e | |
f2 = efield2 * e | |
f3 = efield3 * e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment