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

simpleFoam convergence issue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2019, 03:55
Default simpleFoam convergence issue
  #1
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
I am new to OpenFoam. I am trying to simulate flow over an aircraft fuselage at Re=36000000. I have created my mesh in ansys meshing using cutcell method with inflation layers and y+ ~ 30 and imported it in Openfoam. I am using k omega SST model and I have specified all boundary conditions to the best of my knowledge. I am using simpleFoam as the solver. The solution does not converge and I am getting completely wrong results. I am pasting my case files below. Can someone please take a look and tell me where the problem is? Any help would be greatly appreciated.



K

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 18.37479;

boundaryField
{
    inlet
    {
      type            fixedValue;
      value          uniform 18.37479;
    }

    outlet
    {
      type            zeroGradient;
    }
    wall
    {
        type            zeroGradient;
    }
    fuselage
    {
        type            kqRWallFunction;
    value        uniform 18.37479;
    }
    symmetry
    {
        type            symmetry;
    }
}
nut
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 1.6496e-5;

boundaryField
{
    inlet
    {
        type            freestream;
        freestreamValue uniform 1.6496e-5;
    }

    outlet
    {
        type            freestream;
        freestreamValue uniform 1.6496e-5;
    }

    wall
    {
        type            nutkWallFunction;
        value           uniform 1.6496e-5;
    }

    fuselage
    {
        type            nutkWallFunction;
        value           uniform 1.6496e-5;
    }

    symmetry
    {
        type            symmetry;
    }
}
omega
Code:
dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 5.4941;

boundaryField
{
    inlet
    {
      type            fixedValue;
      value          uniform 5.4941;
    }

    outlet
    {
      type            zeroGradient;
    }  
  
    wall
    {
        type            zeroGradient;
    }

    fuselage
    {
        type            omegaWallFunction;
    value        uniform 5.4941;
    }

    symmetry
    {
        type            symmetry;
    }
}
p
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            freestreamPressure;
        freestreamValue $internalField;
    }

    wall
    {
        type            zeroGradient;
    }

    fuselage
    {
        type            zeroGradient;
    }

    symmetry
    {
        type            symmetry;
    }
}
U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (70 0 0);

boundaryField
{
    inlet
    {
        type            freestreamVelocity;
        freestreamValue $internalField;
    }

    outlet
    {
        type            zeroGradient;
    }

    wall
    {
        type            slip;
    }

    fuselage
    {
        type            noSlip;
    }

    symmetry
    {
        type            symmetry;
    }
}
fvSolution
Code:
solvers
{
    p
    {
        solver             GAMG;
        tolerance         1e-10;
        relTol             0.01;
        smoother         GaussSeidel;
        nPreSweeps         0;
        nPostSweeps     2;
        cacheAgglomeration on;
        agglomerator faceAreaPair;
        nCellsInCoarsestLevel 120;
        mergeLevels     1;
        maxIter            500;
    }

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

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

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

}

SIMPLE
{       
    nNonOrthogonalCorrectors 3;
    nCorrectors 1; 
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    fields
    {
        p               0.2;
    }    
    equations
    {
        U               0.5;
        k               0.5;
        omega           0.5;
    }
}

cache
{
    grad(U);
}
fvSchemes
Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         cellMDLimited Gauss linear 0.5;
    grad(U)         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      bounded Gauss linearUpwind grad(U);
    div(phi,k)      bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;

}


laplacianSchemes
{
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default no;
    p;
}

wallDist
{
    method meshWave;
} 


// ************************************************************************* //
ControlDict

Code:
application     simpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         1000;

deltaT          1;

writeControl    timeStep;

writeInterval   50;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    forces
    {
        type            forceCoeffs;
        libs            ("libforces.so");
        writeControl    writeTime;

        patches
        (
            fuselage
        );

    rho        rhoInf;
        rhoInf      1.0556;

        CofR        (0.4127 0 0);
        liftDir     (0 0 1);
        dragDir     (1 0 0);
        pitchAxis   (0 1 0);
        magUInf     70;
        lRef        8.669;
        Aref        5.01095;
    }
}
Please let me know where the problem is.
dnsuman is offline   Reply With Quote

Old   November 27, 2019, 04:10
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
did you run checkMesh to check if the quality of your mesh is Ok? Can you post snapshot of you mesh. I had the experience that if there are a lot of thetrahedra in the mesh you use openfoam has convergence problems
mAlletto is offline   Reply With Quote

Old   November 27, 2019, 04:13
Default
  #3
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
by the way are you sure you want to use an incompressible solver for an inflow velocity of 70m/s. I would guess that in some parts of your domain you will reach velocities where the Ma number is above the limit where the flow can be regarded as incompressible
mAlletto is offline   Reply With Quote

Old   November 27, 2019, 23:53
Default
  #4
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
Hi

I have attached the snapshot of the mesh and after giving the check mesh I have got


Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 7-6ef561967074
Exec   : checkMesh
Date   : Nov 28 2019
Time   : 10:12:13
Host   : "freedom"
PID    : 4545
I/O    : uncollated
Case   : /home/leapaero/OpenFOAM/leapaero-7/run/tutorials/incompressible/simpleFoam/fuselage
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           1854705
    faces:            5569374
    internal faces:   5433716
    cells:            1853250
    faces per cell:   5.93719
    boundary patches: 5
    point zones:      0
    face zones:       1
    cell zones:       1

