|
[Sponsors] |
April 13, 2016, 13:24 |
element connectivity in gmsh file
|
#1 |
New Member
Mayank Patni
Join Date: Apr 2016
Posts: 2
Rep Power: 0 |
Dear All,
I am new to OpenFOAM Gmsh. I am using below commands to generate a 2D mesh with 2nd order: // Gmsh project created on Wed Apr 13 13:55:50 2016 lc = 1e-5; Point(1) = {-10,0,-10,lc}; Point(2) = {10,0,-10,lc} ; Point(3) = {10,0,10,lc} ; Point(4) = {-10,0,10,lc} ; Line(1) = {1,2} ; Line(2) = {2,3} ; Line(3) = {3,4} ; Line(4) = {4,1} ; Line Loop(5) = {4,1,2,3} ; Plane Surface(6) = {5}; Transfinite Line{1,2,3,4} = 3; Transfinite Surface{6}; Recombine Surface{6}; When I save the msh file and read to check the element connectivity, it gives as below : $Elements 16 1 15 2 0 1 1 2 15 2 0 2 2 3 15 2 0 3 3 4 15 2 0 4 4 5 8 2 0 1 1 5 6 6 8 2 0 1 5 2 7 7 8 2 0 2 2 8 9 8 8 2 0 2 8 3 10 9 8 2 0 3 3 11 12 10 8 2 0 3 11 4 13 11 8 2 0 4 4 14 15 12 8 2 0 4 14 1 16 13 10 2 0 6 4 14 17 11 15 18 19 13 20 14 10 2 0 6 11 17 8 3 19 21 10 12 22 15 10 2 0 6 14 1 5 17 16 6 23 18 24 16 10 2 0 6 17 5 2 8 23 7 9 21 25 $EndElements Ideally it should be only 4 elements (4 9-noded elements). How to remove the elements from 1-12 ? Any suggestions would be helpful. Thanks ! |
|
April 15, 2016, 11:09 |
|
#2 | |
New Member
Abdulhaq
Join Date: Oct 2012
Posts: 27
Rep Power: 14 |
Quote:
|
||
April 15, 2016, 11:17 |
|
#3 |
New Member
Mayank Patni
Join Date: Apr 2016
Posts: 2
Rep Power: 0 |
Hello Abdulhaq,
Thank you so much for your reply. This is what I was looking. I have one more question. When I read the mesh file, its like ************************************************** *** $MeshFormat 2.2 0 8 $EndMeshFormat $Nodes 9 1 -10 0 -10 2 10 0 -10 3 10 0 10 4 -10 0 10 5 -1.232614010859834e-11 0 -10 6 10 0 -1.232614010859834e-11 7 1.232614010859834e-11 0 10 8 -10 0 1.232614010859834e-11 9 0 0 1.519298140712631e-23 $EndNodes $Elements 4 1 3 2 1 6 4 8 9 7 2 3 2 1 6 7 9 6 3 3 3 2 1 6 8 1 5 9 4 3 2 1 6 9 5 2 6 $EndElements ************************************************** *** How to get the coordinates as 0 instead of very small numbers for nodes 5-9 ? 5 -1.232614010859834e-11 0 -10 6 10 0 -1.232614010859834e-11 7 1.232614010859834e-11 0 10 8 -10 0 1.232614010859834e-11 9 0 0 1.519298140712631e-23 Regards Mayank |
|
April 15, 2016, 12:27 |
|
#4 | ||
New Member
Abdulhaq
Join Date: Oct 2012
Posts: 27
Rep Power: 14 |
You are welcome.
There is no apparent way to control the precision. Smoothing the mesh replaced the node which contained "e-23" with 0 but nothing else. You can smooth the mesh either from the command line: Quote:
Quote:
|
|||
Tags |
element connectivity, gmsh, mesh 2d, msh file |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM | Ancioi | OpenFOAM Meshing & Mesh Conversion | 17 | January 9, 2019 00:50 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |