THIS PROGRAM ASSUMES WIRES OF EQUAL LENGTH AND DIAMETER EXTENDING RADIALLY FROM A POINT.
A "CROWS FOOT" ARRANGEMENT IS AN EXAMPLE.
THE POINT IS AT A SPECIFIED DEPTH BELOW THE EARTH SURFACE AND THE WIRES EXTEND HORIZONTALLY.
THE ANGLE BETWEEN ANY TWO ADJACENT WIRES IS ASSUMED TO BE THE SAME.
THE NUMBER OF WIRES MAY BE AS HIGH AS 500.
This program was originally written in Fortran in 1989 by David R. Brown and the American Public Power Association.
{n : TYPE AND ENTER THE NUMBER OF RADIAL WIRES ? UP TO 500}
{rho: EARTH RESISTIVITY IN OHM-METERS}
{xl: RADIAL LENGTHS OF THE WIRES IN FEET}
{rd: WIRE DIAMETERS IN INCHES}
{xd: DEPTH OF THE WIRES IN FEET}
# Click the Blue Plane to preview this as a CrossCompute tool
n = 100
rho = 10
xl = 10
xd = 10
rd = 10
target_folder = '/tmp'
n = int(n)
if n > 500 or n < 1:
raise Exception
from os.path import join
output_text_path = join(target_folder, 'buried_wires_ext_radially_frm_point.log')
target_text_path = join(target_folder, 'buried_wires_ext_radially_frm_point.txt')
from subprocess import run
executable = 'buried_wires_ext_radially_frm_point.out'
script = 'buried_wires_ext_radially_frm_point.f'
output_text = run([
'gfortran',
'-o',
executable,
script,])
from os.path import expanduser
from subprocess import check_output, STDOUT
output_text = check_output([
'./buried_wires_ext_radially_frm_point.out',
expanduser(target_text_path),
str(rho),
str(n),
str(xl),
str(rd),
str(xd),
], stderr=STDOUT)
with open(output_text_path, 'wb') as output_file:
output_file.write(output_text)
print('output_text_path = ' + output_text_path)
print('target_text_path = ' + target_text_path)