In [1]:

```
#Variable declaration
f1 = 0.1 #Frequency (MHz)
f2 = 1.0 #Frequency (MHz)
f3 = 10.0 #Frequency (MHz)
#Calculations
d1 = 50/(f1**(1.0/3)) #Distance for f1 (miles)
d2 = 50/(f2**(1.0/3)) #Distance for f2 (miles)
d3 = 50/(f3**(1.0/3)) #Distance for f3 (miles)
#Result
print "The distance for 100kHz is", round(d1,2), "miles"
print "The distance for 1MHz is", d2, "miles"
print "The distance for 10MHz is", round(d3,2), "miles"
```

In [2]:

```
from math import pi,sin
#Variable declaration
f = 3e6 #Frequency (Hz)
sigma = 0.5 #Standard deviation of surface irregularities (unitless)
theta = 30 #Angle of incidence as measured from normal angle (degrees)
c = 3e8 #Speed of light (m/s)
#Calculations
wave_lt = c/f #Wavelength (m)
R = 4*pi*sigma*sin(theta*pi/180)/wave_lt
#Roughness factor (unitless)
#Result
print "The roughness factor is", round(R,9)
```

In [4]:

```
from math import pi,sin
#Variable declaration
f = 10e6 #Frequency (Hz)
sigma = 5 #Standard deviation of surface irregularities (unitless)
theta1 = 30 #Angle of incidence as measured from normal angle (degrees)
theta2 = 45 #Angle of incidence as measured from normal angle (degrees)
theta3 = 60 #Angle of incidence as measured from normal angle (degrees)
c = 3e8 #Speed of light (m/s)
#Calculations
wave_lt = c/f #Wavelength (m)
R1 = 4*pi*sigma*sin(theta1*pi/180)/wave_lt
#Roughness factor for theta1 (unitless)
R2 = 4*pi*sigma*sin(theta2*pi/180)/wave_lt
#Roughness factor for theta2 (unitless)
R3 = 4*pi*sigma*sin(theta3*pi/180)/wave_lt
#Roughness factor for theta3 (unitless)
#Result
print "The roughness factor for 30 degrees is", round(R1,4)
print "The roughness factor for 45 degrees is", round(R2,3)
print "The roughness factor for 60 degrees is", round(R3,4)
```

In [13]:

```
#Variable declaration
f1 = 0.3 #Frequency (MHz)
f2 = 1 #Frequency (MHz)
f3 = 3 #Frequency (MHz)
sigma = 4e-5 #Standard deviation of surface irregularities (unitless)
#Calculations
x1 = (18e3)*sigma/f1 #Parameter x for f1 (unitless)
x2 = (18e3)*sigma/f2 #Parameter x for f2 (unitless)
x3 = (18e3)*sigma/f3 #Parameter x for f3 (unitless)
#Result
print "The parameter x for 0.3MHz is", x1
print "The parameter x for 1MHz is", x2
print "The parameter x for 3MHz is", x3
```

In [24]:

```
from math import pi, sqrt
#Variable declaration
f1 = 5e3 #Frequency (Hz)
f2 = 50e3 #Frequency (Hz)
f3 = 500e3 #Frequency (Hz)
sigma = 5e-5 #Standard deviation of surface irregularities (unitless)
eps_r = 15.0 #Relative permittivity (unitless)
mu = pi*4e-7 #Absolute Permeability (H/m)
#Calculations
w1 = 2*pi*f1 #Angular frequency (rad/s)
w2 = 2*pi*f2 #Angular frequency (rad/s)
w3 = 2*pi*f3 #Angular frequency (rad/s)
Zs1 = sqrt((w1*mu)/sqrt(sigma**2 + (w1**2)*eps_r))
#Surface impedence for f1 (ohm)
Zs2 = sqrt((w2*mu)/sqrt(sigma**2 + (w2**2)*eps_r))
#Surface impedence for f2 (ohm)
Zs3 = sqrt((w3*mu)/sqrt(sigma**2 + (w3**2)*eps_r))
#Surface impedence for f3 (ohm)
#Result
print "The surface impedence for 5kHz is", round(Zs1,5), "ohms"
print "The surface impedence for 50kHz is", round(Zs2,5), "ohms"
print "The surface impedence for 500kHz is", round(Zs3,5), "ohms"
#There has been a numerical mistake in the calculation/substitution of square root of
#(sigma**2 + (w1**2)*eps_r) and in the second case, the mistake in the calculation of
#(w2*mu)/sqrt(sigma**2 + (w2**2)*eps_r)
```

In [25]:

```
from math import pi, atan, cos
#Variable declaration
f = 2.0 #Frequency (MHz)
sigma = 5e-5 #Standard deviation of surface irregularities (unitless)
eps_r = 15.0 #Relative permittivity (unitless)
d = 20e3 #Distance (m)
eff = 0.5 #Antenna efficiency (unitless)
c = 3e8 #Speed of light (m/s)
E1 = 0.5e-3 #Ground wave electric field strength (V/m)
#Calculations
wave_lt = c/(f*10**6) #Wavelength (m)
x = (18e3)*sigma/f #Parameter x (unitless)
b = atan((eps_r + 1)/x) #Phase constant (unitless)
p = (pi/x)*(d/wave_lt)*cos(b) #Numerical distance (unitless)
A = (2 + 0.3*p)/(2 + p + 0.6*(p**2)) #Reduction factor (unitless)
E_t = E1 * d/A
#Result
print "The Electric field strength at the transmitted end is", round(E_t,2),"V/m"
```