Some questions and problems with gmsh.geo
I am a new user of gmsh. I need to mesh a cylinder as the photo and by the geo file; (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, 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?