-
Notifications
You must be signed in to change notification settings - Fork 184
Morison #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@lilnguy Thank you for this pull request! The changes you made to the Body and Response classes look good. Unfortunately, I cannot open your WECSim library block as it has been saved as a Matlab 2020 version. We save the WECSim library block as a 2015b version to allow use with past versions of Matlab. If possible can you export the library block as a 2015b version and add to the pull request for review? |
|
@lilnguy Can you let @nathanmtom push to your fork so that he can make revisions too? see info here. @nathanmtom this gives you the option to make minor changes to the PR, like saving the |
|
@lilnguy my apologies! I misspoke, I thought this PR was from your fork, not from a branch on the main repository. @nathanmtom should be able to save the |
This commit has verified the implementatino of the normal and tangential Morison Element written by the initial pull request developer. The WEC-Sim team has chosen to keep both implementations active for users. Therefore, additional code development was needed to make this possible for the end user.
Updating the Morison Element documentation to reflect the two modeling approaches provided for the user.
|
@kmruehl and @yuyihsiang I've realized that I need to make an update to the WEC-Sim library. So wait until the next push before taking a deeper dive into the Morison Element update. |
Updating the WECSim_Lib.slx. It appears that the conflict resolution over wrote the updates in the Morison Element block. Therefore, had to reconfigure the ME and make a correction in the calculation as well.
Adding to the documentation after being able to compile locally.
Update the WECSim_Lib.slx to fix broken links in the Flex Body block.
|
@kmruehl @yuyihsiang I've updated the WECSim_Lib.slx to fix the broken links in the Flex Body block. With this last commit, the update is now ready for review. |
|
@nathanmtom I get an error when I run Error using wecSim (line 316)
Derivative of state 'sphere.Floating_3DOF.CONSTRAINT_Planar_Joint.Px.v' in block
'sphere/Floating (3DOF)/CONSTRAINT (Planar Joint)' at time 0.0 is not finite. The simulation
will be stopped. There may be a singularity in the solution. If not, try reducing the step
size (either by reducing the fixed step size or by tightening the error tolerances) |
|
@kmruehl Yes, because the application case hasn't been updated to include the following: body(1).morisonElement.z = [0 1 0]; with simu.morisonElement = 1; without defining the .z vector to be a normal vector, not [0 0 0] which is the default initialization, there will be a situation where there will be a division by 0 and thus a singularity in the solution. I'll see if I can have the code check the variable is non zero and is a unit normal. I did edit the applications case to show how you need to run both option 1 and option 2, but haven't pushed it since this pull request is not yet incorporated into master branch. |
Code updates were made to the bodyClass.m and wecSim.m files to check when using option 1 for the Morison Element that the body(i).morisonElement.z vector is a unit normal vector.
|
@kmruehl I've updated the body(ii).checkinputs function to check to make sure the body(i).morisonElement.z vectors are unit normal vectors. |
Updated the attached files to keep simu.morisonElement = 1 the same as the past implementation which setting simu.morisonElement = 2 for the new normal and tangential formulation.
|
@kmruehl @yuyihsiang The updates to the Morison Element calculation which has set simu.morisonElement = 1 option to the original formulation have been completed. The WEC-Sim_Applications Free Decay example now works with backwards compatibility. |
|
@nathanmtom thanks for adding the warning glad related to not defining |
Update the WECSim_Lib.slx Flex Body block. The wave diffraction and excitation block as well as the hydrostatic restoring block cannot be linked to their equivalent block in the rigid body block.
|
@kmruehl The update library with the corrected Flex Body block links has been uploaded to the Morison branch. |
Update Morison Element block to decompose the fluid and body motion to tangential and normal components to consider the magnitude in the calculation for the Morison force.