Failure to mesh using gmsh

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Failure to mesh using gmsh

Post by BDL42 »

Have a design that is failing to mesh using a recent gmsh (4.11.1). I have been able to use 4.11.1 on other similar designs. It is unclear to me, what the issue is, a problem with the model, or something else. Here are the particulars.

Code: Select all

OS: Pop!_OS 22.04 LTS (pop:GNOME/pop)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33127 (Git)
Build type: Unknown
Branch: master
Hash: a669e4423a32174eef1a65c65f718fb55ecf042f
Python 3.10.6, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1
Locale: English/United States (en_US)
Installed mods: 
  * fasteners 0.4.56
  * kicadStepUpMod.backup1663010049.9382765
  * Render 2023.2.3
  * Help 1.0.3
  * A2plus 0.4.60k
  * fcgear 1.0.0
  * lattice2 1.0.0
  * kicadStepUpMod 10.18.8
Report view

Code: Select all

09:27:36  
09:27:36  Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-2024T6.FCMat
09:27:36  
09:30:55  
09:30:55  Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-2024T6.FCMat
09:30:55  
09:31:03  Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-7075.FCMat
09:31:03  ThermalConductivity not found in AW-7075
09:31:03  SpecificHeat not found in AW-7075
09:31:03  
09:31:08  Zero ThermalConductivity value. This parameter is not saved in the material data.
09:31:08  Zero SpecificHeat value. This parameter is not saved in the material data.
09:32:03    ElementDimension: 3
09:32:03    Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble!
09:32:03  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x564992aad820>
09:32:03      ConstraintPressure001
09:32:03      [(<PartDesign::LinearPattern>, ('Face37',))]
09:32:03      LinearPattern
09:32:03  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x564992aad820>
09:32:03  Body--> Name of the Feature we where searching in.
09:32:03  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:32:03  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x56498e7c40c0>
09:32:03      ConstraintPressure
09:32:03      [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
09:32:03      LinearPattern
09:32:03  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x56498e7c40c0>
09:32:03  Body--> Name of the Feature we where searching in.
09:32:03  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:32:03  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x564994434390>
09:32:03      ConstraintPressure
09:32:03      [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
09:32:03      LinearPattern
09:32:03  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x564994434390>
09:32:03  Body--> Name of the Feature we where searching in.
09:32:03  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:32:03  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x5649928fc7a0>
09:32:03      ConstraintFixed
09:32:03      [(<PartDesign::LinearPattern>, ('Face8',))]
09:32:03      LinearPattern
09:32:03  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649928fc7a0>
09:32:03  Body--> Name of the Feature we where searching in.
09:32:03  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:32:03    Empty reference: MaterialSolid
09:32:03    One material with no reference shapes. No need to make a group for materials.
09:32:03  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure001 could not be found!
09:32:03  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure could not be found!
09:32:03  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintFixed could not be found!
09:32:03    /tmp/fcfem_wj7hb__s/Body_Geometry.brep
09:32:03    /tmp/fcfem_wj7hb__s/Body_Mesh.unv
09:32:03    /tmp/fcfem_wj7hb__s/shape2mesh.geo
09:32:03    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
09:32:03  Unexpected error when creating mesh: list index out of range
09:32:03  Gmsh had warnings:
09:32:03  list index out of range
09:32:09  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
09:33:15    ElementDimension: 3
09:33:15    Group meshing for analysis is set to true in FEM General Preferences. Are you really sure about this? You could run into trouble!
09:33:15  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x5649918ff260>
09:33:15      ConstraintPressure001
09:33:15      [(<PartDesign::LinearPattern>, ('Face37',))]
09:33:15      LinearPattern
09:33:15  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649918ff260>
09:33:15  Body--> Name of the Feature we where searching in.
09:33:15  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:33:15  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x5649944add70>
09:33:15      ConstraintPressure
09:33:15      [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
09:33:15      LinearPattern
09:33:15  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944add70>
09:33:15  Body--> Name of the Feature we where searching in.
09:33:15  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:33:15  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x5649944b1430>
09:33:15      ConstraintPressure
09:33:15      [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
09:33:15      LinearPattern
09:33:15  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944b1430>
09:33:15  Body--> Name of the Feature we where searching in.
09:33:15  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:33:15  Problem: For the geometry of the following shape was no Shape found: <Face object at 0x5649944adb10>
09:33:15      ConstraintFixed
09:33:15      [(<PartDesign::LinearPattern>, ('Face8',))]
09:33:15      LinearPattern
09:33:15  The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944adb10>
09:33:15  Body--> Name of the Feature we where searching in.
09:33:15  LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
09:33:15    Empty reference: MaterialSolid
09:33:15    One material with no reference shapes. No need to make a group for materials.
09:33:15  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure001 could not be found!
09:33:15  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure could not be found!
09:33:15  Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintFixed could not be found!
09:33:15    /tmp/fcfem_8ct05njq/Body_Geometry.brep
09:33:15    /tmp/fcfem_8ct05njq/Body_Mesh.unv
09:33:15    /tmp/fcfem_8ct05njq/shape2mesh.geo
09:33:15    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
09:33:15  Unexpected error when creating mesh: list index out of range
09:33:15  Gmsh had warnings:
09:33:15  list index out of range
Python console

Code: Select all

Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> # Gui.runCommand('Std_Workbench',11)
>>> # Gui.runCommand('Std_ViewStatusBar',1)
>>> # Gui.runCommand('Std_Workbench',18)
>>> import PartDesignGui
>>> # Gui.runCommand('Std_Workbench',19)
>>> # Gui.runCommand('Std_Workbench',20)
>>> # Gui.runCommand('Std_Workbench',22)
>>> # Gui.runCommand('Std_Workbench',11)
>>> # MRU="0"
>>> # with open('/home/bruce/Apps/freecad-build/share/Mod/Start/StartPage/LoadMRU.py') as file:
>>> # 	exec(file.read())
>>> FreeCAD.openDocument('/home/bruce/Documents/freecad/PressureTube/mjp_L2.FCStd')
>>> # App.setActiveDocument("mjp_L2")
>>> # App.ActiveDocument=App.getDocument("mjp_L2")
>>> # Gui.ActiveDocument=Gui.getDocument("mjp_L2")
>>> # Gui.Selection.addSelection('mjp_L2','MaterialSolid')
>>> # App.getDocument('mjp_L2').getObject('MaterialSolid').ViewObject.doubleClicked()
>>> # Gui.Selection.addSelection('mjp_L2','Analysis')
>>> # Gui.activateWorkbench('FemWorkbench')
>>> import PartDesignGui
>>> # import FemGui
>>> # FemGui.setActiveAnalysis(App.activeDocument().Analysis)
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.clearSelection()
>>> ### Begin command Std_ViewRight
>>> # Gui.activeDocument().activeView().viewRight()
>>> ### End command Std_ViewRight
>>> # Gui.Selection.addSelection('mjp_L2','Analysis')
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('mjp_L2','Part','Body.LinearPattern.Face1',16.5393,-55.443,-7.66673)
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('mjp_L2','Part','Body.LinearPattern.',16.5265,-92.9607,-7.67741)
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('mjp_L2','Part','Body.Groove003.')
>>> # Gui.ActiveDocument.setEdit(App.getDocument('mjp_L2').getObject('Groove003'), 0)
>>> # Gui.activateWorkbench('PartDesignWorkbench')
>>> # Gui.Selection.clearSelection()
>>> App.getDocument('mjp_L2').recompute()
>>> # Gui.getDocument('mjp_L2').resetEdit()
>>> # Gui.activateWorkbench('FemWorkbench')
>>> import PartDesignGui
>>> # Gui.Selection.addSelection('mjp_L2','MaterialSolid')
>>> # App.getDocument('mjp_L2').getObject('MaterialSolid').ViewObject.doubleClicked()
>>> # Gui.Selection.addSelection('mjp_L2','MaterialSolid')
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('mjp_L2','FEMMeshGmsh')
>>> # Gui.runCommand('Std_ToggleVisibility',0)
>>> # App.getDocument('mjp_L2').getObject('FEMMeshGmsh').ViewObject.doubleClicked()
>>> # App.getDocument('mjp_L2').getObject('FEMMeshGmsh').ViewObject.doubleClicked()
>>> # Gui.runCommand('Std_About',0)
>>> 
I do realize I need to refine the mesh inside the high stress area on the 0.4mm radius, but that requires gmsh to succeed once. I have yet to get gmsh to work on this model. I do not know why there are errors related to not finding the Constraints, nor why the comments "Use the same as in the line before and you will have less trouble". Nor do I understand the error "list index out of range." Can someone help with this? This is the model I need to simulate. As far as I can tell, the model is ok. I did make my own MaterialCards, by editing Aluminum-Generic and substituting values that I found from reputable sources. Surprisingly, this forum does not allow attachment of FCMat files, although they are simply text files. Probably ought to fix that.

Code: Select all

; Aluminum-2024T6
; Uwe Stöhr
; information about the content of such cards can be found on the wiki:
; https://www.freecad.org/wiki/Material
; file created by BDL42 05062023

[General]
Name = Aluminum Generic
Father = Metal
KindOfMaterial = Aluminium

[Mechanical]
Density = 2780 kg/m^3
PoissonRatio = 0.33
ShearModulus = 27.0 GPa
UltimateTensileStrength = 427 MPa
YieldStrength = 305 MPa
YoungsModulus = 72400 MPa

[Thermal]
SpecificHeat = 875.0 J/kg/K
ThermalConductivity = 151.0 W/m/K
ThermalExpansionCoefficient = 23.2 µm/m/K

[Electromagnetic]
ElectricalConductivity = 370370.4 S/m
RelativePermeability = 1.0

Code: Select all

; Aluminum-7075
; (c) 2014 M. Münch - GNU Lesser General Public License (LGPL)
; information about the content of such cards can be found on the wiki:
; https://www.freecad.org/wiki/Material
; file created by BDL42

[General]
Name = AW-7075
NameDE = AlZnMgCu1,5
Father = Metal
KindOfMaterial = Aluminium
KindOfMaterialDE = Aluminium
MaterialNumber = 3.4365
Norm = DIN 1725-1

[Mechanical]
Density = 2810 kg/m^3
PoissonRatio = 0.33
ShearModulus = 27000 MPa
UltimateStrain = 10
UltimateTensileStrength = 572 MPa
YieldStrength = 505 MPa
YoungsModulus = 71700 MPa

[Thermal]
ThermalExpansionCoefficient = 0.0000234 m/m/K
I have used these FCMat files with other models, and they seem to work ok.
gmshfail.png
gmshfail.png (277.46 KiB) Viewed 1428 times
I'm stuck. Don't know what to do next. Similar models have meshed. This one doesn't. The model isn't very complicated. I would be most grateful for any assistance. Thanks.
mjp_L2a.FCStd
(116.61 KiB) Downloaded 34 times
Here is the Linux window.

Code: Select all

~/Apps/freecad-build/bin$ ./FreeCAD
FreeCAD 0.21.0, Libs: 0.21.0R33127 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2023
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: No such file or directory

Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-2024T6.FCMat


Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-2024T6.FCMat

Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-7075.FCMat
ThermalConductivity not found in AW-7075
SpecificHeat not found in AW-7075

Zero ThermalConductivity value. This parameter is not saved in the material data.
Zero SpecificHeat value. This parameter is not saved in the material data.
  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 0x564992aad820>
    ConstraintPressure001
    [(<PartDesign::LinearPattern>, ('Face37',))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x564992aad820>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x56498e7c40c0>
    ConstraintPressure
    [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x56498e7c40c0>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x564994434390>
    ConstraintPressure
    [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x564994434390>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x5649928fc7a0>
    ConstraintFixed
    [(<PartDesign::LinearPattern>, ('Face8',))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649928fc7a0>
Body--> Name of the Feature we where searching in.
LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
  Empty reference: MaterialSolid
  One material with no reference shapes. No need to make a group for materials.
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure001 could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintFixed could not be found!
  /tmp/fcfem_wj7hb__s/Body_Geometry.brep
  /tmp/fcfem_wj7hb__s/Body_Mesh.unv
  /tmp/fcfem_wj7hb__s/shape2mesh.geo
  /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
Unexpected error when creating mesh: list index out of range
Gmsh had warnings:
list index out of range
Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
  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 0x5649918ff260>
    ConstraintPressure001
    [(<PartDesign::LinearPattern>, ('Face37',))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649918ff260>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x5649944add70>
    ConstraintPressure
    [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944add70>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x5649944b1430>
    ConstraintPressure
    [(<PartDesign::LinearPattern>, ('Face39', 'Face38'))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944b1430>
Body--> Name of the Feature we where searching in.
LinearPattern --> 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 0x5649944adb10>
    ConstraintFixed
    [(<PartDesign::LinearPattern>, ('Face8',))]
    LinearPattern
The reference Shape is not a child nor it is the shape the mesh is made of. : <Face object at 0x5649944adb10>
Body--> Name of the Feature we where searching in.
LinearPattern --> Name of the parent Feature of reference Shape (Use the same as in the line before and you will have less trouble :-) !!!!!!).
  Empty reference: MaterialSolid
  One material with no reference shapes. No need to make a group for materials.
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure001 could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintPressure could not be found!
Error: The shapes for the mesh group for the reference shapes of analysis member: ConstraintFixed could not be found!
  /tmp/fcfem_8ct05njq/Body_Geometry.brep
  /tmp/fcfem_8ct05njq/Body_Mesh.unv
  /tmp/fcfem_8ct05njq/shape2mesh.geo
  /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
Unexpected error when creating mesh: list index out of range
Gmsh had warnings:
list index out of range
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Failure to mesh using gmsh

Post by BDL42 »

Found an issue that once fixed seems to allow gmsh to work. Post from @bernd dated Dec. 2, 2022, titled "issues with region meshing and jac < 0 (0.19dev master)"

user1234 wrote: ↑Tue Dec 01, 2020 4: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

Changing the AnalysisGroupMeshing from true to false solved my meshing problem, this time anyways.
Tools>Edit Parameters>BaseApp>Preferences> Mod>Fem>General
Set AnalysisGroupMeshing from true to false.

Unfortunately, after spending a great deal of time simulating I get an frd file error message at 11:18:23

Code: Select all

10:51:46    ElementDimension: 3
10:51:46    /tmp/fcfem_af2nvei3/Body_Geometry.brep
10:51:46    /tmp/fcfem_af2nvei3/Body_Mesh.unv
10:51:46    /tmp/fcfem_af2nvei3/shape2mesh.geo
10:51:46    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
10:51:46    New mesh was added to the mesh object.
10:51:46  Clean run of Gmsh
10:52:01  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
10:57:44  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
10:58:45    ElementDimension: 3
10:58:45    /tmp/fcfem_33e13mzu/Body_Geometry.brep
10:58:45    /tmp/fcfem_33e13mzu/Body_Mesh.unv
10:58:45    /tmp/fcfem_33e13mzu/shape2mesh.geo
10:58:45    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
10:58:45    New mesh was added to the mesh object.
10:58:45  Clean run of Gmsh
10:58:58  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
11:01:03  
11:01:03  Material card chosen:
    /home/bruce/Apps/freecad-build/share/Mod/Material/StandardMaterial/Aluminum-2024T6.FCMat
11:01:03  
11:01:49  
11:01:49  Check prerequisites...
11:01:49  
11:01:49  Get mesh data for constraints, materials and element geometry...
11:01:49  [{'ccx_elset': 'Evolumes', 'ccx_elset_name': 'MaterialSolidSolid', 'mat_obj_name': 'MaterialSolid', 'ccx_mat_name': 'Aluminum Generic'}]
11:01:49  ConstraintFixed:
11:01:49      Type: Fem::ConstraintFixed, Name: ConstraintFixed
11:01:49      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face8
11:01:49  ConstraintPressure001:
11:01:49      Type: Fem::ConstraintPressure, Name: ConstraintPressure001
11:01:49      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face37
11:01:49  ConstraintPressure002:
11:01:49      Type: Fem::ConstraintPressure, Name: ConstraintPressure002
11:01:49      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face38
11:01:49  ConstraintPressure:
11:01:49      Type: Fem::ConstraintPressure, Name: ConstraintPressure
11:01:49      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face39
11:01:49  Getting mesh data time: 220.339 seconds.
11:01:49  
11:01:49  CalculiX solver input writing...
11:01:49  Input file:/tmp/fcfem_8k4ae_ly/FEMMeshGmsh.inp
11:01:49  One monster input file.
11:01:49  Writing time CalculiX input file: 5.669 seconds.
11:04:33  run CalculiX at: /usr/bin/ccx with: /tmp/fcfem_8k4ae_ly/FEMMeshGmsh.inp
11:18:23  Error() PySide2.QtCore.QProcess.ProcessError.Crashed
11:18:23  CalculiX done without error!
11:18:23  
11:18:23  CalculiX read results...
11:18:23  Read ccx results from frd file: /tmp/fcfem_8k4ae_ly/FEMMeshGmsh.frd
11:18:23  FEM: No nodes found in Frd file.
11:18:23  Problem on frd file import. No nodes found in frd file.
11:18:23  FEM: No result object in active Analysis.
11:18:23  Read ccx results from dat file: /tmp/fcfem_8k4ae_ly/FEMMeshGmsh.dat
FEMMeshGmsh.inp is 62.5MB, the frd file is 7 bytes. What's wrong? What is the PySide2.QtCore.QProcess.ProcessError.Crashed?

Have to say, this has been kind of frustrating.

Output of CalculiX

Code: Select all

0.0: Check dependencies...
58.7: Write completed.
0.0: CalculiX binary: /usr/bin/ccx
0.0: CalculiX input file: /tmp/fcfem_6xk94xtx/FEMMeshGmsh.inp
0.0: Run CalculiX...
0.0: Starting CalculiX...
0.1: CalculiX is running...
903.5: CalculiX execute error: PySide2.QtCore.QProcess.ProcessError.Crashed
903.5: CalculiX stopped.
903.5: ************************************************************
CalculiX Version 2.17, Copyright(C) 1998-2020 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm
************************************************************
You are using an executable made on Thu Jul 23 21:43:50 CEST 2020
The numbers below are estimated upper bounds
number of:
nodes: 1018931
elements: 812461
one-dimensional elements: 0
two-dimensional elements: 0
integration points per element: 4
degrees of freedom per node: 3
layers per element: 1
distributed facial loads: 40249
distributed volumetric loads: 0
concentrated loads: 0
single point constraints: 6165
multiple point constraints: 1
terms in all multiple point constraints: 1
tie constraints: 0
dependent nodes tied by cyclic constraints: 0
dependent nodes in pre-tension constraints: 0
sets: 5
terms in all sets: 3996256
materials: 1
constants per material and temperature: 2
temperature points per material: 1
plastic data points per material: 0
orientations: 0
amplitudes: 4
data points in all amplitudes: 4
print requests: 1
transformations: 0
property cards: 0
STEP 1
Static analysis was selected
903.5: CalculiX done without error!
903.5: Loading result sets...
Second run of CalculiX done after a remesh. Same PySide2.QtCore.QProcess.ProcessError.Crashed...

Code: Select all

11:48:52  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
11:49:10  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
11:50:25    ElementDimension: 3
11:50:25    /tmp/fcfem__puibz5v/Body_Geometry.brep
11:50:25    /tmp/fcfem__puibz5v/Body_Mesh.unv
11:50:25    /tmp/fcfem__puibz5v/shape2mesh.geo
11:50:25    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
11:50:25    New mesh was added to the mesh object.
11:50:25  Clean run of Gmsh
11:50:26  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
11:52:33    ElementDimension: 3
11:52:33    /tmp/fcfem_g2nch611/Body_Geometry.brep
11:52:33    /tmp/fcfem_g2nch611/Body_Mesh.unv
11:52:33    /tmp/fcfem_g2nch611/shape2mesh.geo
11:52:33    /home/bruce/Apps/gmsh/gmsh-4.11.1-Linux64/bin/gmsh
11:52:33    New mesh was added to the mesh object.
11:52:33  Clean run of Gmsh
11:52:54  Fem::FemMeshObjectPython: Link(s) to object(s) 'Body' go out of the allowed scope 'FEMMeshGmsh'. Instead, the linked object(s) reside within 'Part'.
11:55:31  
11:55:31  Check prerequisites...
11:55:31  
11:55:31  Get mesh data for constraints, materials and element geometry...
11:55:31  [{'ccx_elset': 'Evolumes', 'ccx_elset_name': 'MaterialSolidSolid', 'mat_obj_name': 'MaterialSolid', 'ccx_mat_name': 'Aluminum Generic'}]
11:55:31  ConstraintFixed:
11:55:31      Type: Fem::ConstraintFixed, Name: ConstraintFixed
11:55:31      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face8
11:55:31  ConstraintPressure001:
11:55:31      Type: Fem::ConstraintPressure, Name: ConstraintPressure001
11:55:31      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face37
11:55:31  ConstraintPressure002:
11:55:31      Type: Fem::ConstraintPressure, Name: ConstraintPressure002
11:55:31      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face38
11:55:31  ConstraintPressure:
11:55:31      Type: Fem::ConstraintPressure, Name: ConstraintPressure
11:55:31      ReferenceShape ... Type: Face, Object name: LinearPattern, Object label: LinearPattern, Element name: Face39
11:55:31  Getting mesh data time: 371.543 seconds.
11:55:31  
11:55:31  CalculiX solver input writing...
11:55:31  Input file:/tmp/fcfem_6xk94xtx/FEMMeshGmsh.inp
11:55:31  One monster input file.
11:55:31  Writing time CalculiX input file: 10.125 seconds.
11:56:39  run CalculiX at: /usr/bin/ccx with: /tmp/fcfem_6xk94xtx/FEMMeshGmsh.inp
12:11:43  Error() PySide2.QtCore.QProcess.ProcessError.Crashed
12:11:43  CalculiX done without error!
12:11:43  
12:11:43  CalculiX read results...
12:11:43  Read ccx results from frd file: /tmp/fcfem_6xk94xtx/FEMMeshGmsh.frd
12:11:43  FEM: No nodes found in Frd file.
12:11:43  Problem on frd file import. No nodes found in frd file.
12:11:43  FEM: No result object in active Analysis.
12:11:43  Read ccx results from dat file: /tmp/fcfem_6xk94xtx/FEMMeshGmsh.dat
What to do? What to look for? From a build made yesterday from git. Info in first post.
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Failure to mesh using gmsh

Post by BDL42 »

Using the default solver fails. It used all my cores and all my swap and did not write the frd file. (32GB RAM, 20.5GB swap) Fortunately my computer did not crash. But PySide2 crashes.

Using the iterative solver did work, but it took 1 hour and 10 minutes. It used a single core, despite the fact it wrote in the console that it used 16 CPU's. Sorry, this is not true. At no time did gnome-system-monitor, which was running continuously, show the use of more than one core. When the default solver ran, it did indeed show that all cores were 100% utilized.

Is there a happy medium between these extremes?

Curiously, after using iterative solver, the other Matrix solvers are now displayed. Previously it displayed None.

What does the Number of CPU's to use mean? Is the setting used for other than the default solver? It was set to 1, for both using default and iterative solvers. So it clearly ignores the setting on default, but uses the setting on non-default solvers? This is confusing, can someone clarify? Is there valid documentation on this?

If I set Number of CPU's, at least with the default solver, it uses that many CPUs, except if the number is 1, then it uses all of them. However, even with 8 CPU's the process uses up all my memory and swap, this seems to result in an empty Frd file, same as before. It seems the default solver is greedy with respect to memory.

Wish there were some strategies published on how to handle larger node count models intelligently in FreeCAD. I deliberately made the model symmetric. Do I need to chop the full model into quarters? Can this be done in the FEM work bench, or must it be done in Part Designer? Any other suggestions?
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Failure to mesh using gmsh

Post by thschrader »

You must select the "LinearPattern" for meshing, not the "Body",
to avoid "list index out of range" error.
I reduced your model to 1/4 by editing the first 2 sketches.

The highest stresses are allways in the fillet region, maybe you can use "Groove003" for
the analysis, with a shorter MainCylinderPad.

File with cleared mesh:
mjp_L2a_quarter.FCStd
(116.15 KiB) Downloaded 34 times
quarterModel.JPG
quarterModel.JPG (288.35 KiB) Viewed 1272 times
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Failure to mesh using gmsh

Post by thschrader »

Something like this.
Meshing needs 5 sec...
shortcylinder.JPG
shortcylinder.JPG (97.78 KiB) Viewed 1265 times
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Failure to mesh using gmsh

Post by BDL42 »

thschrader wrote: Thu May 11, 2023 12:31 pm You must select the "LinearPattern" for meshing, not the "Body",
to avoid "list index out of range" error.
I reduced your model to 1/4 by editing the first 2 sketches.

The highest stresses are allways in the fillet region, maybe you can use "Groove003" for
the analysis, with a shorter MainCylinderPad.

File with cleared mesh:
mjp_L2a_quarter.FCStd
quarterModel.JPG
Thank you! I have learned a lot from your examples and tips. So one needs to do the model reduction at the Part Designer level, thanks for confirming that.

With a plugged pressure tube, are there not forces on the threads? How can one model this effect? This reduced model is good for showing the stress in the fillet, but obviously ignores thread pullout or deformation.
BDL42
Posts: 253
Joined: Mon Jun 06, 2022 5:55 pm

Re: Failure to mesh using gmsh

Post by BDL42 »

thschrader wrote: Thu May 11, 2023 12:43 pm Something like this.
Meshing needs 5 sec...
shortcylinder.JPG
Very nice. Question about the constraint displacement. These are placed on the quartered faces and the back face of the small solid cylinder? I was using a fixed constraint, on the circular small cylinder end. Is this incorrect? When does one use fixed vs displacement constraints?
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Failure to mesh using gmsh

Post by thschrader »

BDL42 wrote: Thu May 11, 2023 2:44 pm These are placed on the quartered faces and the back face of the small solid cylinder?
Yes, the cut faces are displacement fixed only perpendicular to the face plane.
When using complete fixings the cylinder cant "breathe" under pressure.
Post Reply