In [18]:
import sympy as sp
from sympy.physics import vector as vec
sp.init_printing()
vec.init_vprinting()
In [19]:
R = vec.ReferenceFrame('R')
R
Out[19]:
In [3]:
R??
In [20]:
x, y, z = R[0], R[1], R[2]
# x, y, z, t = sp.symbols('x y z t', real=True)
t = sp.symbols('t', real=True)
c, eps, mu = sp.symbols('c varepsilon_0 mu_0')
c, eps, mu
Out[20]:
In [21]:
Ex= sp.Function('Ex')(x, t)
Ey= sp.Function('Ey')(x, t)
Ez= sp.Function('Ez')(x, t)
Bx= 0
By= sp.Function('By')(x, t)
Bz= sp.Function('Bz')(x, t)
In [22]:
E = Ex*R.x + Ey*R.y + Ez*R.z
B = Bx*R.x + By*R.y + Bz*R.z
vec.curl(E, R)
Out[22]:
In [31]:
jx= sp.Function('jx')(x, t)
jy= sp.Function('jy')(x, t)
jz= sp.Function('jz')(x, t)
j = jx*R.x + jy*R.y +jz*R.z
In [32]:
# FARADAY = sp.Eq(vec.curl(E, R), -B.diff(t,R))
FARADAY = B.diff(t, R)- vec.curl(E, R)
FARADAY
Out[32]:
In [36]:
AMPERE = vec.curl(B, R) - mu * j - eps * mu * E.diff(t, R)
AMPERE
Out[36]:
In [38]:
(FARADAY + c * AMPERE).simplify()
Out[38]: