Skip to content

Commit

Permalink
Merge branch 'dev-unstable-pointers' into f/ADI_c_binding_multiRotor
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Oct 10, 2023
2 parents af651dc + 7091e85 commit 24c05a7
Show file tree
Hide file tree
Showing 129 changed files with 11,864 additions and 4,593 deletions.
235 changes: 214 additions & 21 deletions .github/workflows/automated-dev-tests.yml

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,18 @@ include(${CMAKE_SOURCE_DIR}/cmake/set_rpath.cmake)

if (OPENMP OR BUILD_FASTFARM OR BUILD_OPENFAST_CPP_API)
FIND_PACKAGE(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} ${OpenMP_FORTRAN_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
if (OpenMP_Fortran_FOUND)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
link_libraries("${OpenMP_Fortran_LIBRARIES}")
endif()
if (OpenMP_C_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
link_libraries("${OpenMP_C_LIBRARIES}")
endif()
if (OpenMP_CXX_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
link_libraries("${OpenMP_CXX_LIBRARIES}")
endif()
endif()

#-------------------------------------------------------------------------------
Expand All @@ -130,11 +138,13 @@ if (USE_LOCAL_STATIC_LAPACK)
include(ExternalProject)
ExternalProject_Add(lapack
URL http://www.netlib.org/lapack/lapack.tgz
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_SOURCE_DIR}/install
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_SOURCE_DIR}/install
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
PREFIX ${CMAKE_BINARY_DIR}/dependencies
BUILD_BYPRODUCTS ${BLAS_LIB_PATH} ${LAPACK_LIB_PATH}
)
set(LAPACK_LIBRARIES ${BLAS_LIB_PATH} ${LAPACK_LIB_PATH} CACHE STRING "LAPACK library" FORCE)
set(LAPACK_LIBRARIES ${LAPACK_LIB_PATH} ${BLAS_LIB_PATH} CACHE STRING "LAPACK library" FORCE)
install(FILES ${LAPACK_LIBRARIES} DESTINATION ${CMAKE_SOURCE_DIR}/install/lib)
message(STATUS "Using LAPACK libraries: ${LAPACK_LIBRARIES}")
else()
Expand Down Expand Up @@ -192,7 +202,7 @@ set(OPENFAST_MODULES
map
turbsim
supercontroller
openfoam
externalinflow
openfast-library
)

Expand Down
Binary file modified docs/OtherSupporting/OutListParameters.xlsx
Binary file not shown.
5 changes: 5 additions & 0 deletions docs/OtherSupporting/TurbSim/Corrections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Corrections to TurbSim_v2.00.pdf DRAFT

## p. 34: Input file for User-Defined Profiles
The User-Defined profiles listed in the "Profiles" section contain horizontal angles, not wind direction, so it should say
`3. Horizontal wind angle (degrees, measured counter-clockwise from above)`
6 changes: 6 additions & 0 deletions docs/changelogs/v3.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ See GitHub Actions

#1493 Allow Non-Uniform Force Point Distribution on Blades @mchurchf

### SubDyn

#1413 Implementing directional cosine matrices and section properties for rectangular members
#1526 Remove static improvement method (SIM) from the SubDyn elastic output mesh (y3mesh)
#1531 BugFix - diameter not set properly for rectangular beams


## API changes

Expand Down
41 changes: 24 additions & 17 deletions docs/source/user/aerodyn/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,34 @@ The blade data input file contains the nodal discretization, geometry, twist, ch
AeroDyn List of Output Channels
-------------------------------

This is a list of output parameters for the AeroDyn module. The names are grouped by meaning, but can be ordered in the OUTPUTS section of the AeroDyn input file as you see fit. :math:`B \alpha N \beta`, refers to output node :math:`\beta` of blade :math:`\alpha`, where :math:`\alpha` is a number in the range [1,3] and :math:`\beta` is a number in the range [1,9], corresponding to entry :math:`\beta` in the :math:`\textit{BlOutNd}` list. :math:`\textit{TwN}\beta` refers to output node :math:`\beta` of the tower and is in the range [1,9], corresponding to entry :math:`\beta` in the :math:`\textit{TwOutNd}` list. A comprehensive, up-to-date list of all possible output parameters is given in the Excel file :download:`OutListParameters.xlsx <../../../OtherSupporting/OutListParameters.xlsx>`.

The local tower coordinate system is shown in :numref:`ad_tower_geom` and the local blade coordinate system is shown in :numref:`ad_blade_local_cs` below. Figure :numref:`ad_blade_local_cs` also shows the direction of the local angles and force components.
AeroDyn has regular outputs (see :numref:`AD-Outputs`) and nodal outputs (see :numref:`AD-Nodal-Outputs`).

.. _ad_blade_local_cs:
The coordinate systems used for the outputs (labeled, i, h, p, l, a) are described in :numref:`ad_coordsys`.

.. figure:: figs/aerodyn_blade_local_cs.png
:width: 80%
:align: center
:alt: aerodyn_blade_local_cs.png

AeroDyn Local Blade Coordinate System (Looking Toward the Tip,
from the Root) – l: Lift, d: Drag, m: Pitching, x: Normal (to Plane),
y: Tangential (to Plane), n: Normal (to Chord),
and t: Tangential (to Chord)
A comprehensive, up-to-date list of all possible output parameters is given in the Excel file :download:`OutListParameters.xlsx <../../../OtherSupporting/OutListParameters.xlsx>`, in the tab `AeroDyn` and `AeroDyn_Nodes` for the regular and nodal outputs, respectively.
The names in the Excel file are grouped by meaning, but can be ordered in the OUTPUTS section of the AeroDyn input file as you see fit.

.. _ad-output-channel:

.. figure:: figs/aerodyn_output_channel.pdf
:width: 500px
:align: center
:alt: aerodyn_output_channel.pdf

AeroDyn Output Channel List
**Regular outputs**
Some examples of regular outputs are given below (see :download:`OutListParameters.xlsx <../../../OtherSupporting/OutListParameters.xlsx>` for an exhaustive list):


- `RtAeroCp` : aerodynamic power coefficient.


- :math:`B \alpha N \beta`, refers to output node :math:`\beta` of blade :math:`\alpha`, where :math:`\alpha` is a number in the range [1,3] and :math:`\beta` is a number in the range [1,9], corresponding to entry :math:`\beta` in the :math:`\textit{BlOutNd}` list.

- :math:`\textit{TwN}\beta` refers to output node :math:`\beta` of the tower and is in the range [1,9], corresponding to entry :math:`\beta` in the :math:`\textit{TwOutNd}` list.


**Nodal outputs**

An example of nodal outputs is described below (see :download:`OutListParameters.xlsx <../../../OtherSupporting/OutListParameters.xlsx>` for an exhaustive list).

The x-component of the undisturbed flow velocity (`VUnd`) at all blade nodes in the inertial frame (:math:`i`) is requested by placing :math:`VUndxi` in the AeroDyn nodal output list.
This will result in output channels of the form `AB`:math:`\alpha N\beta` `Vundxi`, for node :math:`\beta` of blade :math:`\alpha`, where :math:`\alpha` is a number in the range [1,3] and :math:`\beta` is a number in the range [1,999] corresponding to the index of the AeroDyn blade node.


123 changes: 99 additions & 24 deletions docs/source/user/aerodyn/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,43 @@
import subprocess
import re


from sphinx.highlighting import PygmentsBridge
from pygments.formatters.latex import LatexFormatter

#sys.path.append(os.path.abspath('_extensions/'))

readTheDocs = os.environ.get('READTHEDOCS', None) == 'True'
builddir = sys.argv[-1]
sourcedir = sys.argv[-2]

# Use this to turn Doxygen on or off
useDoxygen = False

# This function was adapted from https://gitlab.kitware.com/cmb/smtk
# Only run when on readthedocs
def runDoxygen(sourcfile, doxyfileIn, doxyfileOut):
dx = open(os.path.join(sourcedir, doxyfileIn), 'r')
cfg = dx.read()
srcdir = os.path.abspath(os.path.join(os.getcwd(), '..'))
bindir = srcdir
c2 = re.sub('@CMAKE_SOURCE_DIR@', srcdir, re.sub('@CMAKE_BINARY_DIR@', bindir, cfg))
doxname = os.path.join(sourcedir, doxyfileOut)
dox = open(doxname, 'w')
print(c2, file=dox)
dox.close()
print("Running Doxygen on {}".format(doxyfileOut))
doxproc = subprocess.call(('doxygen', doxname))

if readTheDocs and useDoxygen:
runDoxygen(sourcedir, 'Doxyfile.in', 'Doxyfile')

class CustomLatexFormatter(LatexFormatter):
def __init__(self, **options):
super(CustomLatexFormatter, self).__init__(**options)
self.verboptions = r"formatcom=\footnotesize"

PygmentsBridge.latex_formatter = CustomLatexFormatter

#sys.path.append(os.path.abspath('_extensions/'))

readTheDocs = os.environ.get('READTHEDOCS', None) == 'True'
sourcedir = sys.argv[-2]
builddir = sys.argv[-1]

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -56,13 +76,32 @@ def __init__(self, **options):
'sphinxcontrib.bibtex',
]

autodoc_default_flags = ['members','show-inheritance','undoc-members']
autodoc_default_flags = [
'members',
'show-inheritance',
'undoc-members'
]

autoclass_content = 'both'

mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

# FIXME: Naively assuming build directory one level up locally, and two up on readthedocs
if useDoxygen:
if readTheDocs:
doxylink = {
'openfast': (
os.path.join(builddir, '..', '..', 'openfast.tag'),
os.path.join('html')
)
}
else:
doxylink = {
'openfast': (
os.path.join(builddir, '..', 'openfast.tag'),
os.path.join('html')
)
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -79,7 +118,7 @@ def __init__(self, **options):
# General information about the project.
project = u'AeroDyn'
filename = project.replace(' ','_')
copyright = u'2017, National Renewable Energy Laboratory'
copyright = u'2023, National Renewable Energy Laboratory'
author = u'OpenFAST Team'

# The version info for the project you're documenting, acts as replacement for
Expand All @@ -96,7 +135,7 @@ def __init__(self, **options):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# language = None # Default is English and None is not a valid option

#If true, figures, tables and code-blocks are automatically numbered if they
#have a caption. At same time, the numref role is enabled. For now, it works
Expand All @@ -108,6 +147,13 @@ def __init__(self, **options):
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# FIXME: Naively assuming build directory one level up locally, and two up on readthedocs
if useDoxygen:
if readTheDocs:
html_extra_path = [os.path.join(builddir, '..', '..', 'doxygen')]
else:
html_extra_path = [os.path.join(builddir, '..', 'doxygen')]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

Expand Down Expand Up @@ -147,12 +193,15 @@ def __init__(self, **options):
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -162,8 +211,13 @@ def __init__(self, **options):
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, '{}.tex'.format(filename), u'{} Documentation'.format(project),
u'National Renewable Energy Laboratory', 'manual'),
(
master_doc,
'{}.tex'.format(filename),
u'{} Documentation'.format(project),
u'National Renewable Energy Laboratory',
'manual'
),
]


