Skip to content
Snippets Groups Projects
Commit 6fbbc813 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

synchronized README and README.md

parent 458fe3db
No related branches found
No related tags found
No related merge requests found
Pipeline #
Introduction
============
The Wind Energy Toolbox (or ``wetb``, pronounce as wee-tee-bee) is a [![build status](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/badges/master/build.svg)](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/commits/master)
collection of Python scripts that facilitate working with (potentially a [![coverage report](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/badges/master/coverage.svg)](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/commits/master)
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 # Introduction
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.
How to create HAWC2 DLB's and run them on a cluster 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.
The process of how to generated, run and post-process a design load Note that this toolbox is very much a WIP (work in progress). For example,
basis (DLB) of HAWC2 simulations on a DTU Wind Energy cluster is some of the functions in the [prepost](#prepost) module have a similar functions
outlined in more detail in the documentation: in [Hawc2io](wetb/hawc2/Hawc2io.py). These different implementations will be
merged in due time.
- `Auto-generation of Design Load Cases <docs/howto-make-dlcs.md>`__ Both Python2 and Python3 are supported.
- `House rules mimer/hawc2sim and HAWC2 folder
structure <docs/houserules-mimerhawc2sim.md>`__
- `Generate DLB spreadsheets <docs/generate-spreadsheet.md>`__
- `How to use the Statistics DataFrame <docs/using-statistics-df.md>`__
You can also use the Pdap for post-processing, which includes a MS Word # Installation
report generator based on a full DLB, a GUI for easy plotting of HAWC2
result files, and a Python scripting interface:
- `Pdap <http://www.hawc2.dk/Download/Post-processing-tools/Pdap>`__ For a more detailed overview, see: [docs/install](docs/install.md)
- `Pdap
report/docs <http://orbit.dtu.dk/en/publications/post-processing-of-design-load-cases-using-pdap%28827c432b-cf7d-44eb-899b-93e9c0648ca5%29.html>`__
Works with Python 2 and Python 3
================================
This module is tested for Python 2 and 3 compatibility, and works on # Contents of WindEnergyToolbox, [wetb](wetb)
both Windows and Linux. Testing for Mac is on the way, but in theory it
should work. Python 2 and 3 compatibility is achieved with a single code
base with the help of the Python module
`future <http://python-future.org/index.html>`__.
Switching to Python 3 is in general a very good idea especially since ### Overview
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>`__.
So if you are still on Python 2, we would recommend you to give Python 3
a try!
You can automatically convert your code from Python 2 to 3 using the - [hawc2](#hawc2)
`2to3 <https://docs.python.org/2/library/2to3.html>`__ utility which is - [gtsdf](#gtsdf)
included in Python 2.7 by default. You can also write code that is - [fatigue_tools](#fatigue_tools)
compatible with both 2 and 3 at the same time (you can find additional - [wind](#wind)
resources in `issue - [dlc](#dlc)
1 <https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues/1>`__). - [prepost](#prepost)
- [fast](#fast)
- [utils](#utils)
Dependencies ### [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
- [ae_file](wetb/hawc2/ae_file.py): Read AE (aerodynamic blade layout) files
- [pc_file](wetb/hawc2/pc_file.py): Read PC (profile coefficient) files
- [shear_file](wetb/hawc2/shear_file.py): Create user defined shear file
- [at_time_file](wetb/hawc2/at_time_file.py): Read at output_at_time files
- [log_file](wetb/hawc2/log_file.py): Read and interpret log files
- [ascii2bin](wetb/hawc2/ascii2bin): Compress HAWC2 ascii result files to binary
- `numpy <http://www.numpy.org/>`__ ### [gtsdf](wetb/gtsdf)
General Time Series Data Format, a binary hdf5 data format for storing time series data.
- [gtsdf](wetb/gtsdf/gtsdf.py): read/write/append gtsdf files
- [unix_time](wetb/gtsdf/unix_time.py): convert between datetime and unix time (seconds since 1/1/1970)
- `cython <http://cython.org/>`__ ### [fatigue_tools](wetb/fatigue_tools)
- [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
- `scipy <http://scipy.org/scipylib/>`__ ### [wind](wetb/wind)
- [shear](wetb/wind/shear.py): Calculate and fit wind shear
- `pandas <http://pandas.pydata.org/>`__ ### [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
- xlrd and xlwt from `python-excel <http://www.python-excel.org/>`__ ### [prepost](wetb/prepost)
Module for creating an arbitrary number of HAWC2 simulations, and optionally
- `openpyxl <http://openpyxl.readthedocs.org/en/default/>`__ corresponding execution scripts for a PBS Torque cluster (Linux), simple bash
(Linux), or Windows batch scripts. A post-processing module is also included
- h5py that calculates statistical parameters, performs rainflow counting for fatigue
load calculations, and create load envelopes.
- `matplotlib <http://matplotlib.org/>`__
- `pytables <http://www.pytables.org/>`__
- `pyscaffold <http://pyscaffold.readthedocs.org/en/>`__
- pytest, pytest-cov
- six, `future <http://python-future.org/index.html>`__
Installation
============
Detailed installation instructions, including how to install Python from
scratch, are described in the `detailed installation
manual <docs/install-manual-detailed.md>`__.
If you know what you are doing, you can install as a package as follows:
::
python setup.py install
Or in development mode, install from your working directory
::
pip install -e ./
Or create a binary wheel distribution package with:
::
python setup.py bdist_wheel -d dist
Tests
=====
Only a small part of the code is covered by unittests currently. More
tests are forthcoming.
Contents of WindEnergyToolbox, `wetb <wetb>`__
==============================================
Overview
~~~~~~~~
- `hawc2 <#hawc2>`__
- `gtsdf <#gtsdf>`__
- `fatigue\_tools <#fatigue_tools>`__
- `wind <#wind>`__
- `dlc <#dlc>`__
- `prepost <#prepost>`__
- `fast <#fast>`__
- `utils <#utils>`__
`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
- `ae\_file <wetb/hawc2/ae_file.py>`__: Read AE (aerodynamic blade
layout) files
- `pc\_file <wetb/hawc2/pc_file.py>`__: Read PC (profile coefficient)
files
- `shear\_file <wetb/hawc2/shear_file.py>`__: Create user defined shear
file
- `at\_time\_file <wetb/hawc2/at_time_file.py>`__: Read at
output\_at\_time files
- `log\_file <wetb/hawc2/log_file.py>`__: Read and interpret log files
- `ascii2bin <wetb/hawc2/ascii2bin>`__: Compress HAWC2 ascii result
files to binary
`gtsdf <wetb/gtsdf>`__
~~~~~~~~~~~~~~~~~~~~~~
General Time Series Data Format, a binary hdf5 data format for storing
time series data. - `gtsdf <wetb/gtsdf/gtsdf.py>`__: read/write/append
gtsdf files - `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 equivalent loads
- `bearing\_damage <wetb/fatigue_tools/bearing_damage.py>`__: Calculate
a comparable measure of bearing damage
`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
`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.
Additional documentation can be found here: Additional documentation can be found here:
- `Auto-generation of Design Load Cases <docs/howto-make-dlcs.md>`__ - [Auto-generation of Design Load Cases](docs/howto-make-dlcs.md)
- [How to use the Statistics DataFrame](docs/using-statistics-df.md)
- `How to use the Statistics DataFrame <docs/using-statistics-df.md>`__ - [Generate DLB spreadsheets](docs/generate-spreadsheet.md)
`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
`utils <wetb/utils>`__
~~~~~~~~~~~~~~~~~~~~~~
Other functions - `geometry <wetb/utils/geometry.py>`__: Different kind ### [fast](wetb/fast)
of geometry conversion functions - Tools for working with NREL's FAST code (An aeroelastic computer-aided engineering (CAE) tool for horizontal axis wind turbines)
`process\_exec <wetb/utils/process_exec.py>`__: Run system command in - [fast_io](wetb/fast/fast_io.py): Read binary and ascii result files
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
Note ### [utils](wetb/utils)
==== 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
This project has been set up using PyScaffold 2.5. For details and usage
information on PyScaffold see http://pyscaffold.readthedocs.org/.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment