FEM Mesh Region

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

FEM Mesh Region

Postby HarryvL » Tue Jan 23, 2018 4:55 am

Hi All. I am still experimenting with FEM WorkBench. Trying to create Mesh Region and understand I need CompSolid to do so (several good posts around). However, I am not 100% sure how to create one. The way I do it: 1) Create "Boolean Fragments" with mode set to CompSolid. 2) Make "simple copy" with Part workbench. This seems to work, but I have a sneaky feeling there is a more direct way to achieve this? Thanks.
User avatar
bernd
Posts: 9853
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Tue Jan 23, 2018 6:41 am

find attached my favorite example in the regard of multi material analysis with mesh regions and a CompSolid ... Hope it helps ... Depending on the version you run you may need to wait for this PR (https://github.com/FreeCAD/FreeCAD/pull/1247) to be included to proper run the example. Just give it a try.

femexample006.fcstd
(802.14 KiB) Downloaded 95 times
Screenshot_20180123_072848.png
Screenshot_20180123_072848.png (415.46 KiB) Viewed 1924 times
Screenshot_20180123_073919.png
Screenshot_20180123_073919.png (396.64 KiB) Viewed 1924 times
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Wed Jan 24, 2018 3:57 am

That's a great example and it runs well. It also answers my question in that you use CompoundFilter to string the BooleanFragments together. That's better than what I did by creating a simple copy. :D I will do more reading and experimenting about/with CompoundFilters, because I set myself the next challenge of trying to mesh and analyse a solid embedded within another solid. This is because I am ultimately trying to solve a practical problem I am dealing with of analysing a "pipe in pipe" assembly. Currently I cannot get to the embedded region to set mesh and material properties. Harry
User avatar
bernd
Posts: 9853
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Wed Jan 24, 2018 4:56 am

User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Wed Jan 24, 2018 3:05 pm

Thanks Bernd.

Just sharing some of my learning (win the hope that it may benefit some newcomers like myself) ... BTW - if this should be posted elsewhere then please tell me :)

I modeled a stiff object embedded in a soft matrix subjected to shear (see Test43_0.jpg). This to learn about Mesh Groups, Material Groups, Boolean Fragments, how to select hidden solids, etc. etc. I attach the model as Test43.fcstd

In the process I also installed useful tools like "addons_installer.FCMacro" and using this the "Lattice2" workbench.

Here a summary of the workflow:
1) created 2 cubes in PART workbench and placed one at the center of the other
2) created BooleanFragments (resulting in 3 solids) ... set mode to CompSolid !
3) apply a CompoundFilter (can't mesh BooleanFragments?!)
4) copy this and "explode" it into 3 separate solids with Lattice2 for later reference in creating internal mesh groups, internal material groups and (if needed) internal boundary conditions (although I have not thought of a practical application for this)
5) Create a mesh using the CompoundFilter and create Mesh Groups using the associated Solids from the exploded compound
6) Do the same with materials and boundary conditions

and Presto ... this meshes (GMSH) and computes (CCX) without out a problem.

Finally I attach 2 ParaView screenshots (Test43_1.jpg and Test43_2.jpg) to show that the stiff core indeed remains largely undeformed.

Wow .... that was good fun !!
Attachments
Test43_2.jpg
Test43_2.jpg (134.41 KiB) Viewed 1854 times
Test43_1.jpg
Test43_1.jpg (175.2 KiB) Viewed 1854 times
Test43.fcstd
(91.89 KiB) Downloaded 32 times
Test43_0.jpg
Test43_0.jpg (33.77 KiB) Viewed 1854 times
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Wed Jan 24, 2018 4:30 pm

Sorry. Where I say 3 solids I mean 2 solids.
User avatar
bernd
Posts: 9853
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Wed Jan 24, 2018 4:49 pm

cool, I'm glad it worked for you. Mhh where to write this? I would suggest get wiki permissions an write some small tutorial. I really like this shear example because it really shows the different materials.

IMHO you do not need to explode the CompoundFilter to select the solids (your Point 4 is not needed at all). The material task panel has a switch to change the selection mode from faces and edges to solids. With this you should be able to directly select the solids of the CompoundFilter. Furthermore meshing a BooleanFragment shoudl work as well. But the BooleanFragement is a Compound with a CompSolid inside. This could lead to problems in conunction with mesh region and mesh groups and GMSH (means you are fine if you would have no mesh regions and mesh groups). Thus it is recommended to directly use the CompSolid thus the CompoundFilter.

bernd
User avatar
bernd
Posts: 9853
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Wed Jan 24, 2018 4:55 pm

Ahh but you can not select the inner solid, thus Point 4 is needed ...

Wait ... use in one material the outer solid (only the outer difference solid) as reference shape and leave the other material references blank. With this for this material all left geometry (in your case the inner solid) is taken. Means in your example Point 4 is not needed.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Wed Jan 24, 2018 5:10 pm

Thanks Bernd. I will try to simplify the workflow before I write a little tutorial. I did experiment quite a bit with simpler workflows and hit some speed bumps along the way, but I will try to see what simplest (robust) ones I can find. I found the combination of embedded solid + several materials + full flexibility of meshing quite an interesting challenge. :D
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Wed Jan 24, 2018 5:17 pm

Wait ... use in one material the outer solid (only the outer difference solid) as reference shape and leave the other material references blank. With this for this material all left geometry (in your case the inner solid) is taken. Means in your example Point 4 is not needed.
You are right. I did this because I also ran a case with a few internal solids of different materials.