Skip to content

Conversation

@kmruehl
Copy link
Collaborator

@kmruehl kmruehl commented Aug 6, 2021

This is the initial effort to break the library into sub-libraries. If approved, I will continue working on breaking the library into even more sub-libraries (e.g. for force calcs linked between libraries), in progress here: https://github.com/kmruehl/WEC-Sim/tree/feature_subsublibraries

Changes include:

  • Splitting library into sub-libraries for each class (e.g. body, pto, mooring, etc)
  • Updating examples and test files to reflect the new library structure... aka the library change is not backwards compatible
  • moved spectralMoment function to source directory so that test can be run in case directories

@kmruehl kmruehl added Feature new feature request SCM source code mangagement and warnings labels Aug 6, 2021
@akeeste
Copy link
Contributor

akeeste commented Aug 13, 2021

This will definitely make tracking library changes much easier. I like the implementation but think Simulink has some options that will maintain more backwards compatibility. Have you looked at converting the Body Elements, Constraints, etc into referenced subsystems? This method will pull the Body Elements content directly from a different .slx file, instead of having the block open the file directly. I experimented with it a little bit and it may not require rebuilding all old models.

@kmruehl kmruehl requested a review from akeeste August 26, 2021 20:01
@kmruehl
Copy link
Collaborator Author

kmruehl commented Aug 26, 2021

@akeeste Thanks for reviewing this PR and looking into other options. The referenced subsystem is an interesting feature, but unfortunately it does not appear to be compatible with Simulink Library files. If you'd like to take a look I've implemented your suggested revision on my fork here: https://github.com/kmruehl/WEC-Sim/tree/feature_referencedsubsystem. The examples run (with backwards compatibility), but the WEC-Sim Library subsystems do not show up in the Simulink Library.

Top Level:
image

Body Elements:
image

I also tried converting the individual subsystem files to library files so that they show up in the Simulink Library, but this broke the referenced subsystems, and I get the following errors:
image
image

I'll pay around a bit more, but referenced subsystems don't seem to be the solution for the library. The good news is that referenced subsystems are a great solution for some of our other linked library blocks (e.g. between flex body and rigid body)

@kmruehl
Copy link
Collaborator Author

kmruehl commented Aug 26, 2021

UPDATE: @akeeste disregard the issue with the Simulink Library not showing up. I restarted MATLAB and this error went away. I guess I was just messing with the library files too much! I'm running tests now, but it looks like the referenced subsystems will work for the library, and I'll update the linked library blocks this way as well (e.g. between flex body and rigid body). Since the updates on on a different branch I'm going to close this PR and will re-open a new one.

@kmruehl kmruehl closed this Aug 26, 2021
@kmruehl kmruehl added Library updates to the WEC-Sim Library and removed Feature new feature request labels Oct 13, 2021
@kmruehl kmruehl deleted the feature_sublibraries branch October 13, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Library updates to the WEC-Sim Library SCM source code mangagement and warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants