Skip to content

v1.3.0

Compare
Choose a tag to compare
@lucas-carmo lucas-carmo released this 11 Sep 17:02
· 9 commits to master since this release
f3f9db1

Overview

This release contains the following main functionality and bugfixes

  1. Change in overhang convention. Before, overhang was positive for upwind turbines. The sign convention is now along +x (opposite of before), thus following OpenFAST convention. For now, the code issues a warning when the overhang is positive to make sure that the user meant to analyze a downwind turbine. This warning will probably be removed after a few releases.
  2. New set of automated tests in the tests directory, including both unit and regression tests. Developers should run those tests using pytest locally before submitting a PR. The tests are also run after each push and PR using GitHub Actions. Please consider adding new tests when you implement new features to make sure that the automated tests are comprehensive 😀
  3. Ability to use preexisting WAMIT files (added mass from .1 file and wave excitation from .3 file) for hydrodynamic loads.
  4. MacCamy-Fuchs and Kim-and-Yue corrections to approximate wave scattering effects in the first- and second-order wave loads computed with the strip-theory approach (#48). The Kim-and-Yue correction is particularly useful to get more accurate QTFs with the strip-theory approach in some cases of interest.
  5. Overhaul of the rotor class. Most of the changes are internal to the code and shouldn't affect the user, except for items 1 and 2 listed above.
  6. Bug fix in helper function getRMS(). The RMS value was missing a factor of sqrt(0.5). This bug fix affects the calculation of the linearized drag force/damping, as well as the standard-deviation, maximum, and minimum values that were printed to the console. This wasn't a problem in the past because the calculation of the wave amplitudes also missed that factor of 0.5, so they cancelled out. But I forgot to add this factor in getRMS() when we fixed the calculation of the wave amplitudes about a year ago.
  7. Other bug fixes listed below

API changes

  • Besides the already available option of specifying the hub height (using input key hHub), now the user can also specify the coordinates of the RNA reference position (with respect to the FOWT reference frame) via the input key rRNA. For multirotor designs, the user has to provide rRNA for each RNA/rotor
  • Precomputed frequency-dependent added mass and wave force/moments coefficients can be adopted using WAMIT's .1 and .3 file format. Those files are specified using keys hydroPath and potFirstOrder (see examples/OC4semi-WAMIT_Coefs.yaml)
  • Removed input key qtfPath. Now, the path to precomputed QTFs is specified by hydroPath
  • New flag MCF within each member of a platform to specify whether MacCamy-Fuchs and Kim-and-Yue corrections should be used. Documented in #48 and exemplified by examples/OC4semi-RAFT_QTF.yaml
  • The user can output the QTFs computed with RAFT (using the slender-body approach with or without the Kim-and-Yue correction) in WAMIT .12d format. Documented in #48 and exemplified by examples/OC4semi-RAFT_QTF.yaml
  • Now the output channels also include the minimum value of the quantities of interest

Bug fixes and other code changes

  • Removed a lot of commented pieces of code (old code, temporary code that we forgot to remove, etc). Tried to keep some chunks of commented code that seemed to be work in progress. Commit #ref# (in case we need to retrieve something).

Helper functions (helpers.py)

  • Function VecVecTrans() was changed to return the same type as the input vector, so that complex vectors are no longer converted to float.
  • The Rodrigues formula used to get the rotation matrix in function RotFrm2Vect() assumes unit vectors. The input vectors are now divided by their norm to make sure this is the case.
  • New functions getRAO() and functions for wave kinematics used in Rainey's equation (getWaveKin_grad_u1() and others).

Member class (raft_member.py)

  • In Member.RectangularFrustrumMOI(), there was a missing * in the case of a truncated pyramid that caused an error because the intended multiplication was interpreted as a function call.
  • In Member.getHydrostatics(), the waterplane moment of area of a rectangle about the local y axis (variable IyWP) was wrong
  • In Member.getHydrostatics(), the expression for the buoyancy moment about end A only works for a circular cylinder. It's now set to zero for a rectangular cylinder, so we still need to include the right expression for a rectangular cylinder.

FOWT class (raft_fowt.py)

Many code changes to implement the capabilities listed above in Overview. Listing only bug fixes

  • In FOWT.calcHydroExcitation() there was a deg2rad() missing when computing the wave incidence.
  • In FOWT.calcHydroLinearization() the call to function getKinematics() was using the global position of the node instead of the position with respect to the platform to compute node kinematics.
  • In FOWT.calcHydroLinearization() the drag force transverse to a circular element wasn't parallel to the relative transverse fluid velocity because each velocity component was treated independently in the drag part of Morison's equation. This fix does not affect rectangular cylinders, as we still treat the flow along each direction independently in that case.
  • Same thing for FOWT.calcCurrentLoads(), i.e. the drag drag force transverse to a circular element wasn't parallel to the relative transverse fluid velocity. For example, for a vertical circular cylinder under a current with an incidence of 15deg, FOWT.calcCurrentLoads() now returns a horizontal force with a direction of 15deg.
  • We weren't accounting for shaft tilt when computing the contribution of the RNA to the inertia of the FOWT in FOWT.calcStatics().

Rotor class (raft_rotor.py)

Many code changes to overhaul the rotor class to make the code clearer and more organized. Listing only bug fixes

  • Fixed the total shaft tilt (shaft+platform tilt) in rotor.runCCBlade
  • in rotor.calcAero(), we were reading the yaw angle of the platform of a previous case when yaw_mode=2 or yaw_mode=3
  • The vertical coordinate of the center of gravity of the RNA was assumed to be at hub height, but now it's computed based on rotor.xCG_RNA along the shaft.

List of PR's included in this release