Skip to content

Commit 0769598

Browse files
authored
Release v2.0.0 (PR OpenFAST#185)
Merge openfast/dev into openfast/master
2 parents e788b9b + 67d03f6 commit 0769598

227 files changed

Lines changed: 16367 additions & 9400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
*.exe
2828
*.out
2929
*.app
30+
__pycache__/*
3031
*.pyc
3132

32-
# CMake specific files
33-
build/**/*
34-
install/*
35-
ctest-build/*
33+
# Build specific files
34+
build*/
35+
install/
36+
vs-build/
3637

37-
# vs-build specific folders and files
38-
vs-build/*
39-
40-
41-
build
38+
# OS and IDE specific files
4239
.DS_Store
40+
.vscode
41+
.atom
42+
.fortls

‎.gitmodules‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[submodule "reg_tests/r-test"]
22
path = reg_tests/r-test
33
url = https://github.com/openfast/r-test.git
4-
branch = dev
54
[submodule "unit_tests/pfunit"]
65
path = unit_tests/pfunit
7-
url = https://git.code.sf.net/p/pfunit/code
6+
url = https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git

‎.travis.yml‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Travis CI configuration
2+
#
3+
# Environment info
4+
# https://docs.travis-ci.com/user/reference/overview/
5+
# https://docs.travis-ci.com/user/reference/osx/
6+
# https://docs.travis-ci.com/user/reference/trusty/
7+
8+
language: c
9+
10+
os:
11+
- linux
12+
- osx
13+
14+
# linux configuration; container-based environments (default for linux) require the following setup block
15+
addons:
16+
apt:
17+
packages:
18+
- gfortran
19+
- libblas-dev
20+
- liblapack-dev
21+
22+
env:
23+
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
24+
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
25+
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
26+
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF
27+
28+
# mac configuration
29+
before_install:
30+
# first uninstall a conflicting package
31+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask uninstall oclint; fi
32+
33+
# install required packages
34+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
35+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
36+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc@7; fi
37+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake; fi # cmake is already installed in the default mac image
38+
39+
# common configuration
40+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.6.3; fi
41+
- pip3 install numpy
42+
43+
install:
44+
- mkdir build && cd build
45+
- cmake .. -DBUILD_TESTING=ON -DDOUBLE_PRECISION=$DOUBLE_PRECISION
46+
- make -j 8 install
47+
48+
matrix:
49+
exclude:
50+
- os: linux
51+
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
52+
- os: linux
53+
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
54+
- os: osx
55+
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
56+
- os: osx
57+
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF
58+
59+
script:
60+
# beamdyn unit tests
61+
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R beamdyn_utest; fi
62+
63+
# beamdyn regression tests
64+
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R bd_; fi
65+
66+
# subset of openfast regression tests
67+
# do not run
68+
# - 3, 4, 7, 15, 16, 17 since the free yaw is not well trusted
69+
# - 20, 21 because theyre too long
70+
# THIS IS COMMENTED UNTIL TESTS CAN RELIABLY DETERMINE REGRESSION
71+
# CURRENTLY, TESTS FAIL WITH VERY MINOR DIFFERENCES
72+
# - ctest -VV -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26
73+
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ctest -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26 ; fi
74+

‎CMakeLists.txt‎

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
cmake_minimum_required(VERSION 2.8.12)
1818
project(OpenFAST CXX C Fortran)
1919

20-
include(${CMAKE_SOURCE_DIR}/cmake/FastCmakeUtils.cmake)
21-
include(${CMAKE_SOURCE_DIR}/cmake/FastFortranOptions.cmake)
20+
include(${CMAKE_SOURCE_DIR}/cmake/OpenfastCmakeUtils.cmake)
21+
include(${CMAKE_SOURCE_DIR}/cmake/OpenfastFortranOptions.cmake)
2222

2323
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
2424

@@ -39,7 +39,7 @@ option(DOUBLE_PRECISION "Treat REAL as double precision" on)
3939
option(USE_DLL_INTERFACE "Enable runtime loading of dynamic libraries" on)
4040
option(FPE_TRAP_ENABLED "Enable FPE trap in compiler options" off)
4141
option(ORCA_DLL_LOAD "Enable OrcaFlex Library Load" off)
42-
option(BUILD_FAST_CPP_API "Enable building FAST - C++ API" off)
42+
option(BUILD_OPENFAST_CPP_API "Enable building OpenFAST - C++ API" off)
4343

4444
# Setup Fortran Compiler options based on architecture/compiler
4545
set_fast_fortran()
@@ -53,8 +53,18 @@ if (FPE_TRAP_ENABLED)
5353
endif (FPE_TRAP_ENABLED)
5454

5555
# Setup dependencies
56-
find_package(BLAS REQUIRED)
57-
find_package(LAPACK REQUIRED)
56+
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
57+
find_package(MKL)
58+
endif()
59+
if (MKL_FOUND)
60+
include_directories(${MKL_INCLUDE_DIRS})
61+
set(BLAS_LIBRARIES ${MKL_LIBRARIES})
62+
set(LAPACK_LIBRARIES ${MKL_LIBRARIES})
63+
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "ifport;ifcore;imf;svml;m;ipgo;intlc;c;irc_s;dl;c")
64+
else()
65+
find_package(BLAS REQUIRED)
66+
find_package(LAPACK REQUIRED)
67+
endif()
5868

5969
########################################################################
6070
# Test option configuration
@@ -65,14 +75,14 @@ if(BUILD_TESTING)
6575
endif()
6676

6777
########################################################################
68-
# Build rules for FAST Registry
78+
# Build rules for OpenFAST Registry
6979
#
70-
add_subdirectory(modules-local/fast-registry)
80+
add_subdirectory(modules-local/openfast-registry)
7181

7282
########################################################################
73-
# FAST Core modules
83+
# OpenFAST Core modules
7484
#
75-
set(FAST_MODULES_LOCAL
85+
set(OPENFAST_MODULES_LOCAL
7686
nwtc-library
7787
inflowwind
7888
aerodyn
@@ -87,35 +97,35 @@ set(FAST_MODULES_LOCAL
8797
openfoam
8898
supercontroller
8999
turbsim
90-
fast-library
100+
openfast-library
91101
)
92102

93103
########################################################################
94-
# FAST External modules
104+
# OpenFAST External modules
95105
#
96-
set(FAST_MODULES_EXTERNAL
106+
set(OPENFAST_MODULES_EXTERNAL
97107
feamooring
98108
moordyn
99109
icedyn
100110
icefloe
101111
map
102112
)
103113

104-
set(FAST_REGISTRY_INCLUDES "" CACHE INTERNAL "Registry includes paths")
105-
set_registry_includes("modules-local" ${FAST_MODULES_LOCAL})
106-
set_registry_includes("modules-ext" ${FAST_MODULES_EXTERNAL})
107-
# Fix non-standard path addition to FAST_REGISTRY_INCLUDES in icefloe module
108-
set(FAST_REGISTRY_INCLUDES
109-
${FAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules-ext/icefloe/src/interfaces/FAST/
114+
set(OPENFAST_REGISTRY_INCLUDES "" CACHE INTERNAL "Registry includes paths")
115+
set_registry_includes("modules-local" ${OPENFAST_MODULES_LOCAL})
116+
set_registry_includes("modules-ext" ${OPENFAST_MODULES_EXTERNAL})
117+
# Fix non-standard path addition to OPENFAST_REGISTRY_INCLUDES in icefloe module
118+
set(OPENFAST_REGISTRY_INCLUDES
119+
${OPENFAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules-ext/icefloe/src/interfaces/FAST/
110120
CACHE INTERNAL "Registry includes paths")
111121

112-
foreach(IDIR IN ITEMS ${FAST_MODULES_LOCAL})
122+
foreach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})
113123
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-local/${IDIR}")
114-
endforeach(IDIR IN ITEMS ${FAST_MODULES_LOCAL})
124+
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})
115125

116-
foreach(IDIR IN ITEMS ${FAST_MODULES_EXTERNAL})
126+
foreach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})
117127
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-ext/${IDIR}")
118-
endforeach(IDIR IN ITEMS ${FAST_MODULES_EXTERNAL})
128+
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})
119129

120130
add_subdirectory(glue-codes)
121131

@@ -134,7 +144,7 @@ include(CMakePackageConfigHelpers)
134144
set(INCLUDE_INSTALL_DIR include/)
135145
set(LIB_INSTALL_DIR lib/)
136146
set(FTNMOD_INSTALL_DIR include/openfast/)
137-
if (BUILD_FAST_CPP_API)
147+
if (BUILD_OPENFAST_CPP_API)
138148
set(OpenFAST_HAS_CXX_API TRUE)
139149
else()
140150
set(OpenFAST_HAS_CXX_API FALSE)
@@ -150,12 +160,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenFASTConfig.cmake
150160

151161
########################################################################
152162
# Configure the default install path to openfast/install
153-
string(FIND ${CMAKE_Fortran_MODULE_DIRECTORY} "build/ftnmods" found)
154-
if(${found} GREATER 0)
155-
string(REPLACE "build/ftnmods" "install" install_path ${CMAKE_Fortran_MODULE_DIRECTORY})
156-
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
157-
set(CMAKE_INSTALL_PREFIX ${install_path} CACHE PATH "..." FORCE)
158-
endif()
163+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
164+
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install" CACHE PATH
165+
"OpenFAST install directory" FORCE)
159166
endif()
160167

161168
# Option configuration
@@ -172,4 +179,4 @@ endif()
172179
option(BUILD_DOCUMENTATION "Build documentation." OFF)
173180
if(BUILD_DOCUMENTATION)
174181
add_subdirectory(docs)
175-
endif()
182+
endif()

‎README.md‎

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,70 @@
11
# OpenFAST
22

3-
Updated on 2017-03-17
3+
OpenFAST is an open-source wind turbine simulation tool which builds on FAST v8. OpenFAST was created with the goal of being a community model developed and used by research laboratories, academia, and industry. It is managed by a dedicated team at the National Renewable Energy Lab. Our objective is to ensure that OpenFAST is sustainable software that is well tested and well documented.
44

5-
## Overview
5+
**OpenFAST is under active development**.
66

7-
OpenFAST is an open-source wind turbine simulation tool that was established with the FAST v8 code as its starting point (see below). OpenFAST was created with the goal of being a community model, with developers and users from research laboratories, academia, and industry. Our objective is to ensure that OpenFAST is sustainable software that is well tested and well documented. **OpenFAST is under development**; our team at NREL is now establishing online documentation and automated unit/regression testing. During this transition period, users can find FAST v8 documentation at <https://nwtc.nrel.gov/>.
7+
### FAST v8 - OpenFAST v0.1.0
88

9-
## FAST v8
10-
11-
(modified from <https://nwtc.nrel.gov/FAST>)
9+
The transition from FAST v8 to OpenFAST v0.1.0 represents the effort to better support an open-source developer community around FAST-based aero-hydro-servo-elastic engineering models of wind-turbines and wind-plants. OpenFAST is the next generation of FAST analysis tools. More inforation is available in the [transition notes](http://openfast.readthedocs.io/en/latest/source/user/fast_to_openfast.html).
1210

1311
FAST v8 is a computer-aided engineering tool for simulating the coupled dynamic response of wind turbines. FAST joins aerodynamics models, hydrodynamics models for offshore structures, control and electrical system (servo) dynamics models, and structural (elastic) dynamics models to enable coupled nonlinear aero-hydro-servo-elastic simulation in the time domain. The FAST tool enables the analysis of a range of wind turbine configurations, including two- or three-blade horizontal-axis rotor, pitch or stall regulation, rigid or teetering hub, upwind or downwind rotor, and lattice or tubular tower. The wind turbine can be modeled on land or offshore on fixed-bottom or floating substructures. FAST is based on advanced engineering models derived from fundamental laws, but with appropriate simplifications and assumptions, and supplemented where applicable with computational solutions and test data.
1412

1513
The aerodynamic models use wind-inflow data and solve for the rotor-wake effects and blade-element aerodynamic loads, including dynamic stall. The hydrodynamics models simulate the regular or irregular incident waves and currents and solve for the hydrostatic, radiation, diffraction, and viscous loads on the offshore substructure. The control and electrical system models simulate the controller logic, sensors, and actuators of the blade-pitch, generator-torque, nacelle-yaw, and other control devices, as well as the generator and power-converter components of the electrical drive. The structural-dynamics models apply the control and electrical system reactions, apply the aerodynamic and hydrodynamic loads, adds gravitational loads, and simulate the elasticity of the rotor, drivetrain, and support structure. Coupling between all models is achieved through a modular interface and coupler.
1614

17-
## OpenFAST Documentation
18-
We are creating a Sphinx-based documentation site at <http://openfast.readthedocs.io>.
15+
### Documentation
16+
Web based documentation is available at <http://openfast.readthedocs.io>.
17+
18+
This documentation is stored and maintained alongside the source code. It is compiled into html with Sphinx, so it is tied to a particular version of OpenFAST. [readthedocs](http://openfast.readthedocs.io) compiles various versions of the documentation automatically upon new commits:
19+
* `latest` - The latest commit on the `master` branch
20+
* `stable` - Corresponds to the last tagged release
21+
* `dev` - The latest commit on the `dev` branch
22+
23+
These can be toggled with the `v: latest` button in the lower left corner of the docs site.
24+
25+
### Obtaining OpenFAST
26+
27+
OpenFAST is hosted entirely on GitHub so you are in the [right place](https://github.com/OpenFAST/OpenFAST)! The repository is structured with various branches following the "git-flow" convention:
28+
* `master`
29+
* `dev`
1930

20-
Documentation for FAST v8 and its modules may be found at <https://nwtc.nrel.gov/>, while we are building the new site.
31+
The `master` branch is stable, well tested, and represents the most up to date released version of OpenFAST. The latest commit on `master` contains a tag with version info and brief release notes. The tag history can be obtained with the `git tag` command and viewed in more detail on [GitHub Releases](https://github.com/OpenFAST/openfast/releases). For general use, the `master` branch is highly recommended.
2132

22-
## Obtaining OpenFAST
33+
The `dev` branch is generally stable and tested, but not static. It contains new features, bug fixes, and documentation updates that have not been compiled into a production release. Before proceeding with new development, it is recommended to explore the `dev` branch. This branch is updated regularly through pull requests, so be sure to `git fetch` often and check [outstanding pull requests](https://github.com/OpenFAST/openfast/pulls).
2334

24-
You are in the [right place](https://github.com/OpenFAST/OpenFAST)! For those not familiar with git and github, there are many resources, e.g.,
35+
For those not familiar with git and GitHub, there are many resources, e.g.,
2536

2637
* <https://guides.github.com>
2738
* <https://try.github.io>
2839
* <https://help.github.com/categories/bootcamp/>
2940
* <https://desktop.github.com/>
41+
* <http://nvie.com/posts/a-successful-git-branching-model/>
3042

31-
## Compiling, Using & Developing OpenFAST
43+
### Compilation, Usage, and Development
3244

33-
Details for compiling, using, and developing OpenFAST on Linux-based and Windows machines are being established at <http://openfast.readthedocs.io>.
45+
Details for compiling [compiling](http://openfast.readthedocs.io/en/latest/source/install/index.html),
46+
[using](http://openfast.readthedocs.io/en/latest/source/user/index.html), and
47+
[developing](http://openfast.readthedocs.io/en/latest/source/dev/index.html)
48+
OpenFAST on Linux-based and Windows machines are available at
49+
<http://openfast.readthedocs.io>.
3450

35-
## OpenFAST Help
3651

37-
Please use [github issues](https://github.com/OpenFAST/OpenFAST/issues) to:
52+
### Nightly Testing
53+
54+
The `dev` branch is automatically compiled and run through the test suite nightly. The results are publicly available through the [CDash Dashboard](http://my.cdash.org/index.php?project=OpenFAST&date=).
3855

39-
* ask usage questions,
40-
* report bugs,
41-
* request code enhancements.
56+
### Help
57+
58+
Please use [github issues](https://github.com/OpenFAST/OpenFAST/issues) to:
59+
* ask usage questions
60+
* report bugs
61+
* request code enhancements
4262

4363
For other questions regarding OpenFAST, please contact [Mike Sprague](mailto:michael.a.sprague@nrel.gov).
4464

4565
Users and developers may also be interested in the NREL National Wind Technology Center (NWTC) [phpBB Forum](https://wind.nrel.gov/forum/wind/).
4666

47-
## OpenFAST Support
67+
### Acknowledgments
4868

4969
OpenFAST is being maintained and developed by researchers and software engineers at the [National Renewable Energy Laboratory](http://www.nrel.gov/) (NREL), with support from the US Department of Energy's Wind Energy Technology Office. NREL gratefully acknowledges development contributions from the following organizations:
5070

‎cmake/FindMKL.cmake‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Copyright 2016 National Renewable Energy Laboratory
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# find_path(MKL_INCLUDE_DIRS
18+
# mkl.h
19+
# HINTS $ENV{MKLROOT}
20+
# PATH_SUFFIXES include)
21+
22+
find_library(MKL_IFACE_LIB
23+
NAMES mkl_intel_lp64 libmkl_intel_lp64.a mkl_intel_lp64_dll.lib
24+
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
25+
26+
find_library(MKL_SEQ_LIB
27+
NAMES mkl_sequential libmkl_sequential.a mkl_sequential.lib
28+
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
29+
30+
find_library(MKL_CORE_LIB
31+
NAMES mkl_core libmkl_core.a mkl_core_dll.lib
32+
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)
33+
34+
if (MKL_IFACE_LIB AND MKL_SEQ_LIB AND MKL_CORE_LIB)
35+
set(MKL_LIBRARIES ${MKL_IFACE_LIB} ${MKL_SEQ_LIB} ${MKL_CORE_LIB})
36+
else()
37+
set(MKL_LIBRARIES "")
38+
set(MKL_INCLUDE_DIRS "")
39+
endif()
40+
41+
include(FindPackageHandleStandardArgs)
42+
find_package_handle_standard_args(MKL DEFAULT_MSG
43+
MKL_LIBRARIES MKL_IFACE_LIB MKL_SEQ_LIB MKL_CORE_LIB) # MKL_INCLUDE_DIRS)
44+
mark_as_advanced(
45+
MKL_INCLUDE_DIRS MKL_LIBRARIES MKL_IFACE_LIB MKL_SEQ_LIB MKL_CORE_LIB)

0 commit comments

Comments
 (0)