issues with region meshing and jac < 0 (0.19dev master)

About the development of the FEM module/workbench.

Moderator: bernd

user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

issues with region meshing and jac < 0 (0.19dev master)

Post by user1234 »

Hello!

I have an issue with meshing regions because some of them have jac < 0.

When i start meshing with regions, i get an error in the terminal, see:

Code: Select all

Active analysis found: Analysis
  ElementDimension: 3
  Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble!
Problem: For the geometry of the following shape was no Shape found: <Face object at 0x55ae99854ff0>
    ConstraintFixed
    [(<PartDesign::Fillet>, ('Face20',))]
    Fillet
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x55ae99854ff0>
Body--> Name of the Feature we where searching in.
Fillet --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
Problem: For the geometry of the following shape was no Shape found: <Face object at 0x55ae935f08b0>
    ConstraintForce
    [(<PartDesign::Fillet>, ('Face4',))]
    Fillet
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x55ae935f08b0>
Body--> Name of the Feature we where searching in.
Fillet --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
Solid <Solid object at 0x55ae9a77aa20> not found in: <Solid object at 0x55ae8aaa3b40>
We have been searching for a Solid in a Solid and we have not found it. In most cases this should be searching for a Solid inside a CompSolid. Check the ShapeType of your Part to mesh.
Problem: For the geometry of the following shape was no Shape found: <Solid object at 0x55ae9a77aa20>
    MaterialSolid
    [(<PartDesign::Fillet>, ('Solid1',))]
    Fillet
The reference Shape is not a child nor it is the shape the mesh is made of. : <Solid object at 0x55ae9a77aa20>
Body--> Name of the Feature we where searching in.
Fillet --> 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: ConstraintFixed could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintForce could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: MaterialSolid could not be found!
  {'ConstraintFixed': [], 'ConstraintForce': [], 'MaterialSolid': []}
  Mesh regions, we need to get the elements.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion013 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion015 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
  {'Face10': 3.0, 'Face4': 3.0, 'Face7': 3.0, 'Face6': 3.0, 'Face5': 3.0, 'Face11': 1.5, 'Face8': 1.5, 'Face2': 1.5, 'Face13': 1.5, 'Face14': 1.5, 'Face15': 1.5, 'Face16': 12.5, 'Face17': 1.5, 'Face18': 1.5, 'Face19': 1.5, 'Face12': 5.0, 'Face1': 5.0, 'Face3': 5.0, 'Face9': 5.0, 'Face20': 5.0, 'Face21': 5.0, 'Face22': 5.0}
  {'Face10': [9, 11, 10, 8], 'Face4': [2, 3, 8, 9], 'Face7': [3, 5, 11, 9], 'Face6': [4, 5, 10, 11], 'Face5': [4, 2, 8, 10], 'Face11': [12, 13], 'Face8': [6, 12], 'Face2': [0, 6], 'Face13': [14, 15], 'Face14': [15, 16], 'Face15': [16, 17], 'Face16': [17, 18], 'Face17': [18, 19], 'Face18': [20, 19], 'Face19': [20, 21], 'Face12': [14, 13], 'Face1': [0, 1, 2, 3, 4, 5], 'Face3': [7, 1], 'Face9': [7], 'Face20': [21, 22], 'Face21': [22, 23], 'Face22': [23]}
  /tmp/fcfem_n_g_3lcx/Body_Geometry.brep
  /tmp/fcfem_n_g_3lcx/Body_Mesh.unv
  /tmp/fcfem_n_g_3lcx/shape2mesh.geo
  /usr/bin/gmsh
Unexpected error when creating mesh: <class 'IndexError'>
Clean run of Gmsh
01.png
01.png (335.59 KiB) Viewed 2483 times


FreeCAD does not find the regions, but there are defined correct (at least i think they defined are correct). Only when i restart FreeCAD, the model meshes, but also ignores the regions, also other terminal output:

Code: Select all

  ElementDimension: 3
  No Group meshing for analysis.
  Mesh regions, we need to get the elements.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion013 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion015 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion017 could not be found in the Part to mesh. It will be ignored.
  {'Face10': 3.0, 'Face4': 3.0, 'Face7': 3.0, 'Face6': 3.0, 'Face5': 3.0, 'Face11': 1.5, 'Face8': 1.5, 'Face2': 1.5, 'Face13': 1.5, 'Face14': 1.5, 'Face15': 1.5, 'Face16': 12.5, 'Face17': 1.5, 'Face18': 1.5, 'Face19': 1.5, 'Face12': 5.0, 'Face1': 5.0, 'Face3': 5.0, 'Face9': 5.0, 'Face20': 5.0, 'Face21': 5.0, 'Face22': 5.0}
  {'Face10': [9, 11, 10, 8], 'Face4': [2, 3, 8, 9], 'Face7': [3, 5, 11, 9], 'Face6': [4, 5, 10, 11], 'Face5': [4, 2, 8, 10], 'Face11': [12, 13], 'Face8': [6, 12], 'Face2': [0, 6], 'Face13': [14, 15], 'Face14': [15, 16], 'Face15': [16, 17], 'Face16': [17, 18], 'Face17': [18, 19], 'Face18': [20, 19], 'Face19': [20, 21], 'Face12': [14, 13], 'Face1': [0, 1, 2, 3, 4, 5], 'Face3': [7, 1], 'Face9': [7], 'Face20': [21, 22], 'Face21': [22, 23], 'Face22': [23]}
  /tmp/fcfem_zx6hcopt/Body_Geometry.brep
  /tmp/fcfem_zx6hcopt/Body_Mesh.unv
  /tmp/fcfem_zx6hcopt/shape2mesh.geo
  /usr/bin/gmsh
  New mesh was added to the mesh object.
Gmsh had warnings ...
Warning : Volume mesh: worst distortion = -0.444053 (avg = 0.997285, 7 elements with jac. < 0)
Warning : ------------------------------
Warning : Mesh generation error summary
Warning :     1 warning
Warning :     0 errors
Warning : Check the full log for details
Warning : ------------------------------
02.png
02.png (705.48 KiB) Viewed 2483 times


Note, the warning,

Code: Select all

Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble!
, i can not change because the checkbox for this setting is grayed out.

Also note, i know the forces i set makes no sense, i added they only for fast testing.

Also also note, some other models also sometimes do not mesh regions, sometimes they work. I followed the thread https://forum.freecadweb.org/viewtopic. ... 0&start=80 with a random succsess. And to find the jac < 0 i follwed this https://forum.freecadweb.org/viewtopic.php?t=49918, but also workes with a pretty random succsess.


done with:

Code: Select all

