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

[Gmsh] GMSH only one corner of hex mesh on axis line

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2018, 10:51
Default GMSH only one corner of hex mesh on axis line
  #1
New Member
 
Join Date: Oct 2018
Posts: 19
Rep Power: 7
krzychu111 is on a distinguished road
Hi,
when I'm creating axisymmetric hex mesh. Because my shape has more than 5 corners I'm not able to use transfinite surface. So I'm limited to recombine surface. But this tool is not avoiding scenario when only one corner of single node is on axis [see picture] and this causes creating extra surfaces which is breaking the simulation.

How can I force the engine to put two corners of each node on axis line?
edge.png


Code:
Code:
vehicle_diameter = 1;
tube_diameter = 8*vehicle_diameter;
vehicle_length = 5*vehicle_diameter;
tube_length = 3*vehicle_length;

vehicle_gridsize = 0.01;
far_gridsize = 0.25;
Mesh.Smoothing = 5;

ce = 1;
Point(ce) = {0,0,0,vehicle_gridsize};e1=ce;ce++;
Point(ce) = {vehicle_diameter/2,0,0,vehicle_gridsize};c1 = ce;ce++;
Point(ce) = {vehicle_diameter/2,vehicle_diameter/2,0,vehicle_gridsize};t1=ce;ce++;
Point(ce) = {vehicle_length-vehicle_diameter/2,vehicle_diameter/2,0,vehicle_gridsize};t2=ce;ce++;

Point(ce) = {vehicle_length-vehicle_diameter/2,tube_diameter/2,0,far_gridsize};c2 = ce;ce++;
Point(ce) = {-tube_length/2+vehicle_length/2,0,0,far_gridsize};i1=ce;ce++;
Point(ce) = {-tube_length/2+vehicle_length/2,tube_diameter/2,0,far_gridsize};i2=ce;ce++;
Point(ce) = {vehicle_length-vehicle_diameter/2,0,0,vehicle_gridsize};pr1=ce;ce++;




lns[]={};
tlns[]={};
Line(ce) = {i1,e1};        x1=ce;    lns[]+=ce;    ce++;
Circle(ce) = {e1,c1,t1};    x2=ce;    lns[]+=ce;    ce++;
Line(ce) = {t1,t2};        x3=ce;    lns[]+=ce;    ce++;
Line(ce) = {t2,c2};        x4=ce;    lns[]+=ce;    ce++;
Line(ce) = {c2,i2};        x5=ce;    lns[]+=ce;    ce++;
Line(ce) = {i2,i1};        x6=ce;    lns[]+=ce;    ce++;

Line(ce) = {i1,pr1};        x7=ce;            ce++;
Line(ce) = {pr1,c2};        x8=ce;            ce++;


Line Loop(ce) = lns[];ce++;
Plane Surface(ce) = ce-1;surf=ce;ce++;

//hex
Transfinite Curve{x7}=80;
Recombine Surface{surf}=25;

//Transfinite Line{x7,x8,x5,x6}=1;
//Transfinite Surface{surf};
//Transfinite Surface{surf}={6,4,5,7};
//TransfQuadTri{surf};
//Transfinite Volume{new_entities[1]};

Rotate {{1,0,0},{0,0,0},2.5*Pi/180.0}
{
    Surface{surf};
}
new_entities[] = Extrude {{1,0,0},{0,0,0},-5*Pi/180.0}
{
    Surface{surf};
    Layers{1};
    Recombine;
};

Physical Surface("ring") = {new_entities[{2:3}]};
Physical Surface("tunnel") = {new_entities[5]};
Physical Surface("outlet") = {new_entities[4]};
Physical Surface("inlet") = {new_entities[6]};
Physical Surface("wedge0") = {surf};
Physical Surface("wedge1") = {new_entities[0]};

Physical Volume("volume") = {new_entities[1]};
krzychu111 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
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
GMSH - Very strange effect - Mesh elements deleted when saving Araist Mesh Generation & Pre-Processing 3 July 15, 2015 06:03
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 06:44.