Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wtlib
WindEnergyToolbox
Commits
bc47f733
Commit
bc47f733
authored
9 years ago
by
mads
Browse files
Options
Downloads
Patches
Plain Diff
deleted dlc_fatigue.py
parent
fb95623f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
wetb/dlc/dlc_fatigue.py
+0
-84
0 additions, 84 deletions
wetb/dlc/dlc_fatigue.py
with
6 additions
and
84 deletions
README.md
+
6
−
0
View file @
bc47f733
...
...
@@ -4,6 +4,7 @@
-
[
gtsdf
](
#gtsdf
)
-
[
fatigue_tools
](
#fatigue_tools
)
-
[
wind
](
#wind
)
-
[
dlc
](
#dlc
)
-
[
fast
](
#fast
)
-
[
functions
](
#functions
)
...
...
@@ -30,6 +31,11 @@ General Time Series Data Format, a binary hdf5 data format for storing time seri
### [wind](wetb/wind)
-
[
shear
](
wetb/wind/shear.py
)
: Calculate and fit wind shear
### [dlc](wetb/dlc)
Module for working with "Design load cases" (Code independent)
-
[
high_level
](
wetb/dlc/high_level.py
)
Class for working with the highlevel dlc excell sheet
### [fast](wetb/fast)
Tools for working with NREL's FAST code (An aeroelastic computer-aided engineering (CAE) tool for horizontal axis wind turbines)
-
[
fast_io
](
wetb/fast/fast_io.py
)
: Read binary and ascii result files
...
...
This diff is collapsed.
Click to expand it.
wetb/dlc/dlc_fatigue.py
deleted
100644 → 0
+
0
−
84
View file @
fb95623f
'''
Created on 23/09/2014
@author: MMPE
'''
import
numpy
as
np
import
glob
import
os
HOURS_PR_YEAR
=
365.0
*
24.0
def
Weibull
(
u
,
k
,
start
,
stop
,
step
):
C
=
2
*
u
/
np
.
sqrt
(
np
.
pi
)
cdf
=
lambda
x
:
-
np
.
exp
(
-
(
x
/
C
)
**
k
)
wsprange
=
(
np
.
arange
(
start
,
stop
+
step
*
0.01
,
step
)).
tolist
()
return
{
wsp
:
-
cdf
(
wsp
-
step
/
2
)
+
cdf
(
wsp
+
step
/
2
)
for
wsp
in
wsprange
}
def
dlc_dict
(
Vin
=
4
,
Vr
=
12
,
Vout
=
26
,
Vref
=
50
,
Vstep
=
2
,
shape_k
=
2
):
weibull
=
Weibull
(
Vref
*
0.2
,
shape_k
,
Vin
,
Vout
,
Vstep
)
return
{
#dlc : (hour_dist, yaw, wsp
'
12
'
:
(.
975
,
weibull
,
{
0
:.
5
,
10
:.
25
,
-
10
:.
25
}),
#normal
'
64
'
:
(.
025
,
Weibull
(
Vref
*
0.2
,
shape_k
,
Vin
,
Vref
*
0.7
,
Vstep
),
{
8
:.
5
,
-
8
:.
5
}),
#idle
'
24
'
:
(
50.0
/
HOURS_PR_YEAR
,
weibull
,
{
-
20
:.
5
,
20
:.
5
}),
# Yaw error
'
31
'
:
(
1100
*
100
/
3600
/
HOURS_PR_YEAR
,
{
Vin
:
1000
/
1100
,
Vr
:
50
/
1100
,
Vout
:
50
/
1100
},
{
0
:
1
}),
#start ups
'
41
'
:
(
1100
*
100
/
3600
/
HOURS_PR_YEAR
,
{
Vin
:
1000
/
1100
,
Vr
:
50
/
1100
,
Vout
:
50
/
1100
},
{
0
:
1
})
#shut down
}
def
file_hour_lst
(
path
,
dlc_dict
,
dlc_folder
=
"
DLC%s_IEC61400-1ed3/
"
,
dlc_name
=
"
dlc%s_wsp%02d_wdir%03d_s*.sel
"
,
years
=
20.0
):
"""
Create a list of (filename, hours_pr_year) that can be used as input for LifeTimeEqLoad
Parameters
----------
path : str
path to result folder, i.e. dlc12 result files are found in path +
"
DLC12_IEC61400-1ed3/*.sel
"
dlc_dict : dict
Dictionary of {dlc_id: (dlc_prob, wsp_dict, wdir_dict, wsp),...} where
\n
- dlc_id is the design load case id, e.g.
'
12
'
\n
- dlc_prob is the probability of the dlc_id, e.g. 0.95 for dlc12, i.e 95% normal operation
\n
- wsp_dict is a dictionary of {wsp: wsp_prob,...} see dlc_fatigue.Weibull where
\n
- wsp is a wind speed, e.g. 10 for 10m/s
- wsp_prob is the probability of the wind speed, e.g. .14 for 14%
- wdir_dict is a dictionary of {wdir: wdir_prob,...} where
\n
- wdir is a wind direction(yaw error), e.g. 10 for 10 deg yaw error
- wdir_prob is the probability of the wind direction(yaw error), e.g. .25 for 25%
dlc_folder : str, default=
"
DLC%s_IEC61400-1ed3/
"
String with the DLC subfolder names. One string substitution is required
(%s), and should represent the DLC number (withouth comma or point)
dlc_name : str, default=
"
dlc%s_wsp%02d_wdir%03d_s*.sel
"
String with the DLC names. One string, and two integer substitutions
are required (%s, %02d, %03d), indicating the DLC number (e.g.
'
12
'
),
the windspeed (e.g. int(6)), and wind speed direction (e.g. int(10))
respectively. Notice that different seed numbers are covered with the
wildcard *.
years : float, default=20.0
Life time years.
Returns
-------
file_hour_lst : list
[(filename, hours),...] where
\n
- filename is the name of the file, including path
- hours is the number of hours pr. 20 year (or whatever is defined in
the `years` variable) of this file
"""
fh_lst
=
[]
for
dlc_id
in
sorted
(
dlc_dict
.
keys
()):
dlc_dist
,
wsp_dict
,
wdir_dict
=
dlc_dict
[
dlc_id
]
for
wsp
in
sorted
(
wsp_dict
.
keys
()):
wsp_dist
=
wsp_dict
[
wsp
]
for
wdir
in
sorted
(
wdir_dict
.
keys
()):
wdir_dist
=
wdir_dict
[
wdir
]
folder
=
os
.
path
.
join
(
path
,
dlc_folder
%
dlc_id
)
name
=
dlc_name
%
(
dlc_id
,
wsp
,
wdir
%
360
)
files
=
glob
.
glob
(
os
.
path
.
join
(
folder
,
name
))
for
f
in
sorted
(
files
):
f_prob
=
dlc_dist
*
wsp_dist
*
wdir_dist
/
len
(
files
)
f_hours_lifetime
=
years
*
HOURS_PR_YEAR
*
f_prob
fh_lst
.
append
((
f
,
f_hours_lifetime
))
return
fh_lst
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment