Questions tagged [gmsh]
60 questions
0
votes
0 answers
How to set physical names and groups to a union object in gmsh for python?
import warnings
warnings.filterwarnings("ignore")
import gmsh
gmsh.initialize()
gmsh.model.add("slab")
L, B, H, r = 2.0, 12.0, 0.5, 0.0416
slab = gmsh.model.occ.addBox(0, 0, 0, L, B, H)
gmsh.model.occ.synchronize()
rebar_circle_front =…

prusso
- 39
- 5
0
votes
0 answers
How to set the model size of gmsh in python
When I use the following code to open an iges file without units, the coordinates of the points of the generated model are magnified 1000 times.
def LoadIges(self, filename, lcf=None):
gmsh.initialize()
# try:
gmsh.open(filename)
…

aLIEz
- 1
0
votes
0 answers
Gmsh Mesh generating
I would like to ask for some help with my specific 3D meshing task.
I have attached a picture below where I tried to explain the rules I need to follow by meshing.
I would like to create it with the script language of Gmsh (In a '.geo' file).
The…
0
votes
0 answers
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:
lc = 100.;
Mesh.CharacteristicLengthFromPoints = 1.;
Mesh.CharacteristicLengthExtendFromBoundary =…

Gabriel Dante
- 392
- 1
- 12
0
votes
1 answer
GMSH, understanding msh file (entities, nodes, elements)
I am trying to understand the structure of a msh file, in order to be able to extract the nodes coordinates and their connectivity (for use in a plot with pgf/tikz). To do so I decided to make the first tutorial (t1.py) with a coarse mesh. When the…

TOP1
- 71
- 1
- 5
0
votes
0 answers
I´m creating Mesh in GMSH with python and my result is with invisible surfaces
I´m trying to mesh a Volume with gmsh in Python and so far everything is fine, but my result in GMSH is with invisible surfaces. Because I want to build it later on as a structured grid it's quite annoying to click my way through
I can make the…

Michael
- 1
- 2
0
votes
0 answers
How to get properly entity names using gmsh fortran api?
gmsh: When I import the name of my entities using the Fortran API (i.e., with the call gmsh%model%getentityname routine), there seems to be an issue with the character format. I get unreadable entity names, even though these entities do have names.…
0
votes
1 answer
Quad mesh for an annular disc using gmsh
I am trying to generate a quad mesh grid for an annular disc geometry. I was able to generate this mesh for a rectangular shape using gmsh:
import gmsh
import sys
gmsh.initialize()
gmsh.model.add("t1")
lc = 1e-2
p1 = gmsh.model.geo.addPoint(0, 0,…

H.H
- 188
- 1
- 13
0
votes
0 answers
gmsh: how to input a mesh?
Currently, I hava a mesh: points and faces, and I want to optimized it with gmsh. So, the first problem is to input my mesh to gmsh.
The points is a nx3 data, which indicates the coordinate. The faces is also a mx3 data, which indicates the…

Qiang Zhang
- 820
- 8
- 32
0
votes
0 answers
GMSH: Quad-only mesh without refining
I want to mesh a 2D model, with quads only. But it has some specificities.
Simplified example
This mesh is a (very) simplified exemple of what i actually have. As you can see, I have surfaces like the one in the middle where I must have only 1…
0
votes
0 answers
GMSH adds new surfaces when adding a volume
I want to add a volume to the region encapsulated by surfaces. 4 of the surfaces are splines done with points and a sine wave. If i just run the 2d meshing before adding the volume i get following result
However after adding the volume and running…

Nico Su
- 49
- 4
0
votes
0 answers
Possibility of simulating a 2D flood for different 2D plan projections for one mesh
I am working on a flood simulation should have x,y direction (2D), then I should work on x,z direction (2D). My mesh is the same for both areas (one mesh), where I should connect the flood from an upper area to a lower one.
Is it possible to do so…
0
votes
0 answers
Issues importing gmsh python package due to OpenGL libraries on WSL
I've tried importing the gmsh module in python but keep getting errors like:
OSError: libXft.so.2: cannot open shared object file: No such file or directory
Whenever I try to resolve one, a new missing file appears such as libxcursor.so.1. I am not…

user289522
- 1
- 3
0
votes
0 answers
is there a way to enhance a lot a STL file with GMSH in python
My question is quite simple but I had difficulties to find informations about that.
Is there a way to enhance a lot a STL file with GMSH in python ? for exemple, is it possible to go from an STL file (where we can see the STL file/3D object on this…
0
votes
0 answers
difficult with gmsh plugins, specifically AnalyseMeshQuality
I need a way to analyze the mesh data that I receive from Gmsh. Currently, I am able to successfully generate a 3D quad-mesh of a given STEP file. However, the plugin "AnalyseMeshQuality" does not seem to work for me. At first, I simply tried…

Lyndon Alcock
- 117
- 8