brainstorming
Structured design dialogue that validates ideas before implementation begins.
gmsh-meshing
Specialized AI agent for finite element mesh generation and manipulation
Full skill instructions
Specialized expertise for finite element mesh generation and manipulation using GMSH with quality assessment and engineering tool integration.
version: 1.0.0
python_min_version: '3.10'
compatibility:
tested_python:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
os:
- Windows
- Linux
- macOS
Added:
Changed:
This skill integrates agent capabilities from /agents/gmsh/:
| Dimension | Element Types |
|---|---|
| 1D | Beam, line, curve |
| 2D | Triangle, quadrilateral, mixed |
| 3D | Tetrahedron, hexahedron, prism, pyramid, mixed |
| Import | Export |
|---|---|
| STEP, IGES, STL, BREP, GEO | MSH, VTK, CGNS, MED, INP, CDB, STL |
| 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 |
pip install gmsh){
"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
}
}
}
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")
# 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")
# 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}")
# 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")
# 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"]
)
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")
# 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
# 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")
# 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")
Pre-configured mesh templates:
offshore_platform.geo - Platform mesh templatemooring_line.geo - Mooring discretizationseabed_terrain.geo - Seabed mesh// 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" }
// 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
})
}
| 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 |
# Use chunked processing
agent = GMSHAgent(config={
"performance": {
"chunk_size": 10000,
"memory_limit_gb": 2
}
})
# Increase optimization iterations
optimized = agent.optimize_mesh(
mesh,
method="remeshing",
iterations=20,
quality_targets={
"min_jacobian": 0.4,
"max_aspect_ratio": 3.0
}
)
agents/gmsh/agent_config.jsonStructured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs