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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
toolbox
WindEnergyToolbox
Commits
cbca5075
Commit
cbca5075
authored
9 years ago
by
mads
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox
parents
93ba4621
86b77cf6
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
+55
-3
55 additions, 3 deletions
README.md
wetb/hawc2/htc_file.py
+1
-1
1 addition, 1 deletion
wetb/hawc2/htc_file.py
with
56 additions
and
4 deletions
README.md
+
55
−
3
View file @
cbca5075
# Introduction
The Wind Energy Toolbox (or
```wetb```
, pronounce as wee-tee-bee) is a collection
of Python scripts that facilitate working with (potentially a lot) of HAWC2,
HAWCStab2, FAST or other text input based simulation tools.
Note that this toolbox is very much a WIP (work in progress). For example,
some of the functions in the
[
prepost
](
#prepost
)
module have a similar functions
in
[
Hawc2io
](
wetb/hawc2/Hawc2io.py
)
. These different implementations will be
merged in due time.
# Python 3
This module currently only works under Python 3. If you are working in Python 2,
this could be a good moment to consider switching. If you are bound to Python 2
due to critical 3th party dependencies you are encouraged to cast your vote for
Python 2 compatibility in
[
issue 1
](
https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues/1
)
.
Switching to Python 3 is in general a very good idea especially since Python 3.5
was released. Some even dare to say it
[
is like eating your vegetables
](
http://nothingbutsnark.svbtle.com/porting-to-python-3-is-like-eating-your-vegetables
)
.
You can automatically convert you code from Python 2 to 3 using the
[
2to3
](
https://docs.python.org/2/library/2to3.html
)
utility which is included
in Python 2.7 by default. You can also write code that is compatible with both
2 and 3 at the same time (you can find additional resources in
[
issue 1
](
https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues/1
)
).
# Installation
```
python setup.py
```
# Tests
Only a small part of the code is covered by unittests currently. More tests are
forthcoming.
# Contents of WindEnergyToolbox, [wetb](wetb)
-
[
hawc2
](
#hawc2
)
...
...
@@ -5,11 +49,12 @@
-
[
fatigue_tools
](
#fatigue_tools
)
-
[
wind
](
#wind
)
-
[
dlc
](
#dlc
)
-
[
prepost
](
#prepost
)
-
[
fast
](
#fast
)
-
[
utils
](
#utils
)
------------------------------------------------------------------------------------
### [hawc2](wetb/hawc2)
### [hawc2](wetb/hawc2)
-
[
Hawc2io
](
wetb/hawc2/Hawc2io.py
)
: Read binary, ascii and flex result files
-
[
sel_file
](
wetb/hawc2/sel_file.py
)
: Read/write
*
.sel (sensor list) files
-
[
htc_file
](
wetb/hawc2/htc_file.py
)
: Read/write/manipulate htc files
...
...
@@ -26,7 +71,7 @@ General Time Series Data Format, a binary hdf5 data format for storing time seri
-
[
unix_time
](
wetb/gtsdf/unix_time.py
)
: convert between datetime and unix time (seconds since 1/1/1970)
### [fatigue_tools](wetb/fatigue_tools)
-
[
fatigue
](
wetb/fatigue_tools/fatigue.py
)
: Rainflow counting, cycle matrix and equ
v
ivalent loads
-
[
fatigue
](
wetb/fatigue_tools/fatigue.py
)
: Rainflow counting, cycle matrix and equivalent loads
-
[
bearing_damage
](
wetb/fatigue_tools/bearing_damage.py
)
: Calculate a comparable measure of bearing damage
### [wind](wetb/wind)
...
...
@@ -36,6 +81,12 @@ General Time Series Data Format, a binary hdf5 data format for storing time seri
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
### [prepost](wetb/prepost)
Module for creating an arbitrary number of HAWC2 simulations, and optionally
corresponding execution scripts for a PBS Torque cluster (Linux), simple bash
(Linux), or Windows batch scripts. A post-processing module is also included
that calculates statistical parameters, performs rainflow counting for fatigue
load calculations, and create load envelopes.
### [fast](wetb/fast)
Tools for working with NREL's FAST code (An aeroelastic computer-aided engineering (CAE) tool for horizontal axis wind turbines)
...
...
@@ -46,4 +97,5 @@ Other functions
-
[
geometry
](
wetb/utils/geometry.py
)
: Different kind of geometry conversion functions
-
[
process_exec
](
wetb/utils/process_exec.py
)
: Run system command in subprocess
-
[
timing
](
wetb/utils/timing.py
)
: Decorators for evaluating execution time of functions
-
[
caching
](
wetb/utils/caching.py
)
: Decorators to create cached (calculate once) functions and properties
\ No newline at end of file
-
[
caching
](
wetb/utils/caching.py
)
: Decorators to create cached (calculate once) functions and properties
This diff is collapsed.
Click to expand it.
wetb/hawc2/htc_file.py
+
1
−
1
View file @
cbca5075
...
...
@@ -66,7 +66,7 @@ class HTCFile(HTCContents, HTCDefaults):
self
.
contents
[
key
]
=
value
def
__str__
(
self
):
return
""
.
join
(
self
.
initial_comments
+
[
c
.
__str__
(
1
)
for
c
in
self
])
return
"
\n
"
.
join
(
self
.
initial_comments
)
+
"
\n
"
+
""
.
join
(
[
c
.
__str__
(
1
)
for
c
in
self
])
def
save
(
self
,
filename
=
None
):
if
filename
is
None
:
...
...
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