gmsh-meshing

Specialized expertise for finite element mesh generation and manipulation using GMSH with quality assessment and engineering tool integration.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gmsh-meshing" with this command: npx skills add vamseeachanta/workspace-hub/vamseeachanta-workspace-hub-gmsh-meshing

GMSH Meshing Skill

Specialized expertise for finite element mesh generation and manipulation using GMSH with quality assessment and engineering tool integration.

Version Metadata

version: 1.0.0 python_min_version: '3.10' compatibility: tested_python:

  • '3.10'
  • '3.11'
  • '3.12'
  • '3.13' os:
  • Windows
  • Linux
  • macOS

Changelog

[1.0.0] - 2026-01-07

Added:

  • Initial version metadata and dependency management

  • Semantic versioning support

  • Compatibility information for Python 3.10-3.13

Changed:

  • Enhanced skill documentation structure

When to Use

  • 1D/2D/3D mesh generation for analysis

  • Geometry import and healing (STEP, IGES, STL)

  • Mesh quality assessment and optimization

  • Panel mesh generation for hydrodynamics

  • Structural mesh for FEM analysis

  • Mooring line discretization

  • Batch mesh processing

  • Integration with OrcaFlex, ANSYS, OpenFOAM

Agent Capabilities

This skill integrates agent capabilities from /agents/gmsh/ :

Mesh Generation

Dimension Element Types

1D Beam, line, curve

2D Triangle, quadrilateral, mixed

3D Tetrahedron, hexahedron, prism, pyramid, mixed

Geometry Formats

Import Export

STEP, IGES, STL, BREP, GEO MSH, VTK, CGNS, MED, INP, CDB, STL

Quality Metrics

Metric Description Good Range Critical

Jacobian Element distortion

0.3 < 0.1

Aspect Ratio Element shape < 5.0

10.0

Skewness Element skew < 0.7

0.9

Orthogonality Angle quality

0.3 < 0.1

Optimization Methods

  • Laplacian smoothing

  • Adaptive refinement

  • Remeshing

  • Parallel optimization (up to 100 iterations)

Prerequisites

  • Python 3.10+

  • GMSH Python bindings (pip install gmsh )

  • NumPy, SciPy, PyVista

Configuration

Default Settings

{ "configuration": { "default_algorithm": "frontal-delaunay", "default_element_size": 1.0, "quality_thresholds": { "min_jacobian": 0.3, "max_aspect_ratio": 5.0, "max_skewness": 0.7 }, "performance": { "parallel_workers": 4, "chunk_size": 1000, "memory_limit_gb": 4 } } }

Python API

Basic Mesh Generation

from digitalmodel.agents.gmsh import GMSHAgent

Initialize agent

agent = GMSHAgent(config="agent_config.json")

Generate mesh from geometry

mesh = agent.generate_mesh( geometry="platform.step", config={ "algorithm": "frontal-delaunay", "element_size": 0.5, "element_type": "tetrahedron" } )

Save mesh

agent.save_mesh(mesh, "platform.msh")

Quality Assessment

Assess mesh quality

quality = agent.assess_quality(mesh)

print(f"Elements: {quality['element_count']}") print(f"Min Jacobian: {quality['min_jacobian']:.3f}") print(f"Avg Aspect Ratio: {quality['avg_aspect_ratio']:.2f}") print(f"Max Skewness: {quality['max_skewness']:.3f}")

Check if optimization needed

if quality['min_jacobian'] < 0.3: print("Mesh requires optimization")

Mesh Optimization

Optimize poor quality mesh

optimized = agent.optimize_mesh( mesh, method="laplacian_smoothing", iterations=10, quality_targets={ "min_jacobian": 0.4, "max_aspect_ratio": 3.0 } )

Verify improvement

quality_after = agent.assess_quality(optimized) print(f"Jacobian improved: {quality['min_jacobian']:.3f} -> {quality_after['min_jacobian']:.3f}")

Panel Mesh for Hydrodynamics

Generate panel mesh for OrcaFlex/OrcaWave

panel_mesh = agent.generate_panel_mesh( geometry="hull.step", panel_size=2.0, refinement_zones=["waterline", "appendages"] )

Export to OrcaFlex format

agent.export_to_orcaflex(panel_mesh, "hull_panels.dat")

Structural Mesh for ANSYS

Generate structural mesh with boundary layers

struct_mesh = agent.generate_mesh( geometry="structure.step", element_type="hexahedron", boundary_layers={ "walls": {"layers": 5, "growth_rate": 1.2} } )

Export to ANSYS with named selections

agent.export_to_ansys( struct_mesh, output="model.cdb", named_selections=["inlet", "outlet", "walls"] )

Batch Processing

from digitalmodel.agents.gmsh.batch import GMSHBatch

Initialize batch processor

batch = GMSHBatch(parallel=True, max_workers=4)

Process multiple geometries

results = batch.process_directory( input_directory="./geometries", output_directory="./meshes", config={ "algorithm": "frontal-delaunay", "element_size": { "min": 0.1, "max": 1.0 }, "quality_targets": { "min_jacobian": 0.4, "max_aspect_ratio": 4.0 } } )

Generate quality report

batch.generate_report(results, "mesh_quality_report.html")

Command Line Interface

Generate mesh from geometry

python run_gmsh_agent.py generate
--input geometry.step
--output mesh.msh
--element-size 0.5

Batch processing

python run_gmsh_agent.py batch
--input-directory ./geometries
--output-directory ./meshes
--config batch_config.yml
--parallel 4

Quality assessment

python run_gmsh_agent.py assess
--mesh mesh.msh
--report quality_report.html

Mesh optimization

python run_gmsh_agent.py optimize
--input mesh.msh
--output optimized.msh
--method laplacian
--iterations 10

Integration Examples

OrcaFlex Integration

Panel mesh for hydrodynamic analysis

panel_mesh = agent.generate_panel_mesh( geometry="hull.step", panel_size=2.0, refinement_zones=["waterline", "appendages"] )

Mooring line discretization

mooring_mesh = agent.discretize_mooring( length=800.0, segments=50, target_element_length=16.0 )

Export to OrcaFlex

agent.export_to_orcaflex(panel_mesh, "hull_panels.dat")

ANSYS Integration

Structural mesh with named selections

agent.export_to_ansys( mesh, output="model.cdb", format="CDB", boundary_conditions=True, named_selections=["fixed", "load", "contact"] )

Alternative INP format

agent.export_to_ansys(mesh, output="model.inp", format="INP")

Templates

Pre-configured mesh templates:

  • offshore_platform.geo

  • Platform mesh template

  • mooring_line.geo

  • Mooring discretization

  • seabed_terrain.geo

  • Seabed mesh

MCP Tool Integration

Swarm Coordination

// Initialize meshing swarm mcp__claude-flow__swarm_init { topology: "ring", maxAgents: 4 }

// Spawn specialized agents mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "mesh-generator" } mcp__claude-flow__agent_spawn { type: "reviewer", name: "quality-checker" }

Memory Coordination

// Store mesh configuration mcp__claude-flow__memory_usage { action: "store", key: "gmsh/mesh/config", namespace: "meshing", value: JSON.stringify({ geometry: "hull.step", elements: 50000, quality: "verified" }) }

// Share mesh status with analysis agents mcp__claude-flow__memory_usage { action: "store", key: "gmsh/mesh/ready", namespace: "shared", value: JSON.stringify({ file: "hull_panels.dat", for_tool: "orcaflex", panels: 5000 }) }

Performance

Operation Metric

Mesh Generation

100K elements/second

Quality Assessment <1 second for 1M elements

Optimization ~10 seconds per iteration for 100K elements

Batch Processing Linear scaling with CPU cores

Standard Workflows

Standard Meshing Workflow

  • Import geometry

  • Heal geometry defects

  • Generate mesh

  • Assess quality

  • Optimize if needed

  • Export to desired format

Batch Processing Workflow

  • Configure batch settings

  • Process files in parallel

  • Generate quality reports

  • Optimize poor meshes

  • Export all results

Error Handling

Memory Issues with Large Meshes

Use chunked processing

agent = GMSHAgent(config={ "performance": { "chunk_size": 10000, "memory_limit_gb": 2 } })

Poor Quality Meshes

Increase optimization iterations

optimized = agent.optimize_mesh( mesh, method="remeshing", iterations=20, quality_targets={ "min_jacobian": 0.4, "max_aspect_ratio": 3.0 } )

Related Skills

  • freecad-automation - CAD geometry creation

  • orcawave-analysis - Panel mesh application

  • orcaflex-modeling - Hydrodynamic analysis

  • structural-analysis - FEM application

References

Version History

  • 1.0.0 (2025-01-02): Initial release from agents/gmsh/ configuration

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

echarts

No summary provided by upstream source.

Repository SourceNeeds Review
General

pandoc

No summary provided by upstream source.

Repository SourceNeeds Review
General

mkdocs

No summary provided by upstream source.

Repository SourceNeeds Review
General

gis

No summary provided by upstream source.

Repository SourceNeeds Review