-
Notifications
You must be signed in to change notification settings - Fork 465
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
SeaState: fix grid size in wave surface visualization #1992
SeaState: fix grid size in wave surface visualization #1992
Conversation
f94bf60
to
672b29f
Compare
@andrew-platt |
It looks good to me @andrew-platt. Thanks for the effort! |
2d19d1c
into
OpenFAST:dev-unstable-pointers
|
||
if (allocated(Init%OutData_SeaSt%WaveElevVisGrid)) then | ||
p_FAST%VTK_surface%NWaveElevPts(1) = size(Init%OutData_SeaSt%WaveElevVisX) | ||
p_FAST%VTK_surface%NWaveElevPts(2) = size(Init%OutData_SeaSt%WaveElevVisX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrew-platt : Should line 821 use Init%OutData_SeaSt%WaveElevVisY
instead of WaveElevVisX
? Or are they the same size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right. They aren't necessarily the same size.
@@ -89,8 +91,11 @@ typedef ^ InitOutputType CHARACTER(ChanLen) Wri | |||
typedef ^ ^ CHARACTER(ChanLen) WriteOutputUnt {:} - - "The is the list of all HD-related output channel unit strings (includes all sub-module channels)" - | |||
typedef ^ ^ ProgDesc Ver - - - "Version of SeaState" | |||
typedef ^ ^ LOGICAL InvalidWithSSExctn - - - "Whether SeaState configuration is invalid with HydroDyn's state-space excitation (ExctnMod=2)" (-) | |||
typedef ^ ^ SiKi WaveElevSeries {:}{:} - - "Wave elevation time-series at each of the points given by WaveElevXY. First dimension is the timestep. Second dimension is XY point number corresponding to second dimension of WaveElevXY." (m) | |||
typedef ^ ^ SiKi WaveElevVisX {:} - - "X locations of grid output" "m,-" | |||
typedef ^ ^ SiKi WaveElevVisY {:} - - "X locations of grid output" "m,-" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WaveElevVisY
should say Y locations of grid output
, not X
(was done correctly in FAST_Registry.txt).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
call move_alloc( InitInData_SeaSt%WaveElevXY, p_FAST%VTK_Surface%WaveElevXY ) | ||
call move_alloc( InitOutData_SeaSt%WaveElevSeries, p_FAST%VTK_Surface%WaveElev ) | ||
if ( allocated(InitOutData_SeaSt%WaveElevVisGrid) ) then | ||
print*,'Storing Wave surface visualization' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a leftover debugging statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how that got left in there.
I'll make a PR to fix the issues you pointed out. Thanks @bjonkman!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in PR #2071
A few minor issues were noted with PR OpenFAST#1992 after it was merged. Co-authored-by: bjonkman <[email protected]>
SeaSt Vis: corrections to PR #1992
This PR is ready to merge.
Feature or improvement description
When the SeaState module was introduced, the grid used for wave surface visualization was based on interpolated data from the SeaState wave grid stored in the WaveField data. The wave surface size was hard-coded to be 4x the blade length of the turbine being modeled. This resulted in clamping any parts of the wave surface outside the WaveField data. As result, the visualization looks a bit strange.
Before
Figure 1: before modification, wave surfaces beyond the WaveField data would be set to the value of the nearest edge of the WaveField data. The WaveField edges are shown as pink vertical boundaries. In the original formulation, 25x25 data points were interpolated from the WaveField data and stored. For this visualization, the
5MW_OC4Semi_WSt_WavesWN
regression test was modified withWaveHs=55
,WaveTp=4
,WaveDir=30
,WaveDirMod=1
,WaveDirSpread=1
,WaveNDir=75
,WaveDirRange=60
, and second order turned off.After
Figure 2: after modification, the wave surfaces for visualization are bounded by the
WaveField
data set and use the native WaveField grid resolution specified in the SeaState input file (6 nodes in each half-width direction). The same WaveField is used here as in the original case above.Related issue, if one exists
None.
Impacted areas of the software
Visualization of wave surface.
Additional supporting information
Before the addition of the SeaState module, the grid had been set to 25x25 points. The sea surface at each point was calculated from the FFT of the wave spectral data. After the addition of the SeaState module, each point requested was interpolated from the WaveField data. It would be nice to someday restore the ability to calculate an arbitrary number of points for the sea surface from the FFT of the wave spectral data for that location, but I don't have time right now to modify this.
Test results, if applicable
None.