Questions tagged [gmsh]

60 questions
0
votes
0 answers

Nek5000 has an Exit E problem with the mesh grid generated by gmsh

A CFD problem, flow past a cylinder, I need a mesh that can be refined, so I use gmsh to generate my own mesh, but the mesh of gmsh cannot be used after being converted with gmsh2nek, and BCs-related errors occur when nekmpi is running. The error…
0
votes
0 answers

How to add a point to the border of a surface in Gmsh?

I need to add a point to the boundary of an existing surface to refine the mesh in Gmsh. The Python IDE has a function "gmsh.model.reparametrizeOnSurface(dim, tag, parametricCoord, surfaceTag, which=0)" which allows you to add points to a border…
0
votes
0 answers

GMSH Python API - local mesh refinement with setsizecallback

I would like to perform local mesh refinement depending on physical results obtained with a prior simulation. I am using GMSH and the setSizeCallback(meshSizeCallBack) function to apply the desired mesh size in the refinement region. The obtained…
Martin7
  • 93
  • 8
0
votes
0 answers

Importing gmsh gives OSError

I'm trying to import the gmsh python package but getting the following error. I installed gmsh using mamba install python-gmsh (which I got from here) inside Ubuntu but I'm importing the module within Pycharm on Windows using WSL. File…
0
votes
1 answer

How to save mesh in .msh ASCII 2 format from Gmsh Python api?

I need to save my mesh (created with gmsh python api) in .msh ASCII version 2 format in order to use the command dolfin-convert and import the mesh inside Fenics. From the tutorials, to save the mesh I should use the…
Rbocce
  • 15
  • 3
0
votes
0 answers

Inp(Abaqus) mesh file conversion into .msh file via meshio

I'm using meshio to convert an .inp mesh file into compatible form for Gmsh (.msh file type).Αlthough the conversion (meshio convert input.inp output.msh) generates a .msh file, Gmsh can't read it because it appears unusual characters. Please check…
dim
  • 1
0
votes
1 answer

How to obtain surfaces tag in Gmsh Python api?

i am trying to generate geometries and meshes with the Python api of Gmsh, planning to use it in FEniCS. I started creating my geometry following the steps reported here: https://jsdokken.com/src/tutorial_gmsh.html The author first create the volume…
Rbocce
  • 15
  • 3
0
votes
1 answer

Error extruding gmsh surfaces to abutting volumes

My application deals with many shapes processed with gmsh's Python API, but I have reduced my problem to a MWE of two polygons which lie in separate planes. Their coordinates are: # polygon spans (x, y, zs[0]) xy1 = [(0.0, 504.0), (247.0, 504.0),…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
0
votes
1 answer

Generating triangular elements with gmsh and read with python

I'm trying to generate a triangular mesh with gmsh and then read it with python, for the python part I'm using meshio. But my problem is that the mesh elements are always readead as lines, not triangles. Here is my…
efirvida
  • 4,592
  • 3
  • 42
  • 68
0
votes
0 answers

GMSH api is including axis of rotation points in mesh output

I am using the GMSH api to create a 3D mesh from a point cloud. The mesh comes together however my issue lies with the creation of extra nodes. I assume these are associated with the axis of rotation since the loose/hanging node are only located…
TheCodeNovice
  • 750
  • 14
  • 35
0
votes
0 answers

Remeshing depending on physical quantity values

I am performing Code Saturne simulations of fluid flows. I mesh the computational domain with gmsh. I would like to adapt my mesh by refining regions of my investigated case depending on the results of a previous simulation. Here is the…
Martin7
  • 93
  • 8
0
votes
1 answer

GMSH extrusion with dilation

I want to create a structured mesh with boundary layers over an rather complex geometry in GMSH. For this reason I need to seperate my geometry to smaller portions, one of them is pictured: Since structured meshes can only be created by extrusion, i…
Nico Su
  • 49
  • 4
0
votes
0 answers

Error: No elements in volume 1, GMSH module from PYTHON

I'm trying to remesh some .stl files, containing geometries already processed with some smoothing algorithm, with the gmsh module on python. The remeshing algorithm works fine for many .stl files. However, for some of them no 3D remeshing is…
0
votes
0 answers

Trimesh .stp File not loading into script

I am trying to use the python package Trimesh to extract data from .stp files, like bounding box, convex hull, etc., and when i try and load any file over 2000 KB the line of code just seems to run for ever until i run out of memeory, when it then…
0
votes
1 answer

How to get all Edges and Faces (Triangles) in a mesh and their nodes (3D co-ordinates) in GMSH (Python API)?

I need lines and triangles (coordinates corresponding to them) as a list using Python API, how do I go about it? I have tried these functions gmsh.model.mesh.createEdges() edgeTags, edgeNodes =…
Shriraj Hegde
  • 829
  • 5
  • 18