FEM Mesh Region

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: FEM Mesh Region

Postby bernd » Wed Jan 24, 2018 7:43 pm

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

Re: FEM Mesh Region

Postby HarryvL » Thu Jan 25, 2018 5:53 am

Uh oh, when I download and open the case I posted before and try to remesh without changing anything else (only activating Analysis) then I run into trouble. Any suggestion/help appreciated:

Report view...
Group meshing for analysis.
Solid <Solid object at 0x4fcb850> not found in: <CompSolid object at 0x29d4d10>
Problem: For the geometry of the following shape was no Shape found: <Solid object at 0x4fcb850>
SolidMaterial001
[(<Part::PartFeature>, ('Solid1',))]
child001
The reference Shape is not a child nor it is the shape the mesh is made of. : <Solid object at 0x4fcb850>
CompoundFilter--> Name of the Feature we where searching in.
child001--> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
Error: The shapes for the mesh group for the reference shapes of analysis member: SolidMaterial001 could not be found!
{'SolidMaterial': ['Solid1'], 'FemConstraintForce': ['Face3'], 'FemConstraintDisplacement': ['Face5'], 'SolidMaterial001': []}
Mesh regions, we need to get the elements.
Solid <Solid object at 0x35f9ca0> not found in: <CompSolid object at 0x35f9a60>
One element of the meshregion FEMMeshRegion001 could not be found in the Part to mesh. It will be ignored.
The element Solid1 of the meshregion FEMMeshRegion001 has been added to another mesh region.
{'Solid1': 5.0}
{'Solid1': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]}
('Unexpected error when creating mesh: ', <type 'exceptions.IndexError'>)
...

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12960 (Git)
Build type: None
Branch: master
Hash: b6304d16a77f65f94aa5ec79f69688be61a42961
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
User avatar
bernd
Posts: 9823
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Thu Jan 25, 2018 6:41 am

same here ...

recreate GMSH object, save the file, close FreeCAD, reload file, try. Does it work?

make another GMSH mesh and run the following code

Code: Select all

App.ActiveDocument.FEMMeshGmsh.Proxy.Type
App.ActiveDocument.FEMMeshGmsh001.Proxy.Type

Code: Select all

>>> App.ActiveDocument.FEMMeshGmsh.Proxy.Type
u'FemMeshGmsh'
>>> App.ActiveDocument.FEMMeshGmsh001.Proxy.Type
'Fem::FemMeshGmsh'
>>> 
The result is different due to a change in FreeCAD master I made some days ago. I mentioned already. Thus you need to recreate the object. There will be another change in this regard soon (https://github.com/FreeCAD/FreeCAD/pull/1259) Than you will need to recreate all Python objects because they could not be loaded again. But this is the last change in compatibility for development release of 0.17.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Thu Jan 25, 2018 12:34 pm

recreate GMSH object, save the file, close FreeCAD, reload file, try. Does it work?

1) recreate GMSH object, save the file, close FreeCAD, reload file, activate Analysis, generate mesh - does not work (no mesh)

2) recreate GMSH object, save the file, close FreeCAD, reload file, do not activate Analysis, generate mesh - does work (yes mesh)

However in both cases I get the same error messages. I will running your code next.
User avatar
bernd
Posts: 9823
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Thu Jan 25, 2018 12:46 pm

once the PR is in master, would you recreate the model. Than we gone debugg the problem, if it still exists.

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

Re: FEM Mesh Region

Postby HarryvL » Thu Jan 25, 2018 1:16 pm

OK no problem. For now I circumvent the problem all together by placing the Mesh Object outside the Analysis Object until the last moment before running CCX. This seems to to solve the practical problem of regenerating meshes (regardless of activating Analysis ... even though error messages stay the same).
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Thu Jan 25, 2018 8:44 pm

And here is the final result with proper shear forces applied on all 4 sides :D . In green a slice of what you would get it the core would be made of the same soft material as the matrix (what you would call "simple shear").
Attachments
Test44.gif
Test44.gif (487.74 KiB) Viewed 682 times
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Sun Jan 28, 2018 10:14 am

HarryvL wrote:
Wed Jan 24, 2018 5:10 pm
... 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 ...
This is the simplest I can come up with without loss of functionality (i.e. full flexibility to select mesh and material regions).
Test48.fcstd
(251.13 KiB) Downloaded 26 times
Screenshot from 2018-01-28 10-57-00.png
Screenshot from 2018-01-28 10-57-00.png (283.14 KiB) Viewed 646 times
I do get a warning however, that I did not get before by the more involved way of creating independent regions to select from, but it does not seem to impact the meshing or analysis, i.e.

Solid <Solid object at 0xa40f380> not found in: <CompSolid object at 0x702d1b0>
One element of the meshregion FEMMeshRegion could not be found in the Part to mesh. It will be ignored.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: FEM Mesh Region

Postby HarryvL » Sun Jan 28, 2018 9:07 pm

Just found out that if I first create the core (internal reference Box:Solid1) and then the matrix (Box001:Solid1) then all elements get assigned the same material properties. I guess the routine that assignes element properties considers the elements member of both mesh regions? In that case assigning outside-in works, but inside-oit erases previous assignments.
User avatar
bernd
Posts: 9823
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Mesh Region

Postby bernd » Sun Jan 28, 2018 9:20 pm

HarryvL wrote:
Sun Jan 28, 2018 9:07 pm
Just found out that if I first create the core (internal reference Box:Solid1) and then the matrix (Box001:Solid1) then all elements get assigned the same material properties. I guess the routine that assignes element properties considers the elements member of both mesh regions? In that case assigning outside-in works, but inside-oit erases previous assignments.
I can not really follow :o Would you explain this a bit more in detail?