Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Frederik Zahle
SEAMRotor
Commits
a5009e0c
Commit
a5009e0c
authored
Jul 08, 2015
by
Frederik Zahle
Browse files
added plots
parent
2c452ad4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SEAMRotor/SEAMRotor.py
View file @
a5009e0c
...
...
@@ -157,8 +157,8 @@ class SEAMBladeStructure(Component):
# Calculating the final thickness for flap and edge direction
tfinal_flap
=
np
.
maximum
(
text_flap
,
tfat_flap
)
tfinal_edge
=
np
.
maximum
(
text_edge
,
tfat_edge
)
self
.
tfinal_flap
=
tf
at
_flap
self
.
tfinal_edge
=
tf
at
_edge
self
.
tfinal_flap
=
tf
inal
_flap
self
.
tfinal_edge
=
tf
inal
_edge
# Calculating different costs and mass
for
i
in
range
(
0
,
int
(
self
.
Nsections
)):
if
i
>
0
:
...
...
@@ -170,7 +170,7 @@ class SEAMBladeStructure(Component):
print
'volumen'
,
volumen
print
'BladeWeigth'
,
self
.
BladeWeight
#
#
# rotor = self.BladeWeight*self.BladeCostPerMass/1e6 # Meuro
# print 'rotor', rotor
...
...
@@ -225,3 +225,46 @@ class SEAMBladeStructure(Component):
sfat
=
np
.
maximum
(
1.e-6
,
self
.
SF_blade
*
1.e3
*
Mfat_edge
/
W
/
1.e6
)
PM
=
self
.
Neq
/
(
pow
(
10
,
(
self
.
Slim_fat_blade
-
self
.
WohlerExpFlap
*
np
.
log10
(
sfat
))))
return
abs
(
PM
-
self
.
PMtarget
)
/
norm
def
plot
(
self
,
fig
):
"""
function to generate Bokeh plot for web GUI.
Also callable from an ipython notebook
parameters
----------
fig: object
Bokeh bokeh.plotting.figure object
returns
-------
fig: object
Bokeh bokeh.plotting.figure object
"""
try
:
# formatting
fig
.
title
=
'Power curve'
fig
.
xaxis
[
0
].
axis_label
=
'Wind speed [m/s]'
fig
.
yaxis
[
0
].
axis_label
=
'Power production [kW]'
# fatigue, ultimate and final thickness line plots
# fig.line(self.r, self.self.text_flap, line_color='orange',
# line_width=3,
# legend='Extreme flap')
# fig.line(self.r, self.text_edge, line_color='green',
# line_width=3,
# legend='Extreme edge')
# fig.line(self.r, self.tfat_flap, line_color='blue',
# line_width=3,
# legend='Fatigue flap')
fig
.
line
(
self
.
r
,
self
.
tfinal_flap
,
line_color
=
'red'
,
line_width
=
3
,
legend
=
'tfinal_flap edge'
)
fig
.
line
(
self
.
r
,
self
.
tfinal_edge
,
line_color
=
'blue'
,
line_width
=
3
,
legend
=
'tfinal_edge'
)
except
:
pass
return
fig
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment