Processing math: 100%

ElectroStatics


In [2]:
qe = -1.6E-19
qp =  1.6E-19
k  =  9.0E9

def force(charge1, charge2, distance):
    return k * ((charge1 * charge2) / (distance ** 2))

def force_from_field(field, charge):
    return field * charge

def field(charge, distance):
    return k * (charge / (distance**2))

def potential(charge, distance):
    return k * (charge / distance)

def work(deltav, charge):
    return deltav * charge

Charge of an electron

qe=1.61019C

qe

Charge of a proton

qp=1.61019C

qp

Coulomb's Constant

k=9109

k

Force (F)

Unit : Newtons (N)

F=kq1q2r2

F(q1,q2,r)

force(charge1, charge2, distance)

F=Eq2

F(E,q2)

force_from_field(field, charge)

Field (E)

Unit : Newtons/Coulombs (N/C)

E=q1r2

E(q1,r)

field(charge, distance)

Potential (V)

Unit : Volts (V)

V=kqr

V(q,r)

potential(charge, distance)
In [11]:
print(field(qp, .00125))
print(field(qe, .00275))
0.0009215999999999998 + 0.0001904132231404959
0.0009215999999999998
-0.0001904132231404959
Out[11]:
0.0011120132231404957
In [12]:
force_from_field(0.0011120132231404957, qp)
Out[12]:
1.779221157024793e-22
In [4]:
potential(qp, .00125) + potential(qe, .00275)
Out[4]:
6.283636363636363e-07
In [15]:
work(6.283636363636363e-07, qe)
Out[15]:
-1.0053818181818181e-25
In [19]:
potential(qp, 2.5E-12)
Out[19]:
576.0
In [20]:
potential(qp, 2.5E-12 + 3.75E-12)
Out[20]:
230.4
In [21]:
work(-345.6, qe)
Out[21]:
5.5296e-17
In [22]:
potential(-2.4E-12, .00540) + potential(5.1E-12, .012 + .00615)
Out[22]:
-1.4710743801652888
In [23]:
potential(-2.4E-12, .00540 + .012) + potential(5.1E-12, .00615)
Out[23]:
6.222035323801513
In [24]:
work(6.22+1.47, qe)
Out[24]:
-1.2303999999999998e-18
In [ ]: