gmsh issueshttps://gitlab.onelab.info/gmsh/gmsh/-/issues2023-03-21T11:30:58Zhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1407Medit mesh file bug2023-03-21T11:30:58ZHamidMedit mesh file bugHi,
There is a bug in the snapshot release (4.9) when importing a medit mesh file, the z coordinates is always 0... so the mesh is collasped on the (x,y) plane. It works fine with the 4.8.3 release.Hi,
There is a bug in the snapshot release (4.9) when importing a medit mesh file, the z coordinates is always 0... so the mesh is collasped on the (x,y) plane. It works fine with the 4.8.3 release.https://gitlab.onelab.info/gmsh/gmsh/-/issues/14043D meshing - Python API2021-06-07T19:34:19ZXabier Morales Ferez3D meshing - Python APIHi,
I am using the python API (GMSH SDK 4.9.0 install through pip) and trying to create a volumetric mesh from a typical .stl surface mesh of the heart. I'm quite used to this procedure on the gmsh API where I just need to create a vol...Hi,
I am using the python API (GMSH SDK 4.9.0 install through pip) and trying to create a volumetric mesh from a typical .stl surface mesh of the heart. I'm quite used to this procedure on the gmsh API where I just need to create a volume entity and physical group before meshing and I wanted to automatize the process.
I've been checking the available documentation and examples but I have struggled to find any example for imported meshes. I think I found several of the functions required such as gmsh.open(), gmsh.model.addDiscreteEntity(), gmsh.model.addPhysicalGroup() and gmsh.model.mesh.generate() but I'm still a bit lost.
Thanks in advance,
Xabierhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1394Is gmsh working on an rpi4 ? (aarch64)2021-06-10T11:19:07ZTchimyIs gmsh working on an rpi4 ? (aarch64)Hi,
I'm trying to use pygmsh/gmsh in my project, I tried some code on my window computer to do some tests and generate an 3D mesh (union between 2 volumes).
I used this code and it worked fine :
```
from skfem.visuals.matplotlib impor...Hi,
I'm trying to use pygmsh/gmsh in my project, I tried some code on my window computer to do some tests and generate an 3D mesh (union between 2 volumes).
I used this code and it worked fine :
```
from skfem.visuals.matplotlib import draw, show, plot
from skfem.models.elasticity import linear_elasticity, lame_parameters
from skfem.helpers import dot
from skfem import *
import pygmsh
import gmsh
import numpy as np
resolution = 0.01
# Beam parameter
print("parameters")
length = 0.3
width = 0.05
t = 0.03
# added_mass parameter
w2 = 0.03
h2 = 0.03
t2 = 0.03
x0 = 0.0125
y0 = 0.25
z0 = t
# physics parameters
rho = 1120
E = 2.174e9
nu = 0.35
# Clear previous model
mesh_size = 0.01
geom = pygmsh.occ.Geometry()
model3D = geom.__enter__()
box0 = model3D.add_box([0, 0, 0], [width, length, t])
box1 = model3D.add_box([x0, y0, z0], [w2, h2, t2])
union = model3D.boolean_union([box0, box1])
model3D.synchronize()
model3D.add_physical(union, "Union")
geom.generate_mesh(dim=3)
gmsh.write("Mesh3D.msh")
model3D.__exit__()
m = MeshTet.load('mesh3D.msh')
draw(m)
show()
```
I generate a .msh file that I use later in my code to do FEM.
The thing is when I try to do the same on my Raspberry Pi 4 i get this error :
```
/home/alban/.local/lib/python3.8/site-packages/numpy/ctypeslib.py:517: RuntimeWarning: A builtin ctypes object gave a PEP3118 format string that does not match its itemsize, so a best-guess will be made of the data type. Newer versions of python may behave correctly.
return array(obj, copy=False)
Traceback (most recent call last):
File "/home/alban/.local/lib/python3.8/site-packages/meshio/gmsh/main.py", line 38, in read_buffer
reader = _readers[fmt_version]
KeyError: '4,1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alban/.local/lib/python3.8/site-packages/meshio/gmsh/main.py", line 41, in read_buffer
reader = _readers[fmt_version.split(".")[0]]
KeyError: '4,1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alban/PycharmProjects/Stage_2021/Test_Scikit-fem/Mesh_gmsh.py", line 45, in <module>
m = MeshTet.load('Mesh3D.msh')
File "/home/alban/.local/lib/python3.8/site-packages/skfem/mesh/mesh.py", line 429, in load
return from_file(filename)
File "/home/alban/.local/lib/python3.8/site-packages/skfem/io/meshio.py", line 140, in from_file
return from_meshio(meshio.read(filename))
File "/home/alban/.local/lib/python3.8/site-packages/meshio/_helpers.py", line 69, in read
return reader_map[file_format](filename)
File "/home/alban/.local/lib/python3.8/site-packages/meshio/gmsh/main.py", line 19, in read
mesh = read_buffer(f)
File "/home/alban/.local/lib/python3.8/site-packages/meshio/gmsh/main.py", line 43, in read_buffer
raise ValueError(
ValueError: Need mesh format in ['2', '2.2', '4', '4.0', '4.1'] (got 4,1)
Process finished with exit code 1
```
I tchecked and I found out that, with the same code, the .msh file generated is not the same between my computer and the rpi4 :
the .msh generated by my windows computer :
[mesh3D.msh](/uploads/466e36855f0a3d3e65a40a971a0db3f1/mesh3D.msh)
And the one generated on the RPI4 :
[Mesh3D.msh](/uploads/cad7750330da505e34ffae232b3f7955/Mesh3D.msh)
As you can see with the same method the files are differents, I have some theories :
- It can be linked with the
/home/alban/.local/lib/python3.8/site-packages/numpy/ctypeslib.py:517: RuntimeWarning: A builtin ctypes object gave a PEP3118 format string that does not match its itemsize, so a best-guess will be made of the data type. Newer versions of python may behave correctly.
return array(obj, copy=False) error
- It can be linked with the mesh generation/export part, maybe gmsh or pygmsh is not supposed to work with the aarch64 from the raspberry pi (i'm on ubuntu 20.04) ?
- It can simply be linked my python version ?
I installed gmsh/pygmsh with :
```
sudo apt install python3-gmsh
pip install pygmsh
```
Is there some depencies that I forgot or did I installed badly something ? (Sorry for the long post by advance)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1381Refining quadrilateral and hexahedral element meshes2021-10-28T22:53:16ZFrancisco DiasRefining quadrilateral and hexahedral element meshesHello everyone!
I am a really new user of gmsh... I would like to know if there is some way to refine meshes as proposed by Robert Schneiders in his work "[Refining Quadrilateral and Hexahedral Element Meshes](https://www.researchgate.n...Hello everyone!
I am a really new user of gmsh... I would like to know if there is some way to refine meshes as proposed by Robert Schneiders in his work "[Refining Quadrilateral and Hexahedral Element Meshes](https://www.researchgate.net/profile/Robert-Schneiders/publication/2734329_Refining_Quadrilateral_and_Hexahedral_Element_Meshes/links/546203d70cf27487b4557826/Refining-Quadrilateral-and-Hexahedral-Element-Meshes.pdf)".
Here we have some examples of this type of refining in 2D quadrilateral meshes:
<img src="/uploads/410aca8da1bbdc16445edd5e7566d323/image.png" width="400"/>
... and in 3D hexahedral meshes:
<img src="/uploads/3b6c30a51453533dfb8901dffc3933ae/image.png" width="600"/>
My questions:
1. There is some mesh algorithm in gmsh that makes meshes like this?
2. If gmsh doesn't offer this algorithm, is there a way to implement it and use it in gmsh? Can I do it using gmsh API with some routine in Python?
Thanks a lot for your attention!https://gitlab.onelab.info/gmsh/gmsh/-/issues/1370Creation of ordered cuts (cohomology-homology) in 2D2022-11-03T19:59:41ZFrederic TrillaudCreation of ordered cuts (cohomology-homology) in 2DDear all,
I have created the same issue in Models for Gmsh and GetDP. I thought that it may be more relevant here after all.
I have a 2D axisymmetric case of a coil made of 10 conductors in series. The coil is part of a small electric ...Dear all,
I have created the same issue in Models for Gmsh and GetDP. I thought that it may be more relevant here after all.
I have a 2D axisymmetric case of a coil made of 10 conductors in series. The coil is part of a small electric circuit (power supply, resistance in series with the coil). The same current +I is impressed to the series-connected conductors through cuts associated with branches in the circuit, from node 2 to 11.
{ Region cut_0; Branch{2, 3}; }
{ Region cut_1; Branch{3, 4}; }
{ Region cut_2; Branch{4, 5}; }
{ Region cut_3; Branch{5, 6}; }
{ Region cut_4; Branch{6, 7}; }
{ Region cut_5; Branch{7, 8}; }
{ Region cut_6; Branch{8, 9}; }
{ Region cut_7; Branch{9, 10}; }
{ Region cut_8; Branch{10, 11}; }
{ Region cut_9; Branch{11, 0}; }
The issue is that the cuts are not in the same direction for all the branches and it is somehow random leading to a wrong direction for the current in each branch.
I know that a colleague of mine made a manual fixed by reordering the edges in the cuts saving the mesh in ascii format. I think that it would be more appropriate to have it built in the source code to avoid having to reorder the cuts or to give manually a particular sign to the current or even the direction of the branch for the matter after the creation of the mesh and the cuts.
I am joining a picture of some of the cuts and the current density resulting from the basic code without manual ordering to point out the issue.
![circuitCouplingDCAC](/uploads/bf5081fa24f64f88cd4d32c618b06367/circuitCouplingDCAC.png)
![currentDensityDirection](/uploads/d0c62d33e0d555a1cf5b7434e725dfee/currentDensityDirection.png)
Best,
Frederichttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1359"PLC Error: A segment and a facet intersect at point" with boundary layer mesh2021-06-01T13:30:18ZJack Wong"PLC Error: A segment and a facet intersect at point" with boundary layer meshHi all,
I am preparing a mesh for a CFD simulation. I created the building and the ground geometry and used the gmsh.model.geo.extrudeBoundaryLayer method to prepare the boundary layer. The boundary layer could be created and 3D meshed ...Hi all,
I am preparing a mesh for a CFD simulation. I created the building and the ground geometry and used the gmsh.model.geo.extrudeBoundaryLayer method to prepare the boundary layer. The boundary layer could be created and 3D meshed with no problem.
![4](/uploads/12f1a28286fb2f434ce363bc290afb3c/4.JPG)
Then, I followed the aneurysm demo to define the lateral planes and the top plane, as well as the bounded fluid volume. When I proceed to 3D mesh the volume, I am getting a PLC error with some problematic nodes near the boundary layers.
![5](/uploads/3607ef4c8a01938c6e67e0fd3b5249c9/5.JPG)
Is there any way I can fix this? Thanks for reading my problem, I have attached my script as well in this post.
[202105_test_boundary2.py](/uploads/76271bc876437eca27c1f8d00787db28/202105_test_boundary2.py)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1355gmsh pyinstaller2021-05-24T17:10:40ZWill Whitegmsh pyinstallerHi there,
Firstly, I wanted to say that Gmsh is a fantastic piece of meshing / FE software, and to say a big thank you for what I imagine is a lot of hard work must go into it!
I have created a series of Python scripts (in Python 3.8) t...Hi there,
Firstly, I wanted to say that Gmsh is a fantastic piece of meshing / FE software, and to say a big thank you for what I imagine is a lot of hard work must go into it!
I have created a series of Python scripts (in Python 3.8) that i've turned into a package, which imports gmsh as a dependancy to do some simple meshing activities for me (I imported gmsh using "pip install gmsh" into my environment). I now want to compile my tool (note it has many other dependencies such as numpy etc), into an executable. I generally use Pyinstaller for such things, however when trying Pyinstaller for this, I keep getting error messages.
Is there any guidance on how to compile a Python package that imports gmsh using Pyinstaller. I have seen some info online about the use of hidden imports in the Pyinstaller ".spec" file, and was wondering if I'm missing a dependancy that gmsh uses?
Thanks in advance!
Willhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1347Cannot create volume mesh2021-09-04T09:29:30ZFarkas BeöthyCannot create volume meshHello all,
I am trying to create a volume mesh of a ship. There is no special requirement on the mesh size and quality as it will be an input to a CFD solver with a background staggered grid so the geometry mesh only has to covers the w...Hello all,
I am trying to create a volume mesh of a ship. There is no special requirement on the mesh size and quality as it will be an input to a CFD solver with a background staggered grid so the geometry mesh only has to covers the whole geometry.
I received an .igs file of a ship hull which contains a lot of surfaces. There is a layer in the IGES which I don’t need (container on top of ship), therefore I removed that and closed the geometry in rhino and I was able to create a closed geometry without any naked edges.
I tried two methods creating volume mesh in gmsh. First was to create a surface mesh from the model in rhino, either with rhino tool itself creating a mesh and export to stl that or directly export the geometry. After, in gmsh I can create a volume from the closed imported surfaces using the following geo file:
Merge "6570TEU.stl";
Surface Loop(1) = {1};
Volume(1) = {1};
but when creating volume mesh I get the error:
Invalid boundary mesh (overlaping facets on surface 1 surface 1
No elements in volume 1
In rhino I checked the mesh and there was no overlapping elements so I don't understand where does this come from. I also checked and there are no non-manifold edges, degenerate elements. Is there other things I need to considered?
The second method I tried is to import the modified .igs but then I cannot even create a volume from the imported geometry. I can create a surface mesh, but than when I try to use that as an input and create a volume from it I cannot.
What would be a good way to get a volume tetrahedron mesh for this geometry?
I attached both the original igs, modified igs (without the containers), and the stl file.
[6750TEUcontainership-scale1_65-breakwater.igs](/uploads/30c23b323e06fb9bcdc9ba6ebd456fac/6750TEUcontainership-scale1_65-breakwater.igs)
[6570TEU_modified.igs](/uploads/0388d1f2b0ea55f17a62620359e0865a/6570TEU_modified.igs)v
[6570TEU.stl](/uploads/9f189953a96ca06967e80a6d59ec0e9a/6570TEU.stl)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1344No elements in volume2021-05-06T17:21:58ZBrianNo elements in volumeHello,
I'm trying to generate a complex mesh with two volumes. At the end of generation, I get this message: "Error : No elements in volume 778". Oddly, the output mesh does actually have elements in this volume - but I can see that m...Hello,
I'm trying to generate a complex mesh with two volumes. At the end of generation, I get this message: "Error : No elements in volume 778". Oddly, the output mesh does actually have elements in this volume - but I can see that my fields are not being applied.
I'm struggling to find a good way to debug this error. I'm running with General.Verbosity set to 9999, but there doesn't seem to be a single useful output that points me towards where the issue is with volume 778. Is there a common problem that tends to lead to this error? I have no idea where to look.
I've attached the mesh scripts as well as the output and error logs (IntPlug.out and IntPlug_Errors.out) in case they're helpful but as I said it's a very complex grid.
Thanks,
Brian
[no_elements_in_volume_778.zip](/uploads/6b7854f81d53cd28a34d1c405140cad3/no_elements_in_volume_778.zip)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1343Join meshes2021-05-05T13:00:52ZJose BastiasJoin meshesHi,
I'm sorry for the maybe too simple question. I got two 2D meshes that I'd like to join to create only one 2D mesh. But I would like to keep the nodes and elements of each mesh. Like so,
![gmsh](/uploads/ca4e981b03f02b8e38eb86be20ead...Hi,
I'm sorry for the maybe too simple question. I got two 2D meshes that I'd like to join to create only one 2D mesh. But I would like to keep the nodes and elements of each mesh. Like so,
![gmsh](/uploads/ca4e981b03f02b8e38eb86be20eade5f/gmsh.png)
Josehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1341OpenMP & TBB & MPI2021-06-01T13:31:50ZHamidOpenMP & TBB & MPIHi,
1 - Why gmsh binaries are not distributed with OpenMP ?
2 - Visual studio 2017 only supports OpenMP 2.0, which is not compatible with gmsh source. VS 2019 just starts to support "experimental" omp 4.0 using LLVM : [article](https:...Hi,
1 - Why gmsh binaries are not distributed with OpenMP ?
2 - Visual studio 2017 only supports OpenMP 2.0, which is not compatible with gmsh source. VS 2019 just starts to support "experimental" omp 4.0 using LLVM : [article](https://devblogs.microsoft.com/cppblog/improved-openmp-support-for-cpp-in-visual-studio). Which is the minimal OpenMP version to compile gmsh ? Some omp pragmas are not recognized with OpenMP 2.0.
3 - TBB is used for OCC ? It's not used in meshing algorithms ?
4 - MPI is only used for remoting with Onelab and for solvers : Lapack & MUMPS & Petsc ?
Best regards.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1332HXT crash2021-05-02T16:14:39ZChristophe GeuzaineHXT crash@Celestin: if you have a chance could you try
```
gmsh demos/boolean/baffles.geo -3 -algo hxt -clscale 0.5
```
It seems to crash reliably in `reshapeCavityIfNeeded`.@Celestin: if you have a chance could you try
```
gmsh demos/boolean/baffles.geo -3 -algo hxt -clscale 0.5
```
It seems to crash reliably in `reshapeCavityIfNeeded`.Célestin Marotmarotcelestin@gmail.comCélestin Marotmarotcelestin@gmail.comhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1323Transfinite mesh does not recognize OCC curve2021-04-20T11:30:35ZAli CankurtTransfinite mesh does not recognize OCC curveHello,
I want to mesh a part of the 2D model with transfinite mesh with the following Python code, but I get "Error : Curve 8 does not exist". When I check the model in Gmsh, I see that "Curve 8" already exists in the correct place (p...Hello,
I want to mesh a part of the 2D model with transfinite mesh with the following Python code, but I get "Error : Curve 8 does not exist". When I check the model in Gmsh, I see that "Curve 8" already exists in the correct place (please see figure below). Then, why do I see this error?
```
import gmsh
import sys
circEl=6 # num of elements in theta direction
depthEl=6 # num of elements in radial direction
gmsh.initialize(sys.argv)
gmsh.model.add("modelname")
gmOcc=gmsh.model.occ
gmMesh=gmsh.model.mesh
outerSurf=gmOcc.addRectangle(0, 0, 0, 20, 10)
center=(10,0,0)
radius=1
outerDisk=gmOcc.addCircle(center[0],center[1],center[2],radius)
o1, m1 = gmOcc.fragment([(2, outerSurf)], [(1, outerDisk)], removeTool=True)
gmOcc.remove([o1[2]])
surf1=o1[0]
surf2=o1[1]
innerRadius=0.1
innerDisk=gmOcc.addDisk(center[0],center[1],center[2],innerRadius,innerRadius)
o2, m2 = gmOcc.cut([surf2], [(2,innerDisk)])
gmMesh.setTransfiniteCurve(8, depthEl+1)
gmMesh.setTransfiniteCurve(9, depthEl+1)
gmMesh.setTransfiniteCurve(1, circEl+1)
gmMesh.setTransfiniteCurve(7, circEl+1)
gmMesh.setTransfiniteSurface(surf2)
gmOcc.synchronize()
# gmsh.model.mesh.generate(2)
if '-nopopup' not in sys.argv:
gmsh.fltk.run()
gmsh.finalize()
```
![curve_numbering](/uploads/e163963b60c2b515c17b113312b594e1/curve_numbering.png)
Kind regards,
Alihttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1320Some questions and problems with gmsh.geo2021-04-28T20:33:43ZAli ShSome questions and problems with gmsh.geoI am a new user of gmsh. I need to mesh a cylinder as [the photo](https://drive.google.com/file/d/1d20KVqlG3AgLQtyHaHF2nREi_H1O1hwi/view?usp=sharing) and by [the geo file](https://drive.google.com/file/d/1UlJuIvzSE3n_e6K1pLTB0FBCG4hJ1XsF...I am a new user of gmsh. I need to mesh a cylinder as [the photo](https://drive.google.com/file/d/1d20KVqlG3AgLQtyHaHF2nREi_H1O1hwi/view?usp=sharing) and by [the geo file](https://drive.google.com/file/d/1UlJuIvzSE3n_e6K1pLTB0FBCG4hJ1XsF/view?usp=sharing); (Python == 3.8, FiPy == 3.4.2.1, Gmsh == 4.8.3, anaconda 3 environment, windows 10 Enterprise).
P1. When I'm running the geo file from within pycharm, an error appear as (is tested by both gmsh versions 3.0.6 and 4.8.3)
> Error : Unknown number option 'General.NativeFileChooser'
which was mentioned somewhere that it is related to graphic card driver and something like that (my graphic card is GeForce GTS450). But when I export a .msh 2 format ascii from that geo file, the error disappears (which is showing the error's source is from geo file).
Q1. Is this error has any destructive effect on the results? How to solve that?
P2. In my problem, fluid will be applied on a hollow cylinder, from outer cylindrical wall, radially, to inner cylindrical wall. I have a problem in defining Physical Surfaces for each the outer cylindrical boundary and the inner one. When I created the geo file for the first time, Physical Surfaces was shown as
`Physical Surface("Inlet", 101) = {87, 25, 77, 43};
Physical Surface("Outlet", 102) = {33, 69, 51, 95};` which run without any problem, but gives no selected faces (=0) when I'm using `formula_faces = fipy.mesh.physicalFaces["Inlet"]`. I want to define these two boundaries within geo file. Now, when I'm going to define these boundaries from within gmsh, it shows other surface ids as `Physical Surface("Inlet", 33) = {6, 18, 10, 15};
Physical Surface("Outlet", 34) = {8, 12, 16, 19};`, which I couldn't understand why (perhaps a mistake from me) and gives the following error by using them:
```
Error : Unknown number option 'General.NativeFileChooser'
Traceback (most recent call last):
File "C:/Users/Ali/Desktop/meshtest.py", line 26, in <module>
solver = DD()
File "C:/Users/Ali/Desktop/meshtest.py", line 10, in __init__
self.mesh = fp.Gmsh3D('C:/Users/Ali/Desktop/test.geo')
File "C:\Users\Ali\anaconda3\envs\PFC_FiPy\lib\site-packages\fipy\meshes\gmshMesh.py", line 1993, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()
File "C:\Users\Ali\anaconda3\envs\PFC_FiPy\lib\site-packages\fipy\meshes\gmshMesh.py", line 813, in read
raise GmshException(errStr)
fipy.meshes.gmshMesh.GmshException: Gmsh hasn't produced any cells! Check your Gmsh code.
Gmsh output:
Info : Running 'gmsh C:/Users/Ali/Desktop/test.geo -3 -nopopup -format msh2 -o C:\Users\Ali\AppData\Local\Temp\tmpva735_el.msh' [Gmsh 3.0.6, 1 node, max. 1 thread]
Info : Started on Sun Apr 18 17:31:16 2021
Info : Reading 'C:/Users/Ali/Desktop/test.geo'...
Info : Done reading 'C:/Users/Ali/Desktop/test.geo'
Info : Finalized high order topology of periodic connections
Info : Meshing 1D...
Info : Meshing curve 1 (Circle)
Info : Meshing curve 2 (Circle)
Info : Meshing curve 3 (Circle)
Info : Meshing curve 4 (Circle)
Info : Meshing curve 5 (Line)
Info : Meshing curve 6 (Line)
Info : Meshing curve 7 (Line)
Info : Meshing curve 8 (Line)
Info : Meshing curve 9 (Circle)
Info : Meshing curve 10 (Circle)
Info : Meshing curve 11 (Circle)
Info : Meshing curve 12 (Circle)
Info : Meshing curve 13 (extruded)
Info : Meshing curve 14 (extruded)
Info : Meshing curve 15 (extruded)
Info : Meshing curve 16 (extruded)
Info : Meshing curve 17 (extruded)
Info : Meshing curve 18 (extruded)
Info : Meshing curve 19 (extruded)
Info : Meshing curve 20 (extruded)
Info : Meshing curve 21 (extruded)
Info : Meshing curve 22 (extruded)
Info : Meshing curve 23 (extruded)
Info : Meshing curve 24 (extruded)
Info : Meshing curve 25 (extruded)
Info : Meshing curve 26 (extruded)
Info : Meshing curve 27 (extruded)
Info : Meshing curve 28 (extruded)
Info : Meshing curve 29 (extruded)
Info : Meshing curve 30 (extruded)
Info : Meshing curve 31 (extruded)
Info : Meshing curve 32 (extruded)
Info : Done meshing 1D (0 s)
Info : Meshing 2D...
Info : Meshing surface 1 (transfinite)
Info : Meshing surface 2 (transfinite)
Info : Meshing surface 3 (transfinite)
Info : Meshing surface 4 (transfinite)
Info : Meshing surface 5 (extruded)
Info : Meshing surface 6 (extruded)
Info : Meshing surface 7 (extruded)
Info : Meshing surface 8 (extruded)
Info : Meshing surface 9 (extruded)
Info : Meshing surface 10 (extruded)
Info : Meshing surface 11 (extruded)
Info : Meshing surface 12 (extruded)
Info : Meshing surface 13 (extruded)
Info : Meshing surface 14 (extruded)
Info : Meshing surface 15 (extruded)
Info : Meshing surface 16 (extruded)
Info : Meshing surface 17 (extruded)
Info : Meshing surface 18 (extruded)
Info : Meshing surface 19 (extruded)
Info : Meshing surface 20 (extruded)
Info : Done meshing 2D (0 s)
Info : Meshing 3D...
Info : Meshing volume 1 (extruded)
Info : Meshing volume 2 (extruded)
Info : Meshing volume 3 (extruded)
Info : Meshing volume 4 (extruded)
Info : Done meshing 3D (0 s)
Info : Optimizing 3D mesh...
Info : Done optimizing 3D mesh (0 s)
Info : 121 vertices 289 elements
Info : Writing 'C:\Users\Ali\AppData\Local\Temp\tmpva735_el.msh'...
Info : Done writing 'C:\Users\Ali\AppData\Local\Temp\tmpva735_el.msh'
Info : Stopped on Sun Apr 18 17:31:16 2021
```
Q2. Is there any code to write in geo file to find these boundaries, automatically, not manually by selecting surfaces in gmsh, as I do (when cylinder axis is along z)?
Q3. I have looped lines as [the picture](https://drive.google.com/file/d/14znKdDwwPt57xpxX5bzNqc-IP3-RbM1-/view?usp=sharing), Are the line signs selected correctly to achieve the explained goal?
Q4. Does the created mesh need any code in geo file to improve its quality? Which codes can do this? How to check quality of such mesh models from within gmsh?https://gitlab.onelab.info/gmsh/gmsh/-/issues/1317On the grid file format and element order related problems2021-04-17T02:25:36ZHuang FHOn the grid file format and element order related problems I am trying to do tetrahedral meshwork on the STL format model, so I used the code of tutorial t13.cpp and output an INP format mesh file.Now I'm going to use a second order tetrahedron element, so I added this line of code
`gmsh::mo... I am trying to do tetrahedral meshwork on the STL format model, so I used the code of tutorial t13.cpp and output an INP format mesh file.Now I'm going to use a second order tetrahedron element, so I added this line of code
`gmsh::model::mesh::setOrder(1);`
However, when I look up the resulting INP file, I find that it has exactly the same contents as the resulting INP file for the first-order tetrahedral element, and that the element type is C3D4, not C3D10, as I expected.I don't know what the problem is, but I hope I can find the answer herehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1309Fragments with shared surfaces - issue?2021-04-07T12:10:36ZClemens BarthFragments with shared surfaces - issue?Dear all.
In the example below, I have two cylinders, which somewhat overlap (see image_1). I would like that both volumes share the surfaces at the places where they intersect. This works fine, if they have exactly the same surfaces, l...Dear all.
In the example below, I have two cylinders, which somewhat overlap (see image_1). I would like that both volumes share the surfaces at the places where they intersect. This works fine, if they have exactly the same surfaces, like the bottom disk, which has the label No. 6.
However, the thinner ring (label No. 10) in image_2 is only part of cylinder 1 and not cylinder 2, although it is logically a part also of the ring of cylinder 2 (label No. 4). Obviously, the ring of cylinder 2 needs to be subdivided. It needs to have some additional vertices, which introduces the same thin ring surface as the one of cylinder 1.
Overall, is `gmsh.model.occ.fragment` meant like this or is there a bug? If it is not a bug, how can I also share the inner ring, so subdividing the larger ring of cylinder 2?
Thanks for some help.
[Image_1](/uploads/de574b94e22f9f8df9a3b693d932e79f/Image_1.png)![Image_1](/uploads/9b70332ff6064f795926b9ba93c2e1ac/Image_1.png)
![Image_2](/uploads/3b43b7363a0a2b3b18436334e13602ac/Image_2.png)
Here! the example code:
```
import numpy as np
import scipy.constants as const
import gmsh
gmsh.initialize()
cyl1_x = 0.0
cyl1_y = 0.0
cyl1_z = 0.0
cyl1_vx = 0.0
cyl1_vy = 0.0
cyl1_vz = 50.0
cyl1_size = 100.0
cyl2_x = 0.0
cyl2_y = 0.0
cyl2_z = 40.0
cyl2_vx = 0.0
cyl2_vy = 0.0
cyl2_vz = 50.0
cyl2_size = 50.0
ID_cyl1 = gmsh.model.occ.addCylinder(cyl1_x,
cyl1_y,
cyl1_z,
cyl1_vx,
cyl1_vy,
cyl1_vz,
cyl1_size,
angle=2.0*const.pi)
ID_cyl2 = gmsh.model.occ.addCylinder(cyl2_x,
cyl2_y,
cyl2_z,
cyl2_vx,
cyl2_vy,
cyl2_vz,
cyl2_size,
angle=2.0*const.pi)
ID_result = 1000
ID_result_b = gmsh.model.occ.fragment([(3, ID_cyl1)],
[(3, ID_cyl2)],
removeObject=False,
removeTool=False,
tag=ID_result)
print(ID_result)
print(ID_result_b)
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(3)
gmsh.write("aha_01.msh")
```https://gitlab.onelab.info/gmsh/gmsh/-/issues/1260Twist function (Python API) Error2021-03-19T07:33:22ZMario GobrialTwist function (Python API) ErrorHi all,
I started using Gmsh (Python API) a while ago and are now familiar with the main functionality. Unfortunately, there comes up an error when using the TWIST function for certain geometries. I created a mini-example (see attached ...Hi all,
I started using Gmsh (Python API) a while ago and are now familiar with the main functionality. Unfortunately, there comes up an error when using the TWIST function for certain geometries. I created a mini-example (see attached file) where I want to twist the air mesh around the object. The error I get is the following:
Error : PLC Error: A segment and a facet intersect at point
Considering the xy-plane, there are no intersection between the air and the object. Also the surface of the circle around the air has been considered with no intersection. Thanks in advance for advice.
[miniExampleCircleRotation.py](/uploads/3a38e1375225f799b55ed131016ea0df/miniExampleCircleRotation.py)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1257Suggestion needed for structured grid around airfoil O-grid2021-06-26T04:00:18ZSandeep Suggestion needed for structured grid around airfoil O-gridHello Community,
I have been trying to create multi-block structured grid around airfoil.
> With suggestions, I could create a decent pure O-grid around airfoil, using boundary layers. ( GEO File attached)
> Now, the ultimate aim is to ...Hello Community,
I have been trying to create multi-block structured grid around airfoil.
> With suggestions, I could create a decent pure O-grid around airfoil, using boundary layers. ( GEO File attached)
> Now, the ultimate aim is to create 4 more grid-blocks around that O-grid, using TFI ( image attached).
Currently I have un-structured grid around O-grid.
For doing so I can think of 2 ways -
1) I will need to define start of block 1,2,3,4 from the boundary layer end ( O-grid edge) towards domain boundary.
OR
2)Define the points/curve of the O-grid block and then make boundary layer from airfoil to the block boundary curve.
Although option-1 would be best but I am not sure which of these options is possible ( if any?)
Any suggestions/ Tips would be helpful
( GMSH 4.8, Win10)
Thank you
[airfoilmesh4c-1B.geo](/uploads/9f8696320ff5aa0733d440c5fe0e4594/airfoilmesh4c-1B.geo)
![Ogrid-4c-1B](/uploads/9be5cfa960380593970e4435e8b53905/Ogrid-4c-1B.PNG)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1250data races with -fsanitize=thread2021-04-03T10:00:15ZCélestin Marotmarotcelestin@gmail.comdata races with -fsanitize=threadThere are a lot of data races in Gmsh that one can easily detect by compiling it with Clang and running it with an OpenMP library compiled with `-DLIBOMP_TSAN_SUPPORT=1`. See [here](https://stackoverflow.com/a/55147406/1289198) for detai...There are a lot of data races in Gmsh that one can easily detect by compiling it with Clang and running it with an OpenMP library compiled with `-DLIBOMP_TSAN_SUPPORT=1`. See [here](https://stackoverflow.com/a/55147406/1289198) for details.
Example of data races:
* global variables like `_progressMeterCurrent` that are read and overwritten by different threads in GmshMessage.cpp
* in Generator.cpp, the code uses a critical section to increment `nPending`, but the value is read from un-atomically. The typical way to solve this:
```
int localNPending;
#pragma omp atomic capture // or `#pragma omp critical` depending on what is available in MSVC
localNPending = ++nPending;
```
and use `localNPending` from that point on.
* in MeshGRegionHxt.cpp, from line 269 to line 278, a missing point can be create simultaneously by multiple threads.
Many are not critical issues, like the second one which will only show slightly incorrect progress information once in a while.
However, some are serious bugs, like the third one. I would advise to try to fix all possible data races, even if they are unimportant and fixing them could result in slight performance drops. By having a data race free program, it is far simpler to detect new data races that are introduced during development.
I will take care of fixing MeshGRegionHxt.cpp :angel:
PS: I'm also making some changes in Hxt, which is why I was using the ThreadSanitizer in the first place :wink:Célestin Marotmarotcelestin@gmail.comCélestin Marotmarotcelestin@gmail.comhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1226Suggestion on best practice needed - use airfoil shape parameters / coordinat...2021-03-11T23:15:33ZSandeep Suggestion on best practice needed - use airfoil shape parameters / coordinates from external fileHi all,
I have read about this issue a lot, but could not find a clear solution on any forum.
I am hoping someone could help/ direct me to a solution.
For simple example case "naca12BL" ( gmsh 2D benchmark) - I would like to define t...Hi all,
I have read about this issue a lot, but could not find a clear solution on any forum.
I am hoping someone could help/ direct me to a solution.
For simple example case "naca12BL" ( gmsh 2D benchmark) - I would like to define this shape parametrically (for optimization).
Ideally, its always better to store coordinates in separate file and read in main script ("*.GEO" script).
> Looks like file read utility is not available in gmsh. Writing (modifying) actual coordinates for each iteration in GEO script would be tedious and non-ideal approach.
Can anyone suggestion a work-around/solution please?
Thank you
[naca12BL.geo](/uploads/9d6b385175bbdceb366bcb1d44247afe/naca12BL.geo)