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

TurbSim: User-defined time series updates #1361

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

bjonkman
Copy link
Contributor

@bjonkman bjonkman commented Dec 1, 2022

This PR is ready to be merged.

Feature or improvement description
When generating simulated data from a user-defined time-series input file, there was a mismatch between calculating the number of points in the time-series FFT and in the inverse FFT if either of those values were originally entered as not a product of small primes. Time was subtracted from the user input time series, but added to the AnalysisTime, possibly causing an error to be triggered. Now both subtract when user-defined time series are used. The code is unchanged when user-defined time series are NOT used.

Also, a possible array overflow issue was corrected when the user entered time series that were not a product of small primes.

Best practice is still to enter the time history and analysis time to give the number of steps as a products of small primes, in which case these modifications won't do anything.

Related issue, if one exists
None

Impacted areas of the software
TurbSim with user-defined time series (TurbModel = "TIMESR")

Test results, if applicable
This should not change any test results.

When generating simulated data from a user-defined time-series input file, there was a mismatch between calculating the number of points in the time-series FFT and the inverse FFT if either of those values were originally entered as not a product of small primes. Time was subtracted from the user input time series, but added to the `AnalysisTime`, possibly causing an error to be triggered. Now both subtract when user-defined time series are used.  Best practice is still to enter the time history and analysis time as products of small primes.

The code is unchanged when user-defined time series are NOT used.

Also, a possible array overflow issue was corrected when the user entered time series that were not a product of small primes.
Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

I discussed this with Bonnie and approve of these changes. Thanks for sharing!

@andrew-platt andrew-platt self-assigned this Dec 1, 2022
@andrew-platt andrew-platt merged commit 524c6c2 into OpenFAST:dev Dec 1, 2022
@bjonkman bjonkman deleted the b/TurbSim branch December 1, 2022 20:59
@rafmudaf rafmudaf mentioned this pull request Dec 19, 2022
10 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.

3 participants