Skip to content

Commit

Permalink
Release v2.0.0 (PR #185)
Browse files Browse the repository at this point in the history
Merge openfast/dev into openfast/master
  • Loading branch information
rafmudaf committed Oct 11, 2018
2 parents e788b9b + 67d03f6 commit 0769598
Show file tree
Hide file tree
Showing 227 changed files with 16,367 additions and 9,400 deletions.
18 changes: 9 additions & 9 deletions .gitignore
Expand Up @@ -27,16 +27,16 @@
*.exe
*.out
*.app
__pycache__/*
*.pyc

# CMake specific files
build/**/*
install/*
ctest-build/*
# Build specific files
build*/
install/
vs-build/

# vs-build specific folders and files
vs-build/*


build
# OS and IDE specific files
.DS_Store
.vscode
.atom
.fortls
3 changes: 1 addition & 2 deletions .gitmodules
@@ -1,7 +1,6 @@
[submodule "reg_tests/r-test"]
path = reg_tests/r-test
url = https://github.com/openfast/r-test.git
branch = dev
[submodule "unit_tests/pfunit"]
path = unit_tests/pfunit
url = https://git.code.sf.net/p/pfunit/code
url = https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
74 changes: 74 additions & 0 deletions .travis.yml
@@ -0,0 +1,74 @@
# Travis CI configuration
#
# Environment info
# https://docs.travis-ci.com/user/reference/overview/
# https://docs.travis-ci.com/user/reference/osx/
# https://docs.travis-ci.com/user/reference/trusty/

language: c

os:
- linux
- osx

# linux configuration; container-based environments (default for linux) require the following setup block
addons:
apt:
packages:
- gfortran
- libblas-dev
- liblapack-dev

env:
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
- FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
- FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF

# mac configuration
before_install:
# first uninstall a conflicting package
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask uninstall oclint; fi

# install required packages
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc@7; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake; fi # cmake is already installed in the default mac image

# common configuration
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.6.3; fi
- pip3 install numpy

install:
- mkdir build && cd build
- cmake .. -DBUILD_TESTING=ON -DDOUBLE_PRECISION=$DOUBLE_PRECISION
- make -j 8 install

matrix:
exclude:
- os: linux
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON
- os: linux
env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF
- os: osx
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=ON
- os: osx
env: FC=/usr/bin/gfortran; DOUBLE_PRECISION=OFF

script:
# beamdyn unit tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R beamdyn_utest; fi

# beamdyn regression tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -R bd_; fi

# subset of openfast regression tests
# do not run
# - 3, 4, 7, 15, 16, 17 since the free yaw is not well trusted
# - 20, 21 because theyre too long
# THIS IS COMMENTED UNTIL TESTS CAN RELIABLY DETERMINE REGRESSION
# CURRENTLY, TESTS FAIL WITH VERY MINOR DIFFERENCES
# - 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
# - 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

67 changes: 37 additions & 30 deletions CMakeLists.txt
Expand Up @@ -17,8 +17,8 @@
cmake_minimum_required(VERSION 2.8.12)
project(OpenFAST CXX C Fortran)

include(${CMAKE_SOURCE_DIR}/cmake/FastCmakeUtils.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/FastFortranOptions.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/OpenfastCmakeUtils.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/OpenfastFortranOptions.cmake)

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

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

# Setup Fortran Compiler options based on architecture/compiler
set_fast_fortran()
Expand All @@ -53,8 +53,18 @@ if (FPE_TRAP_ENABLED)
endif (FPE_TRAP_ENABLED)

# Setup dependencies
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
find_package(MKL)
endif()
if (MKL_FOUND)
include_directories(${MKL_INCLUDE_DIRS})
set(BLAS_LIBRARIES ${MKL_LIBRARIES})
set(LAPACK_LIBRARIES ${MKL_LIBRARIES})
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "ifport;ifcore;imf;svml;m;ipgo;intlc;c;irc_s;dl;c")
else()
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
endif()

########################################################################
# Test option configuration
Expand All @@ -65,14 +75,14 @@ if(BUILD_TESTING)
endif()

########################################################################
# Build rules for FAST Registry
# Build rules for OpenFAST Registry
#
add_subdirectory(modules-local/fast-registry)
add_subdirectory(modules-local/openfast-registry)

########################################################################
# FAST Core modules
# OpenFAST Core modules
#
set(FAST_MODULES_LOCAL
set(OPENFAST_MODULES_LOCAL
nwtc-library
inflowwind
aerodyn
Expand All @@ -87,35 +97,35 @@ set(FAST_MODULES_LOCAL
openfoam
supercontroller
turbsim
fast-library
openfast-library
)

########################################################################
# FAST External modules
# OpenFAST External modules
#
set(FAST_MODULES_EXTERNAL
set(OPENFAST_MODULES_EXTERNAL
feamooring
moordyn
icedyn
icefloe
map
)

set(FAST_REGISTRY_INCLUDES "" CACHE INTERNAL "Registry includes paths")
set_registry_includes("modules-local" ${FAST_MODULES_LOCAL})
set_registry_includes("modules-ext" ${FAST_MODULES_EXTERNAL})
# Fix non-standard path addition to FAST_REGISTRY_INCLUDES in icefloe module
set(FAST_REGISTRY_INCLUDES
${FAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules-ext/icefloe/src/interfaces/FAST/
set(OPENFAST_REGISTRY_INCLUDES "" CACHE INTERNAL "Registry includes paths")
set_registry_includes("modules-local" ${OPENFAST_MODULES_LOCAL})
set_registry_includes("modules-ext" ${OPENFAST_MODULES_EXTERNAL})
# Fix non-standard path addition to OPENFAST_REGISTRY_INCLUDES in icefloe module
set(OPENFAST_REGISTRY_INCLUDES
${OPENFAST_REGISTRY_INCLUDES} -I ${CMAKE_SOURCE_DIR}/modules-ext/icefloe/src/interfaces/FAST/
CACHE INTERNAL "Registry includes paths")

foreach(IDIR IN ITEMS ${FAST_MODULES_LOCAL})
foreach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-local/${IDIR}")
endforeach(IDIR IN ITEMS ${FAST_MODULES_LOCAL})
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_LOCAL})

foreach(IDIR IN ITEMS ${FAST_MODULES_EXTERNAL})
foreach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})
add_subdirectory("${CMAKE_SOURCE_DIR}/modules-ext/${IDIR}")
endforeach(IDIR IN ITEMS ${FAST_MODULES_EXTERNAL})
endforeach(IDIR IN ITEMS ${OPENFAST_MODULES_EXTERNAL})

add_subdirectory(glue-codes)

Expand All @@ -134,7 +144,7 @@ include(CMakePackageConfigHelpers)
set(INCLUDE_INSTALL_DIR include/)
set(LIB_INSTALL_DIR lib/)
set(FTNMOD_INSTALL_DIR include/openfast/)
if (BUILD_FAST_CPP_API)
if (BUILD_OPENFAST_CPP_API)
set(OpenFAST_HAS_CXX_API TRUE)
else()
set(OpenFAST_HAS_CXX_API FALSE)
Expand All @@ -150,12 +160,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenFASTConfig.cmake

########################################################################
# Configure the default install path to openfast/install
string(FIND ${CMAKE_Fortran_MODULE_DIRECTORY} "build/ftnmods" found)
if(${found} GREATER 0)
string(REPLACE "build/ftnmods" "install" install_path ${CMAKE_Fortran_MODULE_DIRECTORY})
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${install_path} CACHE PATH "..." FORCE)
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install" CACHE PATH
"OpenFAST install directory" FORCE)
endif()

# Option configuration
Expand All @@ -172,4 +179,4 @@ endif()
option(BUILD_DOCUMENTATION "Build documentation." OFF)
if(BUILD_DOCUMENTATION)
add_subdirectory(docs)
endif()
endif()
58 changes: 39 additions & 19 deletions README.md
@@ -1,50 +1,70 @@
# OpenFAST

Updated on 2017-03-17
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.

## Overview
**OpenFAST is under active development**.

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/>.
### FAST v8 - OpenFAST v0.1.0

## FAST v8

(modified from <https://nwtc.nrel.gov/FAST>)
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).

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.

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.

## OpenFAST Documentation
We are creating a Sphinx-based documentation site at <http://openfast.readthedocs.io>.
### Documentation
Web based documentation is available at <http://openfast.readthedocs.io>.

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:
* `latest` - The latest commit on the `master` branch
* `stable` - Corresponds to the last tagged release
* `dev` - The latest commit on the `dev` branch

These can be toggled with the `v: latest` button in the lower left corner of the docs site.

### Obtaining OpenFAST

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:
* `master`
* `dev`

Documentation for FAST v8 and its modules may be found at <https://nwtc.nrel.gov/>, while we are building the new site.
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.

## Obtaining OpenFAST
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).

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.,
For those not familiar with git and GitHub, there are many resources, e.g.,

* <https://guides.github.com>
* <https://try.github.io>
* <https://help.github.com/categories/bootcamp/>
* <https://desktop.github.com/>
* <http://nvie.com/posts/a-successful-git-branching-model/>

## Compiling, Using & Developing OpenFAST
### Compilation, Usage, and Development

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

## OpenFAST Help

Please use [github issues](https://github.com/OpenFAST/OpenFAST/issues) to:
### Nightly Testing

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=).

* ask usage questions,
* report bugs,
* request code enhancements.
### Help

Please use [github issues](https://github.com/OpenFAST/OpenFAST/issues) to:
* ask usage questions
* report bugs
* request code enhancements

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

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

## OpenFAST Support
### Acknowledgments

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:

Expand Down
45 changes: 45 additions & 0 deletions cmake/FindMKL.cmake
@@ -0,0 +1,45 @@
#
# Copyright 2016 National Renewable Energy Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# find_path(MKL_INCLUDE_DIRS
# mkl.h
# HINTS $ENV{MKLROOT}
# PATH_SUFFIXES include)

find_library(MKL_IFACE_LIB
NAMES mkl_intel_lp64 libmkl_intel_lp64.a mkl_intel_lp64_dll.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)

find_library(MKL_SEQ_LIB
NAMES mkl_sequential libmkl_sequential.a mkl_sequential.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)

find_library(MKL_CORE_LIB
NAMES mkl_core libmkl_core.a mkl_core_dll.lib
PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64 $ENV{INTEL}/mkl/lib/intel64_win)

if (MKL_IFACE_LIB AND MKL_SEQ_LIB AND MKL_CORE_LIB)
set(MKL_LIBRARIES ${MKL_IFACE_LIB} ${MKL_SEQ_LIB} ${MKL_CORE_LIB})
else()
set(MKL_LIBRARIES "")
set(MKL_INCLUDE_DIRS "")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MKL DEFAULT_MSG
MKL_LIBRARIES MKL_IFACE_LIB MKL_SEQ_LIB MKL_CORE_LIB) # MKL_INCLUDE_DIRS)
mark_as_advanced(
MKL_INCLUDE_DIRS MKL_LIBRARIES MKL_IFACE_LIB MKL_SEQ_LIB MKL_CORE_LIB)

0 comments on commit 0769598

Please sign in to comment.