CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Diverging simulation (https://www.cfd-online.com/Forums/openfoam-solving/161844-diverging-simulation.html)

czhongrong October 29, 2015 20:20

Diverging simulation
 
Hi, my simulation is diverging. I've tried increasing nNonOrthogonalCorrectors up to 10, and also introducing residualControl in fvSolution, but nothing helps. My checkMesh log is as follows.

The boundary conditions are similar to my other case, which runs perfectly. I have only changed the velocity at the inlet and with a slightly different geometry.

May I know if the "number of severely non-orthogonal faces" is the cause? Otherwise, how can I solve the diverging problem?

Quote:

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 983340
faces: 2838800
internal faces: 2729200
cells: 928000
boundary patches: 7
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 928000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 1600 1701 ok (non-closed singly connected)
outlet 1600 1701 ok (non-closed singly connected)
upperWall 34400 34911 ok (non-closed singly connected)
ground_wall 33600 34101 ok (non-closed singly connected)
cylinder 15200 15390 ok (non-closed singly connected)
lateral_front 11600 12140 ok (non-closed singly connected)
lateral_back 11600 12140 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.625 -0.5 0) (1.875 0.5 1.5)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (2.649697203e-16 -2.956581033e-14 -6.494254509e-15) OK.
Max cell openness = 2.890069133e-14 OK.
Max aspect ratio = 728.8145848 OK.
Minumum face area = 2.451588289e-08. Maximum face area = 0.004215342807. Face area magnitudes OK.
Min volume = 4.596728041e-10. Max volume = 7.903767764e-05. Total volume = 3.745717595. Cell volumes OK.
Mesh non-orthogonality Max: 88.46293676 average: 19.90242632
*Number of severely non-orthogonal faces: 110720.
Non-orthogonality check OK.
<<Writing 110720 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 3.314142436 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

vishal3 October 30, 2015 01:19

hi czhongrong

By looking at your checkMesh Log, it is seen that the Max Skewness for your mesh is 3.314. This could be the problem why your simulations are diverging. The skewness of the mesh is an indication of the optimum cell size. For accurate solution, the maximum skewness for Hex mesh should not go beyond 0.7 or 0.85. In general, the mesh with max skewness of 0 is considered to be perfect and it should not go beyond 1 in order to have accurate solution or convergence in solution.

So i recommend you to change your mesh and run the simulations once again.

All the best

czhongrong October 30, 2015 02:02

1 Attachment(s)
Hi vishal3,

My geometry is a cylinder with a protruded top on its surface(see attached). I just can't seem to be able to decrease the max skewness. May I know what parameters I could try editing? Below is my blockMeshDict.

Quote:

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

convertToMeters 1;

vertices
(
(-0.625 -0.5 0) //0
(0.625 -0.5 0) //1
(1.875 -0.5 0) //2
(1.875 0.5 0) //3
(0.625 0.5 0) //4
(-0.625 0.5 0) //5
(-0.625 0.5 1.5) //6
(0.625 0.5 1.5) //7
(1.875 0.5 1.5) //8
(-0.625 -0.5 1.5) //9
(0.625 -0.5 1.5) //10
(1.875 -0.5 1.5) //11

//cylinder
(-0.02121 -0.02121 0) //12
(0.02121 -0.02121 0) //13
(0.02121 0.02121 0) //14
(-0.02121 0.02121 0) //15

(-0.02121 -0.02121 1.5) //16
(0.02121 -0.02121 1.5) //17
(0.02121 0.02121 1.5) //18
(-0.02121 0.02121 1.5) //19

//protruded
(-0.005 0.02958 0) //20
(0.005 0.02958 0) //21
(0.005 0.033 0) //22
(-0.005 0.033 0) //23

(-0.005 0.02958 1.5) //24
(0.005 0.02958 1.5) //25
(0.005 0.033 1.5) //26
(-0.005 0.033 1.5) //27
);

