# Path: sucemfem/Consts.py
# Z0 = mu0*c0                              


import sympy as sp
import sys
    import numpy as np
    import pylab
from sympy import sin, cos, exp, pi
from sucemfem.Consts import mu0, c0
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## SUCEM is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with SUCEM. If not, see <http://www.gnu.org/licenses/>. 
##
## Contact: cemagga@gmail.com 
from __future__ import division



omega, mu, L, beta, r, theta = sp.symbols(
    'omega mu L beta r theta')

I0 = sp.Symbol('I0')

E_theta = 1j*omega*mu*I0*L*exp(-1j*beta*r)/(4*pi*r)*sin(theta)* \
          sin((beta*L/2)*cos(theta))/((beta*L/2)*cos(theta))

def eval_E_theta(freq, L_val, I_val, theta_val, r_val=1):
    return complex(E_theta.evalf(subs={
        omega:2*pi*freq,
        mu:mu0,
        I0:I_val,

# Path: sucemfem/Consts.py
# Z0 = mu0*c0                              


# Path: sucemfem/Testing/Analytical/current_fillament_farfield.py
import sympy as sp
import sys
    import numpy as np
    import pylab
from sympy import sin, cos, exp, pi
from sucemfem.Consts import mu0, c0

## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## SUCEM is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with SUCEM. If not, see <http://www.gnu.org/licenses/>. 
##
## Contact: cemagga@gmail.com 
from __future__ import division



omega, mu, L, beta, r, theta = sp.symbols(
    'omega mu L beta r theta')

I0 = sp.Symbol('I0')

E_theta = 1j*omega*mu*I0*L*exp(-1j*beta*r)/(4*pi*r)*sin(theta)* \
          sin((beta*L/2)*cos(theta))/((beta*L/2)*cos(theta))

def eval_E_theta(freq, L_val, I_val, theta_val, r_val=1):
    return complex(E_theta.evalf(subs={
        omega:2*pi*freq,
        mu:mu0,
        I0:I_val,

        L:L_val,