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

Fix added mass contribution. #59

Merged
merged 12 commits into from
Mar 16, 2022
Merged

Fix added mass contribution. #59

merged 12 commits into from
Mar 16, 2022

Conversation

arjo129
Copy link
Member

@arjo129 arjo129 commented Nov 3, 2021

I noticed that added mass was acting in the wrong direction. This was after visuallizing the individual forces separately (in this case added mass and damping forces). To be honest it still doesn't fix any of our outstanding issues.

Signed-off-by: Arjo Chakravarty [email protected]

I noticed that added mass was acting in the wrong direction. This was after visuallizing the individual forces separately (in this case added mass and damping forces). To be honest it still doesn't fix any of our outstanding issues.

Signed-off-by: Arjo Chakravarty <[email protected]>
@chapulina
Copy link
Contributor

This PR is causing test failures. I'm not sure yet if we should update the tests or if there's something wrong with the PR. One thing I noticed in the tests is that this PR is exacerbating this issue: #47

Is there a way we can unit test the plugin so we check what the high-level expectations are? i.e. move 2 vehicles forward, one with added mass enabled and one disabled, and check that the one affected by added mass is slower.

@arjo129
Copy link
Member Author

arjo129 commented Nov 5, 2021

I need to update test expectations (The old ones were slightly off, this becomes obvious when you run a visuallization). We can extract out the individual components a functions and unit test the functions as is. One of the problems I face is that I can't test the wrenches with the physics engine running (this would be ideal). Otherwise the easiest test is that the direction of the force should always oppose the direction of motion. For some remedy to 47 I would recommend looking at #57.

@chapulina
Copy link
Contributor

I can't test the wrenches with the physics engine running

Can you elaborate? I think it should be possible to test the hydrodynamics isolated in a world without gravity, buoyancy or lift-drag. Apply a force to the vehicle, and see if its resulting velocity is damped as expected?

the direction of the force should always oppose the direction of motion

+1, I think this should help us detect sign errors

@tfoote
Copy link
Collaborator

tfoote commented Nov 10, 2021

the direction of the force should always oppose the direction of motion

That's not exactly correct. Only when accelerating. When decelerating it will go in the direction of motion. It should be in the opposite of the direction of the acceleration.

@arjo129
Copy link
Member Author

arjo129 commented Nov 10, 2021

That's correct for the direction of the added mass, but the damping matrix would dominate at higher velocities.

@chapulina
Copy link
Contributor

@arjo129 , how would you like to proceed here? Let me know if you need help updating the test expectations.

arjo129 added 3 commits March 11, 2022 11:54
…icle sinks slower now. Thus the tests have had to be updated.

Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 linked an issue Mar 11, 2022 that may be closed by this pull request
@arjo129 arjo129 merged commit e388214 into main Mar 16, 2022
@arjo129 arjo129 deleted the arjo/fix/added_mass branch March 16, 2022 16:16
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.

Positively buoyant vehicle behavior on surface
3 participants