Skip to content
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

Merged
merged 2 commits into from
Oct 14, 2020
Merged

Drag body implementation, set nhBody = 2 #423

merged 2 commits into from
Oct 14, 2020

Conversation

dforbush2
Copy link
Contributor

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.

@kmruehl kmruehl added Drag/Morison related to drag body (body(i).nhBody = 2) or morison element (simu.morisonElement) Feature new feature request labels Oct 7, 2020
@kmruehl
Copy link
Contributor

kmruehl commented Oct 7, 2020

Thanks @dforbush2!

@dforbush2 dforbush2 mentioned this pull request Oct 8, 2020
@kmruehl kmruehl changed the base branch from master to dev October 9, 2020 21:27
@kmruehl
Copy link
Contributor

kmruehl commented Oct 9, 2020

@dforbush2 I just created a dev branch and modified this PR so that it submits change to 'dev' instead of 'master'

@kmruehl kmruehl added the Body Class Body Class (bodyClass.m) label Oct 14, 2020
@nathanmtom
Copy link

@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,
Nathan

@@ -183,6 +183,21 @@ function loadHydroData(obj, hydroData)
obj.dof_gbm = obj.dof-6;
end

function dragForcePre(obj,rho)

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.

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.

Copy link
Contributor Author

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.

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.

Copy link

@nathanmtom nathanmtom left a 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.

@nathanmtom nathanmtom merged commit 57f50b6 into dev Oct 14, 2020
@kmruehl kmruehl deleted the DragBody branch October 22, 2020 17:02
This was referenced Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Body Class Body Class (bodyClass.m) Drag/Morison related to drag body (body(i).nhBody = 2) or morison element (simu.morisonElement) Feature new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants