FEM MeshDistance

FEM MeshDistance

Menu location
Mesh → GMSH Refinements → Distance-Based Refinement
Workbenches
FEM
Default shortcut
None
Introduced in version
1.2
See also
FEM tutorial

Solvers
All

Description

The FEM MeshDistance command can be used to set mesh size based on the distance to vertices, edges and faces.

Task panel of the MeshDistance tool

Usage

  1. To enable the command a Mesh From Shape by Gmsh must be provided first.
  2. Select the Mesh object in the Tree View.
  3. There are several ways to invoke the command:
    • Press the Distance-Based Refinement button.
    • Select the Mesh → GMSH Refinements → Distance-Based Refinement option from the menu.
  4. Edit the four distance vs size fields. From the top to the right:
    • Mesh size when distance < DistanceMinimum
    • Mesh size when distance = DistanceMaximum
    • Distance up to which the mesh size will be SizeMinimum
    • Distance at which the mesh size will be SizeMaximum
  5. Optionally, switch the Interpolation: Linear field to define if interpolation of mesh size between SizeMinimum and SizeMaximum should be linear or sigmoid function.
  6. Optionally, specify the Sampling size to define the number of sampling points used to discretize curves and surfaces. For surfaces it is the sampling size per direction.
  7. Optionally, press the button to edit the global refinement preview settings:
    • Auto enable on open - automatically enables the visualization of the refinement mesh size when opening a refinement task dialog.
    • Preview mesh fineness - determines how fine the preview mesh is. Larger number means finer mesh (smaller elements).
  8. Optionally, press the Visualize button to visualize the refinement mesh size output. It shows the mesh sizes given by the refinement as colors on a preview mesh. Note that the preview evaluates the refinement on a coarse mesh so details smaller than the mesh size may not be visible.
  9. Press the Add button. Select a vertex, edge or face. To remove objects from the selection, press the Remove button.
  10. Click the OK button.
  11. Close the task.
    Result: You now should see a new Distance object under the FEMMeshGmsh object in your active analysis container.
  12. Double-click on the FEMMeshGmsh parent object in your Model Tree and press Apply to force a mesh recalculation.
  13. Close the task.

After the mesh has been created you can change its properties using the Property View. 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.)

You can create as many different distance-based refinements as needed.

Example of distance-based mesh refinement