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 edge tolerance capability #852

Closed
bwspenc opened this issue Feb 14, 2014 · 14 comments
Closed

Contact edge tolerance capability #852

bwspenc opened this issue Feb 14, 2014 · 14 comments

Comments

@bwspenc
Copy link
Contributor

bwspenc commented Feb 14, 2014

For node-face contact to function correctly in situations where a node is right on the edge of a surface, it is necessary to allow for contact to be enforced between a node and a face even though the node is off the face by a slight amount. This is typically referred to as an edge tolerance or tangential tolerance, and the distance that the edge is extended can either be a user-supplied parameter or computed automatically based on typical face dimensions.

We need this to solve a problem with thermal contact between two surfaces that have a symmetry plane. This is also important for mechanical contact in similar scenarios.

@bwspenc bwspenc closed this as completed Feb 14, 2014
@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 8014b62:

Contact bug fix

In the competition between two faces, the wrong variable was being
used for the distance from one of the faces.  Instead of using the
distance for that face, we were always using 0.  I fixed that and
restructured the logic for better code readability. Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 9d56af2:

Fix bug in contact search

Contact distance calculation was wrong.  -Wshadow would have caught this.
Addresses #852

@friedmud
Copy link
Contributor

Hmmm... are you sure you weren't seeing that warning in debug mode? I thought we did -Wall for debug mode.

Are you suggesting we make that warning an error?

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

I'm pretty sure -Wall does not enable shadow variable checking with gcc. You need to explicitly include -Wshadow to get that. I manually added -Wshadow and recompiled just this file, and got a whole ton of shadow variable warnings coming from packages we depend on (libmesh, mtwist), as well as headers in Moose. Most (all?) of them are from having a variable and a method having the same name, which is not actually a problem. I looked into this a while back, and I don't think we can pick and choose which types of shadow variables should trigger warnings. To answer your question, yes, I think that adding -Wshadow would be really good thing, but we would probably have to do a lot of cleanup work to be able to enable it. It is probably worth the effort because shadow variables can produce very nasty, hard to find bugs.

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 3cd5575:

Contact search refactor

1) Added option for the user to prescribe a tangential distance over
   which the face is virtually extended.  If this option is used,
   contact is enforced between a node and a face if the node is off
   the edge of the face and the tangential distance off the face
   is smaller than the specified tolerance.  This is essential for
   using node-face contact with symmetry planes or for enforcing
   contact between two bodies with matching edges.  This is
   optionally enabled by specifying "tangential_tolerance" in the
   scope of anything that creates a PenetrationLocator.

2) Refactor search algorithm to remove all calls to
   elem.contains_point.  These called expensive inverse maps, and
   were causing the node to be paired with the wrong face in some
   situations and causing a sign error in the penetration distance if
   the node was close to the surface.

3) Improve speed and robustness in handling of cases where the
   contact point is on a ridge between two faces.

4) Make contact on triangular faces work.

Addresses #852

@friedmud
Copy link
Contributor

Wow - tons of good work here Ben.

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 25dd127:

Bug fix in penetration locator addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 99e0439:

Use get_node_index() method on libmesh Elem class

Temporary workaround can be removed now that libmesh is updated.
Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 19c0b49:

Test new PenetrationAux diagnostics

Modify existing tests that use PenetrationAux to request
the full set of diagnostics.  Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In f270f4e:

Handle ridge and peak cases more robustly in PenetrationLocator

Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In fa2afaf:

Add 2d tests of PenetrationLocator with moving contact surfaces

These tests exercise PenetrationLocator in 2d with moving meshes in a
variety of situations.  There are two variants of each of these
tests: one with a zero tangential tolerance, and one with a nonzero
tangential tolerance (tt in the name).

Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 19e3a84:

Add moving 2d penetration locator tests with quadratic elements

Addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 86cf4d0:

Fix bug in penetration locator addresses #852

@bwspenc
Copy link
Contributor Author

bwspenc commented Feb 14, 2014

In 7effd61:

Fix another PenetrationLocator bug uncovered by testing addresses #852

permcody pushed a commit that referenced this issue Feb 14, 2014
In the competition between two faces, the wrong variable was being
used for the distance from one of the faces.  Instead of using the
distance for that face, we were always using 0.  I fixed that and
restructured the logic for better code readability. Addresses #852

r8480
permcody pushed a commit that referenced this issue Feb 14, 2014
Contact distance calculation was wrong.  -Wshadow would have caught this.
Addresses #852

r8992
permcody pushed a commit that referenced this issue Feb 14, 2014
1) Added option for the user to prescribe a tangential distance over
   which the face is virtually extended.  If this option is used,
   contact is enforced between a node and a face if the node is off
   the edge of the face and the tangential distance off the face
   is smaller than the specified tolerance.  This is essential for
   using node-face contact with symmetry planes or for enforcing
   contact between two bodies with matching edges.  This is
   optionally enabled by specifying "tangential_tolerance" in the
   scope of anything that creates a PenetrationLocator.

2) Refactor search algorithm to remove all calls to
   elem.contains_point.  These called expensive inverse maps, and
   were causing the node to be paired with the wrong face in some
   situations and causing a sign error in the penetration distance if
   the node was close to the surface.

3) Improve speed and robustness in handling of cases where the
   contact point is on a ridge between two faces.

4) Make contact on triangular faces work.

Addresses #852

r9409
permcody pushed a commit that referenced this issue Feb 14, 2014
permcody pushed a commit that referenced this issue Feb 14, 2014
Temporary workaround can be removed now that libmesh is updated.
Addresses #852

r9859
permcody pushed a commit that referenced this issue Feb 14, 2014
PenetrationAux already provided the ability to output the normal
penetration distance.  I added the option "quantity", which can
be used to ask PenetrationAux to provide other data from
penetration_info: distance, tangential_distance, normal_x,
normal_y, normal_z, closest_point_x, closest_point_y, closest_point_z
element_id, and side.  This is mostly intended to be used for testing
and diagnostics.  Addresses #852.

r9879
permcody pushed a commit that referenced this issue Feb 14, 2014
Modify existing tests that use PenetrationAux to request
the full set of diagnostics.  Addresses #852

r9880
permcody pushed a commit that referenced this issue Feb 14, 2014
permcody pushed a commit that referenced this issue Feb 14, 2014
These tests exercise PenetrationLocator in 2d with moving meshes in a
variety of situations.  There are two variants of each of these
tests: one with a zero tangential tolerance, and one with a nonzero
tangential tolerance (tt in the name).

Addresses #852

r10227
permcody pushed a commit that referenced this issue Feb 14, 2014
permcody pushed a commit that referenced this issue Feb 14, 2014
permcody pushed a commit that referenced this issue Mar 7, 2014
1) Added option for the user to prescribe a tangential distance over
   which the face is virtually extended.  If this option is used,
   contact is enforced between a node and a face if the node is off
   the edge of the face and the tangential distance off the face
   is smaller than the specified tolerance.  This is essential for
   using node-face contact with symmetry planes or for enforcing
   contact between two bodies with matching edges.  This is
   optionally enabled by specifying "tangential_tolerance" in the
   scope of anything that creates a PenetrationLocator.

2) Refactor search algorithm to remove all calls to
   elem.contains_point.  These called expensive inverse maps, and
   were causing the node to be paired with the wrong face in some
   situations and causing a sign error in the penetration distance if
   the node was close to the surface.

3) Improve speed and robustness in handling of cases where the
   contact point is on a ridge between two faces.

4) Make contact on triangular faces work.

Addresses #852

r9409
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

No branches or pull requests

2 participants