Overall number of cells of each type:
    hexahedra:     1614876
    prisms:        192058
    wedges:        0
    pyramids:      4933
    tet wedges:    16
    tetrahedra:    5274
    polyhedra:     36093
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            5   252
            6   8929
            7   7546
            8   291
            9   12017
           10   83
           11   255
           12   4974
           13   9
           15   1710
           18   25
           21   2

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
                fuselage    41276    33202  ok (non-closed singly connected)
                   inlet     5202     5356  ok (non-closed singly connected)
                    wall    41616    42025  ok (non-closed singly connected)
                symmetry    42362    43443  ok (non-closed singly connected)
                  outlet     5202     5356  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-130 -0.000285276 -65) (130 65 65)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (7.31581e-16 4.9481e-15 -8.75319e-16) OK.
    Max cell openness = 5.31195e-15 OK.
    Max aspect ratio = 185.675 OK.
    Minimum face area = 1.22156e-06. Maximum face area = 1.62551.  Face area magnitudes OK.
    Min volume = 7.9565e-09. Max volume = 2.07182.  Total volume = 2.197e+06.  Cell volumes OK.
    Mesh non-orthogonality Max: 82.2994 average: 6.16104
   *Number of severely non-orthogonal (> 70 degrees) faces: 445.
    Non-orthogonality check OK.
  <<Writing 445 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 2.57593 OK.
    Coupled point location match (average 0) OK.

Mesh OK.
Also I had not thought about the mach number limit thanks for reminding about that but would you be able to help me out in terms of setting the case for compressible or any inputs that would help me a lot.


Thank You
Attached Images
File Type: jpg mesh view2.jpg (169.5 KB, 25 views)
File Type: jpg mesh view1.jpg (183.8 KB, 19 views)
dnsuman is offline   Reply With Quote

Old   November 27, 2019, 23:55
Default
  #5
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
Also after around a 150 iterations the solution used to give a error and i suspect the mesh would be the reason for that error
dnsuman is offline   Reply With Quote

Old   November 28, 2019, 00:40
Default
  #6
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
The mesh seems ok. Did you try to write out the solution a few iterations before it converges. This may give you a hint what's going wrong
mAlletto is offline   Reply With Quote

Old   November 28, 2019, 00:42
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Why do you use so many non orthogonal correctors. The mesh quantity does non require this from my experience
mAlletto is offline   Reply With Quote

Old   November 28, 2019, 01:18
Default
  #8
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
Should I set both of the non orthogonal correctors to 0 one in potential flow and SIMPLE and try running the case?
dnsuman is offline   Reply With Quote

Old   November 28, 2019, 01:33
Default
  #9
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Only for simple. For potentialflow it is fine since I assume you use potentialfoam to initialize the flow field
mAlletto is offline   Reply With Quote

Old   November 28, 2019, 01:35
Default
  #10
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
Sure thank you I'll run the case and post the updates
dnsuman is offline   Reply With Quote

Old   November 28, 2019, 03:36
Default
  #11
New Member
 
Suman Dathathreya
Join Date: Jul 2018
Posts: 13
Rep Power: 7
dnsuman is on a distinguished road
I made the non orthogonal correctors 0 and ran the simulation please go through the logs attached.


log.txt
dnsuman is offline   Reply With Quote

Old   November 28, 2019, 07:47
Default
  #12
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15
Bazinga is on a distinguished road
If mesh and boundary conditions are fine and initialization with potentialFoam does not help, you might want to consider running a case with more numerical diffusion first. For example, use a coarser mesh, and choose 1st order upwind for the div terms of the momentum equations. If this one converges use mapFields to initialize your simulation with 2nd order schemes and finer mesh.
Bazinga is offline   Reply With Quote

Old   November 28, 2019, 16:39
Default
  #13
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Some ideas from my bed:
- numerical predictions might not be time-invariant. might be there appears considerable extent time-variant patterns.
- relaxation factors: increase p to 0.9 and the rest 0.7.
- might use simplec instead of simple. if you use simplec, remove relaxation factor for p completely (delete those lines)
- find alternative boundary conditions to freestream bpundary conditions, and do the tests.
- depending on Ma number might consider to use an equivalent compressible solver
HPE 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
Convergence issue with continuity equation Jake FLUENT 8 June 6, 2018 03:41
simpleFoam: simple 1-D channel flow, yet very strange convergence behavior kishpishar OpenFOAM Running, Solving & CFD 2 June 20, 2013 13:55
Convergence Problems SimpleFOAM Kutti OpenFOAM 16 June 14, 2010 08:12
Getting faster convergence in simpleFoam basneb OpenFOAM 8 February 9, 2010 04:20
Definition of convergence criterion in simpleFoam titio OpenFOAM Running, Solving & CFD 1 February 6, 2010 01:34


All times are GMT -4. The time now is 00:02.