Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sympy
- sympy.init_printing()
- xi = sympy.Symbol('xi')
- b = sympy.Symbol('beta')
- J = sympy.Symbol('J')
- g = sympy.Symbol('Gamma')
- m_e = sympy.Symbol('m_e')
- c = sympy.Symbol('c')
- npm = sympy.Symbol('n_{\pm}')
- C1 = sympy.Symbol('C_1')
- C2 = sympy.Symbol('C_2')
- m_p = sympy.Symbol('m_p')
- ntb = sympy.Symbol("{n'}_b")
- ux = sympy.Symbol('u^x')
- u0 = sympy.Symbol('u^0')
- Tb0x = sympy.Symbol('T_b^{0x}')
- Tpm0x = sympy.Symbol('T_{\pm}^{0x}')
- Tbxx = sympy.Symbol('T_b^{xx}')
- Tpmxx = sympy.Symbol('T_{\pm}^{xx}')
- eqn11_rhs = -(1+xi)/(1+xi-3*b**2)*(J/g+m_e*c**2*npm*b-C1*(1+xi+3*b**2)/(1+xi)+C2*(1+xi+3)*b/(1+xi))
- temp = eqn11_rhs
- temp = temp.subs(J,m_p*c**2*ntb*ux)
- temp = temp.subs(C1,Tb0x+Tpm0x)
- temp = temp.subs(C2,Tbxx+Tpmxx)
- temp = temp.subs(Tb0x,m_p*c**2*ntb*u0*ux)
- temp = temp.subs(Tbxx,m_p*c**2*ntb*ux*ux)
- temp = temp.subs(Tpm0x,m_e*c**2*npm*u0*ux)
- temp = temp.subs(Tpmxx,m_e*c**2*npm*ux*ux)
- temp = temp.subs(u0,g)
- temp = temp.subs(ux,g*b)
- temp = temp.subs(g,1/sympy.sqrt(1-b**2))
- temp = temp.subs(xi,0)
- temp.simplify()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement