FEM MeshAdvanced

FEM MeshAdvanced

Menu location
Mesh → GMSH Refinements → Advanced Refinement Types
Workbenches
FEM
Default shortcut
None
Introduced in version
1.2
See also
FEM tutorial

Solvers
All

Description

The FEM MeshAdvanced command allows to define the mesh size by various advanced means.

Task panel of the MeshAdvanced 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 Advanced Refinement Types button.
    • Select the Mesh → GMSH Refinements → Advanced Refinement Types option from the menu.
  4. Select the refinement type:
    • AttractorAnisoCurve - computes the distance to the selected reference edges and specifies the mesh size independently in the direction normal and parallel to the nearest curve. For efficiency, each curve is replaced by a set of Sampling points to which the distance is actually computed. Anisotropic mesh refinements work only with the BAMG (2D) and MMG3D (3D) algorithms.
      • Edit the six distance vs size normal/tangent fields
      • Optionally, change Sampling
    • MathEval - calculates the mesh size from a formula based on coordinates (x,y,z) and other refinements (F1, F2, etc.). Drag refinements into the advanced mesh object in the tree to make them accessible in the Formula.
      • Enter the Mesh size equation. The usual math functions such as Sin and Log (upper case) as well as operators +, -, *, /, ^ are available.
    • MathEvalAniso - calculates the anisotropic mesh size from multiple formulas based on coordinates (x,y,z) and other refinements (F1, F2, etc.). Drag refinements into the advanced mesh object in the tree to make them accessible in the Formula. Anisotropic mesh refinements work only with the BAMG (2D) and MMG3D (3D) algorithms.
      • Enter the mesh size equations in the fields corresponding to metric tensor elements M11, M22, M12, M23, M13 and M33.
    • Distance - computes the distance to the selected reference geometry (vertices, edges and surfaces). For efficiency, curves and surfaces are replaced by a set of points.
      • Optionally, change Sampling
    • Result - uses a data field from a FEM postprocessing pipeline as mesh size. This allows you to adapt the mesh according to the physical behavior of the result.
      • Select the Result and the Field.
  5. 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).
  6. 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.
  7. Press the Add button. Select a face, edge or vertex as reference geometries for AnisoCurve and Distance refinements. To remove objects from the selection, press the Remove button.
  8. Click the OK button.
  9. Close the task.
    Result: You now should see a new Advanced object under the FEMMeshGmsh object in your active analysis container.
  10. Double-click on the FEMMeshGmsh parent object in your Model Tree and press Apply to force a mesh recalculation.
  11. 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 advanced refinements as needed.

Example of MathEval advanced refinement with the following function:
0.05+0.4*(16*x2*y2*(x2y2)2/(x2+y2)4)+0.1*(x2+y24)