CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] 3D coil mesh: can't create the volume?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2016, 09:37
Question 3D coil mesh: can't create the volume?
  #1
New Member
 
Join Date: Mar 2016
Posts: 14
Rep Power: 7
RomainBou is on a distinguished road
Hello,

I want to make a 3D structured mesh from this coil shape :

(It is a square extruded along a coil path)
I made it using FreeCAD, exported it in .iges file format. (also tried .step)

My issue is that I can't manage to make the 3D mesh with Gmesh. It looks like the Volume is not took into account.

Here is my .geo file, made automatically from the .iges import, and at the end, written by end :
I shortened the code defining the coil because the text was too long for the cfd-online forum engine. It builds the 2 square ends and 4 splines to make the coil.
EDIT : see the first reply under the post to read the complete definition: the issue may be there because gmsh defines the 2 squares using splines too instead of straight lines.
Code:
cl__1 = 1;
Point(1) = {35, -3.552713678801e-15, -3.552713678801e-15, cl__1};
Point(2) = {35, -2.841806515585e-13, 16, cl__1};
Point(3) = {25, 7.105490038038999e-15, 0, cl__1};
Point(4) = {25.00000...

p12 = newp;
Point(p12 + 1) = {34.99995040328159, 9.665512834544799e-12, 25.4999999998708};
Point(p12 + 2) = {34.9999530136352, 9.1418428382896e-12, 24.9999999998776};
Point(p12 + 3) = {34.9999556239888, 8.6181728420344e-12, 24.4999999998844};
Point(p12 + 4) = {34.9999582343424, 8.094502845779199e-12, 23.9999999998912};
Point(p12 + 5) = {34.999960844696, 7.570832849524e-12, 23.499999999898};
Point(p12 + 6) = {34.9999634550496, 7.0471628532688e-12, 22.9999999999048};
Point(p12 + 7) = {34.9999660654032, 6.5234928570136e-12, 22.4999999999116};
Point(p12 + 8) = {34.9999686757568, 5.9998228607584e-12, 21.9999999999184};
Point(p12 + 9) = {34.9999712861104, 5.4761528645032e-12, 21.4999999999252};
Point(p12 + 10) = {34.999973896464, 4.952482868248e-12, 20.999999999932};
Point(p12 + 11) = {34.9999765068176, 4.428812871992799e-12, 20.4999999999388};
Point(p12 + 12) = {34.9999791171712, 3.9051428757376e-12, 19.9999999999456};
Point(p12 + 13) = {34.9999817275248, 3.3814728794824e-12, 19.4999999999524};
Point(p12 + 14) = {34.9999843378784, 2.857802883227201e-12, 18.9999999999592};
Point(p12 + 15) = {34.999986948232, 2.334132886972e-12, 18.499999999966};
Point(p12 + 16) = {34.9999895585856, 1.8104628907168e-12, 17.9999999999728};
Point(p12 + 17) = {34.9999921689392, 1.286792894461601e-12, 17.4999999999796};
Point(p12 + 18) = {34.9999947792928, 7.631228982063999e-13, 16.9999999999864};
Point(p12 + 19) = {34.9999973896464, 2.394529019512009e-13, 16.4999999999932};
Spline(12) = {8, p12 + 1, p12 + 2, p12 + 3, p12 + 4, p12 + 5, p12 + 6, p12 + 7, p12 + 8, p12 + 9, p12 + 10, p12 + 11, p12 + 12, p12 + 13, p12 + 14, p12 + 15, p12 + 16, p12 + 17, p12 + 18, p12 + 19, 2};

Line Loop(1) = {1, 4, -3, -2};
    Ruled Surface(1) = {1};
Line Loop(2) = {3, 7, -6, -5};
    Ruled Surface(2) = {2};
Line Loop(3) = {6, 10, -9, -8};
    Ruled Surface(3) = {3};
Line Loop(4) = {9, 12, -1, -11};
    Ruled Surface(4) = {4};
Line Loop(5) = {2, 5, 8, 11};
    Plane Surface(5) = {5};
Line Loop(6) = {4, 7, 10, 12};
    Plane Surface(6) = {6};
    
Surface Loop(1) = {1, 2, 3, 4, 5, 6};

Physical Surface("anode") = {4};
Physical Surface("outlet") = {6};
Physical Surface("cathode") = {2};
Physical Surface("inlet") = {5};
Physical Surface("walls") = {1, 3};

Transfinite Line {5, 11, 2, 8, 10, 12, 7, 4} = 30 Using Bump 0.1;
Transfinite Line {1, 3, 6, 9} = 100;
Transfinite Surface "*";

Recombine Surface "*";

Volume(1) = {1};
Transfinite Volume "*";
And here is the Terminal screen after typing gmsh -3 serpentin1Transfinite.geo :
Code:
Info    : Running 'gmsh -3 serpentin1Transfinite.geo' [Gmsh 2.8.3, 1 node, max. 4 threads]
Info    : Started on Tue Jun 21 14:14:50 2016
Info    : Reading 'serpentin1Transfinite.geo'...
Info    : Done reading 'serpentin1Transfinite.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Nurb)
Info    : Meshing curve 2 (Nurb)
Info    : Meshing curve 3 (Nurb)
Info    : Meshing curve 4 (Nurb)
Info    : Meshing curve 5 (Nurb)
Info    : Meshing curve 6 (Nurb)
Info    : Meshing curve 7 (Nurb)
Info    : Meshing curve 8 (Nurb)
Info    : Meshing curve 9 (Nurb)
Info    : Meshing curve 10 (Nurb)
Info    : Meshing curve 11 (Nurb)
Info    : Meshing curve 12 (Nurb)
Info    : Done meshing 1D (0.093044 s)
Info    : Meshing 2D...
Info    : Meshing surface 3 (transfinite)
Info    : Meshing surface 2 (transfinite)
Info    : Meshing surface 4 (transfinite)
Info    : Meshing surface 1 (transfinite)
Info    : Meshing surface 5 (transfinite)
Info    : Meshing surface 6 (transfinite)
Info    : Done meshing 2D (0.0170281 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (transfinite)
Info    : Done meshing 3D (0.042758 s)
Info    : Optimizing 3D mesh...
Info    : Done optimizing 3D mesh (3e-06 s)
Info    : Optimizing 3D mesh with Netgen...
Info    : Done optimizing 3D mesh with Netgen (2e-06 s)
Info    : 90228 vertices 97289 elements
Info    : Writing 'serpentin1Transfinite.msh'...
Info    : Done writing 'serpentin1Transfinite.msh'
Then the gmsh -check serpentin1Transfinite.msh command:
Code:
Info    : Running 'gmsh -check serpentin1Transfinite.msh' [Gmsh 2.8.3, 1 node, max. 4 threads]
Info    : Started on Tue Jun 21 14:15:01 2016
Info    : Reading 'serpentin1Transfinite.msh'...
Info    : 13168 vertices
Info    : Vertex numbering is dense
Info    : 13166 elements
Info    : Done reading 'serpentin1Transfinite.msh'
Info    : Checking mesh coherence (13166 elements)...
Info    : Checking for duplicate vertices...
Info    : Checking for duplicate elements...
Info    : Done checking mesh coherence
And finally, the gmshToFoam mesh/serpentin1Transfinite.msh command to import in in OpenFoam:
Code:
Starting to read mesh format at line 2
Read format version 2.2  ascii 0

Starting to read physical names at line 5
Physical names:5
    Surface 1    anode
    Surface 2    outlet
    Surface 3    cathode
    Surface 4    inlet
    Surface 5    walls

Starting to read points at line 13
Vertices to be read:13168
Vertices read:13168

Starting to read cells at line 13184
Cells to be read:13166

Mapping region 5 to Foam patch 0
Mapping region 3 to Foam patch 1
Mapping region 1 to Foam patch 2
Mapping region 4 to Foam patch 3
Mapping region 2 to Foam patch 4
Cells:
    total:0
    hex  :0
    prism:0
    pyr  :0
    tet  :0



--> FOAM FATAL IO ERROR: 
No cells read from file "mesh/serpentin1Transfinite.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?

file: mesh/serpentin1Transfinite.msh at line 26352.

    From function readCells(..)
    in file gmshToFoam.C at line 726.

FOAM exiting
It seems that I did not correctly define the volume in the .geo file.
Any idea please ???

Is there an error using the lines
Surface Loop(1) = {1, 2, 3, 4, 5, 6};
Volume(1) = {1};

?
Thank you very much for your reply
RomainBou is offline   Reply With Quote

Old   June 21, 2016, 09:47
Post
  #2
New Member
 
Join Date: Mar 2016
Posts: 14
Rep Power: 7
RomainBou is on a distinguished road
here is the complete .geo file :
Code:
cl__1 = 1;
Point(1) = {35, -3.552713678801e-15, -3.552713678801e-15, cl__1};
Point(2) = {35, -2.841806515585e-13, 16, cl__1};
Point(3) = {25, 7.105490038038999e-15, 0, cl__1};
Point(4) = {25.000000000137, 3.798405561654e-06, 15.999947792928, cl__1};
Point(5) = {25, 8.881784197001e-16, 10, cl__1};
Point(6) = {24.999947793065, 3.798416055467e-06, 25.999947792792, cl__1};
Point(7) = {35, 3.552713678801e-15, 10, cl__1};
Point(8) = {34.999947792928, 1.018914638805e-11, 25.999999999864, cl__1};
p1 = newp;
Point(p1 + 1) = {33.28697578667563, 10.81557595430603, 0.7999999999999649};
Point(p1 + 2) = {28.31559506160125, 20.57248086873501, 1.600000000000005};
Point(p1 + 3) = {20.57248485494981, 28.31560779522319, 2.400000000000103};
Point(p1 + 4) = {10.81559385895301, 33.28697488757213, 3.200000000000139};
Point(p1 + 5) = {-3.934240595526717e-07, 34.99998761012458, 4.000000000000092};
Point(p1 + 6) = {-10.81559370025635, 33.286983947342, 4.8};
Point(p1 + 7) = {-20.5724838605131, 28.31560799352859, 5.599999999999903};
Point(p1 + 8) = {-28.31559583718905, 20.57247413673261, 6.399999999999838};
Point(p1 + 9) = {-33.28697791557772, 10.81557986333438, 7.19999999999981};
Point(p1 + 10) = {-34.99999952433, -7.283063041541027e-14, 7.99999999999975};
Point(p1 + 11) = {-33.2869779155778, -10.81557986333407, 8.799999999999667};
Point(p1 + 12) = {-28.31559583718945, -20.5724741367307, 9.599999999999756};
Point(p1 + 13) = {-20.57248386051387, -28.31560799352474, 10.39999999999986};
Point(p1 + 14) = {-10.81559370025707, -33.28698394733719, 11.19999999999993};
Point(p1 + 15) = {-3.934244503511763e-07, -34.99998761011999, 12};
Point(p1 + 16) = {10.8155938589526, -33.28697488756801, 12.80000000000009};
Point(p1 + 17) = {20.57248485494896, -28.31560779521928, 13.60000000000011};
Point(p1 + 18) = {28.31559506160023, -20.5724808687317, 14.40000000000003};
Point(p1 + 19) = {33.28697578667518, -10.81557595430443, 15.19999999999995};
Spline(1) = {1, p1 + 1, p1 + 2, p1 + 3, p1 + 4, p1 + 5, p1 + 6, p1 + 7, p1 + 8, p1 + 9, p1 + 10, p1 + 11, p1 + 12, p1 + 13, p1 + 14, p1 + 15, p1 + 16, p1 + 17, p1 + 18, p1 + 19, 2};
p2 = newp;
Point(p2 + 1) = {34.5, 3.5527136788005e-16, -2.2204460492505e-17};
Point(p2 + 2) = {34, 7.105427357601e-16, -4.440892098501e-17};
Point(p2 + 3) = {33.5, 1.06581410364015e-15, -6.6613381477515e-17};
Point(p2 + 4) = {33, 1.4210854715202e-15, -8.881784197002e-17};
Point(p2 + 5) = {32.5, 1.77635683940025e-15, -1.11022302462525e-16};
Point(p2 + 6) = {32, 2.1316282072803e-15, -1.3322676295503e-16};
Point(p2 + 7) = {31.5, 2.48689957516035e-15, -1.55431223447535e-16};
Point(p2 + 8) = {31, 2.8421709430404e-15, -1.7763568394004e-16};
Point(p2 + 9) = {30.5, 3.19744231092045e-15, -1.99840144432545e-16};
Point(p2 + 10) = {30, 3.5527136788005e-15, -2.2204460492505e-16};
Point(p2 + 11) = {29.5, 3.907985046680551e-15, -2.44249065417555e-16};
Point(p2 + 12) = {29, 4.2632564145606e-15, -2.6645352591006e-16};
Point(p2 + 13) = {28.5, 4.618527782440651e-15, -2.88657986402565e-16};
Point(p2 + 14) = {28, 4.9737991503207e-15, -3.1086244689507e-16};
Point(p2 + 15) = {27.5, 5.32907051820075e-15, -3.33066907387575e-16};
Point(p2 + 16) = {27, 5.6843418860808e-15, -3.5527136788008e-16};
Point(p2 + 17) = {26.5, 6.03961325396085e-15, -3.77475828372585e-16};
Point(p2 + 18) = {26, 6.3948846218409e-15, -3.9968028886509e-16};
Point(p2 + 19) = {25.5, 6.75015598972095e-15, -4.21884749357595e-16};
Spline(2) = {1, p2 + 1, p2 + 2, p2 + 3, p2 + 4, p2 + 5, p2 + 6, p2 + 7, p2 + 8, p2 + 9, p2 + 10, p2 + 11, p2 + 12, p2 + 13, p2 + 14, p2 + 15, p2 + 16, p2 + 17, p2 + 18, p2 + 19, 3};
p3 = newp;
Point(p3 + 1) = {23.77641052640401, 7.725406834925433, 0.799967528881368};
Point(p3 + 2) = {20.22542459964436, 14.69463299397066, 1.599976999479448};
Point(p3 + 3) = {14.6946330566992, 20.22543763519334, 2.399974747972084};
Point(p3 + 4) = {7.725423698554923, 23.77640723674901, 3.199972942024594};
Point(p3 + 5) = {-4.777837354197345e-06, 24.99998746685228, 3.999973862993754};
Point(p3 + 6) = {-7.725429725077163, 23.77641908865229, 4.799973770831803};
Point(p3 + 7) = {-14.69463293255824, 20.22543734322262, 5.599973156628059};
Point(p3 + 8) = {-20.22542311606549, 14.69462207042045, 6.399974258167043};
Point(p3 + 9) = {-23.7764114478925, 7.725409692672865, 7.199975287514579};
Point(p3 + 10) = {-24.9999995243625, -1.899201690136465e-06, 7.99997389646725};
Point(p3 + 11) = {-23.7764102741238, -7.725413305162711, 8.799972505419536};
Point(p3 + 12) = {-20.22542088342103, -14.6946251433837, 9.599973534766855};
Point(p3 + 13) = {-14.69462985958553, -20.22543957586559, 10.39997463630607};
Point(p3 + 14) = {-7.725426112577281, -23.77642026241737, 11.1999740221024};
Point(p3 + 15) = {-9.794303075238986e-07, -24.99998746683572, 11.99997392994034};
Point(p3 + 16) = {7.725427311049618, -23.77640606296714, 12.79997485090963};
Point(p3 + 17) = {14.69463612967655, -20.22543540255435, 13.59997304496233};
Point(p3 + 18) = {20.22542683230346, -14.69462992099718, 14.39997079345485};
Point(p3 + 19) = {23.77641170014313, -7.725403222406675, 15.19998026405267};
Spline(3) = {3, p3 + 1, p3 + 2, p3 + 3, p3 + 4, p3 + 5, p3 + 6, p3 + 7, p3 + 8, p3 + 9, p3 + 10, p3 + 11, p3 + 12, p3 + 13, p3 + 14, p3 + 15, p3 + 16, p3 + 17, p3 + 18, p3 + 19, 4};
p4 = newp;
Point(p4 + 1) = {34.50000000000685, 1.899200031019044e-07, 15.9999973896464};
Point(p4 + 2) = {34.0000000000137, 3.798402975263305e-07, 15.9999947792928};
Point(p4 + 3) = {33.50000000002055, 5.697605919507566e-07, 15.9999921689392};
Point(p4 + 4) = {33.0000000000274, 7.596808863751827e-07, 15.9999895585856};
Point(p4 + 5) = {32.50000000003425, 9.496011807996088e-07, 15.999986948232};
Point(p4 + 6) = {32.0000000000411, 1.139521475224035e-06, 15.9999843378784};
Point(p4 + 7) = {31.50000000004795, 1.329441769648461e-06, 15.9999817275248};
Point(p4 + 8) = {31.0000000000548, 1.519362064072887e-06, 15.9999791171712};
Point(p4 + 9) = {30.50000000006165, 1.709282358497313e-06, 15.9999765068176};
Point(p4 + 10) = {30.0000000000685, 1.899202652921739e-06, 15.999973896464};
Point(p4 + 11) = {29.50000000007535, 2.089122947346165e-06, 15.9999712861104};
Point(p4 + 12) = {29.0000000000822, 2.279043241770591e-06, 15.9999686757568};
Point(p4 + 13) = {28.50000000008905, 2.468963536195017e-06, 15.9999660654032};
Point(p4 + 14) = {28.0000000000959, 2.658883830619443e-06, 15.9999634550496};
Point(p4 + 15) = {27.50000000010275, 2.84880412504387e-06, 15.999960844696};
Point(p4 + 16) = {27.0000000001096, 3.038724419468296e-06, 15.9999582343424};
Point(p4 + 17) = {26.50000000011645, 3.228644713892722e-06, 15.9999556239888};
Point(p4 + 18) = {26.0000000001233, 3.418565008317148e-06, 15.9999530136352};
Point(p4 + 19) = {25.50000000013015, 3.608485302741574e-06, 15.9999504032816};
Spline(4) = {2, p4 + 1, p4 + 2, p4 + 3, p4 + 4, p4 + 5, p4 + 6, p4 + 7, p4 + 8, p4 + 9, p4 + 10, p4 + 11, p4 + 12, p4 + 13, p4 + 14, p4 + 15, p4 + 16, p4 + 17, p4 + 18, p4 + 19, 4};
p5 = newp;
Point(p5 + 1) = {25, 6.75015598972095e-15, 0.4999999999999996};
Point(p5 + 2) = {25, 6.3948846218409e-15, 0.9999999999999996};
Point(p5 + 3) = {25, 6.039613253960851e-15, 1.5};
Point(p5 + 4) = {25, 5.6843418860808e-15, 2};
Point(p5 + 5) = {25, 5.32907051820075e-15, 2.5};
Point(p5 + 6) = {25, 4.9737991503207e-15, 3};
Point(p5 + 7) = {25, 4.618527782440651e-15, 3.5};
Point(p5 + 8) = {25, 4.2632564145606e-15, 4};
Point(p5 + 9) = {25, 3.90798504668055e-15, 4.499999999999999};
Point(p5 + 10) = {25, 3.5527136788005e-15, 4.999999999999999};
Point(p5 + 11) = {25, 3.19744231092045e-15, 5.499999999999999};
Point(p5 + 12) = {25, 2.8421709430404e-15, 5.999999999999999};
Point(p5 + 13) = {25, 2.48689957516035e-15, 6.499999999999999};
Point(p5 + 14) = {25, 2.1316282072803e-15, 6.999999999999999};
Point(p5 + 15) = {25, 1.77635683940025e-15, 7.499999999999999};
Point(p5 + 16) = {25, 1.4210854715202e-15, 7.999999999999999};
Point(p5 + 17) = {25, 1.06581410364015e-15, 8.5};
Point(p5 + 18) = {25, 7.105427357601e-16, 9};
Point(p5 + 19) = {25, 3.552713678800504e-16, 9.5};
Spline(5) = {3, p5 + 1, p5 + 2, p5 + 3, p5 + 4, p5 + 5, p5 + 6, p5 + 7, p5 + 8, p5 + 9, p5 + 10, p5 + 11, p5 + 12, p5 + 13, p5 + 14, p5 + 15, p5 + 16, p5 + 17, p5 + 18, p5 + 19, 5};
p6 = newp;
Point(p6 + 1) = {23.77637942271676, 7.725395028110497, 10.79996752868822};
Point(p6 + 2) = {20.22540628442055, 14.69461847251175, 11.59997699943675};
Point(p6 + 3) = {14.6946183372976, 20.22541887775483, 12.39997474801252};
Point(p6 + 4) = {7.725414835562436, 23.77638161371448, 13.19997294196919};
Point(p6 + 5) = {-4.369282990523971e-06, 24.99995970468934, 13.99997386291042};
Point(p6 + 6) = {-7.725421141501236, 23.77639466495889, 14.79997377082443};
Point(p6 + 7) = {-14.694617879098, 20.22541687914596, 15.59997315663087};
Point(p6 + 8) = {-20.22540245114558, 14.69460548372962, 16.39997425809336};
Point(p6 + 9) = {-23.77638733224092, 7.72540083349461, 17.19997528744359};
Point(p6 + 10) = {-24.99997342083, -1.526408995644601e-06, 17.999973896433};
Point(p6 + 11) = {-23.77638473789596, -7.725406031478821, 18.79997250534116};
Point(p6 + 12) = {-20.2253993119169, -14.69461104354239, 19.59997353469108};
Point(p6 + 13) = {-14.69461422650177, -20.22541780354248, 20.39997463631247};
Point(p6 + 14) = {-7.725418563303268, -23.77639503424744, 21.1999740220954};
Point(p6 + 15) = {-1.387996832136196e-06, -24.99996302193447, 21.99997392985702};
Point(p6 + 16) = {7.725420041180197, -23.77638203411787, 22.79997485085928};
Point(p6 + 17) = {14.6946201625467, -20.22541192358474, 23.59997304499864};
Point(p6 + 18) = {20.22540291112722, -14.69461375593091, 24.39997079339639};
Point(p6 + 19) = {23.77639315196277, -7.725398896346661, 25.1999802638931};
Spline(6) = {5, p6 + 1, p6 + 2, p6 + 3, p6 + 4, p6 + 5, p6 + 6, p6 + 7, p6 + 8, p6 + 9, p6 + 10, p6 + 11, p6 + 12, p6 + 13, p6 + 14, p6 + 15, p6 + 16, p6 + 17, p6 + 18, p6 + 19, 6};
p7 = newp;
Point(p7 + 1) = {24.9999973897834, 3.79840612048075e-06, 16.4999477929212};
Point(p7 + 2) = {24.9999947794298, 3.7984066437955e-06, 16.9999477929144};
Point(p7 + 3) = {24.9999921690762, 3.79840716711025e-06, 17.4999477929076};
Point(p7 + 4) = {24.9999895587226, 3.798407690425e-06, 17.9999477929008};
Point(p7 + 5) = {24.999986948369, 3.79840821373975e-06, 18.499947792894};
Point(p7 + 6) = {24.9999843380154, 3.7984087370545e-06, 18.9999477928872};
Point(p7 + 7) = {24.9999817276618, 3.79840926036925e-06, 19.4999477928804};
Point(p7 + 8) = {24.9999791173082, 3.798409783684e-06, 19.9999477928736};
Point(p7 + 9) = {24.9999765069546, 3.79841030699875e-06, 20.4999477928668};
Point(p7 + 10) = {24.999973896601, 3.7984108303135e-06, 20.99994779286};
Point(p7 + 11) = {24.9999712862474, 3.79841135362825e-06, 21.4999477928532};
Point(p7 + 12) = {24.9999686758938, 3.798411876943e-06, 21.9999477928464};
Point(p7 + 13) = {24.9999660655402, 3.79841240025775e-06, 22.4999477928396};
Point(p7 + 14) = {24.9999634551866, 3.7984129235725e-06, 22.9999477928328};
Point(p7 + 15) = {24.999960844833, 3.79841344688725e-06, 23.499947792826};
Point(p7 + 16) = {24.9999582344794, 3.798413970202e-06, 23.9999477928192};
Point(p7 + 17) = {24.9999556241258, 3.79841449351675e-06, 24.4999477928124};
Point(p7 + 18) = {24.9999530137722, 3.7984150168315e-06, 24.9999477928056};
Point(p7 + 19) = {24.9999504034186, 3.79841554014625e-06, 25.4999477927988};
Spline(7) = {4, p7 + 1, p7 + 2, p7 + 3, p7 + 4, p7 + 5, p7 + 6, p7 + 7, p7 + 8, p7 + 9, p7 + 10, p7 + 11, p7 + 12, p7 + 13, p7 + 14, p7 + 15, p7 + 16, p7 + 17, p7 + 18, p7 + 19, 6};
p8 = newp;
Point(p8 + 1) = {25.5, 3.730349362741e-15, 10};
Point(p8 + 2) = {26, 3.907985046681e-15, 10};
Point(p8 + 3) = {26.5, 4.085620730621e-15, 10};
Point(p8 + 4) = {27, 4.263256414561e-15, 10};
Point(p8 + 5) = {27.5, 4.440892098501e-15, 10};
Point(p8 + 6) = {28, 4.618527782441e-15, 10};
Point(p8 + 7) = {28.5, 4.796163466381e-15, 10};
Point(p8 + 8) = {29, 4.973799150321001e-15, 10};
Point(p8 + 9) = {29.5, 5.151434834261e-15, 10};
Point(p8 + 10) = {30, 5.329070518201001e-15, 10};
Point(p8 + 11) = {30.5, 5.506706202141e-15, 10};
Point(p8 + 12) = {31, 5.684341886081001e-15, 10};
Point(p8 + 13) = {31.5, 5.861977570021e-15, 10};
Point(p8 + 14) = {32, 6.039613253961001e-15, 10};
Point(p8 + 15) = {32.5, 6.217248937901e-15, 10};
Point(p8 + 16) = {33, 6.394884621841e-15, 10};
Point(p8 + 17) = {33.5, 6.572520305781e-15, 10};
Point(p8 + 18) = {34, 6.750155989721e-15, 10};
Point(p8 + 19) = {34.5, 6.927791673661e-15, 10};
Spline(8) = {5, p8 + 1, p8 + 2, p8 + 3, p8 + 4, p8 + 5, p8 + 6, p8 + 7, p8 + 8, p8 + 9, p8 + 10, p8 + 11, p8 + 12, p8 + 13, p8 + 14, p8 + 15, p8 + 16, p8 + 17, p8 + 18, p8 + 19, 7};
p9 = newp;
Point(p9 + 1) = {33.28694468298838, 10.81556414749148, 10.79999999980681};
Point(p9 + 2) = {28.31557674637745, 20.57246634727634, 11.59999999995723};
Point(p9 + 3) = {20.57247013554825, 28.31558903778467, 12.40000000004029};
Point(p9 + 4) = {10.81558499596076, 33.28694926453743, 13.19999999994432};
Point(p9 + 5) = {1.513110703399434e-08, 34.99995984796148, 13.99999999991627};
Point(p9 + 6) = {-10.81558511667846, 33.28695952364863, 14.79999999999225};
Point(p9 + 7) = {-20.5724688070493, 28.31558752945221, 15.60000000000257};
Point(p9 + 8) = {-28.31557517226427, 20.57245755004223, 16.39999999992629};
Point(p9 + 9) = {-33.28695379992151, 10.81557100415658, 17.1999999999292};
Point(p9 + 10) = {-34.999973420795, 3.727928330476971e-07, 17.999999999966};
Point(p9 + 11) = {-33.28695237934944, -10.81557258965012, 18.79999999992168};
Point(p9 + 12) = {-28.31557426568681, -20.57246003688935, 19.59999999992425};
Point(p9 + 13) = {-20.57246822743285, -28.31558622120141, 20.40000000000646};
Point(p9 + 14) = {-10.81558615098579, -33.28695871916649, 21.19999999999303};
Point(p9 + 15) = {-8.019928401381549e-07, -34.99996316521701, 21.99999999991661};
Point(p9 + 16) = {10.81558658908234, -33.28695085871593, 22.7999999999495};
Point(p9 + 17) = {20.572468887819, -28.31558431624622, 23.60000000003605};
Point(p9 + 18) = {28.31557114042426, -20.57246470366217, 24.39999999994122};
Point(p9 + 19) = {33.28695723849519, -10.81557162824202, 25.1999999998402};
Spline(9) = {7, p9 + 1, p9 + 2, p9 + 3, p9 + 4, p9 + 5, p9 + 6, p9 + 7, p9 + 8, p9 + 9, p9 + 10, p9 + 11, p9 + 12, p9 + 13, p9 + 14, p9 + 15, p9 + 16, p9 + 17, p9 + 18, p9 + 19, 8};
p10 = newp;
Point(p10 + 1) = {25.49994779305815, 3.60849576939182e-06, 25.9999504031456};
Point(p10 + 2) = {25.9999477930513, 3.418575475322641e-06, 25.9999530134992};
Point(p10 + 3) = {26.49994779304445, 3.228655181253461e-06, 25.9999556238528};
Point(p10 + 4) = {26.9999477930376, 3.038734887184281e-06, 25.9999582342064};
Point(p10 + 5) = {27.49994779303075, 2.848814593115101e-06, 25.99996084456};
Point(p10 + 6) = {27.9999477930239, 2.658894299045921e-06, 25.9999634549136};
Point(p10 + 7) = {28.49994779301705, 2.468974004976741e-06, 25.9999660652672};
Point(p10 + 8) = {28.9999477930102, 2.279053710907561e-06, 25.9999686756208};
Point(p10 + 9) = {29.49994779300335, 2.089133416838381e-06, 25.9999712859744};
Point(p10 + 10) = {29.9999477929965, 1.899213122769202e-06, 25.999973896328};
Point(p10 + 11) = {30.49994779298965, 1.709292828700022e-06, 25.9999765066816};
Point(p10 + 12) = {30.9999477929828, 1.519372534630842e-06, 25.9999791170352};
Point(p10 + 13) = {31.49994779297595, 1.329452240561662e-06, 25.9999817273888};
Point(p10 + 14) = {31.9999477929691, 1.139531946492483e-06, 25.9999843377424};
Point(p10 + 15) = {32.49994779296225, 9.496116524233027e-07, 25.999986948096};
Point(p10 + 16) = {32.9999477929554, 7.596913583541228e-07, 25.9999895584496};
Point(p10 + 17) = {33.49994779294855, 5.697710642849428e-07, 25.9999921688032};
Point(p10 + 18) = {33.9999477929417, 3.798507702157629e-07, 25.9999947791568};
Point(p10 + 19) = {34.49994779293485, 1.899304761465834e-07, 25.9999973895104};
Spline(10) = {6, p10 + 1, p10 + 2, p10 + 3, p10 + 4, p10 + 5, p10 + 6, p10 + 7, p10 + 8, p10 + 9, p10 + 10, p10 + 11, p10 + 12, p10 + 13, p10 + 14, p10 + 15, p10 + 16, p10 + 17, p10 + 18, p10 + 19, 8};
p11 = newp;
Point(p11 + 1) = {35, 6.75015598972095e-15, 9.5};
Point(p11 + 2) = {35, 6.3948846218409e-15, 9};
Point(p11 + 3) = {35, 6.039613253960851e-15, 8.5};
Point(p11 + 4) = {35, 5.6843418860808e-15, 8};
Point(p11 + 5) = {35, 5.32907051820075e-15, 7.5};
Point(p11 + 6) = {35, 4.9737991503207e-15, 7};
Point(p11 + 7) = {35, 4.618527782440651e-15, 6.5};
Point(p11 + 8) = {35, 4.2632564145606e-15, 6};
Point(p11 + 9) = {35, 3.90798504668055e-15, 5.5};
Point(p11 + 10) = {35, 3.5527136788005e-15, 5};
Point(p11 + 11) = {35, 3.19744231092045e-15, 4.5};
Point(p11 + 12) = {35, 2.8421709430404e-15, 4};
Point(p11 + 13) = {35, 2.48689957516035e-15, 3.5};
Point(p11 + 14) = {35, 2.1316282072803e-15, 3};
Point(p11 + 15) = {35, 1.77635683940025e-15, 2.5};
Point(p11 + 16) = {35, 1.4210854715202e-15, 2};
Point(p11 + 17) = {35, 1.06581410364015e-15, 1.5};
Point(p11 + 18) = {35, 7.105427357601e-16, 1};
Point(p11 + 19) = {35, 3.552713678800504e-16, 0.5};
Spline(11) = {7, p11 + 1, p11 + 2, p11 + 3, p11 + 4, p11 + 5, p11 + 6, p11 + 7, p11 + 8, p11 + 9, p11 + 10, p11 + 11, p11 + 12, p11 + 13, p11 + 14, p11 + 15, p11 + 16, p11 + 17, p11 + 18, p11 + 19, 1};
p12 = newp;
Point(p12 + 1) = {34.99995040328159, 9.665512834544799e-12, 25.4999999998708};
Point(p12 + 2) = {34.9999530136352, 9.1418428382896e-12, 24.9999999998776};
Point(p12 + 3) = {34.9999556239888, 8.6181728420344e-12, 24.4999999998844};
Point(p12 + 4) = {34.9999582343424, 8.094502845779199e-12, 23.9999999998912};
Point(p12 + 5) = {34.999960844696, 7.570832849524e-12, 23.499999999898};
Point(p12 + 6) = {34.9999634550496, 7.0471628532688e-12, 22.9999999999048};
Point(p12 + 7) = {34.9999660654032, 6.5234928570136e-12, 22.4999999999116};
Point(p12 + 8) = {34.9999686757568, 5.9998228607584e-12, 21.9999999999184};
Point(p12 + 9) = {34.9999712861104, 5.4761528645032e-12, 21.4999999999252};
Point(p12 + 10) = {34.999973896464, 4.952482868248e-12, 20.999999999932};
Point(p12 + 11) = {34.9999765068176, 4.428812871992799e-12, 20.4999999999388};
Point(p12 + 12) = {34.9999791171712, 3.9051428757376e-12, 19.9999999999456};
Point(p12 + 13) = {34.9999817275248, 3.3814728794824e-12, 19.4999999999524};
Point(p12 + 14) = {34.9999843378784, 2.857802883227201e-12, 18.9999999999592};
Point(p12 + 15) = {34.999986948232, 2.334132886972e-12, 18.499999999966};
Point(p12 + 16) = {34.9999895585856, 1.8104628907168e-12, 17.9999999999728};
Point(p12 + 17) = {34.9999921689392, 1.286792894461601e-12, 17.4999999999796};
Point(p12 + 18) = {34.9999947792928, 7.631228982063999e-13, 16.9999999999864};
Point(p12 + 19) = {34.9999973896464, 2.394529019512009e-13, 16.4999999999932};
Spline(12) = {8, p12 + 1, p12 + 2, p12 + 3, p12 + 4, p12 + 5, p12 + 6, p12 + 7, p12 + 8, p12 + 9, p12 + 10, p12 + 11, p12 + 12, p12 + 13, p12 + 14, p12 + 15, p12 + 16, p12 + 17, p12 + 18, p12 + 19, 2};

Line Loop(1) = {1, 4, -3, -2};
    Ruled Surface(1) = {1};
Line Loop(2) = {3, 7, -6, -5};
    Ruled Surface(2) = {2};
Line Loop(3) = {6, 10, -9, -8};
    Ruled Surface(3) = {3};
Line Loop(4) = {9, 12, -1, -11};
    Ruled Surface(4) = {4};
Line Loop(5) = {2, 5, 8, 11};
    Plane Surface(5) = {5};
Line Loop(6) = {4, 7, 10, 12};
    Plane Surface(6) = {6};
    
Surface Loop(1) = {1, 2, 3, 4, 5, 6};

Physical Surface("anode") = {4};
Physical Surface("outlet") = {6};
Physical Surface("cathode") = {2};
Physical Surface("inlet") = {5};
Physical Surface("walls") = {1, 3};

Transfinite Line {5, 11, 2, 8, 10, 12, 7, 4} = 30 Using Bump 0.1;
Transfinite Line {1, 3, 6, 9} = 100;
Transfinite Surface "*";

Recombine Surface "*";

Volume(1) = {1};
Transfinite Volume "*";
RomainBou is offline   Reply With Quote

Old   June 21, 2016, 16:30
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 36
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

In addition to geometric volume, you have to define physical volume. For example, you can add the following line to your geo-file:

Code:
Physical Volume("mesh") = {1};
and the result of gmshToFoam becomes:

Code:
...
Cells:
    total:83259
    hex  :83259
    prism:0
    pyr  :0
    tet  :0
...
RomainBou likes this.
alexeym is offline   Reply With Quote

Old   July 18, 2016, 06:09
Default
  #4
New Member
 
Join Date: Mar 2016
Posts: 14
Rep Power: 7
RomainBou is on a distinguished road
I didn't take the time to thank you! so thanks a lot! It worked fine.
RomainBou is offline   Reply With Quote

Reply

Tags
coil, gmsh, gmshfoam, mesh 3d

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 18:16
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
[snappyHexMesh] snappyHexMesh does not create mesh in body volume Illmatic OpenFOAM Meshing & Mesh Conversion 1 July 11, 2016 22:35
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 03:53


All times are GMT -4. The time now is 20:41.