blocks
(
hex (0 12 15 5 9 16 19 6) (30 20 80) simpleGrading (0.01 1 1)
hex (1 13 12 0 10 17 16 9) (30 20 80) simpleGrading (0.01 1 1)
hex (13 1 4 14 17 10 7 18) (30 20 80) simpleGrading (100 1 1)
//protruded
hex (14 4 22 21 18 7 26 25) (30 20 80) simpleGrading (100 1 1)
hex (23 22 4 5 27 26 7 6) (30 20 80) simpleGrading (100 1 1)
hex (20 23 5 15 24 27 6 19) (30 20 80) simpleGrading (100 1 1)
hex (1 2 3 4 10 11 8 7) (400 20 80) simpleGrading (1 1 1)

);


edges
(
arc 15 12 (-0.03 0 0)
arc 12 13 (0 -0.03 0)
arc 13 14 (0.03 0 0)
arc 14 21 (0.01475 0.02606 0)
arc 20 15 (-0.01475 0.02606 0)

arc 19 16 (-0.03 0 1.5)
arc 16 17 (0 -0.03 1.5)
arc 17 18 (0.03 0 1.5)
arc 18 25 (0.01475 0.02606 1.5)
arc 24 19 (-0.01475 0.02606 1.5)
);


boundary
(
inlet
{
type wall;
faces
(
(6 5 0 9)
);
}

outlet
{
type wall;
faces
(
(3 8 11 2)
);
}

upperWall
{
type symmetryPlane;
faces
(
(4 5 6 7)
(3 4 7 8)
);
}

ground_wall
{
type wall;
faces
(
(0 1 10 9)
(1 2 11 10)
);
}

cylinder
{
type wall;
faces
(
(15 20 24 19)
(20 23 27 24)
(23 22 26 27)
(22 21 25 26)
(21 14 18 25)
(14 13 17 18)
(13 12 16 17)
(12 15 19 16)
);
}

lateral_front
{
type symmetryPlane;
faces
(
(7 26 25 18)
(6 27 26 7)
(6 19 24 27)
(19 6 9 16)
(17 16 9 10)
(7 18 17 10)
(8 7 10 11)
);
}

lateral_back
{
type symmetryPlane;
faces
(
(22 4 14 21)
(5 4 22 23)
(5 23 20 15)
(5 15 12 0)
(12 13 1 0)
(4 1 13 14)
(4 3 2 1)
);
}

);

mergePatchPairs
(
);


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

akidess October 30, 2015 03:03

If you have an STL of your geometry use snappyHexMesh.

czhongrong October 30, 2015 03:10

Hi akidess,

I can't get my STL to work, that's why I use blockMeshDict to mesh my geometry.

mkraposhin October 30, 2015 04:31

Quote:

Originally Posted by czhongrong (Post 570933)
Mesh non-orthogonality Max: 88.46293676 average: 19.90242632

The problem is in non-orthogonality, in fact OpenFOAM's implementation of FVM will not work with non-orthogonality larger then 60-70 degrees

czhongrong October 30, 2015 04:37

Quote:

Originally Posted by mkraposhin (Post 570974)
The problem is in non-orthogonality, in fact OpenFOAM's implementation of FVM will not work with non-orthogonality larger then 60-70 degrees

So I would need to reduce the "Mesh non-orthogonality Max" to be below 60-70? If so, how can I do that? Do I still need to care about the max skewness?

mkraposhin October 30, 2015 08:58

Quote:

Originally Posted by czhongrong (Post 570977)
So I would need to reduce the "Mesh non-orthogonality Max" to be below 60-70?

Yes

Quote:

Originally Posted by czhongrong (Post 570977)
If so, how can I do that?

You must locate cells where non-orthogonality is high and change geometry of corresponding blocks in blockMeshDict. To locate this cells, run:
Code:

checkMest
then
Code:

foamToVTK -faceSet nonOrthoFaces
Quote:

Originally Posted by czhongrong (Post 570977)
Do I still need to care about the max skewness?

Yes, but in most cases, improvement of non-orthogonality leads to improvement of skewness

czhongrong October 30, 2015 21:16

2 Attachment(s)
Hi mkraposhin,

