Questions tagged [gmsh]
A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities
44
questions
5
votes
2
answers
11k
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 ...
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 ...
4
votes
2
answers
501
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 ...
4
votes
1
answer
203
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 ...
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?
...
4
votes
0
answers
821
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 ...
3
votes
1
answer
7k
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. ...
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 ...
3
votes
1
answer
8k
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 ...
3
votes
0
answers
248
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 ...
2
votes
1
answer
255
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 ...
2
votes
1
answer
163
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 ...
2
votes
2
answers
924
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 ...
2
votes
1
answer
2k
views
Gmsh - dividing a plane surface
How to divide a surface to subdomains, which can be recognized in msh file? Avoiding duplicated nodes is necessary.
In general I have geo file which contains definition of smaller and bigger region, ...
1
vote
1
answer
3k
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 ...
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 ...
1
vote
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?
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 ...
1
vote
2
answers
2k
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 ...
1
vote
1
answer
166
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 ...
1
vote
1
answer
578
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 ...
1
vote
1
answer
1k
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.
...
1
vote
0
answers
82
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 ...
1
vote
0
answers
360
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.
...
1
vote
0
answers
73
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 ...
0
votes
1
answer
111
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,
...
0
votes
1
answer
562
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 ...
0
votes
1
answer
377
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.
...
0
votes
1
answer
901
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 ...
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.
...
0
votes
1
answer
146
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 ...
0
votes
1
answer
144
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?...
0
votes
1
answer
178
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 ...
0
votes
1
answer
93
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 ...
0
votes
1
answer
176
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 ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
244
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 ...
0
votes
0
answers
9
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:
...
0
votes
0
answers
20
views
meshing of parametric 3d models
I would like to do CFD analysis on a parametric model and would like to obtain mesh deformation in the parametric space.
As a concrete 2D example let us consider a house shape with a bottom rectangle ...
0
votes
0
answers
49
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 ...
0
votes
1
answer
335
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 ...
0
votes
0
answers
389
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 ...
-1
votes
1
answer
232
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 ...
-1
votes
1
answer
213
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-...