OS: Debian GNU/Linux bullseye/sid (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22922 (Git)
Build type: Release (Note build with RelWithDebInfo, no idea why here is wrote Release)
Branch: master
Hash: ff5f3799d8c32d3d56a4631e79cec15baf6c27ad
Python version: 3.9.0+
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Thanks for helping!
Greetings
user1234
Attachments
issue.FCStd
(64.04 KiB) Downloaded 58 times
user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by user1234 »

Just a follow up, if someone had the same issue.

I downloaded the newest gmsh from here https://gmsh.info/ , and used that and not the lod from the repositories (work without compiling, just link on the FreeCAD Edit --> Preferences --> FEM --> Gmsh (FEM WB must be opend before). The new mesher works way better and faster. But if you get an error while meshing, clear the mesh and restart FreeCAD. Sometimes if you get an error, it stays.

My results now without jac errors and warnings. (Just for testing, must not be that fine, but is just fine that works ..... ).
1.png
1.png (865.98 KiB) Viewed 2363 times
2.png
2.png (725.05 KiB) Viewed 2363 times
Greetings
user1234
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by bernd »

Do you still have some problems or is it solved for you?
user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by user1234 »

Hello!

Still issues, but i think i can repeat an issue.

When i run gmsh and get warnings like:

Code: Select all

Fem::FemMeshObjectPython / FEMMeshGmsh001: Links go out of the allowed scope
Active analysis found: Analysis
Active analysis found: Analysis
  ElementDimension: 3
  Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble!
  Mesh regions, we need to get the elements.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion010 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion011 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion012 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion013 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion013 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion014 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion015 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion015 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion016 could not be found in the Part to mesh. It will be ignored.
  {'Face2': 0.8, 'Face18': 0.8, 'Face8': 0.8, 'Face29': 0.8, 'Face26': 1.0, 'Face22': 1.0, 'Face21': 1.0, 'Face20': 1.0, 'Face15': 2.0, 'Face16': 2.0, 'Face24': 1.0, 'Face25': 1.0, 'Face27': 1.0, 'Face28': 1.0, 'Face33': 2.0, 'Face32': 2.0, 'Face10': 2.0, 'Face4': 2.0, 'Face7': 2.0, 'Face6': 2.0, 'Face5': 2.0}
  {'Face2': [0, 6], 'Face18': [20, 22], 'Face8': [6, 12], 'Face29': [34, 35], 'Face26': [25, 28, 27, 26], 'Face22': [26, 25, 27, 28], 'Face21': [24, 25, 26], 'Face20': [22, 24], 'Face15': [16, 19, 18, 17], 'Face16': [17, 18, 16, 19], 'Face24': [29, 31, 32, 30], 'Face25': [29, 30, 32, 31], 'Face27': [32, 31, 33], 'Face28': [34, 33], 'Face33': [37, 38, 36, 39], 'Face32': [36, 39, 38, 37], 'Face10': [9, 11, 10, 8], 'Face4': [2, 3, 8, 9], 'Face7': [3, 5, 11, 9], 'Face6': [4, 5, 10, 11], 'Face5': [4, 2, 8, 10]}
  /tmp/fcfem_4hipmgaw/Body_Geometry.brep
  /tmp/fcfem_4hipmgaw/Body_Mesh.unv
  /tmp/fcfem_4hipmgaw/shape2mesh.geo
  /home/user/Programs/gmsh-4.7.1/bin/gmsh
, note the Links go out of the allowed scope , it fail to found the MeshRegion, but still founds it. Then i always get a bad mesh, also gmsh runs many hours. When the error Links go out of the allowed scope is not raising, gmsh runs very fast, also i get less errors.

But how to mesh a body, which is in a part? The part is linked to an assembly file. Also when i delete the part and do a mesh region, then i also get the Links go out of the allowed scope error, but only the regions.

Also the warning Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble! : is that a serious issue? I can not uncheck this setting in the preferences, because it is grayed out.

And the last issue, but i do not know that, how that happens, there is a FEMGmshMesh in the dependency graph, which is not in the tree.
1.png
1.png (410.97 KiB) Viewed 2258 times

All done with:

Code: Select all

OS: Debian GNU/Linux bullseye/sid (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23178 (Git)
Build type: ReleaseWithDebInfo
Branch: master
Hash: 8b1aa63130127d8c827f055f5d4d3069467b99bb
Python version: 3.9.1rc1
Qt version: 5.15.1
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/United States (en_US)
Thanks and Greetings
user1234
Attachments
shaft.FCStd
(241.53 KiB) Downloaded 60 times
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by johnwang »

This demo case also got jac < 0 problem https://forum.freecadweb.org/viewtopic.php?f=18&t=52767

By let meshing in 1st order, eliminated the error. The geometry is similar which formed by cylinder. By default, FreeCAD meshing is in 2nd order.

You may try it.
Last edited by johnwang on Fri Dec 04, 2020 10:37 am, edited 1 time in total.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by bernd »

user1234 wrote: Tue Dec 01, 2020 9:57 pm Also the warning Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble! : is that a serious issue? I can not uncheck this setting in the preferences, because it is grayed out.
yes, I have seen here and there problems with gmsh and this setting. Usually it should be deactivated by default, but is seams activated by default. Deactivate it with:

- Tools --> Edit Parameters
- Mod --> Fem --> General --> AnalysisGroupMeshing --> Double click on the word true --> a widget opens --> set it to false
- check Fem preferences
- restart FreeCAD to be sure the value is saved
user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by user1234 »

Hello!
johnwang wrote: Wed Dec 02, 2020 12:12 am By let meshing in 1st order, eliminated the error.
Thanks for the info! But this solve the issue very seldon. I also disagree that 1st order is a good option. I learned years ago from a professor that first order is good for a quick n' dirty precheck. And i must say on practical side (FEM on CATIA, many years ago) that was right. But i have not done FEM analysis since years (only small parts for previews).


bernd wrote: Wed Dec 02, 2020 11:40 am I have seen here and there problems with gmsh and this setting.
Thanks for the info and worked! One issue solved! Now when the gmsh fail, it fails as fast as when it does not fail (~ 180s for 10^6 nodes). Before it was always 1 - 3 h.

But the meshing still fails, but now repeatable.

When it works, then the terminal output looks like:

Code: Select all

Fem::FemMeshObjectPython / FEMMeshGmsh001: Links go out of the allowed scope
  ElementDimension: 3
  No Group meshing for analysis.
  Mesh regions, we need to get the elements.
  {'Face10': 0.8, 'Face4': 0.8, 'Face7': 0.8, 'Face6': 0.8, 'Face5': 0.8, 'Face2': 0.8, 'Face8': 0.8, 'Face13': 0.8, 'Face14': 0.8, 'Face19': 0.4, 'Face18': 0.4, 'Face16': 4.0}
  {'Face10': [9, 11, 10, 8], 'Face4': [2, 3, 8, 9], 'Face7': [3, 5, 11, 9], 'Face6': [4, 5, 10, 11], 'Face5': [4, 2, 8, 10], 'Face2': [0, 6], 'Face8': [6, 12], 'Face13': [14, 15], 'Face14': [15, 16], 'Face19': [20, 21], 'Face18': [20, 19], 'Face16': [17, 18]}
  /tmp/fcfem__zs4kiqr/Fillet_Geometry.brep
  /tmp/fcfem__zs4kiqr/Fillet_Mesh.unv
  /tmp/fcfem__zs4kiqr/shape2mesh.geo
  /home/user/Programs/gmsh-4.7.1/bin/gmsh
  New mesh was added to the mesh object.
Clean run of Gmsh
and the mesh looks like:
01.png
01.png (459.33 KiB) Viewed 2183 times
A very good mesh where all MeshRegions are done.


And when not, the terminal output looks like:

Code: Select all

Fem::FemMeshObjectPython / FEMMeshGmsh001: Links go out of the allowed scope
  ElementDimension: 3
  No Group meshing for analysis.
  Mesh regions, we need to get the elements.
One element of the meshregion MeshRegion001 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion009 could not be found in the Part to mesh. It will be ignored.
  {'Face8': 0.8, 'Face11': 0.8, 'Face2': 0.8, 'Face10': 1.5, 'Face4': 1.5, 'Face7': 1.5, 'Face6': 1.5, 'Face5': 1.5, 'Face18': 0.8, 'Face20': 2.0, 'Face21': 2.0, 'Face26': 2.0, 'Face22': 2.0, 'Face24': 3.0, 'Face27': 3.0, 'Face28': 3.0, 'Face25': 3.0, 'Face16': 3.0, 'Face15': 3.0, 'Face33': 3.0, 'Face32': 3.0, 'Face19': 2.0, 'Face17': 2.0, 'Face12': 2.0, 'Face9': 2.0, 'Face3': 2.0, 'Face38': 2.0, 'Face37': 2.0, 'Face36': 2.0, 'Face35': 2.0, 'Face34': 2.0, 'Face29': 0.8, 'Face14': 4.0, 'Face13': 4.0, 'Face1': 3.0, 'Face31': 4.0, 'Face30': 4.0}
  {'Face8': [6, 12], 'Face11': [12, 14], 'Face2': [0, 6], 'Face10': [9, 11, 10, 8], 'Face4': [2, 3, 8, 9], 'Face7': [3, 5, 11, 9], 'Face6': [4, 5, 10, 11], 'Face5': [4, 2, 8, 10], 'Face18': [20, 22], 'Face20': [22, 24], 'Face21': [24, 25, 26], 'Face26': [25, 28, 27, 26], 'Face22': [26, 25, 27, 28], 'Face24': [29, 31, 32, 30], 'Face27': [32, 31, 33], 'Face28': [34, 33], 'Face25': [29, 30, 32, 31], 'Face16': [17, 18, 16, 19], 'Face15': [16, 19, 18, 17], 'Face33': [37, 38, 36, 39], 'Face32': [36, 39, 38, 37], 'Face19': [21, 23], 'Face17': [15, 21], 'Face12': [13, 15], 'Face9': [7, 13], 'Face3': [7, 1], 'Face38': [44, 45], 'Face37': [43, 44], 'Face36': [42, 43], 'Face35': [41, 42], 'Face34': [40, 41], 'Face29': [34, 35], 'Face14': [18, 19, 20], 'Face13': [14, 16, 17], 'Face1': [0, 1, 2, 3, 4, 5], 'Face31': [38, 39, 40], 'Face30': [35, 36, 37]}
  /tmp/fcfem_7sa4hiow/Body_Geometry.brep
  /tmp/fcfem_7sa4hiow/Body_Mesh.unv
  /tmp/fcfem_7sa4hiow/shape2mesh.geo
  /home/user/Programs/gmsh-4.7.1/bin/gmsh
  New mesh was added to the mesh object.
Gmsh had warnings ...
Warning : Volume mesh: worst distortion = -1.46597 (avg = 0.998187, 42 elements with jac. < 0)
Error   : Failed to reach critical value in pass 1 for measure(s): ScaledJac
Error   : Optimization failed (some measures below critical value)
Error   : ------------------------------
Error   : Mesh generation error summary
Error   :     1 warning
Error   :     2 errors
Error   : Check the full log for details
Error   : ------------------------------
and the mesh looks like:
03.png
03.png (711.63 KiB) Viewed 2183 times
The first MeshRegion is done, the rest not.

Note the output:

Code: Select all

One element of the meshregion MeshRegion001 could not be found in the Part to mesh. It will be ignored.
One element of the meshregion MeshRegion009 could not be found in the Part to mesh. It will be ignored.
But the MeshRegions are correct assigned! The first MeshRegion is correct meshed. But after that, MeshRegion001 can not find one element of the list (for whatever reason) and all other Meshregions in the list are irgnored. Then i get a bad mesh. I hope you know what i mean.

Maybe that has something to to with the:

Code: Select all

Fem::FemMeshObjectPython / FEMMeshGmsh001: Links go out of the allowed scope
But this is also on the working model. Or gmsh is the reason.


Just for complication: the difference between the working model and the not working model is that i have added surfaces for loads, pressures, ..... . I add the models after that post, because the limits off attachments.
00.png
00.png (465.79 KiB) Viewed 2183 times


Thanks for helping!
Greetings
user1234

edit:

my version:

Code: Select all

OS: Debian GNU/Linux bullseye/sid (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23203 (Git)
Build type: ReleaseWithDebInfo
Branch: master
Hash: 578e4aca1489d0c605b8d329b463f305a946b343
Python version: 3.9.1rc1
Qt version: 5.15.1
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/United States (en_US)
Last edited by user1234 on Wed Dec 02, 2020 6:46 pm, edited 1 time in total.
user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by user1234 »

As i write above, the models.
shaft_2nd_order_worked.FCStd
(54.43 KiB) Downloaded 56 times
shaft_1st_order_notworked.FCStd
(237.9 KiB) Downloaded 72 times
shaft_2nd_order_notworked.FCStd
(237.89 KiB) Downloaded 56 times

Greetings
user1234
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by bernd »

in the report there is th path to the gmsh data files. There is a geo file and a brep file. In the geo file at the end is the command how to run gmsh independent from FreeCAD with your data. That way you get a lot more messages and the result should be a unv file this you can import in FreeCAD. This way you may be tackle down where the problem is and we could fix it in FreeCAD if it is on FreeCAD side.

Have you tried latest gmsh?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: issues with region meshing and jac < 0 (0.19dev master)

Post by bernd »

in the regard of 1st order you are right, but if you have lots of elements a first order analysis should give similar results as the second order.

The problem if you have only a few element is the first order element to stiff which would result in results not on the save side.
Post Reply