-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotsenscoeffs.py
More file actions
101 lines (71 loc) · 3.59 KB
/
plotsenscoeffs.py
File metadata and controls
101 lines (71 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/python
import pandas as pd
import matplotlib.pyplot as plt
from subprocess import call
from matplotlib import rc
import numpy as np
from matplotlib import figure
Normfac = 0.786707 # Radial displacement nominal aligned with stacking axis for tuned case
plt.rcParams["figure.figsize"] = (10,3)
#********************** LINEAR *********************************
df = pd.read_csv('./outputALnode3134.txt',
header=None,
sep='\s+', error_bad_lines=False)
df.columns = ['D1','D2','D3']
df.head()
linaxAL=df['D1'].values/Normfac
lintanAL=df['D2'].values/Normfac
linradAL=df['D3'].values/Normfac
df = pd.read_csv('./outputBEnode3134.txt',
header=None,
sep='\s+', error_bad_lines=False)
df.columns = ['D1','D2','D3']
df.head()
linaxBE=df['D1'].values/Normfac
lintanBE=df['D2'].values/Normfac
linradBE=df['D3'].values/Normfac
df = pd.read_csv('./outputZEnode3134.txt',
header=None,
sep='\s+', error_bad_lines=False)
df.columns = ['D1','D2','D3']
df.head()
linaxZE=df['D1'].values/Normfac
lintanZE=df['D2'].values/Normfac
linradZE=df['D3'].values/Normfac
blnum=[i+1 for i in range(75)]
p1=plt.bar(blnum,linaxAL,width=1.0,color="none",edgecolor='k')
p2=plt.bar(blnum,linradAL,width=0.8,color="r")
p3=plt.bar(blnum,lintanAL,width=0.6,color="b")
plt.xlim([1,76])
plt.xticks(np.arange(75),(' ','1',' ',' ',' ',' ',' ',' ',' ',' ','10',' ',' ',' ',' ',' ',' ',' ',' ',' ','20',' ',' ',' ',' ',' ',' ',' ',' ',' ','30',' ',' ',' ',' ',' ',' ',' ',' ',' ','40',' ',' ',' ',' ',' ',' ',' ',' ',' ','50',' ',' ',' ',' ',' ',' ',' ',' ',' ','60',' ',' ',' ',' ',' ',' ',' ',' ',' ','70',' ',' ',' ',' ','75'))
plt.xlabel('Blade number',fontsize=16)
plt.ylabel('Sensitivity (1/rad)',fontsize=16)
plt.legend((p1,p2,p3),('Axial','Radial','Tangential'))
plt.tick_params(axis='both', which='major', labelsize=12)
plt.tight_layout()
plt.savefig('LinSensitivityAL.png', dpi=300)
plt.show()
p1=plt.bar(blnum,linaxBE,width=1.0,color="none",edgecolor='k')
p2=plt.bar(blnum,linradBE,width=0.8,color="r")
p3=plt.bar(blnum,lintanBE,width=0.6,color="b")
plt.xlim([1,76])
plt.xticks(np.arange(75),(' ','1',' ',' ',' ',' ',' ',' ',' ',' ','10',' ',' ',' ',' ',' ',' ',' ',' ',' ','20',' ',' ',' ',' ',' ',' ',' ',' ',' ','30',' ',' ',' ',' ',' ',' ',' ',' ',' ','40',' ',' ',' ',' ',' ',' ',' ',' ',' ','50',' ',' ',' ',' ',' ',' ',' ',' ',' ','60',' ',' ',' ',' ',' ',' ',' ',' ',' ','70',' ',' ',' ',' ','75'))
plt.xlabel('Blade number',fontsize=16)
plt.ylabel('Sensitivity (1/rad)',fontsize=16)
plt.legend((p1,p2,p3),('Axial','Radial','Tangential'))
plt.tick_params(axis='both', which='major', labelsize=12)
plt.tight_layout()
plt.savefig('LinSensitivityBE.png', dpi=300)
plt.show()
p1=plt.bar(blnum,linaxZE,width=1.0,color="none",edgecolor='k')
p2=plt.bar(blnum,linradZE,width=0.8,color="r")
p3=plt.bar(blnum,lintanZE,width=0.6,color="b")
plt.xlim([1,76])
plt.xticks(np.arange(75),(' ','1',' ',' ',' ',' ',' ',' ',' ',' ','10',' ',' ',' ',' ',' ',' ',' ',' ',' ','20',' ',' ',' ',' ',' ',' ',' ',' ',' ','30',' ',' ',' ',' ',' ',' ',' ',' ',' ','40',' ',' ',' ',' ',' ',' ',' ',' ',' ','50',' ',' ',' ',' ',' ',' ',' ',' ',' ','60',' ',' ',' ',' ',' ',' ',' ',' ',' ','70',' ',' ',' ',' ','75'))
plt.xlabel('Blade number',fontsize=16)
plt.ylabel('Sensitivity (1/rad)',fontsize=16)
plt.legend((p1,p2,p3),('Axial','Radial','Tangential'))
plt.tick_params(axis='both', which='major', labelsize=12)
plt.tight_layout()
plt.savefig('LinSensitivityZE.png', dpi=300)
plt.show()