|
|
@ -25,18 +25,19 @@ from pylab import *
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# the harmonics included below in the python code were provided directly to WRL from BOM.
|
|
|
|
# the harmonics included below in the python code were provided directly to WRL from BOM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
harm = {}
|
|
|
|
harm = {}
|
|
|
|
speed = 0
|
|
|
|
speed = 0
|
|
|
|
amp = 1
|
|
|
|
amp = 1
|
|
|
|
lag = 2
|
|
|
|
lag = 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def readlinenocomm(F):
|
|
|
|
def readlinenocomm(F):
|
|
|
|
l = F.readline()
|
|
|
|
l = F.readline()
|
|
|
|
while l[0] == '#':
|
|
|
|
while l[0] == '#':
|
|
|
|
l = F.readline()
|
|
|
|
l = F.readline()
|
|
|
|
return l
|
|
|
|
return l
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
H = open("HARMONIC", "r")
|
|
|
|
H = open("HARMONIC", "r")
|
|
|
|
l = readlinenocomm(H)
|
|
|
|
l = readlinenocomm(H)
|
|
|
@ -246,7 +247,9 @@ while (t<end_time):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
nf = 1.0
|
|
|
|
nf = 1.0
|
|
|
|
ea = 0.0
|
|
|
|
ea = 0.0
|
|
|
|
z=z+nf*harm[constit][amp]*math.cos((harm[constit][speed]*t1 + ea - harm[constit][lag]) * (2*3.1415927 / 360.0))
|
|
|
|
z = z + nf * harm[constit][amp] * math.cos(
|
|
|
|
|
|
|
|
(harm[constit][speed] * t1 + ea - harm[constit][lag]) *
|
|
|
|
|
|
|
|
(2 * 3.1415927 / 360.0))
|
|
|
|
|
|
|
|
|
|
|
|
# print t,z
|
|
|
|
# print t,z
|
|
|
|
F.write("%s,%s\n" % (t, z))
|
|
|
|
F.write("%s,%s\n" % (t, z))
|
|
|
|