CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

GMSH - Very strange effect - Mesh elements deleted when saving

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Araist

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2015, 11:30
Default GMSH - Very strange effect - Mesh elements deleted when saving
  #1
New Member
 
Adrià Salvador
Join Date: Jun 2015
Posts: 4
Rep Power: 10
Araist is on a distinguished road
Dear All,

I'm sincerely desperated, I have the following geometry:
Quote:

// Gmsh project created on Tue Feb 24 11:10:01 2015
// nozzle end at x=0
//moltiplication coefficients
mm=1e-3;
mi=1e-6;

// Parameters: -------------------------------
d_nz=10*mi; //nozzle diameter 10 microns
d_c=1*mm; //inner diameter pressing collar and of first meshing zone
h_c=0.1*mm; //inner step pressing collar
H_c=4*mm; //ext heigh pressing collar
D_c=11.8*mm; //ext diameter pressing collar
D_ext=25*mm; //ext boundary
D_nz_sk=2*mm; //+9.5*mi; //11.6*mm; //nz-sk-distance &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&6
//-glass---------
d_sk=20*mi; //internal sk diameter
t_sk=1*mi; //glass thickness at the entrance
h_gl=0.2*mm; //ext part of microSK inside the cone &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
h_gl_c=1*mm; //ext conical part of microSK
h_gl_int=1*mm; //int part of microSK
h_gl_chan=0.5*mi; //channel in front of the ext skimmer
d_gl=1.5*mm; //ext dia of capillary microSK
d_gl_int=1.1*mm; //int dia of capillary
h_glue=0.3*mm; //height of the glue
//----------------
d_cone=2*mm; //ext cone dia at the microSK
d_cone_int=1.5*mm; //int cone dia
D_cone=22*mm; //ext cone dia at the base
D_cone_int=21.5*mm; //int cone dia at the base
h_cone=21*mm;
h_ext=3*mm; //internal pressing ring heigh at dia 25mm !!!!!
// radii -------------------------------------------
r_nz=d_nz/2; //nozzle radius
r_c=d_c/2; //inner collar radius
R_c=D_c/2; //ext collar radius
R_ext=D_ext/2; //boundary radius
r_sk=d_sk/2; //
r_gl_int=d_gl_int/2;
r_gl=d_gl/2;
r_cone=d_cone/2;
r_cone_int=d_cone_int/2;
R_cone=D_cone/2;
R_cone_int=D_cone_int/2;
// Initial cell radius (im microm) to ensure enough particles
//In_cell=(11^0.5)*mi;
In_cell=3.316625*mi;
//lnk_y2=In_cell*(2^0.5)*mi;
// size of mesh
dens=0.02*mm;
dens_nz=r_nz/8;
dens_nz1=r_nz/2;
dens_nz2=2*r_nz;
newdens=dens_nz1*3;
dens_sk=r_sk/8;
dens_sk1=r_sk/2;
dens_sk2=2*r_sk;
dens_tsk=t_sk/5;

dens_nzsk=0.5*(dens_nz2+dens_sk2);
//links-----------------------------------
//link x------------
lnk_x1=10*d_nz-2*h_gl_chan;
lnk_x2=3*d_nz-h_gl_chan;
lnk_x3=D_nz_sk-2*h_gl_chan-r_sk;
lnk_x4=D_nz_sk+0.02*h_gl_c+t_sk+h_gl_chan;
//link y------------
lnk_y1=3*d_nz;
//lnk_y2=r_sk-3*t_sk;
//lnk_y2=In_cell*(2^0.5);
lnk_y2=In_cell*1.414214;
// Nozzle------------------------------------------

Point(1) = {0, 0, 0, dens_nz*1.5}; //origin
Point(2) = {0, r_nz, 0, dens_nz}; //nozzle boundary
Point(3) = {0, r_c, 0, dens*4};
Point(4) = {h_c, r_c, 0, dens*4};

// New points for an appropiate radial division
Point(5) = {lnk_x2,In_cell, 0,dens_nz1};
Point(6) = {lnk_x3, In_cell, 0, dens_sk1}; //on axis nozzle boundary
Point(7) = {lnk_x4, In_cell, 0, dens_sk2};
Point(8) = {D_nz_sk+h_gl_c+h_gl+h_gl_chan, In_cell, 0, dens};
//New points for a new denser area around the source
Point(9) = {0.0005, 0, 0, newdens};
Point(10) = {0.0005, lnk_y2, 0, newdens};
Point(11) = {0.0005, In_cell, 0, newdens};
//We put a point in line 17
Point(12)= {0.0005, 10*d_nz, 0, newdens};
//one in the middle
Point(13)={0.00025, 22*d_nz, 0, newdens};
//and we plan to close it at point 55, however no surface is really required

Point(14) = {D_nz_sk+h_gl_chan, r_sk+t_sk, 0, 0.5*(dens_tsk+dens_sk)*1.25};
Point(15) = {D_nz_sk, r_sk+t_sk, 0, dens_tsk*5.25};
Point(16) = {D_nz_sk, r_sk, 0, dens_tsk*5}; //nozzle boundary
Point(17) = {D_nz_sk+h_gl_chan+t_sk, r_sk, 0, dens_sk};
Point(18) = {D_nz_sk+h_gl_c+h_gl_chan+t_sk, r_gl_int, 0, dens*4};
Point(19) = {D_nz_sk+h_gl_c+h_gl+h_gl_chan, r_gl_int, 0, dens*4};
Point(20) = {0.00025+0.5*(0.00025), (22-2)*d_nz, 0, newdens};

Point(26) = {lnk_x3, 0, 0, dens_sk1}; //on axis nozzle boundary

Point(31) = {lnk_x4, 0, 0, dens_sk2};

Point(32) = {D_nz_sk+0.02*h_gl_c+t_sk+h_gl_chan, r_sk+(r_gl_int-r_sk)*0.02*h_gl_c/h_gl_c, 0, dens_sk*1.5}; //
Point(33) = {D_nz_sk+0.02*h_gl_c+h_gl_chan, r_sk+t_sk+(r_gl-r_sk-t_sk)*0.02*h_gl_c/h_gl_c, 0, dens_nzsk}; //
Point(34) = {lnk_x3, r_sk+t_sk+(r_gl-r_sk-t_sk)*0.02*h_gl_c/h_gl_c, 0, dens_nzsk}; //
Point(35) = {D_nz_sk+0.05*h_gl_c+t_sk+h_gl_chan, r_sk+(r_gl_int-r_sk)*0.05*h_gl_c/h_gl_c, 0, dens_sk*2*1.5}; //
Point(36) = {D_nz_sk+h_gl_chan+0.1*h_gl_c,r_sk+t_sk+(r_gl-r_sk-t_sk)*0.1*h_gl_c/h_gl_c, 0, dens_sk1*1.5}; //
//Point(37) = {D_nz_sk-8*h_gl_chan-r_sk, r_sk+t_sk+(r_gl-r_sk-t_sk)*8*h_gl_chan/h_gl_c, 0, dens_nzsk}; //
Point(37) = {lnk_x3, lnk_y2, 0, dens_nzsk}; //

Point(50) = {lnk_x2,0,0,dens_nz1};
Point(51) = {lnk_x2,lnk_y2,0,dens_nz1};
Point(52) = {0, lnk_y1,0,dens_nz1};
Point(53) = {lnk_x2,lnk_y1,0,dens_nz1};
Point(54) = {0.5*(lnk_x1+lnk_x3),10*d_nz,0,dens_sk1*3};
Point(55) = {0,10*d_nz,0, newdens};
Point(56) = {D_nz_sk+h_gl_chan+0.7*h_gl_c, r_sk+t_sk+(r_gl-r_sk-t_sk)*0.7*h_gl_c/h_gl_c, 0, dens_sk2*4}; //
Point(59) = {D_nz_sk+h_gl_c+h_gl+h_gl_chan, 0, 0, dens}; //sotto punto 19
Point(60) = {D_nz_sk+h_gl_c+h_gl+h_gl_chan, lnk_y2, 0, dens}; //sotto punto 19

//Point(70) = {lnk_x1,0.5*(lnk_y1+lnk_y2),dens_sk2};
//Point(80) = {D_nz_sk-6*t_sk, r_sk-3*t_sk, 0, dens_tsk}; //nozzle boundary

Point(82) = {lnk_x4, lnk_y2, 0, dens_sk1}; //
//
Line(1) = {1, 2}; //nozzle line
Line(2) = {2, 52};
Line(3) = {52, 55};
Line(4) = {55, 3};
Line(5) = {3, 4};
//------------------

Line(6) = {52, 53};
Line(7) = {51, 10}; //{51, 70, 37};
Line(8) = {6, 11};
Line(9) = {37, 82};
Line(10) = {82, 60};
Line(11) = {60, 8};
Line(12) = {59, 31};
//Line(13) = {31, 26};
Line(13) = {26, 31};
Line(14) = {26, 9}; //{26, 53, 50};
Spline(15) = {12, 20, 13, 55};

Line(16) = {50, 1};
Line(17) = {12, 54};
Line(18) = {53, 51};
Line(19) = {34, 37};
Line(20) = {34, 33};
Line(21) = {4, 56};
Line(22) = {56, 36};
Line(23) = {36, 33};
Line(24) = {33, 14};
Line(25) = {14, 15};
Line(26) = {15, 16};
Line(27) = {16, 17};
Line(28) = {17, 32};
Line(29) = {32, 35};
Line(30) = {35, 18};
Line(31) = {18, 19};
Line(32) = {19, 60};
Line(33) = {32, 82};
Line(34) = {54, 36};
Line(35) = {9, 11};
Line(36) = {11, 10};
Line(37) = {37, 10};
Line(39) = {9, 50};
Line(40) = {10, 12};
Line(47) = {50, 5};

Line(48) = {37, 6};
Line(49) = {82, 7};

Line(150) = {6, 7};
Line(151) = {7, 8};
Line(152) = {6, 26};
Line(153) = {7, 31};
Line(154) = {8, 59};
Line(155) = {11, 5};
Line(156) = {5, 51};

Line Loop(50) = {17, 34, -22, -21, -5, -4, -15};
Plane Surface(51) = {50};
Line Loop(52) = {15, -3, 6, 18, 7, 40};
Plane Surface(53) = {52};
Line Loop(54) = {35, -39,-47,155};
Plane Surface(55) = {54};
Line Loop(56) = {-17,-34,-23, 20, -19, -37, -40};
Plane Surface(57) = {56};
Line Loop(58) = {-6, -18, 156, 47, -16, -1, -2};
Plane Surface(59) = {58};

Line Loop(60) = {37, -36, -8, -48};
Plane Surface(61) = {60};
Line Loop(62) = {8, -35, -14, -152};
Plane Surface(63) = {62};
Line Loop(64) = {-20, -24, -25, -26, -27, -28, -33, 9, 19};
Plane Surface(65) = {64};
Line Loop(66) = {-9, -49, 150, 48};
Plane Surface(67) = {66};
Line Loop(68) = {-150, -153, 13, 152};
Plane Surface(69) = {68};
Line Loop(70) = {-31,-32, 10, 33, -29, -30};
Plane Surface(71) = {70};
Line Loop(72) = {-10, -11, 151, 49};
Plane Surface(73) = {72};
Line Loop(74) = {-151, -154, -12, 153};
Plane Surface(75) = {74};
Line Loop(76) = {-7, 36, -155, -156};
Plane Surface(77) = {76};

Transfinite Line{-37} = 80 Using Progression 1.015;
Transfinite Line{36} = 1 Using Bump 1.0;
Transfinite Line{-8} = 80 Using Progression 1.015;
Transfinite Line{48} = 1 Using Bump 1.0;

Transfinite Surface {61} = {11, 10, 37, 6};
Recombine Surface{61};
//Mesh.Smoothing = 100;

Transfinite Line{35} = 1 Using Bump 1.0;
Transfinite Line{-14} = 80 Using Progression 1.015;
Transfinite Line{152} = 1 Using Bump 1.0;
Transfinite Surface {63} = {9, 11, 6, 26};
Recombine Surface{63};
//Mesh.Smoothing = 100;

Transfinite Line{9} = 3 Using Progression 1.0;
Transfinite Line{49} = 1 Using Bump 1.0;
Transfinite Line{150} = 3 Using Progression 1.0;
Transfinite Line{48} = 1 Using Bump 1.0;
Transfinite Surface {67} = {6, 37, 82, 7};
Recombine Surface{67};
//Mesh.Smoothing = 100;

Transfinite Line{152} = 1 Using Bump 1.0;
Transfinite Line{13} = 3 Using Progression 1.0;
Transfinite Line{153} = 1 Using Bump 1.0;
Transfinite Surface {69} = {26, 6, 7, 31};
Recombine Surface{69};

//Mesh.Smoothing = 100;
Transfinite Line{-10} = 40 Using Progression 1.0;
Transfinite Line{151} = 40 Using Progression 1.0;
Transfinite Line{11} = 1 Using Bump 1.0;
Transfinite Surface {73} = {7, 82, 60, 8};
Recombine Surface{73};
//Mesh.Smoothing = 100;
Transfinite Line{12} = 40 Using Progression 1.0;
Transfinite Line{154} = 1 Using Bump 1.0;
Transfinite Surface {75} = {31, 7, 8, 59};
Recombine Surface{75};
//Mesh.Smoothing = 100;
Transfinite Line{-155} = 134 Using Progression 1.015;
Transfinite Line{47} = 1 Using Bump 1.0;
Transfinite Line{-39} = 134 Using Progression 1.015;
Transfinite Surface {55} = {50, 5, 11, 9};
Recombine Surface{55};
//Mesh.Smoothing = 100;
Transfinite Line{7} = 134 Using Progression 1.015;
Transfinite Line{156} = 1 Using Bump 1;
Transfinite Surface {77} = {5, 51, 10, 11};
Recombine Surface{77};
Mesh.Smoothing = 100;

//allPoints[] = Point "*" ;
//allLines[] = Line "*" ;
allSurfaces[] = Surface "*"; //allVolumes[] = Volume "*";
//allTranslines = Transfinite Line "*";

Rotate {{1, 0, 0}, {0, 0, 0}, -(Pi*5)/(2*180) } { Surface{ allSurfaces[] } ; }


Extrude {{1, 0, 0}, {0, 0, 0}, 2*(Pi*5)/(2*180) } {
Surface{ allSurfaces[] };
Layers{ 1 };
Recombine;
//QuadTriNoNewVerts RecombLaterals;
}


Physical Surface("back") = {51, 53, 59, 77, 55, 57, 61, 63, 65, 67, 69, 73, 75, 71};//14
Physical Surface("front") = { 193, 225, 311, 529, 242, 350, 333, 279, 436, 419, 397, 507, 490, 468};
Physical Surface("inlet") = {298};
Physical Surface("nz_outlet") = {180};
Physical Surface("sk_outlet") = {506, 489, 467};
Physical Surface("nz_wall") = {295, 208, 188, 184};
Physical Surface("sk_wall") = {447, 451, 455, 384, 380, 388, 392, 396, 274,176};

Physical Volume("internalField") = {5, 4, 3, 1, 2, 8, 7, 6};
Coherence Mesh;
The problem I have is the following: Once i have saved the mesh, some elements (parallel to the z direction), disappear whan I open the mesh again. (see screenshots). Thus, the mesh does not work properly in the right part of the geometry.

Does anybody have an idea why this could be?? I'm desperated
Attached Images
File Type: jpg Element.jpg (23.3 KB, 10 views)
File Type: jpg No_element_anymore.jpg (36.7 KB, 11 views)
File Type: jpg aftersaving.jpg (35.3 KB, 11 views)
File Type: jpg beforesaving.jpg (34.0 KB, 6 views)

Last edited by Araist; July 1, 2015 at 06:23.
Araist is offline   Reply With Quote

Old   July 7, 2015, 15:13
Default
  #2
New Member
 
Adrià Salvador
Join Date: Jun 2015
Posts: 4
Rep Power: 10
Araist is on a distinguished road
Dear All,

I have found the mistake, which is in the definition of the internal volume, not all of them are included.

Yours
Araist is offline   Reply With Quote

Old   July 13, 2015, 10:52
Default
  #3
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Quote:
Originally Posted by Araist View Post
Dear All,

I have found the mistake, which is in the definition of the internal volume, not all of them are included.

Yours
Hello Adrià,

can you please post your update *.geo file?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   July 15, 2015, 06:03
Default
  #4
New Member
 
Adrià Salvador
Join Date: Jun 2015
Posts: 4
Rep Power: 10
Araist is on a distinguished road
Quote:
Originally Posted by KateEisenhower View Post
Hello Adrià,

can you please post your update *.geo file?

Best regards,

Kate
Dear Kate,

You just need to change the line

Physical Volume("internalField") = {5, 4, 3, 1, 2, 8, 7, 6};

To the correct physical volume numbers.

I can't update the file because i did some modifications for that exact mesh and it's quite different. But it should be fairly simple to do
KateEisenhower likes this.
Araist is offline   Reply With Quote

Reply


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
[ICEM] Effect of globle mesh size and mesh independency sujay ANSYS Meshing & Geometry 20 September 29, 2019 07:36
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 11:14
Fluent dynamic mesh 'remeshing' method for pyramid elements DarrenC FLUENT 14 December 11, 2015 04:58
[Gmsh] gmshToFoam problem: not the same mesh in Gmsh vs. paraview zhernadi OpenFOAM Meshing & Mesh Conversion 8 July 7, 2011 02:28
2d irregular grid Remy Main CFD Forum 1 December 22, 2008 04:49


All times are GMT -4. The time now is 13:38.