FEM MeshGmshFromShape/it: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 15: Line 15:
Per un'analisi degli elementi finiti, la geometria deve essere discretizzata in [[FEM_Mesh/it|Mesh FEM]]. Questo comando utilizza gmsh (che deve essere installato sul sistema) per il calcolo della mesh.
Per un'analisi degli elementi finiti, la geometria deve essere discretizzata in [[FEM_Mesh/it|Mesh FEM]]. Questo comando utilizza gmsh (che deve essere installato sul sistema) per il calcolo della mesh.
</div>
</div>

Gmsh is bundled with the FreeCAD installation binaries. Alternatively you can install it separately from FreeCAD and then use the menu {{MenuCommand|Edit → Preferences → FEM → Gmsh}} to set the path to the ''gmsh.exe''.


==Utilizzo==
==Utilizzo==
Line 26: Line 28:
</div>
</div>


After the mesh has been crated you can change its properties using the [[Property_editor|property editor]]. After you changed a property, you must reopen the Gmsh dialog again and click the {{Button|Apply}} button. (You can leave the dialog open while changing properties.)

== Properties ==

* {{PropertyData|Algorithm2D}}: The algorithm to create 2D meshes. The different algorithms are [https://gmsh.info/doc/texinfo/gmsh.html#Choosing-the-right-unstructured-algorithm explained here]. For Delaunay, see [https://en.wikipedia.org/wiki/Delaunay_triangulation Delaunay triangulation].
* {{PropertyData|Algorithm3D}}: The algorithm to create 3D meshes. The different algorithms are [https://gmsh.info/doc/texinfo/gmsh.html#Choosing-the-right-unstructured-algorithm explained here].
* {{PropertyData|Characteristic Length Max}}: The maximal size of the mesh elements. If set to ''0.0'', the size will be set automatically. This property can also be changed in the Gmsh dialog in the field '''Max element size'''.
* {{PropertyData|Characteristic Length Min}}: The minimal size of the mesh elements. If set to ''0.0'', the size will be set automatically. This property can also be changed in the Gmsh dialog in the field '''Min element size'''.
* {{PropertyData|Coherence Mesh}}:
** true (default); duplicate mesh nodes will be removed
** false
* {{PropertyData|Element Dimension}}: The dimension of the mesh elements. This property can also be changed in the Gmsh dialog in the field '''Mesh element dimension'''.
** From Shape (default); the dimension will be determined from the dimension of the object that is meshed
** 1D
** 2D
** 3D
* {{PropertyData|Element Order}}: The [https://www.comsol.de/support/knowledgebase/1270 mesh element order]. This property can also be changed in the Gmsh dialog in the field '''Mesh order'''. {{Version|0.20}}
** 1st
** 2nd (default)
* {{PropertyData|Mesh Size From Curvature}} {{Version|0.20}}: The number of mesh elements per <math>2\pi</math> times the radius of the curvature. To get a finer mesh at small corners or holes, this value can be increased for better results
[[Image:FEM_Gmsh-MeshSizeFromCurvature.png|450px]]
{{Caption|Effect of ''Mesh Size From Curvature'''; left: set to 12, right: deactivated}}
* {{PropertyData|Second Order Linear}}: Option if second order nodes (if {{PropertyData|Element Order}} set to ''2nd'') and/or mesh refinement points are created by linear interpolation.
** true; linear interpolation is used
** false (default); curvilinear interpolation is used

==Notes==

=== Nonpositive Jacobians ===

When you get a meshing erro about nonpositive Jacobians, you can try out the following strategies:

* Set {{PropertyData|Second Order Linear}} to ''true'' but keep {{PropertyData|Element Order}} at ''2nd''.
* Set {{PropertyData|Element Order}} to ''1st''.
* Use a smaller element size by reducing the {{PropertyData|Characteristic Length Max}}.

===Mesh Growth===

At edges and small geometric entities the mesh has to be smaller than in areas without edges. So the mesh element size grows away from edges. The growing strategy of Gmsh is to grow between edges with different sizes. So the growing fails when an area has the same sized edges like for example this tube:

[[Image:FEM_Gmsh-MeshGrowth-failing.png|400px]]
{{Caption|Failing mesh growing because the cylindrical area is surrounded be the same edges}}

To enable a sensible mesh growing, you must in this case add an edge to the area. In the example this would be a circle in the middle of the cylinder. The circle is added as part of a [[Part_BooleanFragments|BooleanFragments]] compound (to form a CompSolid), see [https://forum.freecadweb.org/download/file.php?id=146255 the project file] of the example.

[[Image:FEM_Gmsh-MeshGrowth-success.png|400px]]
{{Caption|Sensible mesh growing due to the additional edge in the middle of the cylindrical aread}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">

Revision as of 20:08, 1 April 2021

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Mesh FEM da forma con Gmsh

Posizione nel menu
Mesh → Mesh FEM da forma con Gmsh
Ambiente
FEM
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
FEM tutorial

Descrizione

Per un'analisi degli elementi finiti, la geometria deve essere discretizzata in Mesh FEM. Questo comando utilizza gmsh (che deve essere installato sul sistema) per il calcolo della mesh.

Gmsh is bundled with the FreeCAD installation binaries. Alternatively you can install it separately from FreeCAD and then use the menu Edit → Preferences → FEM → Gmsh to set the path to the gmsh.exe.

Utilizzo

  1. Selezionare la forma da analizzare. Il volume FEM deve essere un solido o un solido composto. Se la parte è composta da più materiali è necessario un solido composto. (Un solido composto può essere creato con il comando Frammenti booleani.) -- Per travi e solette FEM qualcuno dovrebbe aggiungere qui delle spiegazioni dettagliate.
  2. Premere il pulsante Mesh FEM da forma con GMSH
  3. Modificare facoltativamente la dimensione dell'elemento minimo e massimo. (Il rilevamento automatico funziona correttamente a meno che non si applichino complicate condizioni.)
  4. Cliccare sul pulsante Apply e attendere il completamento del calcolo della mesh
  5. Chiudere l'attività. Ora nel contenitore delle analisi attivo si dovrebbe vedere un nuovo oggetto FEMMeshGMSH.

After the mesh has been crated you can change its properties using the property editor. After you changed a property, you must reopen the Gmsh dialog again and click the Apply button. (You can leave the dialog open while changing properties.)

Properties

  • DatiAlgorithm2D: The algorithm to create 2D meshes. The different algorithms are explained here. For Delaunay, see Delaunay triangulation.
  • DatiAlgorithm3D: The algorithm to create 3D meshes. The different algorithms are explained here.
  • DatiCharacteristic Length Max: The maximal size of the mesh elements. If set to 0.0, the size will be set automatically. This property can also be changed in the Gmsh dialog in the field Max element size.
  • DatiCharacteristic Length Min: The minimal size of the mesh elements. If set to 0.0, the size will be set automatically. This property can also be changed in the Gmsh dialog in the field Min element size.
  • DatiCoherence Mesh:
    • true (default); duplicate mesh nodes will be removed
    • false
  • DatiElement Dimension: The dimension of the mesh elements. This property can also be changed in the Gmsh dialog in the field Mesh element dimension.
    • From Shape (default); the dimension will be determined from the dimension of the object that is meshed
    • 1D
    • 2D
    • 3D
  • DatiElement Order: The mesh element order. This property can also be changed in the Gmsh dialog in the field Mesh order. introduced in version 0.20
    • 1st
    • 2nd (default)
  • DatiMesh Size From Curvature introduced in version 0.20: The number of mesh elements per times the radius of the curvature. To get a finer mesh at small corners or holes, this value can be increased for better results

Effect of Mesh Size From Curvature'; left: set to 12, right: deactivated

  • DatiSecond Order Linear: Option if second order nodes (if DatiElement Order set to 2nd) and/or mesh refinement points are created by linear interpolation.
    • true; linear interpolation is used
    • false (default); curvilinear interpolation is used

Notes

Nonpositive Jacobians

When you get a meshing erro about nonpositive Jacobians, you can try out the following strategies:

  • Set DatiSecond Order Linear to true but keep DatiElement Order at 2nd.
  • Set DatiElement Order to 1st.
  • Use a smaller element size by reducing the DatiCharacteristic Length Max.

Mesh Growth

At edges and small geometric entities the mesh has to be smaller than in areas without edges. So the mesh element size grows away from edges. The growing strategy of Gmsh is to grow between edges with different sizes. So the growing fails when an area has the same sized edges like for example this tube:

Failing mesh growing because the cylindrical area is surrounded be the same edges

To enable a sensible mesh growing, you must in this case add an edge to the area. In the example this would be a circle in the middle of the cylinder. The circle is added as part of a BooleanFragments compound (to form a CompSolid), see the project file of the example.

Sensible mesh growing due to the additional edge in the middle of the cylindrical aread