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

[blockMesh] BlockMesh with cylinder and halfsphere

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By ich558

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2019, 05:17
Default BlockMesh with cylinder and halfsphere
  #1
New Member
 
Join Date: Apr 2019
Posts: 2
Rep Power: 0
ich558 is on a distinguished road
Hi this is Torsten from Munich,
I do calculations with multiphaseInterFoam, like shaking your cognac.
The original was just a cylinder with an O-mesh and seems to be good.
Now there are diffenent containers and this one is a cylinder with a halfsphere at the bottom.; Halbkugel means halfsphere.

The error-message is:
Inconsistent point locations between block pair 0 and 4
probably due to inconsistent grading.


I would like to keep the O-Mesh style in the Cylinder and halfsphere.


Thanks in advance
Torsten
PS: this is a second try because I haven't found my previous post.


Here a picture of the cylinder O-mesh:



and here is the blockMeshDict:


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

// https://www.youtube.com/watch?v=3v50ev75aDw
// Tutorial SloshingCylinder
// Tutorial Sphere

convertToMeters 1;

verbose no;

radiusBottom 0.0035; //Radius Well unten
radiusBottomNeg -0.0035; //Radius Well unten negativ
radiusTop 0.004; //Radius Well oben
radiusTopNeg -0.004; //Radius Well oben negativ
yMax 0.0085; //Position Y Max Well oben
xMin 0; //Position X 0
yMin 0; //Position Y 0
zMin 0; //Position Z 0
cylArcTop 0.002828427; //(radiusTop*cos45) top arc bei r=1 ist 0.7071067 (cos45 oder sin45)
cylArcTopNeg -0.002828427;//(radiusTopNeg*cos45) top arc bei r=1 ist -0.7071067 (cos45 oder sin45)
cylArcBottom 0.002474873; //(radiusBottom*cos45) bottom arc bei r=1 ist 0.7071067 (cos45 oder sin45)
cylArcBottomNeg -0.002474873; //(radiusBottomNeg*cos45) bottom arc bei r=1 ist -0.7071067 (cos45 oder sin45)
yMinSphere -0.0035; //Position KugelWell unten, Gesamthöhe Well - yMax
sphereV 0.002020725; //(radiusBottom*0.5773502) Kugel Volumen 3D Punkt bei r=1 ist 0.5773502
sphereMV -0.002020725; //(radiusBottomNeg*0.5773502) Kugel Volumen 3D Punkt bei r=1 ist -0.5773502
sphereA 0.002474873; //(radiusBottom*cos45) bottom sphere Kugel Fläche 2D Punkt bei r=1 ist 0.7071067 (cos45 oder sin45)
sphereMA -0.002474873; //(radiusBottomNeg*cos45) bottom sphereKugel Fläche 2D Punkt bei r=1 ist -0.7071067 (cos45 oder sin45)



geometry
{
sphere
{
type searchableSphere;
centre ($xMin $yMin $zMin);
radius $radiusBottom;
}
}


vertices
(
($radiusBottom $yMin $zMin) //0
($xMin $yMin $radiusBottomNeg) //1
($radiusBottomNeg $yMin $zMin) //2
($xMin $yMin $radiusBottom) //3 bottom circle Cylinder

($radiusTop $yMax $zMin) //4
($xMin $yMax $radiusTopNeg) //5
($radiusTopNeg $yMax $zMin) //6
($xMin $yMax $radiusTop) //7 top circle Cylinder

($xMin $yMin $zMin) //8 center point Cylinder Bottom
($xMin $yMax $zMin) //9 center point Cylinder Top

($sphereV $sphereMV $zMin) //10
($xMin $sphereMV $sphereMV) //11
($sphereMV $sphereMV $zMin) //12
($xMin $sphereMV $sphereV) //13 Halbkugel
($xMin $sphereMV $zMin) //14 center point Sphere Bottom
);

blocks
(
hex (0 1 8 8 4 5 9 9) (25 35 50) simpleGrading (1 1 1)
hex (1 2 8 8 5 6 9 9) (25 35 50) simpleGrading (1 1 1)
hex (2 3 8 8 6 7 9 9) (25 35 50) simpleGrading (1 1 1)
hex (3 0 8 8 7 4 9 9) (25 35 50) simpleGrading (1 1 1) // blocks Cylinder

hex (0 8 8 1 10 14 14 11) (25 35 50) simpleGrading (1 1 1)
hex (1 8 8 2 11 14 14 12) (25 35 50) simpleGrading (1 1 1)
hex (2 8 8 3 12 14 14 13) (25 35 50) simpleGrading (1 1 1)
hex (3 8 8 0 13 14 14 10) (25 35 50) simpleGrading (1 1 1) // blocks Sphere


);

edges
(
arc 0 1 ($cylArcBottom $yMin $cylArcBottomNeg) // bottom arc
arc 1 2 ($cylArcBottomNeg $yMin $cylArcBottomNeg)
arc 2 3 ($cylArcBottomNeg $yMin $cylArcBottom)
arc 3 0 ($cylArcBottom $yMin $cylArcBottom)

arc 4 5 ($cylArcTop $yMax $cylArcTopNeg) // top arc
arc 5 6 ($cylArcTopNeg $yMax $cylArcTopNeg)
arc 6 7 ($cylArcTopNeg $yMax $cylArcTop)
arc 7 4 ($cylArcTop $yMax $cylArcTop)

arc 0 10 ($sphereA $sphereMA $zMin) // Halbkugel
arc 1 11 ($xMin $sphereMA $sphereMA)
arc 2 12 ($sphereMA $sphereMA $zMin)
arc 3 13 ($xMin $sphereMA $sphereA)
);

faces
(
project (0 10 11 1) sphere
project (1 11 12 2) sphere
project (2 12 13 3) sphere
project (3 13 10 0) sphere
// project (0 1 2 3) sphere
// project (10 13 12 11) sphere
project (10 14 14 11) sphere
project (11 14 14 12) sphere
project (12 14 14 13) sphere
project (13 14 14 10) sphere
);

boundary
(
walls
{
type wall;
faces
(
(0 10 11 1)
(1 11 12 2)
(2 12 13 3)
(3 13 10 0)
// (10 13 12 11)
(10 14 14 11)
(11 14 14 12)
(12 14 14 13)
(13 14 14 10)
);
}
atmosphere
{
type patch;
faces
(
(5 9 9 4)
(6 9 9 5)
(7 9 9 6)
(4 9 9 7)
);
}
sides
{
type wall;
faces
(
(0 1 5 4)
(1 2 6 5)
(2 3 7 6)
(3 0 4 7)
);
}
);

mergePatchPairs
(

);

// ************************************************** *********************** //






I have solved my Problem by using snappyHexMesh.

Now I meshing runns well.
anaspauzi and W Mao like this.

Last edited by ich558; April 24, 2019 at 06:05. Reason: Soled my Problem
ich558 is offline   Reply With Quote

Reply

Tags
blockmeshdict, cylinder + halfsphere


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 03:21.