Understanding mechanical simulations with boundary contacts

Numerical methods and mathematical models of Elmer
Post Reply
robtovey
Posts: 7
Joined: 22 Jan 2024, 14:35
Antispam: Yes

Understanding mechanical simulations with boundary contacts

Post by robtovey »

I have been playing with some contact mechanics in Elmer but feeling like there is something I'm missing. My experience so far has been that results often look a bit suspicious and can be quite fragile with lots of failed simulations for one reason or another.
I'm hoping someone on this forum might have some generic or specific advice on best-practices.

The test problem I've worked on so far is spinning a rotor with some magnets in it. Centrifugal force always wants to pull the magnets away from the centre, and there is a pre-stress pressure on the outside of the rotor to counteract the centrifugal force. My ideal model is that magnets should move freely in their holes (i.e. no glue).

The images below compare four different contact options in a scenario where the angular velocity is too large so the magnets are trying to separate from the inner surfaces. The contact types in order left to right:
tie - too much contact
stick - a bit too much contact
slide - the correct one for me
no contact - the magnet never interacts with the surrounding rotor

Plot showing magnitude of displacement under net expansion:
low_pressure_displacement.png
low_pressure_displacement.png (78.49 KiB) Viewed 227 times
Plot showing the active contact locations in the plot above:
low_pressure_contact.png
low_pressure_contact.png (311.75 KiB) Viewed 227 times
tie - the boundary is active all the way around and therefore artificially prevents the magnet/rotor from expanding
stick - the magnets escape the hole and fly off to infinity
slide - the region has a medium displacement and there are small bits of active contact on both inner and outer surfaces
no contact - the outer region has a large displacement because it receives no support from the magnet

The behaviour of the "tie" and "no contact" boundaries are completely expected. I would expect the "slide" case to have worse deformation than the "no contact" case, the contact of the magnets on the rotor should just add to the outwards expansion. The active contact indicator looks particularly strange to me, I expected the outer edge to be fully active and the inner edge to be entirely detached. The combination of these factors suggests that the magnet is adding mechanical stability to the rotor, exactly what I don't want.

My more practical concerns are the fragility of these simulations. In this example the magnets inside the holes with stick contacts have escaped the hole. Certainly this doesn't just happen for stick contacts, in this case I even set "Contact Active Set Minimum = Integer 10" to try and prevent it. My experience has been very diverse:
- sometimes the simulation completes but the magnets have escaped
- sometimes the simulation terminates with an overflow/underflow error
- sometimes the simulation fails with "Numerical Error: Norm of solution appears to be NaN"
- sometimes the simulation hangs while printing lots of copies of "ERROR:: ElementMetric: Degenerate 2D element: 462..."

In an ideal world the magnets could never escape their hole, although I appreciate that this is a challenging for a generic mortar boundary. Are there any options I can set to stabilise this?
If not, I would at least like the simulation to fail reliably and quickly, any suggestions?

I guess the more general question is looking for advice on best practices for mechanical simulation (with contact modelling). I would like to have a general script I trust which I can run on slightly different geometries/meshes or forces and always trust that the output files will be sensible without having to manually look or edit settings. Broadly speaking I have complicated geometries but not super fine meshes. I am happy to assume elasticity is linear (StressSolve), but the active contact detection should be "reasonably accurate" for forces within a factor of 10 of the balanced scenario (i.e. the point where any increase in angular velocity will detach the magnets from their inner boundaries). My experience so far is that compression is always well resolved (small rpm -> full active contact), but any simulation with only partial contact just look a bit un-intuitive. The absolute displacements in all of these tests are tiny, the maximum displacement above is <1% the thickness of the magnets, which I consider an extreme case.

I have read the documentation in chapter 9 of ElmerSolverManual which has been very useful, but doesn't cover all of the options seen in examples. And I know a common suggestion on this forum for mechanical simulations is to use second order quad meshes, which I am already using. Beyond this, it is still hard for me to get an intuition from the examples (which are typically small simple hand-designed geometries) of which parameters or settings are particularly necessary/sufficient/sometimes useful etc.
A few choices I've particularly struggled with:
- choice of projector. "Normal Projector" seems to be most common and generically applicable. Sometimes (e.g. here ) it's combined with the "Galerkin Projector", when would that be "better"? There are also options for strong projection, again are there certain situations you expect this to be better? There are many options in the manual, but I cant find these two described.
- sometimes dual or "Biorthogonal" bases are used. Does this make sense when the constraints of the mortar boundary have the binary switching behaviour of contact detection?
- this example sets both "Contact Depth Initial" and "Contact Depth Offset". Is bigger always more robust? Or is too big likely to create unwanted boundary connections?
- Are there any mechanical-specific suggestions for solver choices? The three combinations I see in examples are: (BiCGStabL(4) + ILU2), or (Direct, umfpack), or (GCR, ILU2, restart=100). I haven't used the multigrid option. It seems to be in a lot of elasticity examples, but mainly just as a preconditioner? Any general advice would be great.

Possibly an observation relating to the question of forcing magnets to stay in their holes, I see that ElmerSolver prints the following line quite a lot: "WARNING:: DetermineContact: There are normals with conflicting signs"
I have been setting "mass consistent normals", which I assumed to be outward facing normal. I expect the normals to remain pretty stable through the simulation. Can I change a setting so that the DeterminContact function receives the expected normals?

I have uploaded the sif file as well in case that is useful to anyone, but apologies that it's quite long with 35 boundary conditions.
Feel free to ask for any further clarification.
Thanks again in advance for any advice you can offer
Attachments
centrifugal_sim.sif
(14.68 KiB) Downloaded 10 times
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Understanding mechanical simulations with boundary contacts

Post by kevinarden »

This was my attempt, with and without the magnets. Without the magnets and no need for contact, the rotor deforms as expected.
with magnets on the left, without on the right
on the left it appears to deflect inward instead of outward as expected.
rotor.png
(422.91 KiB) Not downloaded yet
The white is undeformed
magcontact.zip
(164.81 KiB) Downloaded 7 times
Post Reply