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

Diverging simulation

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2015, 05:12
Default
  #21
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
Thanks so much! I will give it a try and update again!
czhongrong is offline   Reply With Quote

Old   November 3, 2015, 04:01
Default
  #22
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
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. 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:olyMesh(... 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
Attached Images
File Type: jpg Photo 3-11-15, 4 53 13 PM.jpg (88.8 KB, 12 views)
Attached Files
File Type: txt blockMeshDict.txt (9.4 KB, 1 views)

Last edited by czhongrong; November 8, 2015 at 05:35.
czhongrong is offline   Reply With Quote

Old   November 7, 2015, 06:03
Default
  #23
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
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
mkraposhin is offline   Reply With Quote

Old   November 7, 2015, 06:16
Default
  #24
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
Erm, how can I disable patches?
czhongrong is offline   Reply With Quote

Old   November 7, 2015, 06:40
Default
  #25
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by czhongrong View Post
Erm, how can I disable patches?
Just comment everything in boundaries section

I mean here:
Code:
boundary
(
//
//
);
mkraposhin is offline   Reply With Quote

Old   November 7, 2015, 06:48
Default
  #26
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
Thanks a lot! I'll try it out soon...
czhongrong is offline   Reply With Quote

Old   November 7, 2015, 10:41
Default
  #27
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
blockMesh crashed while "creating topology patches" after I blocked out "boundary", and had the following error:

Quote:
--> FOAM FATAL ERROR:
hanging pointer, cannot dereference
czhongrong is offline   Reply With Quote

Old   November 9, 2015, 09:46
Default
  #28
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
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
Attached Images
File Type: jpg blockScheme-1.jpg (61.4 KB, 13 views)
mkraposhin is offline   Reply With Quote

Old   November 10, 2015, 06:52
Default
  #29
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
I've done according to what you've instructed, but now I encountered another error. 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:olyMesh(... 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
Attached Images
File Type: jpg Photo 10-11-15, 7 46 06 PM.jpg (126.2 KB, 5 views)
Attached Files
File Type: txt blockMeshDict.txt (9.9 KB, 2 views)
czhongrong is offline   Reply With Quote

Old   November 11, 2015, 03:49
Default
  #30
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
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
Attached Images
File Type: jpg blockScheme-1.jpg (62.3 KB, 7 views)
mkraposhin is offline   Reply With Quote

Old   November 11, 2015, 03:54
Default
  #31
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
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...
czhongrong is offline   Reply With Quote

Old   November 11, 2015, 04:17
Default
  #32
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
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)
mkraposhin is offline   Reply With Quote

Old   November 11, 2015, 04:58
Default
  #33
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
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!
czhongrong is offline   Reply With Quote

Old   November 13, 2015, 04:20
Default
  #34
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hi,
did your simulation converged with the new mesh?
mkraposhin is offline   Reply With Quote

Old   November 13, 2015, 04:25
Default
  #35
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
The core processors are idling though, I will update once I got it to run...
czhongrong is offline   Reply With Quote

Old   November 13, 2015, 08:46
Default
  #36
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
UPDATE: The simulation seems to be running well! Thanks a lot!
czhongrong is offline   Reply With Quote

Old   November 19, 2015, 23:37
Default
  #37
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
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
Attached Files
File Type: txt log.txt (169.9 KB, 2 views)
czhongrong is offline   Reply With Quote

Old   November 20, 2015, 04:05
Default
  #38
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
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)
mkraposhin is offline   Reply With Quote

Old   November 20, 2015, 04:32
Default
  #39
Member
 
Join Date: Sep 2015
Posts: 30
Rep Power: 10
czhongrong is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
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?
Attached Files
File Type: txt fvSolution.txt (3.2 KB, 4 views)
czhongrong is offline   Reply With Quote

Old   November 20, 2015, 04:58
Default
  #40
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by czhongrong View Post
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 View Post
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)
mkraposhin is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge file sizes when Running VOF simulation aarratia FLUENT 0 May 8, 2014 12:27
Supersonic Nozzle Exhaust Simulation mikeh FLUENT 0 May 1, 2014 21:28
Exporting data of transient simulation DURING a simulation, at user locations ? Milan2013 CFX 0 April 18, 2014 03:47
Simulation of a complex wing in solidworks flow simulation niels1900 FloEFD, FloWorks & FloTHERM 6 April 20, 2011 10:44
GUI crash and simulation engine still running RPJones FLOW-3D 2 November 9, 2010 08:18


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