|
[Sponsors] |
April 15, 2022, 14:42 |
Gmsh import into OpenFOAM
|
#1 |
New Member
Saketh Bharadwaj
Join Date: Jan 2018
Posts: 12
Rep Power: 8 |
Hello,
I have a problem in importing Gmsh generated mesh into OpenFOAM. The geometry is very simple. Iron bar is protruding out of a insulation block. When I import the mesh (ASCII version 2), I am getting following error. Error message: "Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)? Perhaps you have not exported the 3D elements?" Even though there are other threads with similar problems, there seems to be some issue with creating volume. Gmsh v4.9.5 and OpenFOAM 8 in Windows10. Here are the lines from .geo file Code:
Point(1) = {0, 0, 0, 1.0}; Point(2) = {0.45, 0, 0, 1.0}; Point(3) = {0.55, 0, 0, 1.0}; Point(4) = {1, 0, 0, 1.0}; Point(5) = {0, 0.475, 0, 1.0}; Point(6) = {0.45, 0.475, 0, 1.0}; Point(7) = {0.55, 0.475, 0, 1.0}; Point(8) = {1, 0.475, 0, 1.0}; Point(9) = {0, 0.525, 0, 1.0}; Point(10) = {0.45, 0.525, 0, 1.0}; Point(11) = {0.55, 0.525, 0, 1.0}; Point(12) = {1, 0.525, 0, 1.0}; Point(13) = {0, 1, 0, 1.0}; Point(14) = {0.45, 1, 0, 1.0}; Point(15) = {0.55, 1, 0, 1.0}; Point(16) = {1, 1, 0, 1.0}; //+ Line(1) = {1, 2}; //+ Line(2) = {2, 6}; //+ Line(3) = {6, 5}; //+ Line(4) = {5, 1}; //+ Line(5) = {6, 10}; //+ Line(6) = {10, 9}; //+ Line(7) = {9, 5}; //+ Line(8) = {10, 14}; //+ Line(9) = {14, 13}; //+ Line(10) = {13, 9}; //+ Line(11) = {2, 3}; //+ Line(12) = {3, 7}; //+ Line(13) = {7, 6}; //+ Line(14) = {7, 11}; //+ Line(15) = {11, 10}; //+ Line(16) = {11, 15}; //+ Line(17) = {15, 14}; //+ Line(18) = {3, 4}; //+ Line(19) = {4, 8}; //+ Line(20) = {8, 7}; //+ Line(21) = {8, 12}; //+ Line(22) = {12, 11}; //+ Line(23) = {12, 16}; //+ Line(24) = {16, 15}; //+ Curve Loop(1) = {1, 2, 3, 4}; //+ Plane Surface(1) = {1}; //+ Curve Loop(2) = {11, 12, 13, -2}; //+ Plane Surface(2) = {2}; //+ Curve Loop(3) = {18, 19, 20, -12}; //+ Plane Surface(3) = {3}; //+ Curve Loop(4) = {3, -7, -6, -5}; //+ Plane Surface(4) = {4}; //+ Curve Loop(5) = {13, 5, -15, -14}; //+ Plane Surface(5) = {5}; //+ Curve Loop(6) = {20, 14, -22, -21}; //+ Plane Surface(6) = {6}; //+ Curve Loop(7) = {22, 16, -24, -23}; //+ Plane Surface(7) = {7}; //+ Curve Loop(8) = {15, 8, -17, -16}; //+ Plane Surface(8) = {8}; //+ Curve Loop(9) = {6, -10, -9, -8}; //+ Plane Surface(9) = {9}; //+ Transfinite Surface {1} = {5, 6, 2, 1}; //+ Transfinite Curve {4, 2} = 50 Using Progression 1; //+ Transfinite Curve {3, 1} = 50 Using Progression 1; //+ Recombine Surface {1}; //+ Transfinite Surface {3} = {7, 8, 4, 3}; //+ Transfinite Curve {20, 18} = 50 Using Progression 1; //+ Transfinite Curve {12, 19} = 50 Using Progression 1; //+ Recombine Surface {3}; //+ Transfinite Surface {7} = {15, 16, 12, 11}; //+ Transfinite Curve {24, 22} = 50 Using Progression 1; //+ Transfinite Curve {23, 16} = 50 Using Progression 1; //+ Recombine Surface {7}; //+ Transfinite Surface {9} = {13, 14, 10, 9}; //+ Transfinite Curve {9, 6} = 50 Using Progression 1; //+ Transfinite Curve {10, 8} = 50 Using Progression 1; //+ Recombine Surface {9}; //+ Transfinite Surface {2} = {6, 7, 3, 2}; //+ Transfinite Curve {2, 12} = 50 Using Progression 1; //+ Transfinite Curve {11, 13} = 30 Using Progression 1; //+ Recombine Surface {2}; //+ Transfinite Surface {8} = {14, 15, 11, 10}; //+ Transfinite Curve {15, 17} = 30 Using Progression 1; //+ Transfinite Curve {8, 16} = 50 Using Progression 1; //+ Recombine Surface {8}; //+ Transfinite Surface {6} = {11, 12, 8, 7}; //+ Transfinite Curve {22, 20} = 50 Using Progression 1; //+ Transfinite Curve {14, 21} = 25 Using Progression 1; //+ Recombine Surface {6}; //+ Transfinite Surface {4} = {9, 10, 6, 5}; //+ Transfinite Curve {5, 7} = 25 Using Progression 1; //+ Transfinite Curve {6, 3} = 50 Using Progression 1; //+ Recombine Surface {4}; //+ Transfinite Surface {5} = {10, 6, 7, 11}; //+ Transfinite Curve {5, 14} = 25 Using Progression 1; //+ Transfinite Curve {15, 13} = 30 Using Progression 1; //+ Recombine Surface {5}; //+ Extrude {0, 0, 0.2} { Surface{1,2,3,4,6,7,8,9}; Layers {3}; Recombine; } //+ Extrude {0, 0, 0.2} { Surface{5}; Layers {3}; Recombine; }//+ Extrude {0, 0, 0.4} { Surface{222}; Layers {6}; Recombine; } Physical Surface("outside", 245) = {3, 6, 7, 9, 1, 4, 8, 2, 5}; //+ Physical Surface("inside", 246) = {235, 243, 239, 231, 156, 90, 134, 178, 68, 112, 46, 200}; //+ Physical Surface("adiabatic", 247) = {155, 81, 133, 151, 173, 195, 191, 103, 45, 244, 33, 55, 77}; //+ Physical Volume("insulation", 248) = {3, 2, 1, 5, 6, 7, 8, 4}; //+ Physical Volume("iron", 249) = {9, 11}; Can someone help me fixing this issue. Thanks in advance. |
|
April 15, 2022, 14:45 |
Adding volume is also not helping
|
#2 |
New Member
Saketh Bharadwaj
Join Date: Jan 2018
Posts: 12
Rep Power: 8 |
I already tried adding volumes for each individual part. It just made things worse. After adding volume, when I reload script and go for mesh, 3d mesh just does not work. It throws an output with huge bunch of lines.
|
|
September 18, 2023, 04:45 |
|
#3 | |
New Member
alcale
Join Date: May 2023
Posts: 4
Rep Power: 3 |
Quote:
Hi Saketh, I have the same problem, have you find how to solve it? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Trying to convert an already generated gmsh to OpenFOAM | syavash | OpenFOAM Meshing & Mesh Conversion | 3 | March 11, 2020 11:15 |
OpenFOAM course for beginners | Jibran | OpenFOAM Announcements from Other Sources | 2 | November 4, 2019 09:51 |
[Gmsh] Cylinder from Gmsh to OpenFoam | satkinson | OpenFOAM Meshing & Mesh Conversion | 0 | September 21, 2015 08:49 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
[Gmsh] Error converting Gmsh mesh to OpenFOAM format | Martin_ | OpenFOAM Meshing & Mesh Conversion | 3 | December 9, 2009 10:35 |