American Public Power Association tools

 Pay Notebook Creator: Salah Ahmed 0 Set Container: Numerical CPU with TINY Memory for 10 Minutes 0 Total 0

TRANSMISSION LINE ENVIRONMENTAL EFFECTS PROGRAM¶

AUDIBLE NOISE CALCULATION MODULE¶

TL EFFECTS VERSION 1/4

ENTER CONDUCTOR VOLTAGES, MAGNITUDE AND ANGLE.

MAGNITUDE MUST BE RMS KV LINE-TO-GROUND.

I.E., A 69 KV LINE IMPLIES 69/SQRT(3)=39.8.

ANGLES SHOULD BE IN DEGEES, TYPICALLY 0,120,-120.

SHIELD VOLTAGES ARE AUTOMATICALLY SET TO ZERO.

ENTER MAGNITUDE AND ANGLE

{mag_angles_table: magnitudes and angles}

ENTER POINTS WHERE NOISE CALCULATION IS DESIRED. VALUES ARE CALCULATED AT GROUND LEVEL. ENTER DISTANCE DATA IN FEET, NUMBER OF DATA POINTS AS AN INTEGER.

For example, if xstart is 0, xstop is 10 and the number of data points is 3, then the program will calculate noise at ground level at the following distances away from the distribution line: 0 feet, 5 feet, 10 feet.

{xstart: first x}

{xstop: last x}

{n: number of data points}

In [ ]:
# CrossCompute
mag_angles_table_path = 'magnitude_angles.csv'

xstart = 0
xstop = 250
n = 100

target_folder = '/tmp'

In [ ]:
from os.path import join
output_text_path = join(target_folder, 'audible_noise.log')
target_text_path = join(target_folder, 'audible_noise.txt')

In [ ]:
from pandas import read_csv
df

In [ ]:
mag_angles = [','.join((str(x), str(y))) for x,y in zip(df['magnitudes'], df['angles'])]

In [ ]:
pylon_text_path = ''

In [ ]:
from itertools import chain
from os.path import expanduser

cmd = list(chain([
'./magnetic_field.out',
pylon_text_path,
expanduser(target_text_path)
],
mag_angles,
[str(xstart),
str(xstop),
str(n)]))

In [ ]:
from subprocess import check_output, STDOUT
output_text = check_output(cmd, stderr=STDOUT)
with open(output_text_path, 'wb') as output_file:
output_file.write(output_text)

In [ ]:
print('output_text_path = ' + output_text_path)
print('target_text_path = ' + target_text_path)