Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linearization regression tests #2038

Merged
merged 10 commits into from
Feb 19, 2024

Conversation

andrew-platt
Copy link
Collaborator

This PR needs review of results before merging.

Feature or improvement description
The number of linearization cases has been somewhat limited and did not fully cover the code. This PR adds the following regression tesrts:

  • 5MW_Land_BD_Linear_Aero -- based on the 5MW_Land_BD_Linear case, but with the addition of aero damping
  • 5MW_Land_Linear_Aero -- based on 5MW_Land_BD_Linear_Aero, but with ElastoDyn for the blades
  • 5MW_OC4Semi_MD_Linear -- based on 5MW_OC4Semi_MD_Linear, but with MoorDyn instead of MAP
  • 5MW_OC3Spar_Linear -- a very simple linearization of the 5MW_OC3Spar_DLL_WTurb_WavesIrr case with no aero, no controls, and no inflow.

Related issue, if one exists
None.

Impacted areas of the software
Regression tests cover aero and more hydro for comparisons during glue-code reorganization.

Additional supporting information
During the development of the tight-coupling (for OF v5.0), the linearization must be refactored from the implementation in v3.5 and v4.0. It has proven difficult to check that all the modules are correctly implemented in the new code without linearization models that included aero.

Test results, if applicable
Test results below.

- 5MW_Land_BD_Linear_Aero: BD + AD15 (based on 5MW_Land_BD_Linear, but with aero)
- 5MW_Land_Linear_Aero: ED + AD15 (based on 5MW_Land_BD_Linear_Aero, but with ED)
- 5MW_OC4Semi_MD_Linear: MD equivalent of 5MW_OC4Semi_Linear
Copy link
Contributor

@deslaughter deslaughter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As soon as all the regression tests pass, you can merge it

deslaughter and others added 8 commits February 19, 2024 14:51
Specify using np.float32 where possible in reading the linearization file. Also use np.float64 instead of float for matrices. Read matrices with genfromtxt instead of line by line
Previously the number of parallel threads in CTest was set via the -j flag. This changes it to use an environment variable set at the top of the file. The number of parallel tests was reduced from 4 to 2 as the linearization tests were failing from lack of memory. This may need to be adjusted.
…sion tests.

The previous method looped over each element and checked to see if it was within tolerance of the reference. This does the compare for the full matrices and then iterates over the element indices which were not within tolerance. This should significantly reduce the time to do the comparison for large matrices.

Also prints out the row/column variables which correspond to that element.
This will prevent warnings about node 16 deprecation
…SS_Rdtn%numStates

This also moves to a simpler scheme that just checks if the perturbation index 'n' is equal to the current value index 'k'
@andrew-platt andrew-platt merged commit 83f55eb into OpenFAST:rc-3.5.3 Feb 19, 2024
19 checks passed
@andrew-platt andrew-platt deleted the f/MoreLinearRegTests branch February 19, 2024 18:30
bjonkman pushed a commit to bjonkman/openfast that referenced this pull request Feb 20, 2024
…unstable

Merge rc-3.5.3 into dev-unstable-pointers (this is to get PR OpenFAST#2038)
@andrew-platt andrew-platt mentioned this pull request Mar 26, 2024
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants