Skip to content

SeaState: Small change in WavePkShp logic#3202

Merged
deslaughter merged 3 commits intoOpenFAST:devfrom
RBergua:SeaState-WavePkShp-logic
Feb 13, 2026
Merged

SeaState: Small change in WavePkShp logic#3202
deslaughter merged 3 commits intoOpenFAST:devfrom
RBergua:SeaState-WavePkShp-logic

Conversation

@RBergua
Copy link
Contributor

@RBergua RBergua commented Feb 13, 2026

This PR is ready to be merged.

Feature or improvement description
In SeaState, the peak-shape parameter only plays a role when using WaveMod = 2 (JONSWAP/Pierson-Moskowitz spectrum (irregular)).
image

However, nowadays, there is no logic that checks this. For example, if the user defines still water (WaveMod = 0) or a regular wave (e.g., WaveMod = 1), SeaState still checks internally for a valid WavePkShp input value and it aborts the program if the criteria is not met.
image

This modification, checks for a valid WavePkShp only if WaveMod = 2.

@luwang00: Internally, if the user is not using WaveMod = 2, I'm assigning a dummy value of WavePkShp = 1. I don't know if you use this WavePkShp somewhere else and not having a 'valid' WavePkShp could break the code down the road. If there is no need to have a WavePkShp, I could remove the else statement in the proposed code. I did this change to have something robust.

@RBergua RBergua requested a review from luwang00 February 13, 2026 02:50
@RBergua RBergua added the Module: SeaState SeaState module for wave data generation label Feb 13, 2026
@luwang00
Copy link
Contributor

@RBergua Thanks for catching this. I'm not aware of WavePkShp being used anywhere else. Still, it's good to assign it a value just in case. This looks good to me.

Change for floating-point precision.

Co-authored-by: Derek Slaughter <dslaught@nrel.gov>
@deslaughter deslaughter merged commit bd5b909 into OpenFAST:dev Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module: SeaState SeaState module for wave data generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants