Skip to content

Contact mechanics scaling#1377

Merged
mariusnevland merged 16 commits intodevelopfrom
contact_mechanics_scaling
Apr 10, 2025
Merged

Contact mechanics scaling#1377
mariusnevland merged 16 commits intodevelopfrom
contact_mechanics_scaling

Conversation

@mariusnevland
Copy link
Contributor

@mariusnevland mariusnevland commented Mar 20, 2025

Proposed changes

Regarding issue #1151. We remove the contact mechanics softening factor, and introduce two new mixins CharacteristicTractionFromDisplacement and CharacteristicDisplacementFromTraction. The former mixin fetches the characteristic displacement from the numerical constants and computes the characteristic traction by Hooke's law. The latter mixin does the opposite. Note that this is a breaking change, as the default value of the contact mechanics numerical constant has changed.

Note: test_time_dependent_bc() needed some quite significant changes, as the removal of the softening factor caused the Newton solver to not converge. This test is very sensitive to the value of the contact mechanics constant, and we might want to redesign the test. Also, a tiny relaxation of some absolute tolerances in test_contact_mechanics() was needed.

Types of changes

What types of changes does this PR introduce to PorePy?
Put an x in the boxes that apply.

  • Minor change (e.g., dependency bumps, broken links).
  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Testing (contribution related to testing of existing or new functionality).
  • Documentation (contribution related to adding, improving, or fixing documentation).
  • Maintenance (e.g., improve logic and performance, remove obsolete code).
  • Other:

Checklist

Put an x in the boxes that apply or explain briefly why the box is not relevant.

  • The documentation is up-to-date.
  • Static typing is included in the update.
  • This PR does not duplicate existing functionality.
  • The update is covered by the test suite (including tests added in the PR).
  • If new skipped tests have been introduced in this PR, pytest was run with the --run-skipped flag.

Copy link
Contributor

@jwboth jwboth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me the changes look good. What about the failing tests? Any insight @mariusnevland ?

As of now, the code does not change behavior compared to the previous code. Experience will show which of the two provided mixins for determining characteristic quantities is more often used.

Copy link
Contributor

@IvarStefansson IvarStefansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@mariusnevland mariusnevland reopened this Apr 10, 2025
@mariusnevland mariusnevland merged commit a4d4af8 into develop Apr 10, 2025
12 checks passed
@mariusnevland mariusnevland deleted the contact_mechanics_scaling branch April 10, 2025 13:22
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.

4 participants