# Mesh refinement in snap fit

**URL:** <https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549>\
**Category:** General Questions\
**Created:** [February 22, 2024, 11:42am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549 "2024-02-22T11:42:08Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 1:50pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/21 "2024-02-23T13:50:31Z")

</div>

Refinement on the whole sample was working correctly before, but as soon as I did the refinement on each contact part, the simulation did not work correctly.  
Now I will add amplitude, I want to make sure if I understood correctly or not, column A is the displacement (BC) and here instead of the number 1, I should enter the maximum displacement?

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 1:52pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/22 "2024-02-23T13:52:35Z")

</div>

Enter the data as it is. Then reference the amplitude in the boundary condition definition (with ~ 6 mm magnitude like before). Amplitude value will be multiplied by BC magnitude at each time step.

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 2:09pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/23 "2024-02-23T14:09:33Z")

</div>

I did the same but it still doesn’t work. For example, I’ve only done mesh refinement on the edge of the clip (No 1)  
As soon as I remove the mesh refinement it works correctly (if I reduce the size of all the elements it works correctly, but when I add local mesh refinement it doesn’t work!!!) (No 2)

 ![P2](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/3/3972f960dbbb049eb0efe2a35db663824ddc0297.jpeg)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 2:12pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/24 "2024-02-23T14:12:18Z")

</div>

Are you sure that the amplitude name is referenced in the boundary condition definition ? Can you show the window with this BC ?

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 2:29pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/25 "2024-02-23T14:29:31Z")

</div>

Sorry, I forgot to reference the domain name in the boundary condition definition. I referred it now and the answer was as follows:

 ![P3](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/1/1ebb37f204b02689ec58a85d40abd0043d0f45ef.jpeg)

 ![amplitude](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/f/fd7531bfb0b12de20898674b84be83c64dcddd70.jpeg)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 2:33pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/26 "2024-02-23T14:33:14Z")

</div>

In practice, you will probably need much more refinement to capture the response properly (especially with those sharp edges that are tricky for contact). That’s why a model reduced to the joint itself can be a good idea.

---

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [February 23, 2024, 2:48pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/27 "2024-02-23T14:48:35Z")

</div>

> [@Reza](#):
>
> In the second simulation, the size of all the elements is smaller, if I use mesh refinement on a specific edge or plane, will the simulation still work correctly?

As far as I know mesh density can mess the convergence if the slave mesh ends up coarser than the master.  
Does that responds the answer?

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 2:50pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/28 "2024-02-23T14:50:20Z")

</div>

> [@SergioP1975](#):
>
> interference

Thank you. I re-entered the following values as the domain and got a better answer,

 ![Amplitude 2](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/e32eaa82f473a15ea3aebe48cc6a23194c432ddf.jpeg)  
 ![P5](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/b/bbb0d8ad8e1747ad44c7c20292a72f5e63c7b74a.jpeg)

But I don’t know why the elements in contact area at the end have interference.

 ![P4](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/5/55547414d3ca7602b964956dd3022b80c16515f7.jpeg)

---

<div class="post-metadata">

**Author:** ![SergioP1975](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/sergiop1975/32/37_2.png) [@SergioP1975](https://prepomax.discourse.group/u/SergioP1975)\
**Post date:** [February 23, 2024, 2:58pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/29 "2024-02-23T14:58:20Z")

</div>

Trying to simulate with accuracy the “post clipping” moment (when the parts pass the maximun height to the minimun again) is very very very complex, it need insannely small time step and lot of iterations. For knowing the max stress during clipping is enough to reach the maximun displacement and stay with that results.

If you want to know the unclipping force, just start your simulation from the clipped postition.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 3:06pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/30 "2024-02-23T15:06:43Z")

</div>

As I said before, this mesh is way too coarse and the contact conditions are nasty (edge to edge/surface). Sometimes adding node to surface contact helps but you should focus on the mesh first (once again - try to reduce the model to the minimum).

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 3:28pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/31 "2024-02-23T15:28:13Z")

</div>

I didn’t know this until now, but I tested it now and it didn’t work.

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 3:31pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/32 "2024-02-23T15:31:45Z")

</div>

Thanks a lot to you and SergioP1975, I will definitely check these points and let you know the result.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 3:32pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/33 "2024-02-23T15:32:29Z")

</div>

It’s a general common rule in FEA. For example, from CalculiX User’s Manual:

> Finally a few useful rules if you experience convergence problems:  
> • Deactivate NLGEOM (i.e. do not use NLGEOM on the \*STEP card).  
> • Try SMALL SLIDING first, and then large sliding, if applicable.  
> • Try a linear pressure-overclosure relationship first (instead of exponential), with a stiffness constant about 5 to 50 times Young’s modulus of the adjacent materials.  
> • Define your slave surface based on faces, not on nodes. This can be especially helpful if you use quadratic elements.  
> • **Make sure that the mesh density on the slave side is at least as fine as on the master side, preferably finer.**  
> • Deactivate friction first.

---

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [February 23, 2024, 3:45pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/34 "2024-02-23T15:45:17Z")

</div>

That small corner I posted can help to achieve it in a reasonable time step.

![ezgif-7-c78c0998e9](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/c/c72852f66842b389ba2ac04ad0abccce8d51e71d.gif)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 4:30pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/35 "2024-02-23T16:30:07Z")

</div>

And significantly finer mesh…

---

<div class="post-metadata">

**Author:** ![Reza](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Reza](https://prepomax.discourse.group/u/Reza)\
**Post date:** [February 23, 2024, 4:48pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/36 "2024-02-23T16:48:24Z")

</div>

Whenever you have a time, please share the second simulation file.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 23, 2024, 6:05pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/37 "2024-02-23T18:05:52Z")

</div>

That’s the one:

[snap fit mod.pmx](https://prepomax.discourse.group/uploads/short-url/zvGvVoeWbKW31N6Ulgw878XrNZX.pmx) (2.6 MB)

---

<div class="post-metadata">

**Author:** ![FEAUser](https://avatars.discourse-cdn.com/v4/letter/f/58956e/32.png) [@FEAUser](https://prepomax.discourse.group/u/FEAUser)\
**Post date:** [February 28, 2024, 10:35am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/38 "2024-02-28T10:35:37Z")

</div>

This is the correct design for snap fit. first step is to follow best practice or design guidelines for snaps. after wards define the purpose of the simulation. in most cases the only concern is the beam maximum stresses under maximum deflection.

[Previous page](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549.md?page=1)
