-
Notifications
You must be signed in to change notification settings - Fork 112
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
116 rigid body rod contact #117
116 rigid body rod contact #117
Conversation
This commit fixes the rod-cylinder contact by adding torques due to the contact force on cylidner. Previously, we were only dealing with forces acting on cylinders however any contact force acting away from the cg will create torque.
Codecov Report
@@ Coverage Diff @@
## update-0.2.4 #117 +/- ##
================================================
- Coverage 87.09% 86.87% -0.23%
================================================
Files 40 40
Lines 2534 2567 +33
Branches 343 345 +2
================================================
+ Hits 2207 2230 +23
- Misses 305 315 +10
Partials 22 22
Continue to review full report at Codecov.
|
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.
LGTM. But to show torques are acting, shouldn't we show an example where there is an inclined collision, and then rotation happens? What if the inclination angle is provided as a parameter to be set in the example case?
I will add one more example, where cylinder rotates after collision. |
@armantekinalp after you add the variable-angle collision case, no need to re-request, you can merge directly. |
Fixes #116
Previous implementation of rigid cylinder rod contact was not taking into account torques generated on cylinder due to contact. This PR changes the previous implementation to incorporate torques generated by contact forces that are applied away from the cg of cylinder.
In order to validate implementation a new example simulation called
rod_cylinder_parallel_contact.py
is added where parallel rod and cylinder contact and exchange momentum. Simulation results are given below, whererod_one
is a Cosserat Rod ,rod_two
is rigid cylinder.Blue rod is Cosserat Rod, Orange rod is Rigid Cylinder.
2D_xz_rod_cylinder_contact.mp4