Skip to content

Commit

Permalink
Merge pull request #4 from andrew-platt/f/noise
Browse files Browse the repository at this point in the history
Merged in the updated dev branch from OpenFAST
  • Loading branch information
ptrbortolotti authored Jul 22, 2020
2 parents 91ad82f + 708ef24 commit 22a10e7
Show file tree
Hide file tree
Showing 254 changed files with 114,924 additions and 57,710 deletions.
16 changes: 8 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

**Complete this sentence**
THIS PULL REQUEST __ [IS/IS NOT] __ READY TO MERGE
<!-- Is this pull request ready to be merged? -->
<!-- i.e. tests pass or are expected to fail; all development is finished; appropriate documentation is included. -->
<!-- If not but opening the pull request will facilitate development, make it a "draft" pull request -->

**Feature or improvement description**
<A clear and concise description of the new code.>
<!-- A clear and concise description of the new code. -->

**Related issue, if one exists**
<Link to a related GitHub Issue.>
<!-- Link to a related GitHub Issue. -->

**Impacted areas of the software**
<List any modules or other areas which should be impacted by this pull request. This helps to determine the verification tests.>
<!-- List any modules or other areas which should be impacted by this pull request. This helps to determine the verification tests. -->

**Additional supporting information**
<Add any other context about the problem here.>
<!-- Add any other context about the problem here. -->

**Test results, if applicable**
<Add the results from unit tests and regression tests here along with justification for any failing test cases.>
<!-- Add the results from unit tests and regression tests here along with justification for any failing test cases. -->
69 changes: 43 additions & 26 deletions .github/actions/compile-and-test/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,69 @@
#!/bin/bash

cd /openfast
verbosecommand() { echo ">>> $1" && eval $1 && echo "<<<"; }

git fetch origin ${GITHUB_REF}:CI
git checkout CI
git submodule update
# Configure Bash to exit if any command returns an error
set -e

verbosecommand "cd /openfast"

repo="OpenFAST"
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]; then
repo=${GITHUB_ACTOR}
fi
# Create a branch "CI" at the current commit from the GH Actor's fork.
verbosecommand "git fetch https://github.com/${repo}/openfast ${GITHUB_REF}:CI"
verbosecommand "git checkout CI"
verbosecommand "git submodule update"

# Display the current git info
echo git-status from openfast:
git status
echo "*** git-status from openfast:"
verbosecommand "git status"

echo git-log from openfast:
git log -1
echo "*** git-log from openfast:"
verbosecommand "git log -1"

cd /openfast/reg_tests/r-test
echo git-status from r-test:
git status
verbosecommand "cd /openfast/reg_tests/r-test"
echo "*** git-status from r-test:"
verbosecommand "git status"

echo git-log from r-test:
git log -1
echo "*** git-log from r-test:"
verbosecommand "git log -1"

cd /openfast
verbosecommand "cd /openfast"

# Display the differences between this commit and `dev`
echo git-diff from ${GITHUB_REF} to dev:
git diff dev
echo "*** git-diff from ${GITHUB_REF} to dev:"
verbosecommand "git diff dev --numstat"

# Move into the "build" directory, remove the old reg tests, and compile
cd /openfast/build
rm -rf reg_tests
cmake ..
make -j4 install
verbosecommand "cd /openfast/build"
verbosecommand "rm -rf reg_tests"
verbosecommand "cmake .."
verbosecommand "make -j4 install"

# Run the tests

# NWTC Library tests
ctest -VV -R nwtc_library_utest
verbosecommand "ctest -VV -R nwtc_library_utest"

# BeamDyn-specific tests
ctest -VV -j7 -R bd_
ctest -VV -R beamdyn_utest
verbosecommand "ctest -VV -j7 -R bd_"
verbosecommand "ctest -VV -R beamdyn_utest"

# OLAF free vortex wake tests
ctest -VV -R fvw_utest

# OpenFAST linearization tests
# Dont run these in parallel, copying the case files can fail in a race condition
ctest -VV -L linear
# Exclude the Ideal_Beam test cases
# - They fail consistently in the Docker container when run on GitHub,
# but pass everywhere else including running the same Docker image locally
verbosecommand "ctest -VV -L linear -E Ideal"

# Subset of OpenFAST regression tests; do not run
## - 9, 16 because they're very sensitive
## - 19, 20 because theyre too long
## - 17, 22, 23 becuase we dont know why they fail :(
ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25
## - 17, 22, 23 because we dont know why they fail :(
verbosecommand "ctest -VV -j8 -I 1,1,1,2,3,4,5,6,7,8,10,11,12,13,14,15,18,21,24,25,26,27,28"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ vs-build/
.fortls
# backup files
*.asv
~$*.xlsx

# LaTeX compiling files
*.aux
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "reg_tests/r-test"]
path = reg_tests/r-test
url = https://github.com/openfast/r-test.git
url = https://github.com/OpenFAST/r-test.git
[submodule "unit_tests/pfunit"]
path = unit_tests/pfunit
url = https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
3 changes: 0 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
# Required
version: 2

sphinx:
configuration: docs/conf.py

formats:
- htmlzip
- pdf
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ script:
# beamdyn regression tests
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -j4 -VV -R bd_; fi

# linearization cases
- if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -L linear; fi

# subset of openfast regression tests
# do not run
# - 3, 4, 7, 15, 16, 17 since the free yaw is not well trusted
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ option(BUILD_SHARED_LIBS "Enable building shared libraries" off)
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(ORCA_DLL_LOAD "Enable OrcaFlex Library Load" on)
option(BUILD_OPENFAST_CPP_API "Enable building OpenFAST - C++ API" off)
option(OPENMP "Enable OpenMP support" off)

# Precompiler/preprocessor flag configuration
# Do this before configuring modules so that the flags are included
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FAST v8 - OpenFAST v0.1.0
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
next generation of FAST analysis tools. More information 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
Expand Down Expand Up @@ -116,7 +116,7 @@ OpenFAST on Unix-based and Windows machines are available at `readthedocs <http:

Help
----
Please use `github issues <https://github.com/OpenFAST/OpenFAST/issues>`_ to:
Please use `GitHub Issues <https://github.com/OpenFAST/OpenFAST/issues>`_ to:

* ask usage questions
* report bugs
Expand Down
22 changes: 21 additions & 1 deletion cmake/OpenfastFortranOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ macro(set_fast_gfortran)
endif(NOT WIN32)

# Fix free-form compilation for OpenFAST
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp -fopenmp")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -cpp")

# Deal with Double/Single precision
Expand All @@ -93,7 +94,7 @@ macro(set_fast_gfortran)

# debug flags
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all -pedantic -fbacktrace" )
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=all -pedantic -fbacktrace " )
endif()

if(CYGWIN)
Expand All @@ -102,6 +103,12 @@ macro(set_fast_gfortran)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},--stack,${stack_size}")
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fopenmp" )
endif()

endmacro(set_fast_gfortran)

#
Expand Down Expand Up @@ -131,6 +138,12 @@ macro(set_fast_intel_fortran_posix)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -check all -traceback" )
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -qopenmp" )
endif()
endmacro(set_fast_intel_fortran_posix)

#
Expand All @@ -157,4 +170,11 @@ macro(set_fast_intel_fortran_windows)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /check:all /traceback" )
endif()

# OPENMP
if (OPENMP)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /qopenmp")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /qopenmp" )
endif()

endmacro(set_fast_intel_fortran_windows)
Binary file modified docs/OtherSupporting/OutListParameters.xlsx
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/_static/css/math_eq.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.math {
text-align: left;
}
.eqno {
float: right;
}
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def runDoxygen(sourcfile, doxyfileIn, doxyfileOut):
]

def setup(app):
app.add_css_file('css/math_eq.css')
app.add_object_type(
"confval",
"confval",
Expand All @@ -257,3 +258,4 @@ def setup(app):
objname="CMake configuration value",
indextemplate="pair: %s; CMake configuration"
)

16 changes: 8 additions & 8 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
breathe==4.4.0
docutils==0.13.1
Pygments==2.2.0
pyparsing==2.1.9
Sphinx==1.5.2
sphinxcontrib-bibtex==0.3.4
sphinxcontrib-doxylink==1.3
sphinx_rtd_theme==0.3.1
breathe>=4.4
docutils>=0.13
Pygments>=2.2
pyparsing>=2.1
Sphinx>=1.8.5
sphinxcontrib-bibtex>=0.3.3
sphinxcontrib-doxylink>=1.3
sphinx_rtd_theme>=0.3
requests[security]
9 changes: 9 additions & 0 deletions docs/source/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ All precompiled binaries can be found in the ``Assets`` dropdown in the
`here <https://github.com/OpenFAST/openfast/releases/latest/download/windows_openfast_binaries.zip>`__
to download the latest binaries.

Note that the precompiled binaries require either the Intel fortran
compiler or the Intel MKL redistributable libraries, which are not by
default included with the binaries. To configure the libraries, download the
installers from `here <https://software.intel.com/sites/default/files/managed/bb/e0/ww_ifort_redist_msi_2017.8.275.zip>`__
and run the MSI file(s) to install the libraries. Note that if you have a
Command Prompt open, you will need to close it after installing the libraries
in order for the changes to take effect.

Compile from source
~~~~~~~~~~~~~~~~~~~
For compiling from source code, the NREL OpenFAST team has developed an
Expand Down Expand Up @@ -228,6 +236,7 @@ The CMake options specific to OpenFAST and their default settings are:
GENERATE_TYPES - Use the openfast-regsitry to autogenerate types modules
ORCA_DLL_LOAD - Enable OrcaFlex library load (Default: OFF)
USE_DLL_INTERFACE - Enable runtime loading of dynamic libraries (Default: ON)
OPENMP - Enable OpenMP parallelization in FVW (Default: OFF)

Additional system-specific options may exist for a given system, but those
should not impact the OpenFAST configuration. As mentioned above, the
Expand Down
19 changes: 19 additions & 0 deletions docs/source/user/aerodyn-olaf/Acknowledgments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _Acknowledgments:

Acknowledgments
===============

This work was authored by the National Renewable Energy Laboratory,
operated by Alliance for Sustainable Energy, LLC, for the U.S.
Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding
provided by the U.S. Department of Energy Office of Energy Efficiency
and Renewable Energy Wind Energy Technologies Office. The views
expressed in the article do not necessarily represent the views of the
DOE or the U.S. Government. The U.S. Government retains and the
publisher, by accepting the article for publication, acknowledges that
the U.S. Government retains a nonexclusive, paid-up, irrevocable,
worldwide license to publish or reproduce the published form of this
work, or allow others to do so, for U.S. Government purposes.

The authors are also grateful to the Big Adaptive Rotor program for
supporting the development of this software.
52 changes: 52 additions & 0 deletions docs/source/user/aerodyn-olaf/Acronyms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. _Acronyms:

List of Symbols
===============

+-----------------------------+---------------------------------------+
| BEM | blade-element momentum |
+-----------------------------+---------------------------------------+
| CFD | computational fluid dynamics |
+-----------------------------+---------------------------------------+
| DOE | U.S. Department of Energy |
+-----------------------------+---------------------------------------+
| :math:`F_v` | core radius factor |
+-----------------------------+---------------------------------------+
| :math:`t` | time |
+-----------------------------+---------------------------------------+
| FVW | free vortex wake |
+-----------------------------+---------------------------------------+
| :math:`N` | number of rotor revolutions before |
| | wake cutoff condition |
+-----------------------------+---------------------------------------+
| :math:`\vec{r}` | vector between point of interest and |
| | vortex segment |
+-----------------------------+---------------------------------------+
| :math:`\vec{r}(\psi,\zeta)` | position vector of Lagrangian markers |
+-----------------------------+---------------------------------------+
| :math:`r_c` | core radius |
+-----------------------------+---------------------------------------+
| :math:`r_{c0}` | initial core radius |
+-----------------------------+---------------------------------------+
| OLAF | cOnvecting LAgrangian Filaments |
+-----------------------------+---------------------------------------+
| :math:`\alpha` | numerical constant :math:`=1.25643` |
+-----------------------------+---------------------------------------+
| :math:`\Gamma` | circulation strength |
+-----------------------------+---------------------------------------+
| :math:`\delta` | measure of viscous diffusion |
+-----------------------------+---------------------------------------+
| :math:`\epsilon` | measure of strain |
+-----------------------------+---------------------------------------+
| :math:`\Delta \psi` | step size for blade rotation |
+-----------------------------+---------------------------------------+
| :math:`\Omega` | rotational speed of wind turbine |
+-----------------------------+---------------------------------------+
| :math:`\zeta` | vortex wake age |
+-----------------------------+---------------------------------------+
| :math:`\zeta_0` | vortex wake age offset |
+-----------------------------+---------------------------------------+
| :math:`\nu` | kinematic viscosity |
+-----------------------------+---------------------------------------+
| :math:`\psi` | azimuth blade position |
+-----------------------------+---------------------------------------+
13 changes: 13 additions & 0 deletions docs/source/user/aerodyn-olaf/AppendixA.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _OLAF-Primary-Input-File:

Appendix A: OLAF Primary Input File
===================================


**Check the regression test cases for updates to this input file.**

.. container::
:name: Tab:OLAFinputfile

.. literalinclude:: ExampleFiles/ExampleFile--OLAF.txt
:linenos:
Loading

0 comments on commit 22a10e7

Please sign in to comment.