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

[blockMesh] blockMesh with parametric mesh. Unusual and unseen problem

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2016, 17:13
Post blockMesh with parametric mesh. Unusual and unseen problem
  #1
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 8
13msmemusman is on a distinguished road
Hi guys i am facing a problem with mesh. Mesh has lot of flaws. please view the pictures and blockMesh file and guide me where is the fault.
The first figure shows the real mesh as i needed. but 2nd figure shows the gaps in the front and rear slice of mesh. All points are ok. but flaws are between points.

pic1.jpg

pic2.jpg




here is my blockMeshDict file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;
d 0.293; //ellipse major axis//
Luc 10;
Lskew 0.5;
Ldivider 1;
tantheta 0.4040262258;
Lpassage #calc "2 * $d";
z_i 0; //tank length initial//
z_f 1;



p0x #calc "$Luc*0.5";
p0y #calc "$Ldivider*0.5";
p1x #calc "$Luc*0.5";
p1y #calc "($Ldivider*0.5)+$d";
p2x #calc "$Lpassage";
p2y #calc "$Ldivider*0.5";
p3x #calc "$Lpassage";
p3y #calc "($Ldivider*0.5)+(2*$d)";
p4x #calc "0";
p4y #calc "$Ldivider*0.5";
p5x #calc "0";
p5y #calc "($Ldivider*0.5)+(2*$d)+($Lpassage*$tantheta)" ;



p10x #calc "($Luc*0.5*-1)+$Lskew+($Lpassage)";
p10y #calc "$Ldivider*0.5";
p11x #calc "($Luc*0.5*-1)+$Lskew+($Lpassage)";
p11y #calc "($Ldivider*0.5)+$d+($Lpassage*$tantheta)";
p33y #calc "2*$d+($Ldivider*0.5)";
p33x #calc "($Luc*0.5*-1)+$Lskew+$Lpassage+(($p33y-$p11y)/$tantheta)";
p32x #calc "($Luc*0.5*-1)+$Lskew+$Lpassage+(($p33y-$p11y)/$tantheta)";
p32y #calc "(0.5*$Ldivider)";
p12x #calc "($Luc*0.5*-1)+$Lskew";
p12y #calc "$Ldivider*0.5";
p13x #calc "($Luc*0.5*-1)+$Lskew";
p13y #calc "($Ldivider*0.5)+$d";
p14x #calc "$Luc*0.5*-1";
p14y #calc "$Ldivider*0.5";
p15x #calc "$Luc*0.5*-1";
p15y #calc "($Ldivider*0.5)+$d";
p16x #calc "$Luc*0.5";
p16y #calc "$Ldivider*0.5*-1";
p17x #calc "$Luc*0.5";


halfunit #calc "0.5*$Luc";
// 32x - 10x = (($p33y-$p11y)/$tantheta))]
a #calc "($p33y-$p11y)/$tantheta";
b #calc "($halfunit-2*$Lskew-$a)*0.5";

p8x #calc "($p32x+$b)";
p8y #calc "$Ldivider*0.5";
p6y #calc "$Ldivider*0.5";
p7x #calc "$p8x+$Lskew";
p7y #calc "($p7x*$tantheta*-1)+($Lpassage*$tantheta)+(2*$d)";

//p17y #calc "($Lpassage*$tantheta+2*$d+$Ldivider*0.5)*-1";
p17y #calc "(((($p5x-$p3x)*($p7y-$p3y))/($p7x-$p3x))+$p3y)*-1";

p6x #calc "$p8x+$Lskew";
p9x #calc "($p32x+$b)";
p9y #calc "$p7y";


p18x #calc "$b+$Lpassage+$a+$Lskew*2";
p18y #calc "$p9y*-1";
p19x #calc "$b+$Lpassage+$a+$Lskew*2";
p19y #calc "$Ldivider*0.5*-1";
p20x #calc "$b+$Lpassage+$a+$Lskew";
p20y #calc "$p9y*-1";
p21x #calc "$b+$Lpassage+$a+$Lskew";
p21y #calc "$Ldivider*0.5*-1";
p22x #calc "$Lskew+$Lpassage";
p22y #calc "($Ldivider*0.5*-1)-$d-$Lpassage*$tantheta";
p23x #calc "$Lskew+$Lpassage";
p23y #calc "$Ldivider*0.5*-1";
p24x #calc "$Lskew";
p24y #calc "($Ldivider*0.5*-1)-$d";
p25x #calc "$Lskew";
p25y #calc "$Ldivider*0.5*-1";
p26x #calc "0";
p26y #calc "($Ldivider*0.5*-1)-$d";
p27x #calc "0";
p27y #calc "$Ldivider*0.5*-1";
p28x #calc "(-0.5*$Luc)+$Lpassage";
p28y #calc "($Ldivider*0.5*-1)-2*$d";
p29x #calc "(-0.5*$Luc)+$Lpassage";
p29y #calc "$Ldivider*0.5*-1";
p30x #calc "$Luc*0.5*-1";
//p30y #calc "($Lpassage*$tantheta+2*$d+$Ldivider*0.5)*-1";
p30y #calc "(((($p5x-$p3x)*($p7y-$p3y))/($p7x-$p3x))+$p3y)*-1";
p31x #calc "$Luc*0.5*-1";
p31y #calc "$Ldivider*0.5*-1";







vertices
(
($p0x $p0y $z_i) //0//
($p1x $p1y $z_i) //1//
($p2x $p2y $z_i) //2//
($p3x $p3y $z_i) //3//
($p4x $p4y $z_i) //4//
($p5x $p5y $z_i) //5//
($p6x $p6y $z_i) //6//
($p7x $p7y $z_i) //7//
($p8x $p8y $z_i) //8//
($p9x $p9y $z_i) //9//
($p10x $p10y $z_i) //10//
($p11x $p11y $z_i) //11//
($p12x $p12y $z_i) //12//
($p13x $p13y $z_i) //13//
($p14x $p14y $z_i) //14//
($p15x $p15y $z_i) //15//
($p16x $p16y $z_i) //16//
($p17x $p17y $z_i) //17//
($p18x $p18y $z_i) //18//
($p19x $p19y $z_i) //19//
($p20x $p20y $z_i) //20//
($p21x $p21y $z_i) //21//
($p22x $p22y $z_i) //22//
($p23x $p23y $z_i) //23//
($p24x $p24y $z_i) //24//
($p25x $p25y $z_i) //25//
($p26x $p26y $z_i) //26//
($p27x $p27y $z_i) //27//
($p28x $p28y $z_i) //28//
($p29x $p29y $z_i) //29//
($p30x $p30y $z_i) //30//
($p31x $p31y $z_i) //31//
($p32x $p32y $z_i) //32//
($p33x $p33y $z_i) //33//
($p0x $p0y $z_f) //34//
($p1x $p1y $z_f) //35//
($p2x $p2y $z_f) //36//
($p3x $p3y $z_f) //37//
($p4x $p4y $z_f) //38//
($p5x $p5y $z_f) //39//
($p6x $p6y $z_f) //40//
($p7x $p7y $z_f) //41//
($p8x $p8y $z_f) //42//
($p9x $p9y $z_f) //43//
($p10x $p10y $z_f) //44//
($p11x $p11y $z_f) //45//
($p12x $p12y $z_f) //46//
($p13x $p13y $z_f) //47//
($p14x $p14y $z_f) //48//
($p15x $p15y $z_f) //49//
($p16x $p16y $z_f) //50//
($p17x $p17y $z_f) //51//
($p18x $p18y $z_f) //52//
($p19x $p19y $z_f) //53//
($p20x $p20y $z_f) //54//
($p21x $p21y $z_f) //55//
($p22x $p22y $z_f) //56//
($p23x $p23y $z_f) //57//
($p24x $p24y $z_f) //58//
($p25x $p25y $z_f) //59//
($p26x $p26y $z_f) //60//
($p27x $p27y $z_f) //61//
($p28x $p28y $z_f) //62//
($p29x $p29y $z_f) //63//
($p30x $p30y $z_f) //64//
($p31x $p31y $z_f) //65//
($p32x $p32y $z_f) //66//
($p33x $p33y $z_f) //67//






);

blocks
(
hex (0 2 3 1 34 35 37 36) (15 15 10) simpleGrading (1 1 1)
hex (2 6 7 3 36 37 41 40) (15 15 10) simpleGrading (1 1 1)
// hex (4 6 7 5 38 39 41 40) (15 15 1) simpleGrading (1 1 1)
hex (6 8 9 7 40 41 43 42) (15 15 10) simpleGrading (1 1 1)
hex (8 12 13 9 42 43 47 46) (15 15 10) simpleGrading (1 1 1)
// hex (32 10 11 33 66 67 11 10) (15 15 1) simpleGrading (1 1 1)
// hex (10 12 13 11 44 45 47 46) (15 15 1) simpleGrading (1 1 1)
hex (12 14 15 13 46 47 49 48) (15 15 10) simpleGrading (1 1 1)
hex (2 23 25 4 36 38 59 57) (15 15 10) simpleGrading (1 1 1)
hex (29 31 12 10 65 63 44 46) (15 15 10) simpleGrading (1 1 1)
hex (16 17 18 19 50 53 52 51) (15 15 10) simpleGrading (1 1 1)
hex (19 18 20 21 53 55 54 52) (15 15 10) simpleGrading (1 1 1)

hex (21 20 24 25 55 59 58 54) (15 15 10) simpleGrading (1 1 1)
// hex (23 22 24 25 57 59 58 56) (15 15 1) simpleGrading (1 1 1)
hex (25 24 26 27 61 60 58 59) (15 15 10) simpleGrading (1 1 1)
hex (27 26 28 29 61 63 62 60) (15 15 10) simpleGrading (1 1 1)
hex (29 28 30 31 63 65 64 62) (15 15 10) simpleGrading (1 1 1)

);

edges
(
);

boundary
(
walls
{
type wall;
faces
(

// (1 35 34 0)


// (1 3 37 35)
// (3 7 41 37)

// (7 9 43 41)


// (9 13 47 43)

// (13 15 49 47)
// (15 14 48 49)
// (12 31 65 46)
// (10 44 63 29)
// (31 30 64 65)
// (30 28 62 64)
// (28 26 60 62)
// (26 24 58 60)
// (24 20 54 58)
// (20 18 52 54)
// (18 17 51 52)
// (17 16 50 51)
// (16 19 53 50)
// (19 21 55 53)
// (20 23 57 55)
// (23 2 36 57)
// (2 0 34 36)
// (4 25 59 38)



);
}
);

mergePatchPairs
(
);

// ************************************************** *********************** //
13msmemusman is offline   Reply With Quote

Old   June 13, 2016, 02:25
Default
  #2
New Member
 
Marco Atzori
Join Date: Mar 2016
Posts: 22
Rep Power: 6
Atzori is on a distinguished road
Hi!

Using the option paraFoam -block (it uses directly the info in the BlockMeshDict, it doesn't require BlockMesh), I found that the vertexes are in the proper position, but I fear that there are several mistake in the orientation of the faces.

Have a look at the attachment.

Did you follow this tutorial, when you decide the order of the vertexes for each face? http://cfd.direct/openfoam/user-guide/blockmesh/

Bests Regards!

Marco Atzori
Attached Images
File Type: jpg blocks.jpg (49.1 KB, 38 views)
Atzori is offline   Reply With Quote

Reply

Tags
blockmesh, flaws, mesh

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



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