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

Large contrasting values across adjacent cells

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By piu58
  • 1 Post By Joshua14
  • 1 Post By piu58

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2017, 08:34
Default Large contrasting values across adjacent cells
  #1
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Hi all

Apologies as this is very basic, trying to learn OpenFOAM in preparation for more complex sims. I am running a simple 2D case in potentialFoam, where air is entering from the left and exiting at the top and right, encountering a triangular ridge in the centre. In the solution however I am getting large contrasting values across the cells. (http://i.imgur.com/EqrlL0y.png) I am guessing it is due to the mesh, but checkMesh registers it as okay and I've messed around with increasing cell count/grading with no success.

The mesh: http://i.imgur.com/kobL1OJ.png

Mesh zoomed to the area of contrast: http://i.imgur.com/4ylAZHa.png

blockMeshDict:

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

convertToMeters 1;

vertices
(

(0 100 -0.5)
(46.25 100 -0.5)
(50 100 -0.5)
(53.75 100 -0.5) //3
(100 100 -0.5) //4
(0 5.47 -0.5)
(46.25 5.47 -0.5)
(50 11.99 -0.5)
(53.75 5.47 -0.5) //8
(100 5.47 -0.5) //9
(0 0 -0.5)
(43.09 0 -0.5)
(44.23 0 -0.5)
(47.115 5 -0.5)
(50 10 -0.5)
(52.885 5 -0.5)
(55.77 0 -0.5)
(56.91 0 -0.5)
(100 0 -0.5)

(0 100 0.5)
(46.25 100 0.5)
(50 100 0.5)
(53.75 100 0.5)
(100 100 0.5)
(0 5.47 0.5)
(46.25 5.47 0.5)
(50 11.99 0.5)
(53.75 5.47 0.5)
(100 5.47 0.5)
(0 0 0.5)
(43.09 0 0.5)
(44.23 0 0.5)
(47.115 5 0.5)
(50 10 0.5)
(52.885 5 0.5)
(55.77 0 0.5)
(56.91 0 0.5)
(100 0 0.5)

);

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

);

edges
(
);

boundary
(

    inlet
    {
        type patch;
        faces
        (
			(10 5 24 29)
			(5 0 19 24)

        );
    }
    outlet
    {
        type patch;
        faces
        (
			(0 1 20 19)
			(1 2 21 20)
			(2 3 22 21)
			(3 4 23 22)
			(4 9 28 23)
			(9 18 37 28)
        );
    }
    fixedWalls
    {
        type wall;
        faces
        (
			(11 10 29 30)
			(12 11 30 31)
			(13 12 31 32)
			(14 13 32 33)
			(15 14 33 34)
			(16 15 34 35)
			(17 16 35 36)
			(18 17 36 37)

        );
    }

);

mergePatchPairs
(
);

// ************************************************************************* //
Again, sorry this is basic; I have looked online and messed around in the files for a while without any success, so any advice would be appreciated.

Cheers
sturgeon is offline   Reply With Quote

Old   June 26, 2017, 14:11
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I think the solution you got may be physical plausible: There should be a large increasing in pressure at the top of the triangle. I think you gave the pressure here.

I say "plausible" and not "correct" because your problem is perhaps not a potential problem so the potential solution is only a first guess.
sturgeon likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   June 26, 2017, 15:00
Default
  #3
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Thank you piu. Sorry though, I should have been more clear - I meant the contrast between the light blue triangular part and the darker blue surroundings, which aligns with the different blocks of the mesh, which made me feel like there was something wrong with the way I'd meshed it.
sturgeon is offline   Reply With Quote

Old   June 26, 2017, 16:01
Default
  #4
Member
 
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9
Joshua14 is on a distinguished road
Quote:
Originally Posted by sturgeon View Post
Thank you piu. Sorry though, I should have been more clear - I meant the contrast between the light blue triangular part and the darker blue surroundings, which aligns with the different blocks of the mesh, which made me feel like there was something wrong with the way I'd meshed it.
It looks like the culprit is the change in the cell orientation between these regions. You can either try remeshing with finer cells where there is larger changes between the regions, or try a different block structure.

Currently you use 10 different blocks. Maybe try less blocks. You can also always try to mesh with snappy.

Joshua
sturgeon likes this.
Joshua14 is offline   Reply With Quote

Old   June 26, 2017, 18:10
Default
  #5
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Quote:
Originally Posted by Joshua14 View Post
It looks like the culprit is the change in the cell orientation between these regions. You can either try remeshing with finer cells where there is larger changes between the regions, or try a different block structure.

Currently you use 10 different blocks. Maybe try less blocks. You can also always try to mesh with snappy.

Joshua
Thank you Joshua, I will look into this and see if it resolves the issue. Cheers.
sturgeon is offline   Reply With Quote

Old   June 27, 2017, 00:13
Default
  #6
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
You used a triangular mesh. Such meshes are known to be diffusive, because they realize a first order approximation. I strongly recommend a hex mesh.
sturgeon likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   June 27, 2017, 08:23
Default
  #7
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Quote:
Originally Posted by piu58 View Post
You used a triangular mesh. Such meshes are known to be diffusive, because they realize a first order approximation. I strongly recommend a hex mesh.
I am attempting to rectify this but I don't understand how to get blockMesh to do this. The layout of my geometry was trying to mirror the cylinder case tutorial, which uses hexes and executes properly... but I don't see anything different about its blockMeshDict versus mine. Do the sharp edges prevent the use of hexes over triangles?
sturgeon is offline   Reply With Quote

Old   June 27, 2017, 09:28
Default
  #8
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
I believe Sturgeon didn't use a tetrahedral mesh. It is more likely a common visualization issue with ParaView, which decomposes the polyhedral elements into tetrahedra for any good reason I still ignore. You can see the correct mesh by unclicking the option Decompose polyhedra (see attached pics.).
Now coming back to your problem... my initial guess is that it is related with the sudden non-orthogonality in the transition regions.
1st question: Are you using nonOrthogonal correctors?
(fvSolution file -> nNonOrthogonalCorrectors)
2nd question: Are you using corrected schemes? (fvScheme file -> laplacianSchemes & snGradSchemes)

PV_decomposePH.jpg

PV_NOTdecomposePH.jpg
guin is offline   Reply With Quote

Old   June 27, 2017, 11:33
Default
  #9
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Quote:
Originally Posted by guin View Post
I believe Sturgeon didn't use a tetrahedral mesh. It is more likely a common visualization issue with ParaView, which decomposes the polyhedral elements into tetrahedra for any good reason I still ignore. You can see the correct mesh by unclicking the option Decompose polyhedra (see attached pics.).
Now coming back to your problem... my initial guess is that it is related with the sudden non-orthogonality in the transition regions.
1st question: Are you using nonOrthogonal correctors?
(fvSolution file -> nNonOrthogonalCorrectors)
2nd question: Are you using corrected schemes? (fvScheme file -> laplacianSchemes & snGradSchemes)

Attachment 56980

Attachment 56981
I believe you are correct about the mesh - I can't find that option in ParaView but when I disable the cell interpolation and just have them coloured by absolute value it's pretty clear they're not triangular.

My nNonOrthogonalCorrectors is set to 3, as it's copied directly from the cylinder case. Both of the schemes you mentioned are the corrected versions, like in the cylinder case.
sturgeon is offline   Reply With Quote

Reply


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] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 03:21
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 22:38
[ICEM] Problem with prism cells sidharath ANSYS Meshing & Geometry 0 September 1, 2015 07:09
[snappyHexMesh] snappyHexMesh Segmentation Fault avd28 OpenFOAM Meshing & Mesh Conversion 11 May 11, 2015 20:32
physical boundary error!! kris Siemens 2 August 3, 2005 00:32


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