-
Notifications
You must be signed in to change notification settings - Fork 159
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
Drag body implementation, set nhBody = 2 #423
Conversation
Thanks @dforbush2! |
@dforbush2 I just created a dev branch and modified this PR so that it submits change to 'dev' instead of 'master' |
@dforbush2 Thanks for pulling this pull request together. If possible, can you save the updated WEC-Sim Library to a Matlab 2015b version? Currently it appears the library is saved as a 2020a version. Cheers, |
@@ -183,6 +183,21 @@ function loadHydroData(obj, hydroData) | |||
obj.dof_gbm = obj.dof-6; | |||
end | |||
|
|||
function dragForcePre(obj,rho) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dforbush2 This implementation allows for a non-hydrodynamic body to include a linear and a quadratic viscous drag forcing term; however, based on the conversation on issue #384 the requester is asking for the Morison Element forcing which includes a drag and added inertia coefficient that also includes the flow velocity and acceleration of the undisturbed wave velocity. Therefore, this modification may not be fully addressing the issue; however, it should be relatively straightforward to adapt for the Morison Element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dforbush2 My apologies, believe I misunderstood the implementation. Please disregard my previous comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not need to modify anything to specifically incorporate the morison elements, but I did test the new implementation with morison elements on/off and they seem to be behaving correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dforbush2 Yes, I realized that the linear and quadratic damping are attached to the body.hydroforce variable, while all of the Morison Element coefficients stay within the body object and is not placed within body.hydroforce. Perhaps the Morison Element definition should also be moved into body.hydroforce to be consistent with the rest of the hydrodynamic forces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dforbush2 Your pull request looks good, apologies for the prior misunderstanding on my part.
This is to address issue #384 and creates an additional dragBodyPre method of bodyClass, and rigid body library block, and the necessary flags in simulationClass. Set body(num).nhBody = 2 in WEC-Sim input file to utilize. Acts like non-hydro body but allows for linear and viscous damping forces to be calculated.