Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SEAM
SEAMAero
Commits
8fd3d670
Commit
8fd3d670
authored
Jul 08, 2015
by
Frederik Zahle
Browse files
added a plot
parent
bd9fd134
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SEAMAero/SEAM_AEP.py
View file @
8fd3d670
...
...
@@ -134,12 +134,44 @@ class SEAM_AEP(Component):
NHours
[
i
]
=
8760.
*
((
1
-
np
.
exp
(
-
np
.
exp
(
self
.
WeibullC
*
np
.
log
((
wsp
[
i
]
+
0.5
)
/
self
.
WeibullA
))))
-
\
(
1
-
np
.
exp
(
-
np
.
exp
(
self
.
WeibullC
*
np
.
log
((
wsp
[
i
]
-
0.5
)
/
self
.
WeibullA
)))))
AEPprWSP
=
P_turb
*
NHours
AEPSum
=
np
.
sum
(
AEPprWSP
/
1000000.
)
self
.
aep_pr_wsp
=
P_turb
*
NHours
AEPSum
=
np
.
sum
(
self
.
aep_pr_wsp
*
1.e-6
)
self
.
aep
=
AEPSum
self
.
total_aep
=
AEPSum
*
self
.
NYears
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
=
'Energy production'
fig
.
xaxis
[
0
].
axis_label
=
'Wind speed [m/s]'
fig
.
yaxis
[
0
].
axis_label
=
'Energy production [kWh]'
# fatigue, ultimate and final thickness line plots
fig
.
line
(
self
.
wind_curve
,
self
.
aep_pr_wsp
,
line_color
=
'orange'
,
line_width
=
3
)
fig
.
legend
[
0
].
orientation
=
'top_right'
except
:
pass
return
fig
class
SEAMAEP
(
Assembly
):
...
...
Write
Preview
Markdown
is supported
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