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

blockMesh does not merge axis faces!

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Hip2BL7

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2020, 11:22
Default blockMesh does not merge axis faces!
  #1
New Member
 
Diego
Join Date: Dec 2019
Location: Cardiff
Posts: 9
Rep Power: 6
Hip2BL7 is on a distinguished road
After what feels like years of googling, I feel I have given up and will move on to extrudeMesh which I know will be able to solve my problems.

I am creating a cylinder within a cylinder volume, and so I'm attempting to use blockMesh in order to create an axissymetric wedge of my problem.

My issue is that though blockMesh works fine:

Code:
Creating block edges
No non-planar block faces defined
Creating topology blocks
Creating topology patches

Creating block mesh topology

Check topology

        Basic statistics
                Number of internal faces : 2
                Number of boundary faces : 14
                Number of defined boundary faces : 14
                Number of undefined boundary faces : 0
        Checking patch -> block consistency


Creating block offsets
Creating merge list (topological search)...
Deleting polyMesh directory "constant/polyMesh"

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 0.001
    Block 0 cell size :
        i : 0.000176056 .. 0.000176056
        j : 0 .. 0
        k : 0.000173913 .. 0.000173913

    Block 1 cell size :
        i : 0.000172412 .. 0.000172412
        j : 0.000436302 .. 0.000436302
        k : 0.000173913 .. 0.000173913

    Block 2 cell size :
        i : 0.000172412 .. 0.000172412
        j : 0.000436302 .. 0.000436302
        k : 0.000175066 .. 0.000175066


There are no merge patch pairs

Detected cyclic patches; ordering boundary faces

Writing polyMesh with 0 cellZones
----------------
Mesh Information
----------------
  boundingBox: (0 -0.000305412 0) (0.0174973 0.000305412 0.07)
  nPoints: 27468
  nCells: 13233
  nFaces: 53432
  nInternalFaces: 25966
----------------
Patches
----------------
  patch 0 (start: 25966 size: 29) name: air
  patch 1 (start: 25995 size: 13233) name: AMI1
  patch 2 (start: 39228 size: 13233) name: AMI2
  patch 3 (start: 52461 size: 500) name: beakerCylinder
  patch 4 (start: 52961 size: 448) name: toolCylinder
  patch 5 (start: 53409 size: 23) name: axis

End
My checkMesh throws errors:

Code:
Checking geometry...
    Overall domain bounding box (0 -0.000305412 0) (0.0174973 0.000305412 0.07)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-3.7654e-15 1.47052e-14 3.00031e-19) OK.
    Max cell openness = 1.70915e-16 OK.
    Max aspect ratio = 56.6022 OK.
 ***Zero or negative face area detected.  Minimum area: 0
  <<Writing 23 zero area faces to set zeroAreaFaces
    Min volume = 9.40625e-14. Max volume = 1.83433e-11.  Total volume = 1.94124e-07.  Cell volumes OK.
    Mesh non-orthogonality Max: 1.07995e-05 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 1.17353e+146, 23 highly skew faces detected which may impair the quality of the results
  <<Writing 23 skew faces to set skewFaces
    Coupled point location match (average 9.02597e-10) OK.

Failed 2 mesh checks.
On examination, it seems as though blockMesh is creating thin faces on the axis of the elements. This causes many issues downstream when trying to use functions such as refineMesh etc. It doesn't seem to impair the actual solver.

Contents of constant/polyMesh/boundary:

Code:
    axis
    {
        type            empty;
        inGroups        1(empty);
        nFaces          23;
        startFace       53409;
    }
When I see other people define wedges, invariably their constant/polyMesh/boundary should show nFaces as 0.

I've gone through defining things as patches and wedges and seperating all my faces to putting them back together again, but I am well and truly stuck. Here's hoping you may be able to help me with my issues.

blockMeshDict

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

#include "cylinderRe"

backgroundMesh
{
    rOuter	$rO; // inner radius of outer cylinder
    rTool	$rT; // radius of the tool
    gap		$d;  // gap from tool to base of the beaker
    height	$h;  // cylinder height 

// Mesh

    n1x         $n1x;
    n1z     	$n1z;

    n2x         $n2x;
    n2z         $n2z;
    
    n3x         $n3x;
    n3z         $n3z;
} 

scale 1e-3;

vertices
(
    (0    0    0) //0
    ($rx1 $ty1 0) //1
    ($rx2 $ty2 0) //2
    (0    0    $:backgroundMesh.gap)    //3
    ($rx1 $ty1 $:backgroundMesh.gap)    //4
    ($rx2 $ty2 $:backgroundMesh.gap)    //5
    ($rx1 $ty1 $:backgroundMesh.height) //6
    ($rx2 $ty2 $:backgroundMesh.height) //7   
    ($rx1 $ry1 0) //8
    ($rx2 $ry2 0) //9
    ($rx1 $ry1 $:backgroundMesh.gap)    //10
    ($rx2 $ry2 $:backgroundMesh.gap)    //11
    ($rx1 $ry1 $:backgroundMesh.height) //12
    ($rx2 $ry2 $:backgroundMesh.height) //13
);

blocks
(
// Zone 1
    hex (0 1 8 0 3 4 10 3) 
    ($:backgroundMesh.n1x 1 $:backgroundMesh.n1z) simpleGrading (1 1 1)

// Zone 2
    hex (1 2 9 8 4 5 11 10)
    ($:backgroundMesh.n2x 1 $:backgroundMesh.n2z) simpleGrading (1 1 1)

// Zone 3
    hex (4 5 11 10 6 7 13 12) 
    ($:backgroundMesh.n3x 1 $:backgroundMesh.n3z) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    air
    {
        type patch;
	faces
        (
            (6 7 13 12)
        );
    }

    AMI1
    {
        type 			cyclic;
	neighbourPatch 	AMI2;
	transform		rotational;
	rotationAxis	(0 0 1);
	rotationCentre	(0 0 0);
       	faces
        (
	    (1 2 5 4)
	    (4 5 7 6)
            (0 1 4 3)
        );
    }

    AMI2
    {
        type 			cyclic;
	neighbourPatch 	AMI1;
	transform		rotational;
	rotationAxis	(0 0 1);
	rotationCentre	(0 0 0);
       	faces
        (
	    (8 10 11 9)
	    (10 12 13 11)
            (0 3 10 8)
        );
    }

    beakerCylinder
    {
        type wall;
        faces
        (
            (2 9 11 5)
	    (5 11 13 7)
	    (2 1 8 9)
	    (0 8 1 0)
        );
    }

    toolCylinder
    {
        type wall;
        faces
        (
	    (4 6 12 10)
            (3 4 10 3)
        );
    }    
	
    axis
    {
	type empty;
	faces
	(
	    (0 3 3 0)
	);
    }

);
cylinderRe

Code:
// Geometry (in mm)

    rO	17.5; // Beaker internal radius
    rT  12.5; // Tool radius
    d	4;    // Tool height from the bottom of the beaker
    h	70;   // Internal Cylinder height
    a   #calc "constant::mathematical::pi/180"; // 9 degree slice

    rx1 #calc "$rT*cos($a)";
    rx2 #calc "$rO*cos($a)";
    ry1 #calc "$rT*sin($a)";
    ry2 #calc "$rO*sin($a)";
	ty1 #calc "-$ry1";
	ty2 #calc "-$ry2";


// Mesh

    k	#calc "100/$rO";  // Target cell density

	// Zone 1
    n1x	#calc "round($k*$rT)";
    n1z #calc "round($k*$d)";

	// Zone 2
    n2x #calc "round($k*($rO - $rT))";
    n2z #calc "round($k*$d)";

	// Zone 3
    n3x #calc "round($k*($rO - $rT))";
    n3z #calc "round($k*($h - $d))";

	// Azimuth
	y1	#calc "round($k*(2*$rT - $rO)*sin($a))";
	y2	#calc "round($k*(0.5*$rT)*sin($a))";

// Operations

    omega_i	#calc "42000*(2*constant::mathematical::pi/60)"; // Speed in rad/s
    v           #calc "$omega_i*$rT*1e-3"; // linear velocity at the Tool
Hip2BL7 is offline   Reply With Quote

Old   March 18, 2021, 17:52
Default Solved
  #2
New Member
 
Diego
Join Date: Dec 2019
Location: Cardiff
Posts: 9
Rep Power: 6
Hip2BL7 is on a distinguished road
This one weird trick solved all my problems:

Code:
mergeType points;
Not really in the documentation for any of the axisymmetric mesh cases. Hope this helps anyone who stumbles across this forum post.
hgcastro likes this.
Hip2BL7 is offline   Reply With Quote

Old   August 16, 2021, 21:11
Default
  #3
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 118
Rep Power: 5
dasith0001 is on a distinguished road
Thanks Diego, It was exactly my problem too, ''mergeType points;'' solves it. Thank you for saving me a lot of time.

Cheers,
Dasith
dasith0001 is offline   Reply With Quote

Old   August 29, 2021, 04:42
Default
  #4
New Member
 
Rakesh Majumder
Join Date: May 2019
Posts: 1
Rep Power: 0
Rakesh_the_pirate is on a distinguished road
Quote:
Originally Posted by dasith0001 View Post
Thanks Diego, It was exactly my problem too, ''mergeType points;'' solves it. Thank you for saving me a lot of time.

Cheers,
Dasith
Where is this "mergeType points;" in openfoam??? Can anyone tell me??? Thanks in advance.
Rakesh_the_pirate is offline   Reply With Quote

Reply

Tags
blockmesh, blockmesh cylinder, openfoam 1806


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] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 11:49
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11


All times are GMT -4. The time now is 05:58.