Is there any rule of thumb or guideline that we can follow to avoid high non-orthogonality? As seen from my geometry in my previous reply #3, I find it difficult to change the geometry of the block. Attached is the schematic sketch diagram of my meshing and what "foamToVTK -faceSet nonOrthoFaces" has shown me in ParaView.

It can be seen that lines 5-23 and 4-22 are the causes of this problem.

vishal3 October 30, 2015 22:49

Hey czhongrong

Why don't you try to create a mesh in other applications like GMSH / SALOME / GAMBIT / ANSYS WORKBENCH / HYPERMESH etc. ? I dont have any idea whether blockmeshdict is that much capable of handling this. Just give it a try. There you have a good control over your mesh when you are using other applications.

All the best!

mkraposhin October 31, 2015 05:52

1 Attachment(s)
I would propose another a bit more complex configuration of blocks - see attachment

czhongrong October 31, 2015 23:59

Thanks for the layout, but just a few questions, I couldn't quite visualise properly:o:

1) I see 2 circles, do I have to model that outer circle? If yes, is the area in-between the 2 circles considered as hex blocks as well?

2) Are the 2 horizontal lines on the right needed?

3) "With this line non-orthogonality can be adjusted" - meaning the BLACK diagonal line on the right?

czhongrong November 1, 2015 10:49

1 Attachment(s)
By the way, I've tried to mesh in a different layout. See attached for layout. But I keep getting the following error from blockMesh - "face 3 in patch 2 does not have neighbour cell face: 4(3 4 7 8)". I can't find the cause of the problem. My blockMesh is as follows.

Quote:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
"/scratch/wyquek1/gap3mm1/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology


--> FOAM FATAL ERROR:
face 3 in patch 2 does not have neighbour cell face: 4(3 4 7 8)