Expand All @@ -172,8 +226,13 @@ def __init__(self, **options):
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, project, u'{} Documentation'.format(project),
[author], 1)
(
master_doc,
project,
u'{} Documentation'.format(project),
[author],
1
)
]


Expand All @@ -183,19 +242,34 @@ def __init__(self, **options):
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, filename, u'{} Documentation'.format(project),
author, project, 'One line description of project.',
'Miscellaneous'),
(
master_doc,
filename,
u'{} Documentation'.format(project),
author,
project,
'One line description of project.',
'Miscellaneous'
),
]

def setup(app):
app.add_object_type("confval", "confval",
objname="input file parameter",
indextemplate="pair: %s; input file parameter")
app.add_object_type("cmakeval", "cmakeval",
objname="CMake configuration value",
indextemplate="pair: %s; CMake configuration")

try:
app.add_css_file('css/math_eq.css')
except:
pass
app.add_object_type(
"confval",
"confval",
objname="input file parameter",
indextemplate="pair: %s; input file parameter"
)
app.add_object_type(
"cmakeval",
"cmakeval",
objname="CMake configuration value",
indextemplate="pair: %s; CMake configuration"
)
# --- Prolog that will be included at the top of every rst file
# Here: defining the role :red: for html and latex
rst_prolog = r"""
Expand All @@ -216,3 +290,4 @@ def setup(app):
.. role:: red
"""

Loading

0 comments on commit 24c05a7

Please sign in to comment.