2015.09.24


In [6]:
from __future__ import division, print_function
import os
if os.path.split(os.getcwd())[-1] == "Lab notebooks":
    os.chdir("../../")
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import Modules.processing as pr
import Modules.plotting as pl
%load_ext autoreload
%autoreload 2
%matplotlib inline

Got in at about 10 AM. Didn't turn off DAQ last night so that appears to be working fine. Test processed a run from last night and results look just like what we expect.

Homed tow and turbine axes.


In [26]:
r = pr.Run("Perf", 2)
print(r.mean_tsr)
print(r.mean_cp)
print(r.mean_cd)
s = 5
plt.plot(r.angle[:s*2000], r.cp[:s*2000])
plt.show()


2.00109375829
0.256487206631
0.967965271976

In [27]:
pr.process_latest_run("Perf")


Processing latest run in Perf

Summary for Perf run 4:
run                 4.000000
tow_speed_nom       1.000000
tsr_nom             2.800000
mean_tow_speed      0.999769
std_tow_speed       0.010182
t1                 15.000000
t2                 30.700000
n_blade_pass       42.000000
n_revs             14.000000
mean_tsr            2.800778
mean_cp             0.100351
mean_cd             1.062450
std_tsr             0.044355
std_cp              0.066167
std_cd              0.436838
std_tsr_per_rev     0.004151
std_cp_per_rev      0.014371
std_cd_per_rev      0.019537
exp_unc_tsr         0.009306
exp_unc_cp          0.032552
exp_unc_cd          0.043806
dof_tsr            13.000167
dof_cp             13.974549
dof_cd             13.010691
dtype: float64

In [30]:
s = pr.Section("Perf")
s.process()

In [33]:
omega = s.data.rpm*2*np.pi/60
s.data["tsr"] = omega*pr.R/1
power = s.data.torque*omega
s.data["cp"] = power/(0.5*1000*1*1**3)
s.data["cd"] = s.data.drag/(0.5*1000*1*1**2)
s.data


Out[33]:
tow_speed rpm torque drag tsr cp cd
run
0 0.999737 22.911482 29.297704 377.696892 1.199642 0.140587 0.755394
1 0.999723 30.576568 36.566590 440.679143 1.600985 0.234170 0.881358
2 0.999749 38.214584 31.466900 483.666696 2.000911 0.251850 0.967333
3 0.999736 45.828674 20.867135 512.859426 2.399584 0.200290 1.025719
4 0.999769 53.483139 8.960410 530.745002 2.800371 0.100370 1.061490

In [35]:
plt.figure()
plt.plot(s.data.tsr, s.data.cp, "-o")
plt.xlabel(r"$\lambda$")
plt.ylabel(r"$C_P$")

plt.figure()
plt.plot(s.data.tsr, s.data.cd, "-s")
plt.xlabel(r"$\lambda$")
plt.ylabel(r"$C_D$")
plt.show()