From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::polyMesh::facePatchFaceCells(Foam::List<Foam ::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#3 Foam::polyMesh::setTopology(Foam::List<Foam::cellS hape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libblockMesh.so"
#6 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libblockMesh.so"
#7 main in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/blockMesh"
#8 __libc_start_main in "/lib64/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/usr/local/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/blockMesh"
Aborted
Quote:

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

convertToMeters 1;

vertices
(
(-0.625 -0.5 0) //0
(0.625 -0.5 0) //1
(1.875 -0.5 0) //2
(1.875 0.5 0) //3
(0.625 0.5 0) //4
(-0.625 0.5 0) //5
(-0.625 0.5 1.5) //6
(0.625 0.5 1.5) //7
(1.875 0.5 1.5) //8
(-0.625 -0.5 1.5) //9
(0.625 -0.5 1.5) //10
(1.875 -0.5 1.5) //11

//cylinder
(-0.02121 -0.02121 0) //12
(0.02121 -0.02121 0) //13
(0.02121 0.02121 0) //14
(-0.02121 0.02121 0) //15

(-0.02121 -0.02121 1.5) //16
(0.02121 -0.02121 1.5) //17
(0.02121 0.02121 1.5) //18
(-0.02121 0.02121 1.5) //19

//protruded
(-0.005 0.02958 0) //20
(0.005 0.02958 0) //21
(0.005 0.033 0) //22
(-0.005 0.033 0) //23

(-0.005 0.02958 1.5) //24
(0.005 0.02958 1.5) //25
(0.005 0.033 1.5) //26
(-0.005 0.033 1.5) //27

(-0.625 0.033 0) //28
(0.625 0.033 0) //29
(0.005 0.5 0) //30
(-0.005 0.5 0) //31
(-0.625 0.033 1.5) //32
(0.625 0.033 1.5) //33
(0.005 0.5 1.5) //34
(-0.005 0.5 1.5) //35

(1.875 0.033 0) //36
(1.875 0.033 1.5) //37
);

blocks
(
hex (0 12 15 28 9 16 19 32) (30 20 80) simpleGrading (0.01 1 1)
hex (1 13 12 0 10 17 16 9) (30 20 80) simpleGrading (0.01 1 1)
hex (13 1 29 14 17 10 33 18) (30 20 80) simpleGrading (100 1 1)
//protruded
hex (14 29 22 21 18 33 26 25) (30 20 80) simpleGrading (100 1 1)
hex (29 4 30 22 33 7 34 26) (30 20 80) simpleGrading (100 1 1)
hex (22 30 31 23 26 34 35 27) (30 20 80) simpleGrading (100 1 1)
hex (23 31 5 28 27 35 6 32) (30 20 80) simpleGrading (100 1 1)
hex (28 15 20 23 32 19 24 27) (30 20 80) simpleGrading (0.01 1 1)
hex (1 2 36 29 10 11 37 33) (400 20 80) simpleGrading (1 1 1)
hex (4 29 36 3 4 33 37 8 7) (400 20 80) simpleGrading (1 1 1)

);


edges
(
arc 15 12 (-0.03 0 0)
arc 12 13 (0 -0.03 0)
arc 13 14 (0.03 0 0)
arc 14 21 (0.01475 0.02606 0)
arc 20 15 (-0.01475 0.02606 0)

arc 19 16 (-0.03 0 1.5)
arc 16 17 (0 -0.03 1.5)
arc 17 18 (0.03 0 1.5)
arc 18 25 (0.01475 0.02606 1.5)
arc 24 19 (-0.01475 0.02606 1.5)
);


boundary
(
inlet
{
type wall;
faces
(
(6 5 28 32)
(32 28 0 9)
);
}

outlet
{
type wall;
faces
(
(8 3 36 37)
(37 36 2 11)
);
}

upperWall
{
type symmetryPlane;
faces
(
(31 5 6 35)
(30 31 35 34)
(4 30 34 7)
(3 4 7 8)
);
}

ground_wall
{
type wall;
faces
(
(0 1 10 9)
(1 2 11 10)
);
}

cylinder
{
type wall;
faces
(
(15 20 24 19)
(20 23 27 24)
(23 22 26 27)
(22 21 25 26)
(21 14 18 25)
(14 13 17 18)
(13 12 16 17)
(12 15 19 16)
);
}

lateral_front
{
type symmetryPlane;
faces
(
(33 26 25 18)
(26 33 7 34)
(27 26 34 35)
(32 27 35 6)
(32 19 24 27)
(32 9 16 19)
(17 16 9 10)
(33 18 17 10)
(10 11 37 33)
(33 37 8 7)
);
}

lateral_back
{
type symmetryPlane;
faces
(
(29 22 21 14)
(22 29 4 30)
(23 22 30 31)
(28 23 31 5)
(28 15 20 23)
(28 0 12 15)
(12 0 1 13)
(13 1 29 14)
(1 2 36 29)
(29 36 3 4)
);
}

);

mergePatchPairs
(
);


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

mkraposhin November 2, 2015 03:59

1 Attachment(s)
Hi,
I think that with the descretization shown above, you will also get mesh with high non-orthogonality. I made another version of block geometry (see attachment).

Grey regions are blocks

In this geometry you can adjust non-orthogonality with the vertical position of point 6 and horizontal position of point 5.

czhongrong November 2, 2015 04:20

Hi mkraposhin,

Yes, indeed my discretisation still yields 88 deg of non-orthogonality.

1) Are points 4, 6, 8, 9, 13, 14 all arbitrary points on the circle which I can choose on my own?

2) I will need to follow this discretization on the upper left half of the geometry too right (i.e. mirror on the left)?

mkraposhin November 2, 2015 04:37

Quote:

Originally Posted by czhongrong (Post 571387)
Yes, indeed my discretisation still yields 88 deg of non-orthogonality.

Yes, this was expected result, because you must take care of planar angles between edges in each block - they all should be near 90 degrees

Quote:

Originally Posted by czhongrong (Post 571387)
1) Are points 4, 6, 8, 9, 13, 14 all arbitrary points on the circle which I can choose on my own?

Yes, they are arbitrary, and with their position you can adjust non-orthogonality.
For the first iteration, you can assume that line 2-5 have length equal or slighly larger then line 3-2. Line 13-8 inclined to line 12-10 with angle ~ 30 degrees


Quote:

