FE Meshing a Fabrication Direct From CAD

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Apart from Part_CheckGeometry, What Else?

Post by -alex- »

DamianHarty wrote: Thu Mar 09, 2023 6:33 pm
1-The results from your check are very different to the results that I got.

2-If you look at the picture, I think my confusion is reasonable.

3-Of course the geometry isn't ready to mesh! I am trying to get the mesher to guide me about what it objects to.
1- Yes, it's maybe about your step import options
2- Yes, that's why you should send your FreeCAD file instead of the step file, it avoids misleading.
3- As Newjoker said, don't expect too much about the mesher. You have to clean your model yourself, you have to know good practices. We can help you BTW.

So, send your FC file, and send your FC infomations (see red ribbon "forum rules").

Basically I know how to get a mesh from your model. But it needs some efforts, because the model is quite "dirty" as FEM is concerned.
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: FE Meshing a Fabrication Direct From CAD

Post by DamianHarty »

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Attached are two versions of the file in FreeCAD. One has been imported with STEP Compound Merge enabled and one without it enabled.

None of that is telling me why your geometry check is different to my geometry check?
Attachments
LowerArm_2.FCStd
(178.45 KiB) Downloaded 23 times
LowerArm_1.FCStd
(178.56 KiB) Downloaded 23 times
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FE Meshing a Fabrication Direct From CAD

Post by -alex- »

DamianHarty wrote: Thu Mar 09, 2023 7:53 pm None of that is telling me why your geometry check is different to my geometry check?
Maybe it's due to OCC difference, or maybe that's related to the linkdaily branch I'm using (I don't think so BTW). I don't know. Maybe @bernd has a valuable opinion about such difference of diagnostic with Part_CheckGeometry.

I share here the file Lower_Arm2, 2D meshed. This mesh has not a so good quality because of the poor quality of the former model (in regards to FEM I mean). And I was too lazy to remove all split lines and to fine tun the 2D shell. Hence some regions are too much distorted with non positive jacobian elements as a result (the padeye junction on tube for eg.).
Anyway, the file shows you the way to do for 2D analysis. Many other workflows are possible.
Actually it would be easier to re-model the part from scratch, properly, with 2D FEM analysis in mind as a goal.

Below a gif to illustrate a FEM result (with CCX errors btw due to bad jacobian), fancy load case, just for fun:
Lower_Arm_2_FEM.gif
Lower_Arm_2_FEM.gif (241.47 KiB) Viewed 859 times
LowerArm_2_2Dmeshed_cleared.FCStd
(796.88 KiB) Downloaded 27 times

30 sec to write inp file, then 20 sec to run CCX on my Raspberry PI4-4GB. 2D analysis is the key!

I have cleared the mesh, just run again the mesh object to re-create the mesh.
Now your turn to try ;)
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: FE Meshing a Fabrication Direct From CAD

Post by DamianHarty »

<Well, that got scrambled somehow. Edited to maintain my original intent.>

At the risk of sounding slightly obsessive, I am only really interested in the original question.

When I look at the other tube that won't mesh, notwithstanding that my CheckGeometry is different to anybody else's - and I'm no closer to understanding that, by the way - I am still pretty mystified about what the actual issue is.

I can go and find the .BREP file written out and passed to GMSH, and the specific shape2mesh.geo file for that tube. The "Report View" pane (bottom left on my screen) gives me the temporary folder name in AppData where the files are stored.

Running GMSH standalone produces the same error messages as in report view, including the rather cryptic "check full log for details". No other log is actually evident to me. At the command prompt, GMSH reports 6 pairs of intersecting "facets", all of which appear to be facet #8 and facet #3 at triangles 904, 12, 6844 and 9903, 9884, 904. To my untrained eye it looks like the same thing detected six times.

A file called intersect.pos is produced which contains four (not six) sets of co-ordinates, all of which are within a couple of millimetres of each other. If I go and look at the CAD data at that location (marked with the ball in the screen grab), it's really not looking like a clear and present danger to the fabric of society.

Image
Or here if the link is broken Why are my links always broken, by the way? The images display fine if I paste the URL into a browser.

It's clear when I look at the surface mesher that it has got its knickers in a twist in this area, with all sorts of sliver elements that are clearly foxing itself. It's really not clear to me why it would do that, specifically. Especially since on a nearby tube which is pretty much identical in this area, that tube meshes just fine.

---

On the other matter, I read in the FreeCAD model with the shell mesh. I'm a big fan of shell meshes, as evidenced by the effort I went to, to make one as described in the last post on this thread.

The "Results Mesh" that arrives in LowerArm_2_2Dmeshed_cleared is very different to the mesh in the posted GIF. The model is also full of things I didn't put in it, like "FaceBinders" (6 of those), surfaces and sketches. It's not apparent to me how to get to a surface mesh even from this model; I only seem able to mesh individual tubes and as I know already I can't have multiple mesh objects in a single analysis.

But like I said, I am somewhat obsessive about the original question.

How do I know what to fix if my CheckGeometry tells me everything is fine, and when I dive into the detail as described above I can't really understand what's wrong with the geometry?

I don't really believe that recreating the geometry every time is the answer. I was doing that 30 years ago in Patran 2.4, but I think we should be past that now. Patran 3, SDRC I-DEAS and Hypermesh were all about using native CAD data for productivity and were firmly established by the late '90s.

