Merged
Conversation
- Included mean drift. Current implementation is not rigorously correct when more than one wave direction are acting at the same time, but should be good enough for now. - The QTF files pre-computed with a BEM code are in a different resolution then the incoming waves in RAFT. To solve that, we were computing the second-order force spectrum considering the QTF resolution and then interpolating the result. Turns out that we obtain different results if we interpolate the QTF first. Left both implementations in the code, but still thinking whether it is worth adding a flag for that on the input file. - Typo fix
- Added helper functions to compute quantities needed for the slender-body approximation for second-order wave loads - Added the capability of computing QTFs using the slender-body approximation - Included flags in the input file for the second-order loads - Updated solveDynamics for the case where the second-order loads are computed with the slender-body approximation. In that case, we need to first solve for the first-order motions to compute the second-order forces and moments.
- Added force due to the rotation term from slender-body approach - Added force due to body motions inside the wave field - Bug fix: The force component due to the relative wave elevation was being computed for one member only; - Bug fix: There was a cos instead of a sin in the computation of gradient matrix of fluid velocity induced by waves. This influenced the axial-divergence acceleration and the component due to body displacements; - Bug fix: The 2D qtf interpolation in calcHydroForce_2ndOrd was interpolating only the real part of the matrix - Commented a part of raft_member.py that breaks the computation of second-order loads. Still need to figure out why
Also changed test cases for the OC3 Hywind
Made it run for a single turbine case, but need to test it with an array. Besides, had to change some stuff in the code from ctopt and comment other stuff that I don't know how to fix right now.
- Damping levels were heavily underpredicted when motions induced by second-order loads are large. It much improved after including these motions in the drag linearization procedure. - There was a bug in the calculation of the second-order force amplitude from the spectrum, namely a factor of 2 that was outside a sqrt but should be inside it.
- Fix F_lines0 size - Compute natural periods with RAFT - Handle multi-rotor outputs
- Updated rotor.calcHydroConstants method to copy each blade member over each heading before moving on to the next blade member - Added ballast fill levels to the outer columns of the RM1 Model - Updated FOCTT example to make sure rA is always below rB - Small zero addition to raft_member to avoid python warnings
- Rotor methods and variables changed to handle rotor orientation and yaw in a more integrated way. Several new Rotor attributes store this information. - Yaw modes work the same as before - Rotor.setYaw has all the logic for rotor nacelle yaw. - overhang has a sign change - now it's positive with +x. WILL NEED TO CHANGE INPUTS. - Various methods changed through the code to use new Rotor attributes. - DOES NOT WORK! Currently getting NaNs out of CCBlade.
- Fixed a couple bugs and missing pieces, so now the updated rotor orientation handline seems to work. - Added a temporary check for positive overhang entries, in which case we make them negative (assuming people want to model upwind rotors). Will remove this once the change in YAML inputs is formalized. - Still needs testing for different yaw angles and modes!
The drag force transverse to a circular element should be parallel to the relative transverse fluid velocity, but this was not the case with the previous code. This commit fixes that. This modification does not affect rectangular cylinders. For rectangular cylinders, we still treat the flow along each direction independently.
The 2D arrays storing the PSD of mooring line tension had size [2*nLines, nfreqs ] in the model class, but the reverse [nfreqs, 2*nLines] in the fowt class. Now they both have size [2*nLines, nfreqs ]
- Tests for model.solveStatics, model.calcEigen, and model.analyzeCases. Test cases are the OC3-Hywind spar, the UMaine VolturnUS-S semisubmersible, and two VolturnUS-S with shared moorings - Added a test case for calcCurrentLoads in fowt.test - Updated true valus for hydroLinearization and hydroExcitation because increased frequency resolution of the input files
I had forgotten to update omdao_raft.py to follow the changes in raft_fowt.py introduced by commit 02d5330 (results['Tmoor_PSD'].shape= [2*nLines, nfreqs])
- Made many console print outputs optional and controlled by display flag. - New method FOWT.getStiffness gets stiffness on individual FOWT. - Changed many of the case_metrics results to now output in np.array rather than list form for easier processing. - Added Member property Member.V to store submerged volume.
test_calcCurrentLoads() wasn't comparing the results against true values, so it was useless. It's working now
The input key 'hHub' corresponds to the hub height but it was being assigned to the z coordinate of the RNA reference point. The difference is overhang*sin(tilt)
- The call to CCBlade receives the total shaft tilt, which is due to the initial shaft tilt + platform tilt. We changed the name of the input variable because it was misleading - Fixed some temporary code that was included by mistake in a previous commit
There were several modifications in dev and rerotor branches that changed the true values (most of them only slightly)
Previous true values were obtained using MoorPy's dev branch. Because we plan to merge this into the master branch soon, replaced those values to use MoorPy's master branch. Will change it back to using MoorPy's dev branch after. Also removed checks on natural modes from solveStatics for now, but will also put it back later
Because some people are using RAFT to analyze downwind turbines, we do NOT change the sign of overhang anymore. To analyze upwind turbines, the overhang needs to be negative (same convention as OpenFAST). If the overhang is positive, RAFT issues a warning to let the user know that we changed overhang convention from previous versions, but treats the turbine as downwind. We will probably remove this warning after a few releases.
- Removed input key `qtfPath`. Now, the path to a precomputed qtf is obtained from `hydroPath` just like other hydrodynamic coefficients - Changed the example using WAMIT_QTFs to use WAMIT_Coefs
- 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 needs to provide `rRNA` for each RNA/rotor - moved the flagSaveValues to be an input of test_calcAero
Code clean up. I tried to keep some chunks of commented code that seemed to be work in progress. Removed only commented code that didn't seem to be used anymore. I didn't clean parts of the code that I don't know well. If we need, we can retrieve the removed comments using git.
- Added a new list of pitch angles to the VolturnUS design to match the actual turbine control behavior (which has been in the VolturnUS-farm file for a while) - Wrote a new function to ensure that if you "dump" a RAFT design dictionary to yaml, and then want to read it in again, you won't get any errors
The code for the second-order loads was lacking a lot of comments and had some stuff that was meant to be temporary for debugging.
The calculation of the RMS value was missing a factor of 0.5 (within the sqrt). This bug fix impacts the calculation of the linearized drag force/damping, so the affected tests were updated accordingly. It also impacts the standard-deviation, maximum, and minimum values that were printed to the console. This wasn't a problem in the original code 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 amplitude.
- Updating the README to include intructions to test the installation afterwards - General organization and ensuring that the README instructions allow for proper installation (in 1 of 2 ways) - Some quick fixes in raft_rotor and raft_fowt to allow for array plotting - - Given a RAFT array, each FOWT would have it's own x/y position, which wasn't captured
- Changed yaml extension names to yaml - Included a specific version of numpy (1.26.4), which is just the last version before it switched to 2.0. There were some errors with numpy v2.0 that we found. Doing this for only the environment-source.yaml since the environment.yaml didn't need it
- Checks did not pass in GitHub with .yaml, so switching back, and also updating the README to reflect these changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Pull request to merge dev into master to make a new RAFT release. It includes new features and bug fixes that will be better documented in the release notice.
In summary, the main additions and modifications are:
testsdirectory, including both unit and regression tests. Developers should run those tests usingpytestlocally 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 😀Other minor modifications:
hHub), now the user can also specify the coordinates of the RNA reference position (with respect to the FOWT reference frame) via the input keyrRNA. For multirotor designs, the user has to providerRNAfor each RNA/rotorexamples/OC4semi-RAFT_QTF.yamlqtfPath. Now, the path to precomputed QTFs is specified byhydroPathMCFwithin eachmemberof a platform to specify whether MacCamy-Fuchs and Kim-and-Yue corrections should be used. Documented in Improvement to hydrodynamic capabilities - Mostly MacCamy-Fuchs and second-order loads #48 and exemplified byexamples/OC4semi-RAFT_QTF.yamlType of change
What types of change is it?
Testing
Tested using pytest.
Checklist
Put an
xin the boxes that apply.