Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gmsh]

A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

Second-order quadrangle mesh of a curved surface using Gmsh

Why am I obtaining a "two flat element" element instead of a one flat element, when using second-order mesh? That is the .geo file ...
Riobaldo Tatarana's user avatar
0 votes
0 answers
26 views

Finding neighboring cells using Gmsh API

I am creating a simple mesh on a square domain, $[-5,5]\times[-5,5]$ using the following .geo file ...
Mainak's user avatar
  • 183
0 votes
0 answers
23 views

uniform refinement is not working in gmsh

I get 0 node and elements when I use -refine command line flag in gmsh. Explicitly writing RefineMesh; in the script produces the original mesh and not a refined one. Am I missing something while ...
Ashb's user avatar
  • 11
-1 votes
1 answer
88 views

Gmsh problems in Google Colab, visualize mesh

I'm trying to implement mesh in Google colab from gmesh tutorials. I have an error: Exception: Fltk not available My code is: ...
KekLol's user avatar
  • 3
0 votes
0 answers
46 views

Gmsh 2D shape with boundaries

I'm trying to generate a mesh which has inlet and outlet boundary conditions at the top (not included in the code below). I need the mesh to be whole, but the issue is the transfinite surface as gmsh ...
coolrobot's user avatar
0 votes
0 answers
47 views

Meshing inconsistency

New to Gmsh. I am trying to create a very simple mesh that is essentially two cylinders merging into one. So I added two parallel cylinders first (a bit farther from each other). Then I extruded (...
Bernhard Listing's user avatar
2 votes
1 answer
71 views

Quads with some nodes shifted

I'm new to gmsh. I would like to produce a mesh of quads where some nodes are shifted. I managed to have construct a structured mesh of quads. However, I would like now to shift some of the points to ...
Lio's user avatar
  • 23
1 vote
0 answers
50 views

Wall refinement of a tetraheadral Complex Geometry using Gmsh without a Geo file

I have an msh file, which is generated from a third party software(Pointwise). The geometry is a complex cylindrical pipe like structure with lot of branches. I need to refine the mesh further only on ...
ThivinAnandh's user avatar
0 votes
0 answers
73 views

Create structured alternate volume mesh in gmsh

I've been trying to create a box mesh in gmsh with a structured and refined layer in the middle, here is the .geo code for it: ...
Gabriel Dante's user avatar
0 votes
1 answer
178 views

Gmsh Python: Specify mesh regularity conditons

I am using python API of Gmsh to generate a mesh for a rectangular domain. I am really new at this. My code looks like this, ...
Mainak's user avatar
  • 183
0 votes
1 answer
486 views

GMSH: How can I extrude a surface in a non-linear way?

I am developing a model to represent a dam, shown in the picture below. The geometry in the white circle is the curtain, which is required to be curved. I extruded this 2D face (including the ...
Julio's user avatar
  • 13
1 vote
1 answer
774 views

Gmsh: what is the right syntax to iterate over a list of numbers with a For loop on the native language?

I'm new to Gmsh and after browsing many sites I haven't found the answer for this silly error. Using the native language of the software, I'm assigning a value to the Transfinite property of a bunch ...
Julio's user avatar
  • 13
-1 votes
1 answer
474 views

gmsh python api ignores quad mesh option [closed]

I am trying to mesh a geometry using the gmsh python api, however it seems like my algorithm selection option (i.e. gmsh.option.setNumber("Mesh.Algorithm", 8) ) is being ignored. Can anyone ...
Eric Eckert's user avatar
0 votes
1 answer
676 views

Convert unstructured mesh to structured mesh

I need help to know, how can I convert an unstructured 2d mesh for structured mesh? (Software Gmsh version 4.9.3). This is my script in Gmsh. ...
Afrânio Augusto's user avatar
0 votes
1 answer
181 views

Parametric surface in 3D

I want to create a mesh for a 3D surface with coordinates defined by a parametric function. Is it possible to define this mesh using Gmsh? If it is not possible, what free software do you recommend me?...
yemino's user avatar
  • 515
-1 votes
1 answer
338 views

Generating structured paraboloid using gmsh

I am trying to get the structured mesh as shown in the figure. I have used the transfinite surface and curve to achieve the same. Though I get the structured mesh but I do not know how to do for body-...
jomegaA's user avatar
  • 99
1 vote
0 answers
106 views

How can I improve the accuracy of the calculation of the magnetic field in Gmsh/GetDP?

I need to calculate the magnetic field along a straight line in proximity of an array of 6 magnets. I used the tutorial files "magnets" included in Gmsh and I slightly modified the file in ...
sintetico's user avatar
  • 111
4 votes
2 answers
625 views

Meshing surface of a sphere with a subdomain

I am trying to build a triangle mesh of the surface of a sphere which also includes a subdomain defined by a 'polygon'. Here is a successful example (subdomain defined by the red dots): Note that the ...
Fab von Bellingshausen's user avatar
0 votes
0 answers
52 views

Hi I am trying to model a 2D Lug angle using Gmsh 4.6. How can I combine transfinite quad and regular full quad meshes in the following geo file?

I need transfinite mesh a small section of the bolt hole to insert a crack. However, The transfinite mesh and regular full quad mesh seem being incompatible and throwing errors. How can I combine ...
Bruce Lee Jun Fan's user avatar
2 votes
1 answer
335 views

Going From Blender Structure defined by triangles to full 3D mesh (Using GMSH?)

I currently have created a model airplane in Blender by drawing a closed volume with triangular planes. I want to do a FEM calculation on this object, meaning I need a fine 3D tetrahedral mesh of this ...
Aleksander Bach Lorentzen's user avatar
2 votes
1 answer
956 views

Does 'Recombine' work for this geometry in Gmsh?

I am struggling to recombine the remaining triangular cells into unstructured quadrangular ones in this geometry using Gmsh. Do I need to add auxiliary lines somewhere or do some geometries just don't ...
Lucas Vieira's user avatar
0 votes
1 answer
346 views

Convert existing gmsh mesh from first- to second-order elements?

Is there a way to take an existing gmsh .msh file, and convert it to second-order elements? Specifically, I'm trying to go from 8-point hexahedra (hex8) to 20-point hexahedra (hex20). Ideally, I'd ...
Harris M Snyder's user avatar
0 votes
1 answer
104 views

Why addCylinder function not respecting the given coordinates?

I tried to generate 3 very simple cylinders, each other connected to it end, however the cylinder get connected to an unexistent point in space as the image shows: It was supposed to each segment be ...
FourZeroFive's user avatar
2 votes
2 answers
3k views

Gmsh for .inp file

How do I get an .inp file from Gmsh? I need to create a simple geometry and mesh it and define the boundary conditions in Gmsh and export it as an ...
Dude's user avatar
  • 580
0 votes
1 answer
247 views

Creating a mesh around an 1-D line to form a 2-D object

Given the following code, how can I perform a mesh generation around the line, to make a 2D form in GMSH API? Extrude or Mirror ...
FourZeroFive's user avatar
0 votes
1 answer
380 views

Retaining or mapping sets (physical tags) after remeshing a compounded surface/curve in Gmsh?

For my current work, I need to remesh a given geometry with Gmsh (currently trying all Gmsh versions to achieve this) to continue my Abaqus simulations. As can be seen in the image, the geometry has ...
fruitiest Punch's user avatar
0 votes
0 answers
429 views

Heat diffusion simulation in a 3D piston using FENICS

I'm trying to simulate the heat diffusion in a 3D piston. I marked the boundaries on GMSH. I have used a Dirichlet BC of 300 on the top face of piston. But the results look abnormal. There is a ...
Black Heart's user avatar
0 votes
1 answer
1k views

Multi-domain 3D Geometries for MATLAB PDE Toolbox

In principle the PDE Toolbox in MATLAB can handle multi-domain 3D geometries as noted here. This feature and the associated function geometryfromMesh were introduced in MATLAB R2018a. The associated ...
LAPEMAG's user avatar
  • 81
2 votes
1 answer
175 views

Gmsh meshes flat faces incorrectly for cylindrical faces

I have some C++ code that generates meshes from step files and then analyses these meshes for visibility of the faces from different viewing directions. I currently use CGAL but I would like to switch ...
Luke Hunter's user avatar
3 votes
0 answers
321 views

Is it possible to retain sets (physical tags) after remeshing the model in Gmsh?

I am currently working on a remeshing algorithm for Abaqus using Gmsh as part of my Bachelors thesis and I seem to be stuck at some point. I am able to remesh .geo and .msh files using the script ...
fruitiest Punch's user avatar
3 votes
1 answer
3k views

Is it possible to remesh with gmsh?

I am currently working on remeshers for my simulations (academic purpose) and I try to find a method to remesh previous meshes using Gmsh. The first mesh (normalMesh.msh) was created using a .geo file ...
fruitiest Punch's user avatar
1 vote
0 answers
394 views

Duplicate Surface Meshes in different Gmsh files

My objective is to get a conformal surface mesh between two geometries meshed independently in different files. By example, I can start with a simple cube in one .geo file and mesh this geometry. ...
Bullet's user avatar
  • 31
5 votes
2 answers
14k views

Creating 3D Mesh from stl files with gmsh

After long hours of searching for an answer I thought it might be better to ask the community. The problem I have is that I need to convert STL files to mesh files. I know that I therefore need to ...
A.M.'s user avatar
  • 71
4 votes
1 answer
247 views

Definition of Lagrange nodes in Gmsh

When gmsh uses higher-order tetrahedral elements, there is an underlying Lagrange basis used to specify the map from reference space to the element. I'm trying to load a gmsh mesh of 3rd degree ...
Wraith1995's user avatar
0 votes
1 answer
738 views

Node re-numbering in 1D mesh GMSH

I'm working with Gmsh to generate 1D meshes of polygon edges. I have noticed that drawing a polygon by "vertices and lines" the program always assigns to the first N nodes of the mesh the coordinates ...
John Snow's user avatar
  • 139
1 vote
1 answer
4k views

How can I coarsen a mesh in Gmsh when 'Mesh options' include 'Refine by splitting' but nothing about coarsening?

I am new to Gmsh and I am having trouble creating a circle with a coarse mesh. I use Geometry->Elementary entities->Add->Circle to create the geometry ...
ManUtdBloke's user avatar
0 votes
1 answer
2k views

Gmsh: Recombine 2D in script file or command line

I have many STL files and I want to reduce their size, so I use Gmsh in this way: gmsh -2 -bin -format vtk -o file.vtk file.stl -0 It reduces the size from 7 MB ...
xpt's user avatar
  • 1
5 votes
0 answers
1k views

Gmsh for 3D volume with inclusions [closed]

In an attempt to create three-dimensional volumes with inclusions in Gmsh I stumble upon a problem which was non-existent in the two-dimensional case. I'm using the OpenCASCADE geometry kernel ...
Steyn W.'s user avatar
1 vote
1 answer
1k views

C++ library unstructured mesh writer to VTK format (or similar)

I am working on a 2D unstructured code in C++. I am using gmsh to generate a 2D unstructured mesh and reading it into my program with a library called ...
EssentialAnonymity's user avatar
4 votes
1 answer
8k views

Creating a proper quad-mesh in GMSH for an "I"-shaped geometry

I'm trying to make a 2-D quad-only mesh of an "I"-shaped cross-section, with elements of size 5. So far I've managed to make it quad only, but some elements are very distorted when they shouldn't be. ...
tomas-silveira's user avatar
1 vote
1 answer
2k views

A difference running Gmsh in command line and in GUI for 3-D mesh generation [closed]

In Gmsh, I have a test.geo file. The question is: if I run gmsh -3 test.geo in the command line, I get the below error. ...
fanronghong's user avatar
0 votes
1 answer
293 views

Gmsh exporting wrong mesh DATA [closed]

so hopefully I'll be using gmsh to make meshes out of 2-D cross sections with o thickness. I tried to make a structured mesh with quad elements of a rectangular ...
tomas-silveira's user avatar
1 vote
0 answers
78 views

surface triangulation to boundary representation

Are there any open source tools available which can take a surface triangulation of mesh volumes and convert them to a boundary representation? I am interested in refining multiple region tetrahedral ...
Juan's user avatar
  • 285
3 votes
1 answer
9k views

Custom Mesh Sizes in GMSH [closed]

I have a simple question today. I am new to GMSH and I am currently learning how to use the software program. I am using GMSH 3.0.4. What I am looking to do is to set a different mesh size for ...
philm's user avatar
  • 499
2 votes
2 answers
1k views

Combined translational and rotational meshing in gmsh

For a flow simulation I am trying to reproduce a specific screw element design for an intermeshing co-rotating twin-screw extruder. I am using gmsh (v2.16) where the element is made from a 2D surface ...
nluigi's user avatar
  • 277
2 votes
1 answer
2k views

what is the meaning of mesh smoothing steps in Gmsh?

In Gmsh mesh option list ,there is a smoothing concept, what does this mean and what is the effect of its number to the mesh quality?
user123's user avatar
  • 679
4 votes
0 answers
864 views

Meshing two parts together [closed]

I have two parts, which need to be meshed. One part is located inside another. To simplify the problem, imagine two cubes: one inside another. Geometries are stored in STL files. From CAD point of ...
Krzysztof Bzowski's user avatar
4 votes
1 answer
2k views

Using Gmsh to create a mesh with zero thickness (quad) interface elements

I acknowledge the following post where a similar question is posed and a very nice answer has been provided: Is there a mesh generator that will generate zero thickness elements for interfaces? ...
Steyn W.'s user avatar
1 vote
1 answer
3k views

Triangular mesh of a 3D surface

I have an irregular grid of points describing this surface (a large subduction fault in South America). The color is depth. Anyway I have 3D coordinates (lon,lat,depth) at irregular intervals. I'm ...
user3684658's user avatar
0 votes
1 answer
4k views

Convert STL file to other formats like .msh (Gmsh) and .inp (Abaqus)

After reading some stuff on STL files, I realized that they do no contain information about a mesh (connectivity for instance) , but they represent the surface geometry of the part to be meshed. ...
SAAD's user avatar
  • 616