|
[Sponsors] |
January 20, 2015, 02:58 |
gmshToFoam: strange error
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
Dear Foamers,
could you help me with this: I do have a question about the utility gmsh. I have done a very simple geometry: one cylinder inside the other one and I have created a mesh with gmsh. It seems to be a good mesh, but when I try to convert it using gmshTo Foam, I get this error: Code:
szampini@archimede:~/Documenti/Afros/CFDSimulations/01dielectricCylinder$ mshToFoam meshGeneration.msh /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.3.1-262087cdf8db Exec : mshToFoam meshGeneration.msh Date : Jan 20 2015 Time : 08:45:16 Host : "archimede" PID : 25055 Case : /home/szampini/Documenti/Afros/CFDSimulations/01dielectricCylinder nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL IO ERROR: wrong token type - expected int, found on line 1 the word '$MeshFormat' file: meshGeneration.msh at line 1. From function operator>>(Istream&, int&) in file primitives/ints/int/intIO.C at line 68. FOAM exiting szampini@archimede:~/Documenti/Afros/CFDSimulations/01dielectricCylinder$ Also, if I want to add patches name, could I do this with gmsh? Thanks a lot, Samuele |
|
January 20, 2015, 03:17 |
|
#2 |
Senior Member
|
Hi,
If you'd like to use gmshToFoam, use gmshToFoam, not mshToFoam as latter is Fluent mesh converter. |
|
January 20, 2015, 03:22 |
|
#3 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
Yeah,
that's what I did (I wrote it wrong in the post: I'm gonna to change it!). Anyway, I solved this cleaning up everything and doing it again. Also, as far as the patches are concerned, how can I give them a name? Thanks a lot, Samuele |
|
January 20, 2015, 03:30 |
|
#4 |
Senior Member
|
In case of physical groups you can use strings instead of numbers, here's a fragment of the GEO file (if you start with GEO)
Code:
... Physical Surface("bottom") = {14}; Physical Surface("top") = {16}; Physical Surface("sides") = {24, 18, 20, 22}; ... If you just have MSH file there's PhysicalNames section of the file, where you can set the names: Code:
$PhysicalNames 4 2 1 "bottom" 2 2 "top" 2 3 "sides" 3 4 "cuboid" $EndPhysicalNames |
|
January 20, 2015, 04:17 |
|
#5 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
Great,
thanks a lot! Samuele! PS: could you check me .geo file, letting me know if it is "nice"? Code:
Point(1) = {0,0,0}; Point(18) = {0,0.55,0}; Point(2) = {0.0125,0,0}; Point(3) = {0,0,0.0125}; Point(4) = {-0.0125,0,0}; Point(5) = {0,0,-0.0125}; Point(6) = {0.005,0,0}; Point(7) = {0,0,0.005}; Point(8) = {-0.005,0,0}; Point(9) = {0,0,-0.005}; Point(10) = {0.0125,0.55,0}; Point(11) = {0,0.55,0.0125}; Point(12) = {-0.0125,0.55,0}; Point(13) = {0,0.55,-0.0125}; Point(14) = {0.005,0.55,0}; Point(15) = {0,0.55,0.005}; Point(16) = {-0.005,0.55,0}; Point(17) = {0,0.55,-0.005}; Circle(1) = {2,1,3}; Circle(2) = {3,1,4}; Circle(3) = {4,1,5}; Circle(4) = {5,1,2}; Circle(5) = {6,1,7}; Circle(6) = {7,1,8}; Circle(7) = {8,1,9}; Circle(8) = {9,1,6}; Circle(9) = {10,18,11}; Circle(10) = {11,18,12}; Circle(11) = {12,18,13}; Circle(12) = {13,18,10}; Circle(13) = {14,18,15}; Circle(14) = {15,18,16}; Circle(15) = {16,18,17}; Circle(16) = {17,18,14}; Line Loop(1) = {1,2,3,4}; Line Loop(2) = {5,6,7,8}; Plane Surface(1) = {1,2}; Line Loop(3) = {9,10,11,12}; Line Loop(4) = {13,14,15,16}; Plane Surface(2) = {3,4}; Physical Surface("bottom") = {1}; Physical Surface("top") = {2}; Ruled Surface(3) = {1, 3}; Ruled Surface(4) = {2, 4}; Physical Surface("innerWall") = {3}; Physical Surface("outerWall") = {4}; Now, if the geometry is fine, how can I mesh it properly? |
|
January 20, 2015, 05:15 |
|
#6 |
Senior Member
|
Well, you only describe two disks in your geometry. You have to connect them, define surfaces, then, using defined surfaces, define volumes. After you can add transfinite algorithm for mesh construction.
You can find compressed geo file in attachment. Also in attachment is a screenshot of the resulting mesh. |
|
January 20, 2015, 05:23 |
|
#7 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
WoW: thanks a lot! Great mesh and very nice script. Thanks a lot!
Just 1 more questions: could you suggest me a pdf to learn GMSH? Thanks a lot. Have a good day, Samuele. |
|
January 20, 2015, 05:29 |
|
#8 |
Senior Member
|
Reference manual is quite nice (http://www.geuz.org/gmsh/doc/texinfo/gmsh.html), sections 3-5 & 6.3.2 are of particular interest, it is available in PDF format (http://www.geuz.org/gmsh/doc/texinfo/gmsh.pdf) if you insist on PDF
Last edited by alexeym; January 20, 2015 at 05:52. Reason: typo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries | NickG | OpenFOAM Installation | 3 | December 30, 2019 00:21 |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 07:43 |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 06:35 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 12:34 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 05:07 |