Gmsh - Meshing a very thin flat sheet

About the development of the FEM module/workbench.

Moderator: bernd

freecad_FEM
Posts: 8
Joined: Fri Dec 31, 2021 1:12 am

Gmsh - Meshing a very thin flat sheet

Post by freecad_FEM »

Hello,

I am trying to mesh using gmsh a very thin square sheet (10 mm x 10 mm, thickness 10nm). For this kind of almost 2-D like object, I think we need to set boundary layers of top and bottom face and do 2D mesh. This post (https://forum.freecadweb.org/viewtopic.php?t=30006) gives an idea of how to do this in "CFD analysis" but I am not sure how to proceed with gmsh. I am trying to characterize the strain distribution of stretching this flat sheet.

I would greatly appreciate any help!
User avatar
NewJoker
Veteran
Posts: 3089
Joined: Sun Oct 11, 2020 7:49 pm

Re: Gmsh - Meshing a very thin flat sheet

Post by NewJoker »

For such a thin sheet, no doubt you should use shell elements. Then you won’t have to worry about meshing in a through-thickness direction. Just model the sheet as a surface and the mesher will automatically recognize it as an object for shell meshing. Then you will also have to assign thickness to it using FEM ElementGeometry2D.

For shell meshing usually adopted criterion is that the thickness should be less than 1/10 of the characteristic global dimension. So in this case, even a thickness of 1 mm would be enough to use shell elements. We often use shells for thicker sheets too, especially since many codes offer thick shell element formulation. It’s a matter of engineering judgment to decide whether to use shell elements or not but if the sheet is thin enough to make it difficult to obtain good solid mesh (at least 4 elements through-thickness) without significant raise in the computational effort then we go for shell elements (unless the contact must be modeled accurately since shells can’t represent its three-dimensional stress state).
freecad_FEM
Posts: 8
Joined: Fri Dec 31, 2021 1:12 am

Re: Gmsh - Meshing a very thin flat sheet

Post by freecad_FEM »

Thank you very much for your advice. It makes sense and I think it works great.

May I ask for another suggestion when I want to mesh two sheets on stacked along z-direction (for example, one is 10mm x 10mm x 10um and another is 2mm x 2mm x 10nm attached to the bottom sheet)? Using Boolean Fragments -> Compound filter, I make one Compsolid and define material parameters of the two sheets separately. Even though the two sheets are very flat, there is a 3-D aspect I need to define (from z=0 to 10um is 10mm x 10mm sheet#1, from z=10um to 10.010um is 2mm x 2mm sheet#2).
User avatar
NewJoker
Veteran
Posts: 3089
Joined: Sun Oct 11, 2020 7:49 pm

Re: Gmsh - Meshing a very thin flat sheet

Post by NewJoker »

If you want to model two shell parts lying on top of each other, you should offset them by the distance equal to the sum of halves of their thicknesses and define contact or tie constraint between them. For such purposes, a special type of shell elements (so-called continuum shells) is available in some FEA codes but it’s not supported by CalculiX. As I’ve mentioned, shell elements can’t capture full contact stress distribution but in this case, there’s no other choice since the sheets are extremely thin.
freecad_FEM
Posts: 8
Joined: Fri Dec 31, 2021 1:12 am

Re: Gmsh - Meshing a very thin flat sheet

Post by freecad_FEM »

Thank you again for your reply.

I do not have much interest in the contact strain distribution, and I will be okay just looking at the strain distribution of the film sitting on top of the bottom one. As long as I can define material parameter for each sheet, I think I am good.

Can I ask how to define constraint between the two?
User avatar
NewJoker
Veteran
Posts: 3089
Joined: Sun Oct 11, 2020 7:49 pm

Re: Gmsh - Meshing a very thin flat sheet

Post by NewJoker »

You can connect these parts either with tie constraint (if you want them to be permanently connected without the possibility of relative sliding or separation) or with contact constraint (if you want to allow for sliding and separation). Tie constraint is less realistic in many cases (unless the parts are supposed to be fully bonded in real life) but also easier to converge.
freecad_FEM
Posts: 8
Joined: Fri Dec 31, 2021 1:12 am

Re: Gmsh - Meshing a very thin flat sheet

Post by freecad_FEM »

I have tried what you suggested, but I think I might be doing something wrong. I would appreciate if you could point out where I am making mistakes..

I create two faces, one at z=0 (Face#1), another at z=12.6um (Face#2).

I then make them compound -- this is the part I am not very certain, but I found this necessary because I cannot put two separate meshes for each face under the Analysis tab -- CalculiX doesn't support more than one mesh.

Then I do mesh, define material parameter, put constraint on two edge (one ConstraintFixed, another ConstraintDisplacement) on Face#1 (because in real world, Face#1 will be stretched while Face#2 is stuck to Face#1).

I then put ElementGeometry2D for Face#1 with thickness = 12.5um, and another one for Face#2 with thickness = 20nm.

I then put ConstraintContact -- ConstraintTie is more convenient but it does not allow me to use this.. Please correct me if I am wrong..

I then run SolverCcxTools, writing .inp file is okay, but when I Run CalculiX, I encounter this error:

*ERROR reading *SHELL SECTION: shell thickness is lacking
*ERROR reading *SHELL SECTION. Card image:
1.9999999999999998E-05


When I work with arbitrarily thick films, I do not see this error. I attached the FreeCAD file for your reference. I would really appreciate it if you could point out how I can fix this error.
Attachments
TwoFaces_FEMtest-thin.FCStd
(29.23 KiB) Downloaded 23 times
User avatar
NewJoker
Veteran
Posts: 3089
Joined: Sun Oct 11, 2020 7:49 pm

Re: Gmsh - Meshing a very thin flat sheet

Post by NewJoker »

freecad_FEM wrote: Mon Jan 03, 2022 2:40 am CalculiX doesn't support more than one mesh.
It’s a limitation of FreeCAD’s FEM module. CalculiX itself doesn’t impose any limitations like that. Thus, at some point, you may find that your case will be easier to solve with other CalculiX preprocessor or even standalone solver.

Anyway, I downloaded your file and submitted your analysis without any modifications. It was solved successfully. Which version of FreeCAD do you use ?
freecad_FEM
Posts: 8
Joined: Fri Dec 31, 2021 1:12 am

Re: Gmsh - Meshing a very thin flat sheet

Post by freecad_FEM »

FreeCAD version is:

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)

Actually, running the program again, I find no error either. I am really not sure what happened.. But good news! Thank you very much for running it on your end as well!

However, I think the contact using ConstraintContact is still not working too well, as the top film seems to be unaffected by the bottom film. I am suspecting there is an issue with the contact, since when I use ConstraintTie instead of ConstraintContact, I get the following error message:

*ERROR in identifytiedface: tied contact nodal slave surface TIE_DEPCONSTRAINTTIES
does not exist

I double checked the offset and thickness. I set the z-position for the film #2 as 6.26um while I set 0 for film #1 (thickness: 12.5um + 0.02um -> half of it is 6.26um). I am sorry for the continued inconvenience..
User avatar
NewJoker
Veteran
Posts: 3089
Joined: Sun Oct 11, 2020 7:49 pm

Re: Gmsh - Meshing a very thin flat sheet

Post by NewJoker »

If you scroll a bit higher in the Report view window, there’s also another, more specific error message: Shell mesh is not allowed for constraint tie.

That’s because CalculiX theoretically allows tie constraints to be used only for solid elements (that’s what the documentation says) but in practice, they work very well with shell and beam elements too ;-)

Check this recent thread on the CalculiX forum:
https://calculix.discourse.group/t/tie-and-surfaces/887

You could replace tie constraint with tied contact in such cases.
Post Reply