And I can't resist commenting that this is the finite element method, with the emphasis on finite. The truth, in my domain (vehicle suspensions), is that we never really know what the load conditions will be, we never really know what the material is (weld toe metallurgy, anyone?) and the welds themselves are never some geometrically perfect item in any case. The analysis an approximation, to get us to something worth testing. So the outcome from all this for me, for this and multiple other components, is one of three things - "It needs more metal here and here", "It's about right" or "we can take weight out here and here".

It's only part of the whole journey I'm trying to make. It should be obvious from these posts that I don't expect not to put some effort in, and it should be obvious from these posts that I don't expect everything to "just work perfectly". I am trying to get help with this particular toolset. As far as I can tell I am asking the right questions.

So, again, how do I know what to fix if my CheckGeometry tells me everything is fine?
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: FE Meshing a Fabrication Direct From CAD

Post by DamianHarty »

It's also clear that if I offer the same information to Patran 2021 - which is available to me for educational purposes, but not for officially completing this activity - that Patran identifies the original file as containing 9 solids and nothing else:

Image
Or here if the link is broken

The geometry reads in cleanly and meshes cleanly:

Image
Or here if the link is broken

In the problem areas, with some sensible mesh parameters, it manages very sensibly:

Image
Or here if the link is broken

What conclusions am I to draw from this? Difficult to say. But it's surely hard to argue that the originating data is flawed. Much more likely that I am making errors in a tool unfamiliar to me. Which is why I am here.

To get help avoiding these errors.

So what am I missing?
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FE Meshing a Fabrication Direct From CAD

Post by -alex- »

DamianHarty wrote: Fri Mar 10, 2023 2:07 pm How do I know what to fix if my CheckGeometry tells me everything is fine, and when I dive into the detail as described above I can't really understand what's wrong with the geometry?
The best reply I can do: viewtopic.php?p=432403#p432403
I don't really believe that recreating the geometry every time is the answer. I was doing that 30 years ago in Patran 2.4, but I think we should be past that now. Patran 3, SDRC I-DEAS and Hypermesh were all about using native CAD data for productivity and were firmly established by the late '90s.
Sure, so 30 years later Patran 2.4 is open source and for free, and it's named FreeCAD FEM workbench, not so bad after all ;)
And I can't resist commenting that this is the finite element method, with the emphasis on finite. The truth, in my domain (vehicle suspensions), is that we never really know what the load conditions will be, we never really know what the material is (weld toe metallurgy, anyone?) and the welds themselves are never some geometrically perfect item in any case. The analysis an approximation, to get us to something worth testing. So the outcome from all this for me, for this and multiple other components, is one of three things - "It needs more metal here and here", "It's about right" or "we can take weight out here and here".
I see your point, you would like a kind of multi-meshed model, with rigid links between sub meshes for eg.
Of course such approach would allow to work with non continuous models, non continuous mesh. But FEM WB doesn't handle multi-meshes for now (except in @bernd experimental github branch IIRC). Hence IMHO you have to fine tune your mesh, that's mandatory to get a reliable single mesh then good results.
Why are my links always broken, by the way? The images display fine if I paste the URL into a browser
I don't know, it should work with
Image
tag :? It's seems you do the right way, I don't get the issue.
Humm, maybe you paste the URL but you forget to load the file on the forum? Do you load it with Add files button in Attachment section below to the screen?
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FE Meshing a Fabrication Direct From CAD

Post by -alex- »

DamianHarty wrote: Thu Mar 09, 2023 12:49 pm will be back with more questions about "constraint tie", I am sure.
Yes, maybe TIE contact constrain could be a way to get what you want on raw model made from weld elements. But it will not fix bad topology of sub-bodies by magic.
I'm gonna try to send an example, on moment please.
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: FE Meshing a Fabrication Direct From CAD

Post by thschrader »

DamianHarty wrote: Fri Mar 10, 2023 2:07 pm ...
I don't really believe that recreating the geometry every time is the answer.
...
Not every time but in this case you should do that. ;)
The geometry is impossible to manufacture and impossible to assemble.
A: equal tube diameters, tangential contact at the outer surface. Impossible to cut the tube like this.
You can mesh this as much as you want, you will allways get distorted elements in the tip of the cut.
B: the cube inside the tube blocks the assembly.
Why should gmsh be more intelligent than the CAD-technician?
Anyway, maybe a good meshing exercise.
impossible-part.JPG
impossible-part.JPG (65.45 KiB) Viewed 702 times
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FE Meshing a Fabrication Direct From CAD

Post by -alex- »

thschrader wrote: Fri Mar 10, 2023 3:36 pm Anyway, maybe a good meshing exercise.
impossible-part.JPG
For sure :mrgreen:
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: FE Meshing a Fabrication Direct From CAD

Post by -alex- »

So, here is an example of 2 cylinders with gap between.
With Tie constraint you can merge distant nodes (it involves local stress).
Such strategy allows to analyse a non continuous single mesh object, with gaps between solids:
Tie_constraint_2_cylinders.gif
Tie_constraint_2_cylinders.gif (200.71 KiB) Viewed 669 times
FC-FEM-Tie-Const-gap-cylinders.FCStd
(297.56 KiB) Downloaded 24 times

But this strategy doesn't fix topological issue, bad tangencies, null thickness, tiny inner gaps, tiny shapes, etc...
I can't mesh your LowerArm model with this approach because of the too bad topological quality.
As @thschrader said:
Why should gmsh be more intelligent than the CAD-technician?
I agree, with FC FEM you can mesh a lot of things, but not anything.
Post Reply