FEM Mesh Region
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: FEM Mesh Region
here is what we have ATM: https://www.freecadweb.org/wiki/FEM_Module#Tutorials
Re: FEM Mesh Region
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)
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)
Re: FEM Mesh Region
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
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.
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'
>>>
Re: FEM Mesh Region
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.
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.
Re: FEM Mesh Region
once the PR is in master, would you recreate the model. Than we gone debugg the problem, if it still exists.
bernd
bernd
Re: FEM Mesh Region
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).
Re: FEM Mesh Region
And here is the final result with proper shear forces applied on all 4 sides . 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 (487.74 KiB) Viewed 1996 times
Re: FEM Mesh Region
This is the simplest I can come up with without loss of functionality (i.e. full flexibility to select mesh and material regions).
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.
Re: FEM Mesh Region
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.
Re: FEM Mesh Region
I can not really follow Would you explain this a bit more in detail?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.