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

Contact 3 of 3 #202

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open

Contact 3 of 3 #202

wants to merge 40 commits into from

Conversation

gabemorris12
Copy link
Collaborator

Description

This is the third and final stage of the implementation of the contact algorithm, which adds force resolution. The results look great.

sie_test.mp4
slide_test.mp4
mult_hit.mp4

As a future note, a multi-stage detection process is not yet implemented. Without this, expect to see some issues with a node sliding across a concave surface and also with three or more bodies resting on each other. Additionally, an error study should be conducted too.

Type of change

Please select all relevant options

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Formatting and/or style fixes
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A : Go into the sgh setup located in sgh_solver.h and comment out the run_contact_tests function. The input file should be contact_test.yaml. This will perform the previously implemented tests as well as the additional force resolution test.
  • Test B : Run contact_sie_test.yaml, multi_hit_test.yaml, and block_sliding_test.yaml to see that they match with the above results.

Test Configuration:

  • OS version: MacOS
  • Hardware: M3 Pro
  • Compiler: Clang

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code builds from scratch with my new changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Yaml input now accepts 'global' as a geometry option for the boundary conditions. This is for contact only and means that contact will be checked on all boundary patches. Additionally, there is some cleanup here as contact features will begin to be added.
Setting things up with a function pointer for the case where there is no contact, an empty function will be getting executed instead of hitting an if statement.
Additionally, the contact_test.geo was changed so that the patch ordered in outward normal. Added additional members to contact_patch_t and contact_patches_t. Getting everything set up for the bucket sorting.
All the previous sorting methods lead up to the ability to find nodes that could potentially penetrate a patch. This ability is now implemented with the contact_patches_t::find_nodes function.
Added the get_contact_point method which determines the reference coordinates of the intersection point.
…t_nodes; added unit test for get_contact_point
… del_tc instead to prevent matar array allocation
Additionally, I've done a restructure of the unit test so that it can be based on the file name.
All tests are working and results are identical to the python implementation.
@gabemorris12 gabemorris12 added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants