# 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:** 20\
**Page:** 1

<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 22, 2024, 11:42am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/1 "2024-02-22T11:42:08Z")

</div>

Hello every one!  
I simulated a snap fit, when I define refinement in the slave and master mesh, the simulation does not work properly. It works properly without mesh refinement.  
How can I solve this problem?

 ![Problem](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/d2139db94533e8dddc228028f8b8f2b5ac13c4c4.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 22, 2024, 12:14pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/2 "2024-02-22T12:14:55Z")

</div>

Can you share the files ? Contact definition is important here - how you assign master and slave surfaces, what type of contact is used and so on.

---

<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 22, 2024, 12:55pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/3 "2024-02-22T12:55:19Z")

</div>

Thank you for your answer. You can download the file through the link below.

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F12Bg-FoCWWAm3KAVoj58leoJ5507fyt05%2Fview%3Fusp%3Ddrive_link&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F12Bg-FoCWWAm3KAVoj58leoJ5507fyt05%2Fview%3Fusp%3Ddrive_link&ifkv=ATuJsjxBtoNLQTwnddgsvImY5UGZAHt5Vsb8duPJNV3qnwToRchKpBo-fXm_cpHbNiU1OzGGx5usAQ&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S1711728932%3A1708606455559471&theme=glif)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

---

<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 22, 2024, 12:56pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/4 "2024-02-22T12:56:37Z")

</div>

You have to set access to “Anyone with the link” before copying the link and pasting it here.

---

<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 22, 2024, 1:00pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/5 "2024-02-22T13:00:03Z")

</div>

Ok, I think it works now.

> **[snap joint simulation 6, mesh refinement.pmx](https://drive.google.com/file/d/12Bg-FoCWWAm3KAVoj58leoJ5507fyt05/view?usp=sharing)**
>
> Google Drive 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 22, 2024, 1:37pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/6 "2024-02-22T13:37:49Z")

</div>

What value of mesh refinement did you use ? I tried 0.4 mm but it takes a lot of time to solve.

Don’t you want to include friction ? Also, I would reduce the model to the connection and its closest surroundings at least for now.

---

<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 22, 2024, 2:13pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/7 "2024-02-22T14:13:10Z")

</div>

The value of refinement does not matter (you can set it to 1mm), but if there is refinement around the contact area, it will make the model not work properly.

I’m in the early stages of simulation and plan to add friction next.

Is there a guide that explains the different contacts and their parameters?

---

<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 22, 2024, 3:19pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/8 "2024-02-22T15:19:26Z")

</div>

> [@Reza](#):
>
> The value of refinement does not matter (you can set it to 1mm)

Results with mesh refinement set to 1 mm:

![snap-fit](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/0/0561e0fa0ece269677fd09740cbccb38198b5eb1.gif)

> [@Reza](#):
>
> Is there a guide that explains the different contacts and their parameters?

Mainly [CalculiX documentation](http://www.dhondt.de/ccx_2.21.pdf) but you can also find some helpful tips on the CalculiX forum. For example, here: [Contact stiffness setting - CalculiX (official versions are on www.calculix.de, the official GitHub repository is at https://github.com/Dhondtguido/CalculiX).](https://calculix.discourse.group/t/contact-stiffness-setting/455)

---

<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 22, 2024, 3:26pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/9 "2024-02-22T15:26:33Z")

</div>

Thank you. Why mesh refinement is done but the hook is not placed?  
When we don’t have mesh refinement, the hook is placed correctly.

---

<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 22, 2024, 7:39pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/10 "2024-02-22T19:39:05Z")

</div>

Results without mesh refinement:

![snap-fit no refinement](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/3/31ebcc49f61149b7a093275edf9fe61c81f528ad.gif)

You could use amplitude to control the prescribed displacement BC in such a way that it reaches the maximum distance before the end of the simulation and then there’s some time for the hook to snap back.

![snap-fit mod](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/2/2ee49e49f031c88d420cbabead27e52dba5d287b.gif)

As you can see, I reduced your model for testing.

---

<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, 9:04am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/11 "2024-02-23T09:04:52Z")

</div>

Thank you so much.  
If possible, share the second simulation file.

1. 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?
2. Did you use amplitude in the second simulation? If possible, explain a little more about the amplitude settings.

---

<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, 9:05am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/12 "2024-02-23T09:05:00Z")

</div>

It would be very interesting trying to solve this problem with hyperelastic material. It is closely related to this other post. I haven’t been able to solve it with the final snap.

> [@Hyperelastic contacts in axisymmetric model](https://prepomax.discourse.group/t/hyperelastic-contacts-in-axisymmetric-model/1533/11):
>
> I don’t know if it’s the same in CalculiX but Abaqus users are only advised to avoid second-order elements with node-to-surface contact. There shouldn’t be any special issues with those elements with surface-to-surface contact.

Found that just an small cut helps to get a softer transition at the entrance and final snap (Only able to solve it with elastic).

 ![imagen](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/c/c28060843ce6787ea5c4bac6b83ff1577f8b005f.png)

---

<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, 9:06am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/13 "2024-02-23T09:06:19Z")

</div>

Guess that for investigate the clipping feature you don’t need to model the contact at all, just impose a lateral displacement in the tip of the clip feature and what you’ll see is that the main stress is in the base of the clip. You could refine the mesh in the head of the clip to capture better the contact, but that will not solve your issue of the high stress in the base, you need to model that area with a radius and focus there.

Without using contact you can reach the same results and try ten different radius or shapes of the clip in the same time that you solve only one with contact.

I have run your problem, and there is also a big interference in the main body, guess that you should add contact there or fix the cad.

---

<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, 10:01am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/14 "2024-02-23T10:01:25Z")

</div>

> [@SergioP1975](#):
>
> Guess that for investigate the clipping feature you don’t need to model the contact at all, just impose a lateral displacement in the tip of the clip feature and what you’ll see is that the main stress is in the base of the clip.

For that, analytical calculation (cantilever beam) could be sufficient. Unless the OP wants to evaluate the stresses in contact and see what happens with the tip.

> [@SergioP1975](#):
>
> I have run your problem, and there is also a big interference in the main body, guess that you should add contact there or fix the cad.

It acts essentially as a rigid body anyway. Might be better to get rid of it and focus on the joint like in my last 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, 10:49am UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/15 "2024-02-23T10:49:15Z")

</div>

Usually, linear elasticity is sufficient in snap-fit design studies (at least to estimate the forces in the joint). However, theoretically, this material model is valid for small elastic strains up to around 5% (which can be exceeded a bit here).

---

<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, 12:16pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/16 "2024-02-23T12:16:26Z")

</div>

As analyst, the first thing that one sholud ask for, is “what the goal of the analysis/What results I need?”, and then build and focus on just the minimun model to give a razonably accurate answer to this question. Is something basic, but even experienced analyst fail in this (as me).

For example, in the case of a clippling analysis, the results needed could be:

1. I need to know the clipping force  
Then you need to model only the clip (only one, no matter if your part has several. Even you could model a one element thikness mesh and multiply the resulting force by the real thicknes), whithout radius in the base, maybe a radius in the tip to help the contact. For the oposite part (the “female” clip) you need only to model a layer of one element that get in contact with the male, is not need all the rest of the material. The problem here is this force will depend a lot on the contact properties… but as you have a really small model, you can investigate several contact configurations in a very short time

2. I need to know the retention force, or the force to unclip the clip  
Then you can use the same model as above, but start in the clipped position! Don´t try to run the clip/unclip operation, it has no sense and will be wasting of time

3. I need to know if my clip will not broke during the clip operation  
Then here you need to know stress and strains, and the clip must include the radius that release stress in the base (only that, there are some radius that doesn´t affect the stress result and can be removed). As you need only the max stress/strain, then you don´t need contact at all, just apply a lateral displacement in the tip and you get the same stress state as with contact with 10x less time. Again you can work with a one element thickness model, and then put a lot of elements in the base radius that is where the action will happen, and still will be a very small model, but with high accuracy in the interest area

4. I need to know how the clip asembly will perform during traction (will it broke or release?)  
Same model as above, but with contact and maybe add more radius in base of the tip also because probably there is were the action (stress) will be. Again start with the part clipped and try several contact conditions.

5. My boss ask me for a set of spectacular images for posting in Linkedin (or want to impress a girl/friends at bar) including the part and the clip during clipping operation…  
Then you are f\*ed, you need to work with the whole model. But still you can use a quarter model, and replicate in postprocessing! Here as they are just for show…you can use lineal elements ;-), and the more bigger that your part/mesher can accept, nobody will see the elements in the cage, the focus will be in the clip.

For cases 1-4 the deformation of the part is visible at true scale, that is an indication that the analysis should be at least no lineal due to big displacements (great deformation of the orignal shape), and if is a plastic clip, then is prefferifble to use a propper plastic material definition. For case 5 you must use the most basic material, as the focus of the job is to get a set of spectacular (not accurate) images.

---

<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, 12:24pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/17 "2024-02-23T12:24:03Z")

</div>

Right, we don’t know the goal here so we can only guess and suggest different approaches for different scenarios. But, as usual, the discussion went a bit too far without more feedback from the OP. The main goal seems to be achieved so let’s wait for potential further questions.

---

<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:31pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/18 "2024-02-23T13:31:05Z")

</div>

Thank you all, I have already asked my questions about the simulation you posted and I am waiting for your reply.  
I ask my questions here again:  
"If possible, share the second simulation file.

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?  
Did you use amplitude in the second simulation? If possible, explain a little more about the amplitude settings."

I want to check if the clamp breaks during meshing, first I need to make sure my simulation is working properly and then check other parameters and currently I still don’t understand why when I apply mesh refinement the operation to It does not work properly

---

<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:31pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/19 "2024-02-23T13:31:22Z")

</div>

(post deleted by author)

---

<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:37pm UTC](https://prepomax.discourse.group/t/mesh-refinement-in-snap-fit/1549/20 "2024-02-23T13:37:15Z")

</div>

I can share the file later.

Yes, it should work with refinement. I didn’t use it there, just refined the whole mesh but there’s no reason why it couldn’t work with refinement now.

Yes, I used the amplitude feature to control the movement of the part with the hook. It was defined this way:

```auto

t A
0 0
0.8 1
1 1

```

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