Skip to content

Conversation

@nathanmtom
Copy link

@nathanmtom nathanmtom commented Aug 30, 2021

Originally WEC-Sim would activate the morisonElement and nlHydro as a global variable across all bodies. This update allows the user to select individual bodies and activate the morisonElement or nlHydro options for that body. This should help improve computational time for bodies that do not have active elements.

To Do:

  • Update WEC-Sim_Applications wecSimInputFile.m to reflect changes implemented in this pull request. All tests past except for MoorDyn and Paraview applications since I do not have this installed on my machine.
  • Verify updates did not influence functionality with running WEC-Sim from Simulink. akeeste has volunteered to review changes to the mask initialization files.

nathanmtom added 5 commits August 30, 2021 15:52
Pulling Dev into Nathan's Branch
Updates to the WECSim_Lib.slx to set the morisonElement and NLHydro options per body rather than globally.
Requires changing from simu class to body class.
@nathanmtom nathanmtom requested a review from kmruehl August 31, 2021 16:56
@nathanmtom
Copy link
Author

@akeeste I was hoping you could check if I edited the run from Simulink files correctly with this pull request. I made some edits that let the checks pass; however, I am not sure if I broke other functionality in the mask. The issue I ran into was the mask initialization looking for the simu.morisonElement option which has now been transferred to body(ii).morisonElement.option. Hopefully, this helps narrow down the edits I made and which files to check. I believe you have the most experience with that functionality, if I'm mistaken please tag the right team member. Thanks in advance!

@akeeste
Copy link
Contributor

akeeste commented Aug 31, 2021

@nathanmtom Yes I can check the masks and callbacks to ensure everything is working. I should get to it today or tomorrow.

nathanmtom added 2 commits August 31, 2021 16:24
After running the WEC-Sim Applications Test File, the results of the test showed that additional changes needed to be made to the initialization file and the library to address changes with PR #692
Resolving issues with the WECSim_Applications GBM example.
@kmruehl kmruehl requested a review from akeeste September 1, 2021 17:20
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.

@nathanmtom
Can you grant me push access to your repo? I have a few updates to make the Run from Simulink feature work robustly. Otherwise I can put a PR into your branch from mine.

@nathanmtom
Copy link
Author

@akeeste Thanks for the review, I believe I have opened editing permission to my repo. If you still are having issues, then the pull request option would be fine.

@akeeste
Copy link
Contributor

akeeste commented Sep 1, 2021

@nathanmtom Thanks! I was able to update your branch now. I added two commits that update the body mask callbacks to ensure the correct Morison Element parameters are visible depending on the chosen morisonElement.option and remove the old simu.morisonElement flag from the global reference frame.

Everything looks good on the Run From Simulink side of things!

Lastly, in a different PR I'm working on a developer manual addition about the callbacks and masks for Run From Simulink functionality. This will be aimed at helping the development team understand and change these features. I think you're the first to give it an attempt so if you have any feedback on what was difficult/confusing I'm happy to hear it.

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

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

I've reviewed this as well, all tests on wec-sim and wec-sim_applications pass for me too. However we need to make a minor update to the WEC-Sim_Applications\Free_Decay\1m-ME example

@kmruehl
Copy link
Collaborator

kmruehl commented Sep 15, 2021

@nathanmtom thank so much this is a huge improvement to the way WEC-Sim handles non-linear hydro and morison elements, thank you!

@nathanmtom
Copy link
Author

@kmruehl I've just added you as a collaborator to my WEC-Sim Applications branch, but also if you let me know the update needed to be made happy to implement that since I thought I had double checked all application cases ran.

@kmruehl kmruehl merged commit 77c16e0 into WEC-Sim:dev Sep 15, 2021
kmruehl added a commit to akeeste/WEC-Sim that referenced this pull request Sep 15, 2021
akeeste added a commit that referenced this pull request Sep 15, 2021
* allow 0 hydro bodies and allow nonhydro to have fixed or eq mass value

* add error checks for nonhydro cg and dispVol

* update documentation on nonhydro bodies and traditional ME

* fix wamit volume for bottom-fixed bodies

* clarify required wave properties with 0 hydro bodies

* resolving docs and initialize WecSim issues

* updating for compatibility with #692

Co-authored-by: Kelley Ruehl <kmruehl@sandia.gov>
@nathanmtom nathanmtom deleted the meUpdateR3 branch February 9, 2022 15:45
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.

3 participants