Skip to content

Add JONSWAP spectrum + random seed#47

Merged
dav-og merged 2 commits intoProject-SEA-Stack:mainfrom
tridelat:jonswap
Nov 23, 2023
Merged

Add JONSWAP spectrum + random seed#47
dav-og merged 2 commits intoProject-SEA-Stack:mainfrom
tridelat:jonswap

Conversation

@tridelat
Copy link
Copy Markdown
Collaborator

This PR adds the JONSWAP spectrum, and is calculated in the code by first getting the spectral densities from the Pierson-Moskowitz spectrum and then scaling it with the peak enhancement factor factor. By default, the peak enhancement factor is 1.0, which keeps the spectrum equivalent to Pierson-Moskowitz (as used in tests).
The random seed was also exposed in the IrregularWaveParams struct so it can be set by the user.

@tridelat tridelat requested a review from dav-og November 21, 2023 09:03
Copy link
Copy Markdown
Collaborator

@dav-og dav-og left a comment

Choose a reason for hiding this comment

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

Looks good - tests passing (2, 3, 5, 20 aside). Thanks Tristan! 👍

@dav-og dav-og merged commit 0a58e4a into Project-SEA-Stack:main Nov 23, 2023
@tridelat tridelat deleted the jonswap branch November 24, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants