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/)
-   -   Conversion problem with simpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/248867-conversion-problem-simplefoam.html)

AMR96 April 6, 2023 11:08

Conversion problem with simpleFoam
 
1 Attachment(s)
Hello,

I am new to OF, I'm trying to simulate external flow around an Ahmed body and I am having convergence problems. Initially, I ran the simulation on Ansys and it worked fine with good results. I decided to use the same mesh for OF.

The main problem is that when I use second order schemes, the residuals start decreasing but after a while they stall and start to increase again. This is specially the case with the pressure residual. In addition to residuals, I am also using drag and lift coefficients to monitor the results and those values are also incorrect.

I am using Realizable k-epsilon with wall functions to run the simulation since this was the same algorithm that I ran in Ansys. I also tried k-omega sst but that didn't work either.

I have also tried running the simulation with first order schemes until the residuals are low enough and then changing to second order scheme but unfortunately the same residual behaviour was observed as before.

The mesh quality is not bad as you can see in the checkMesh report below. I have set the nNonOrthogonalCorrectors to 2 in order to addresse the high non-orthogonality.

I would really appreciate any help as I have been trying different schemes and workarounds to make this simulation work for the last three weeks. I am really out of ideas.

The BC file is also attached to the post.

Code:

Mesh stats
    points:          676066
    internal points:  623321
    faces:            6958333
    internal faces:  6857479
    cells:            3393943
    faces per cell:  4.070726
    boundary patches: 6
    point zones:      0
    face zones:      1
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    0
    prisms:        240040
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    3153903
    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              581      361      ok (non-closed singly connected)
    ground_slip        1174    645      ok (non-closed singly connected)
    ground              24242    12465    ok (non-closed singly connected)
    outlet              581      361      ok (non-closed singly connected)
    symmetry            51684    28609    ok (non-closed singly connected)
    car                22592    11462    ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
    FaceZone            Faces    Points  Surface topology
    interior-geom-1-enclosure_enclosure6857479  676065  multiply connected (shared edge)
  <<Writing 675152 conflicting points to set nonManifoldPoints

Checking basic cellZone addressing...
    CellZone            Cells        Points      Volume      BoundingBox
    geom-1-enclosure_enclosure 3393943      676066      19.579551    (-1.1268994 -0.7405 -7.448) (0.27310058 0.1945 7.552)

Checking geometry...
    Overall domain bounding box (-1.1268994 -0.7405 -7.448) (0.27310058 0.1945 7.552)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.3906281e-15 -4.1996552e-16 -8.38449e-18) OK.
    Max cell openness = 4.2124307e-16 OK.
    Max aspect ratio = 7.2929552 OK.
    Minimum face area = 2.965643e-07. Maximum face area = 0.0050927999.  Face area magnitudes OK.
    Min volume = 1.342751e-10. Max volume = 0.00014501842.  Total volume = 19.579551.  Cell volumes OK.
    Mesh non-orthogonality Max: 64.770132 average: 15.500522
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.3385037 OK.
    Coupled point location match (average 0) OK.

fvsolution:
Code:

solvers
{
    p
    {
        solver          GAMG;
        smoother        GaussSeidel;
        tolerance      1e-7;
        relTol          0.01;
    }

    Phi
    {
        $p;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance      1e-8;
        relTol          0.1;
        nSweeps        1;
    }

    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance      1e-15;
        relTol          0.1;
        nSweeps        1;
    }

    epsilon
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance      1e-12;
        relTol          0.1;
        nSweeps        1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 2;
    consistent yes;
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    equations
    {
        U              0.7;
        k              0.5;
        omega          0.5;
    }
       
       
}

cache
{
    grad(U);
}

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

fvscheme:
Code:

ddtSchemes
{
    default        steadyState;
}

gradSchemes
{
    default        leastSquares;
    grad(U)        leastSquares;
}

divSchemes
{
    default        none;
    div(phi,U)      bounded Gauss linearUpwindV grad(U);
    div(phi,k)      Gauss linearUpwind grad(k);
    div(phi,epsilon)  Gauss linearUpwind grad(epsilon);
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

wallDist
{
    method meshWave;
}


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


farzadmech April 11, 2023 04:57

1 Attachment(s)
Dear AMR96
I have also some issues with residuals for some of my case studies(most of them are good, just some them shows increase in residuals). Did you find an answer for your problem? I have attached my residuals to this reply.



Thanks,
Farzad

AMR96 June 8, 2023 12:44

Dear Farzad,

Apologies for my late reply. In my case the problem was due to the mesh. Initially, I used tet mesh which wasn't working. I decided to use the CutCell mesh and that seemed to solve my issue.

Best,

Amirmohammad


All times are GMT -4. The time now is 15:25.