Originally Posted by czhongrong (Post 571387)
2) I will need to follow this discretization on the upper left half of the geometry too right (i.e. mirror on the left)?

Yes, you need to mirror upper right blocks on the upper left to get upper part of your geometry. Then, you must creat lower part of geometry. For this you can look at tutorial tutorials/stressAnalysis/solidDisplacementFoam/plateHole

czhongrong November 2, 2015 04:51

For the lower part of my geometry, can I just model it like how I used to, in my earlier posts? By the diagonals 0-12 and 13-1?

mkraposhin November 2, 2015 04:59

1 Attachment(s)
Quote:

Originally Posted by czhongrong (Post 571398)
For the lower part of my geometry, can I just model it like how I used to, in my earlier posts? By the diagonals 0-12 and 13-1?

Yes, you can, but if you will do lower part of mesh like in example tutorials/stressAnalysis/solidDisplacementFoam/plateHole
or like the top part, you will get better mesh quality, i think.

Also, please note, that in any case you will need to save blocks between outer and inner cylinders

See attachment

czhongrong November 2, 2015 05:03

Save blocks?

mkraposhin November 2, 2015 05:05

1 Attachment(s)
I attached file with lower part of mesh

czhongrong November 2, 2015 05:12

Thanks so much! I will give it a try and update again!

czhongrong November 3, 2015 04:01

2 Attachment(s)
Hi mkraposhin,

HELP! I've created the mesh and encountered some error in blockMesh as follows. I'm not sure if my labelling sequence in hex blocks are correct. :confused: Attached is my schematic layout, and blockMeshDict.

In the schematic layout, blue ink corresponds to the hex block numbers in blockMeshDict for better reference.

Quote:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
"/scratch/wyquek1/gap3mm1/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 888
Found 8 undefined faces in mesh; adding to default patch.

Check topology

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

Creating block offsets
Creating merge list

--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 10 and 11

From function blockMesh::calcMergeInfo()
in file blockMesh/blockMeshMerge.C at line 221.

FOAM exiting

mkraposhin November 7, 2015 06:03

Hi,

i think, you must start by adding blocks one by one to find which block causes error. Also, you must disable all patches at this step

czhongrong November 7, 2015 06:16

Erm, how can I disable patches?

mkraposhin November 7, 2015 06:40

Quote:

Originally Posted by czhongrong (Post 572303)
Erm, how can I disable patches?

Just comment everything in boundaries section

I mean here:
Code:

boundary
(
//
//
);


czhongrong November 7, 2015 06:48

Thanks a lot! I'll try it out soon...

czhongrong November 7, 2015 10:41

blockMesh crashed while "creating topology patches" after I blocked out "boundary", and had the following error:

Quote:

--> FOAM FATAL ERROR:
hanging pointer, cannot dereference

mkraposhin November 9, 2015 09:46

1 Attachment(s)
Hi, i checked your blockMeshDict and i can propose next changes

1) If you want to comment something between '(' and ')' brackets, use two slashes, for example:
Code:

//    inlet
//    {
//        type wall;
//        faces
//        (
//            (6 5 63 92)      //0
//            (92 63 62 91)    //1
//            (91 62 61 90)    //2
//            (90 61 60 89)    //3
//            (89 60 0 9)      //4
//        );
//    }

2) The problems with blocks, with which you faced several days before are result of incorrect specification of directions of blocks. Each block in OpenFOAM uses next specification of directions:
  • direction e1 - between point 1 and 2 of block
  • direction e2 - between point 2 and 3 of block
  • direction e3 - normal to the plane of e1 and e2 (e3 = e1^e2)

When you specified block 10 as
Code:

hex (22 43 52 51 26 72 81 80) (30 20 20) simpleGrading (100 1 1)
it means, that e1 direction specified from point 22 to point 43, e2 direction specified from point 43 to 52 and direction e3 is orthogonal to e1 and e2. It means, that all edges that belongs to e1 will be partitioned in 30 parts, all edges that are belongs to e2 direction will be partitioned in 20 parts and all edges that are belongs to e3 direction will be partitioned in 20 parts

But in block 11
Code:

