CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Discontinuity in Paraview (http://www.cfd-online.com/Forums/openfoam-bugs/102554-discontinuity-paraview.html)

Mkoll May 28, 2012 04:41

Discontinuity in Paraview
 
3 Attachment(s)
Hi everyone,

First post, i hope you can help me :)
I'm french so, sorry if i make too big mistakes^^


So, i have a discontinuity in my simulation (using twoLiquidMixingFoam) when i try to simulate an avalanche interacting with an obstacle.
You can see that with attached files (bug, bug2, bug3).
I hope you can tell me how to fix that.

I'm using OpenFOAM 1.6.
I also join blockMeshDict and boundaries.
Quote:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0)
(20 0 0)
(20.4 0 0)
(38 0 0)
(0 0.6 0)
(20 0.6 0)
(20.4 0.6 0)
(38 0.6 0)
(0 10 0)
(20 10 0)
(20.4 10 0)
(38 10 0)
(0 0 0.1)
(20 0 0.1)
(20.4 0 0.1)
(38 0 0.1)
(0 0.6 0.1)
(20 0.6 0.1)
(20.4 0.6 0.1)
(38 0.6 0.1)
(0 10 0.1)
(20 10 0.1)
(20.4 10 0.1)
(38 10 0.1)
);

blocks
(
hex (0 1 5 4 12 13 17 16) (125 10 1) simpleGrading (1 1 1)
hex (2 3 7 6 14 15 19 18) (125 10 1) simpleGrading (1 1 1)
hex (4 5 9 8 16 17 21 20) (125 50 1) simpleGrading (1 1 1)
hex (5 6 10 9 17 18 22 21) (25 50 1) simpleGrading (1 1 1)
hex (6 7 11 10 18 19 23 22) (125 50 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall leftWall
(
(0 12 16 4)
(4 16 20 8)
)
wall rightWall
(
(7 19 15 3)
(11 23 19 7)
(8 20 21 9)
(9 10 22 21)
(10 11 23 22)
)
wall lowerWall
(
(0 1 13 12)
(1 5 17 13)
(5 6 18 17)
(2 14 18 6)
(2 3 15 14)
)

(8 20 21 9)
(9 10 22 21)
(10 11 23 22)


);

mergePatchPairs
(
);
Quote:

FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
leftWall
{
type wall;
nFaces 60;
startFace 32155;
}
rightWall
{
type wall;
nFaces 60;
startFace 32215;
}
lowerWall
{
type wall;
nFaces 295;
startFace 32275;
}
defaultFaces
{
type empty;
nFaces 32500;
startFace 32845;
}
)
Thanks,
Jonathan

MartinB May 28, 2012 06:29

Hi Jonathan,

you should refine your mesh around the obstacle. Have a look at the different cell sizes there ("Surface with edges" visualization in Paraview).

You can do this by using simpleGrading parameters in the blocks definition part like this:
Code:

FoamFile
 {
 version 2.0;
 format ascii;
 class dictionary;
 object blockMeshDict;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

 convertToMeters 1;

 vertices
 (
 (0 0 0)
 (20 0 0)
 (20.4 0 0)
 (38 0 0)
 (0 0.6 0)
 (20 0.6 0)
 (20.4 0.6 0)
 (38 0.6 0)
 (0 10 0)
 (20 10 0)
 (20.4 10 0)
 (38 10 0)
 (0 0 0.1)
 (20 0 0.1)
 (20.4 0 0.1)
 (38 0 0.1)
 (0 0.6 0.1)
 (20 0.6 0.1)
 (20.4 0.6 0.1)
 (38 0.6 0.1)
 (0 10 0.1)
 (20 10 0.1)
 (20.4 10 0.1)
 (38 10 0.1)
 );

 blocks
 (
 hex (0 1 5 4 12 13 17 16) (125 10 1) simpleGrading (0.05 1 1)
 hex (2 3 7 6 14 15 19 18) (125 10 1) simpleGrading (20 1 1)
 hex (4 5 9 8 16 17 21 20) (125 50 1) simpleGrading (0.05 1 1)
 hex (5 6 10 9 17 18 22 21) (25 50 1) simpleGrading (1 1 1)
 hex (6 7 11 10 18 19 23 22) (125 50 1) simpleGrading (20 1 1)
 );

 edges
 (
 );

 patches
 (
 wall leftWall
 (
 (0 12 16 4)
 (4 16 20 8)
 )
 wall rightWall
 (
 (7 19 15 3)
 (11 23 19 7)
 (8 20 21 9)
 (9 10 22 21)
 (10 11 23 22)
 )
 wall lowerWall
 (
 (0 1 13 12)
 (1 5 17 13)
 (5 6 18 17)
 (2 14 18 6)
 (2 3 15 14)
 )

 //(8 20 21 9)
 //(9 10 22 21)
 //(10 11 23 22)


 );

 mergePatchPairs
 (
 );

Martin

Mkoll May 28, 2012 07:22

4 Attachment(s)
Hi Martin

Thanks for answering.

I tried with your blockMesh
It seems to be a little better ?
I attached some screenshots.



Jonathan

lovecraft22 May 28, 2012 15:55

As already pointed out by Martin, it seems like you have a way too big discontinuity in your mesh. I would suggest you to post a picture that depicts your mesh around the obstacle.

Mkoll May 28, 2012 16:38

1 Attachment(s)
Hi lovecraft22

Thanks for answering.

I hope it's what you ask.

lovecraft22 May 28, 2012 16:44

Yes it is. As you can see you have a big difference in your cells, as a matter of fact it the picture you attached the cells above the obstacle cannot be seen as the blue lines are too close to each other. So you can either make a coarser mesh in that region or make a finer mesh in the surrounding regions.

Mkoll May 29, 2012 01:32

Hi lovecraft22

The goal was to make finer the mesh around the obstacle.
I'll try with the same precision everywhere.

Thanks,
Jonathan

lovecraft22 May 29, 2012 03:11

It can (and should) be finer around the obstacle but the transition between one mesh level and the one close to it should be smooth.


All times are GMT -4. The time now is 04:54.