CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Unusual velocity profile with pentahedra cells (https://www.cfd-online.com/Forums/openfoam/199903-unusual-velocity-profile-pentahedra-cells.html)

tdof March 19, 2018 03:50

Unusual velocity profile with pentahedra cells
 
Hi all,

I'm doing some studies on an extrusion head and created the mesh mostly via rotation and extrusion in Hypermesh which resulted in pentahedra cells along the middle axis of a J-bend right after the inlet. The odd thing is that the velocity in these pentahedra cells is a lot lower than in their surrounding cells, but it continues to converge to its surrounding velocity with increasing runtime. I remembered that I saw a similar behaviour when doing first examples in OpenFOAM with a 5 degree straight pipe section with pentahedra along the middle axis and hexahedra elsewhere. My guess is that OpenFOAM has some sort of problem with pentahedra cells, but I can't think of a reason why. Is it the cell size? This behaviour is independent of fluid property and I've provided a link to the case (without mesh since I can't publish it), but there are a few pictures. Does anybody have an idea what's happening and how to prevent it, apart from using another mesh structure?

https://1drv.ms/f/s!AqGKZzn3ghyumBowygR94yGGdqlz

Saideep March 19, 2018 09:45

Hi,

I did observe this sort of behavior in the interFoam solver for a complex mesh of mine but I realized it was due to numerical dispersion. I changed the solver a bit to solve this issue.

Further few things to be kept in mind are the "goodness of your mesh": maybe there is a better mesh than the one you have [try checking with "checkMesh" and see for any mesh fails]. If everything was fine, atleast the skewness shall fail which is good to know.

Later, if the mesh is already good enough, check for the schemes you use as "Gauss linear" is good for orthogonal meshes. Also, try setting your Courants number or ideally your time step size less initially.

Hope this helps!!

tdof March 19, 2018 10:14

Hi Saideep,

how did you change the solver exactly? Were the failing cells also pentahedra?

Here's the checkMesh output:

Code:

Mesh stats
    points:          249057
    faces:            708555
    internal faces:  668055
    cells:            229950
    faces per cell:  5.98656
    boundary patches: 4
    point zones:      0
    face zones:      1
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    226890
    prisms:        3000
    wedges:        0
    pyramids:      30
    tet wedges:    0
    tetrahedra:    30
    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                 
    fixedWalls          23820    24646    ok (non-closed singly connected) 
    sym                15330    16129    ok (non-closed singly connected) 
    inlet              1050    1086    ok (non-closed singly connected) 
    outlet              300      341      ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (0 -0.459 -0.0749979) (0.028 0.009 0.028)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (2.33654e-15 -4.29265e-18 -1.15824e-16) OK.
    Max cell openness = 1.01507e-15 OK.
    Max aspect ratio = 142.191 OK.
    Minimum face area = 1.09322e-08. Maximum face area = 6.8249e-06.  Face area magnitudes OK.
    Min volume = 1.83692e-12. Max volume = 3.14243e-09.  Total volume = 0.000141659.  Cell volumes OK.
    Mesh non-orthogonality Max: 56.3886 average: 9.28842
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.42746 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

There definitely is a better mesh, this problem probably stems from the mesh creation method I used. I can't seem to get it running with a tetrahedra mesh using Hypermesh as it can't handle the geometry all too well. It always creates a few very small tetras that I can't get rid of no matter how I alter the settings, and it doesn't support merging tetras to polyhedras.

Have a look at the system folder in the link I posted.

fvschemes:

Code:

ddtSchemes
{
    default        Euler;
}

    gradSchemes
    {
        default leastSquares;
        grad(DU) leastSquares;
        snGradCorr(DU) leastSquares;
        grad(sigma) leastSquares;
    }


divSchemes
{
    default                  Gauss linear;
    div(phi,U)              Gauss upwind;
    div(phi,sigma)          Gauss upwind;
    div(phi,sigmafirst)          Gauss upwind;
    div(phi,sigmasecond)          Gauss upwind;
    div(phi,sigmathird)          Gauss upwind;
    div(phi,sigmafourth)          Gauss upwind;
    div(phi,sigmafifth)          Gauss upwind;       
        div(phi,sigmasixth)          Gauss upwind;
        div(phi,sigmaseventh)          Gauss upwind;
    div(tau)                Gauss linear;
    div(taufirst)                Gauss linear;
    div(tausecond)                Gauss linear;
    div(tauthird)                Gauss linear;
    div(taufourth)                Gauss linear;
        div(taufifth)                Gauss linear;
    div(tausixth)                Gauss linear;
    div(tauseventh)                Gauss linear;
}

laplacianSchemes
{
    default                      Gauss linear corrected;
    laplacian(etaPEff,U)        Gauss linear corrected;
    laplacian(etaPEff+etaS,U)    Gauss linear corrected;
    laplacian((1|A(U)),p)        Gauss linear corrected;
}

interpolationSchemes
{
    default          linear;
    interpolate(HbyA) linear;
}

snGradSchemes
{
    default        corrected;
}

Gauss linear isn't recommended at least for gradSchemes, see https://www.cfd-online.com/Forums/op...ed-meshes.html

The Courant number is not that relevant for the viscoelastic simulations at hand (I forgot to mention those) as it won't reach critical regions since other stability criteria hit first. The time step is limited to 1e-3 and starts at 1e-5.

tdof March 27, 2018 05:22

Well, I've found the error. I've made a stupid mistake defining the viscoelastic properties and with the right definitions, it works as intended.


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