hex (53 4 52 43 82 7 81 72) (30 20 20) simpleGrading (100 1 1)
You specified e1 to be from point 53 to 4 and direction e2 to be from point 4 to 52. Their partitions are 30 and 20, consequently. This means, that edge 43-52 will have 30 part in block 11 as it's a direction e1. But in block 10 edge 43-52 will have 20 parts, because you specified it to belong to direction e2.

So, you need to correct directions for all blocks with errors
For example - see attached file

czhongrong November 10, 2015 06:52

2 Attachment(s)
I've done according to what you've instructed, but now I encountered another error.:confused: Apparently, blockMesh said I have undefined faces, which I couldn't figure out as I have listed all the faces. Subsequently, checkMesh stated "Number of edges not aligned with or perpendicular to non-empty directions: 1208760".

Attached is my schematic layout (i've re-numbered my points), and my blockMeshDict.


Quote:

Create time

Creating block mesh from
"/scratch/wyquek1/gap3mm1/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 888
Found 6 undefined faces in mesh; adding to default patch.

Check topology

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

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1

Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (-0.625 -0.5 0) (1.875 0.5 1.5)
nPoints: 857491
nCells: 810000
nFaces: 2476800
nInternalFaces: 2383200
----------------
Patches
----------------
patch 0 (start: 2383200 size: 4500) name: inlet
patch 1 (start: 2387700 size: 900) name: outlet
patch 2 (start: 2388600 size: 9000) name: upperWall
patch 3 (start: 2397600 size: 8100) name: ground_wall
patch 4 (start: 2405700 size: 11700) name: cylinder
patch 5 (start: 2417400 size: 27000) name: lateral_front
patch 6 (start: 2444400 size: 27000) name: lateral_back
patch 7 (start: 2471400 size: 5400) name: defaultFaces

End
Quote:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 857491
faces: 2476800
internal faces: 2383200
cells: 810000
boundary patches: 8
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 810000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
*Number of regions: 2
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 4500 4681 ok (non-closed singly connected)
outlet 900 961 ok (non-closed singly connected)
upperWall 9000 9362 ok (non-closed singly connected)
ground_wall 8100 8432 ok (non-closed singly connected)
cylinder 11700 12090 ok (non-closed singly connected)
lateral_front 27000 27661 ok (non-closed singly connected)
lateral_back 27000 27661 ok (non-closed singly connected)
defaultFaces 5400 5642 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.625 -0.5 0) (1.875 0.5 1.5)
Mesh (non-empty, non-wedge) directions (0 1 1)
Mesh (non-empty) directions (0 1 1)
***Number of edges not aligned with or perpendicular to non-empty directions: 1208760
<<Writing 626419 points on non-aligned edges to set nonAlignedEdges
Boundary openness (5.119152811e-17 1.237583009e-14 3.460884152e-15) OK.
Max cell openness = 5.357615177e-16 OK.
Max aspect ratio = 580.0003633 OK.
Minumum face area = 2.688478977e-08. Maximum face area = 0.001666666667. Face area magnitudes OK.
Min volume = 1.347951296e-09. Max volume = 1.593322438e-05. Total volume = 3.745718059. Cell volumes OK.
Mesh non-orthogonality Max: 48.40055691 average: 6.484578965
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.6070497176 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

mkraposhin November 11, 2015 03:49

1 Attachment(s)
Because you introduced new block, that is not connected to others. You must split this block to connect to point 4, 59, 60, 61, 62, 1. See attached jpg for example, new points are marked with red color

Also, i see that your mesh have a very large aspect ration
Code:

Max aspect ratio = 580.0003633
OpenFOAM's checkMesh says that it's OK, but from my experience i can tell you that you must reduce it with at least 10 times, lets say to 58.0

czhongrong November 11, 2015 03:54

How can I reduce the max aspect ratio? Would simpleGrading help? Because now I'm just testing the mesh with simpleGrading (1 1 1), to see if it works...

mkraposhin November 11, 2015 04:17

You must inrease number of discretization points in z direction for all blocks and number of discretization points for large blocks in x and y directions - blocks like 38-59-4-58.

Or, you can decrease number of discretization points in radial direction and azimuthal directions (blocks in the circle and blocks in the cross)

czhongrong November 11, 2015 04:58

Thanks!! I've managed to solve the undefined patches! Now I'm trying to lower the max aspect ratio...

Thank you so much! It is of indeed great help for my project!

mkraposhin November 13, 2015 04:20

Hi,
did your simulation converged with the new mesh?

czhongrong November 13, 2015 04:25

The core processors are idling though, I will update once I got it to run...

czhongrong November 13, 2015 08:46

UPDATE: The simulation seems to be running well! Thanks a lot!

czhongrong November 19, 2015 23:37

1 Attachment(s)
Hi mkraposhin,

I've encountered some problem with my simulation. It keeps getting this error. See attached for log(only an extract). It looks like it suddenly diverges. Is it a problem with my mesh?

checkMesh as follows(I can only reduce my max aspect ratio to 76.8):

Quote:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 1986740
faces: 5826400
internal faces: 5693600
cells: 1920000
boundary patches: 7
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 1920000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 16000 16261 ok (non-closed singly connected)
outlet 16000 16261 ok (non-closed singly connected)
upperWall 19200 19481 ok (non-closed singly connected)
ground_wall 16000 16261 ok (non-closed singly connected)
cylinder 41600 41860 ok (non-closed singly connected)
lateral_front 12000 12340 ok (non-closed singly connected)
lateral_back 12000 12340 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.625 -0.5 0) (1.875 0.5 1.5)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (1.950403867e-14 -8.903364551e-14 -3.104133787e-15) OK.
Max cell openness = 5.224572217e-16 OK.
Max aspect ratio = 76.82851875 OK.
Minumum face area = 7.05338283e-08. Maximum face area = 0.00148959375. Face area magnitudes OK.
Min volume = 6.612546403e-10. Max volume = 1.396494141e-05. Total volume = 3.745718474. Cell volumes OK.
Mesh non-orthogonality Max: 48.23810345 average: 6.459839068
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.6018542669 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

mkraposhin November 20, 2015 04:05

Hi, i think that your mesh is good.

As i undestrand, you are using transient solver (pimpleFoam?)

Try next:

1) Set momentumPredictor in fvSolution->PIMPLE to false
2) Set nCorrectors to 2
3) Reduce time step at least 4 times (set maxCo to 0.5)

czhongrong November 20, 2015 04:32

1 Attachment(s)
Quote:

Originally Posted by mkraposhin (Post 574150)
Hi, i think that your mesh is good.

As i undestrand, you are using transient solver (pimpleFoam?)

Try next:

1) Set momentumPredictor in fvSolution->PIMPLE to false
2) Set nCorrectors to 2
3) Reduce time step at least 4 times (set maxCo to 0.5)

Yes, I'm using pimpleFoam.

1) I do not have a "momentumPredictor" entry in fvSolution. Attached is my fvSolution file.

2) nCorrectors was initially 2.

3) Currently my deltaT is 1E-4 in controlDict, so decrease by 4x right?

mkraposhin November 20, 2015 04:58

Quote:

Originally Posted by czhongrong (Post 574154)
Yes, I'm using pimpleFoam.

1) I do not have a "momentumPredictor" entry in fvSolution. Attached is my fvSolution file.

2) nCorrectors was initially 2.

Code:

PIMPLE
{
    momentumPredictor false; //this disables prediction of velocity using pressures from old time step
    nOuterCorrectors    1;
    nCorrectors        2;
    nNonOrthogonalCorrectors 1; //must be at least one for non orthogonal case
    pRefCell            0;
    pRefValue          0;
}

Quote:

Originally Posted by czhongrong (Post 574154)
3) Currently my deltaT is 1E-4 in controlDict, so decrease by 4x right?


From the log i saw that your Co number is larger then 2. This value is acceptable for pimpleFoam, but i would recommend you to decrease time step at least 4 times. When you will be sure that stability is not dependent on time step, you can increase deltaT again (or maxCo)


All times are GMT -4. The time now is 18:08.