Skip to content

Conversation

@jtgrasb
Copy link
Contributor

@jtgrasb jtgrasb commented May 30, 2025

This PR adds an example of a variable mass WEC as enabled by WEC-Sim/WEC-Sim#1465 into WEC-Sim source. As of now, the example just runs a sphere (r = 5m) with varying mass and draft in a regular wave. The draft increases from 1 m to 9 m and can represent a WEC taking in water to increase draft. However, I assumed a constant density meaning the CG doesn't change relative to the sphere's center.

For now, this is an example of how to implement a variable mass WEC in WEC-Sim, but it is not a very practical case. Here are my ideas for details to add (open to suggestions):

  • Finer discretization: I only used 1 m draft intervals but a finer discretization is definitely needed for accuracy.
  • Simulate water intake to determine mass distribution and changes in center of gravity.
    • May be more clear with a cylinder instead of sphere.
  • Create realistic use case:
    • Model system that is gradually taking on water to adapt to wave condition.
    • Develop controller that can take in and let out water to tune itself in irregular waves.

@akeeste akeeste self-requested a review June 11, 2025 14:47
@akeeste akeeste self-assigned this Jun 11, 2025
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.

Thanks @jtgrasb. I pushed a few miscellaneous clean up items (removing commented lines that weren't used, minor formatting, etc) and added a README.

See my couple of outstanding comments on simplifying the BEM and geometry files included in the PR.

Now that we're demonstrating the feature, do you still feel confident in our variable mass implementation? Not doubting our previous work, I just didn't double check it here

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Jun 18, 2025

@akeeste Thanks, I made the suggested changes.

As for confidence in our implementation, I am feeling pretty confident. However, I would like to do a more detailed verification with comparisons to non-variable mass models. I don't think it would be too difficult and would increase confidence. I'll work on this in the next couple weeks before merging.

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Jul 2, 2025

@akeeste I made some slight changes to clean up the model and wrap up some final tasks:

  • I tested the functionality in noWave conditions by simulating a series of WEC-Sim runs with the different mass values:
    image
  • I added the variable mass case to the variable hydro tests.
  • I updated the README accordingly.
  • I adjusted the body class in PR 1494 to check for mass vector input before overwriting as equilibrium for variable mass cases.
  • I added small details to the documentation on variable hydrodynamics in PR 1494.

This PR should be ready for final review and merge.

@akeeste akeeste self-requested a review July 8, 2025 19:31
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.

Thanks @jtgrasb, this case looks good to me. I agree that we could improve this case by more accurately simulating the water intake and the influence on cg and inertia, but for now I think we should merge this as a demonstration of how to vary the mass using variable hydro.

@jtgrasb jtgrasb merged commit 4ce0c88 into WEC-Sim:dev Jul 8, 2025
3 checks passed
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