Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented Jun 5, 2023

This PR introduces the capability to have multiple wave fronts each with their own wave-heights, wave-periods, direction, and spreading. Each wave-train is used to calculate its respective wave excitation forces by using code-generation to have an additional instance of wave-excitation force block. The wave-trains that shall be used in the simulation are defined using 2 steps,

  1. Using a function waveGen to generate the necessary wave elevations for the respective wave-trains, e.g. >>waveGen(waves1)
  2. Defining waves.waveGroup to contain wave-trains to be included in the simulation, e.g. waves.waveGroup = [waveGen(waves1);waveGen(waves2)]

An example is available here https://github.com/salhus/WEC-Sim_Applications/tree/N-wave-Example.
Use the 'Passive_Yaw_with_N_Waves' example to see a demo.

Relevant documentation is under development.

relates to https://github.com/WEC-Sim/WEC-Sim/projects/58#card-64154778

salhus added 7 commits May 30, 2023 13:48
- modify bodyClass.m to have some properties public to be able to generate wave time-histories a priori, rather than during model run
- add a function waveGen.m to generate the wave history for each wave object,
- modify the body block to have multiple instances of excitation force blocks - each with their respective waves object,
- modify reference force blocks to have a modified wave-markers implementation.
make waveClass compatible with the latest waveClass. only changes needed are to remove the protected status of the currently protected properties.
increase compatibility
@salhus salhus marked this pull request as draft June 5, 2023 17:52
@akeeste akeeste self-assigned this Jun 14, 2023
Copy link
Contributor

@akeeste akeeste left a comment

Choose a reason for hiding this comment

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

@salhus I did an initial review of this PR, but based on our discussion last week I think some changes are missing. Were there not significant changes to the bodyClass to give the excitation forces an additional dimension? I don't see any updates to the bodyClass right now. Let me know if I'm missing something here.

Noting a couple other things we should do:

  • Update waves.marker in the waveClass definition to include the new visualization parameters added to the library. Ensure the documentation reflects the new parameters too

  • Move waveGroup to a waves() variables. This simplifies the workflow for the user and allows us to utilize the waves.setup() function already in initializeWecSim. I started working on this, but got stuck on the bodyClass.hydroForcePre calculations.

  • Add several checks on the waves (or waveGroup) variable. Users should only be able to define multiple waves of the same type and convolution method, or else the hydroForce parameters will not be accurate. Some of these checks can go in waves.checkInputs()

  • I'll make a PR into your branch that makes progress on the second point above. See https://github.com/salhus/WEC-Sim/pull/10

@kmruehl kmruehl added the Wave Class Wave Classs (waveClass.m) label Jul 12, 2023
@kmruehl kmruehl removed the request for review from jtgrasb August 9, 2023 14:55
@salhus
Copy link
Contributor Author

salhus commented Aug 15, 2023

@akeeste
Hi Adam,

I reviewed your changes and seems to resolve the comments you had about the data management and how the multiple instances of waves are being handled.
If there is no more work to add, I am moving to the docs right?

@kmruehl kmruehl requested a review from nathanmtom September 20, 2023 14:30
@kmruehl kmruehl assigned nathanmtom and unassigned akeeste Sep 20, 2023
@salhus salhus mentioned this pull request Sep 21, 2023
@salhus salhus closed this Sep 21, 2023
@salhus salhus deleted the Nwave_headings branch October 4, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Wave Class Wave Classs (waveClass.m)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants