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

pimplefoam doesn't converge

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2020, 17:04
Default pimplefoam doesn't converge
  #1
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Hi
I have made a relatively simple porous geometry for a transient flow. I started by using simplefoam and there was no problem but now I am running pimplefoam+porousity. Unfortunately pimplefoam doesn't converge. I checked the mesh quality and tried to manipulate it to reduce the aspect ratio but it wasn't useful in convergence.
Maybe someone could give any guidance.
Here is the details of the settings:
fvSchemes

Code:
ddtSchemes
{
    default         Euler;
}
gradSchemes
{
    default         Gauss cubic; //leastSquares;
 }

divSchemes
{
    default         none;
    div(phi,U)       bounded Gauss upwind; 
    div((nuEff*dev2(T(grad(U))))) Gauss linear;  
}
snGradSchemes
{
    default         corrected;
}
laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}
fvSolution


Code:
solvers
{
     p_rgh
    {
       solver         PBiCGStab;
       preconditioner  diagonal;
       tolerance       1e-05;
       relTol          0.01;
    }
    p_rghFinal
    {
        $p_rgh;
        tolerance       1e-5;
        relTol          0;
    }
   p
    {
       solver         PBiCGStab;
       preconditioner  diagonal;
       tolerance       1e-05;
       relTol          0.01;
    }
    pFinal
    {
        $p;
        tolerance       1e-5;
        relTol          0;
    }
    "(U|k|epsilon)"
    {
        solver             smoothSolver;
        smoother        GaussSeidel;
        nSweeps         3;
        tolerance        1e-04;
        relTol             0.01;
    }
    UFinal
    {
        $U;
        tolerance       1e-4;
        relTol          0;
    }

  "cellMotionU|cellMotionUFinal"     
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-03;
        relTol          0.01;
    }

   "C|CFinal"
    {
        solver            smoothSolver;
       preconditioner    symGaussSeidel;
       tolerance         1e-3;
      relTol            0;
   }
}

  PIMPLE
  {
    momentumPredictor   no;
    correctPhi          no;
    nOuterCorrectors    50;
    nCorrectors         1;
    nNonOrthogonalCorrectors 2;

    pRefCell        0;
    pRefValue       0;

    moveMeshOuterCorrectors false;

    consistent true;
  residualControl
    {
        U 
        {
            tolerance 1e-4;
            relTol 0;
        }
        p
        {
            tolerance 1e-4;
            relTol 0;
        }
        
        p_rgh
        {
            tolerance 1e-4;
            relTol 0;
        }
    }
  }
 
relaxationFactors
{
    fields
    {
        p               0.8;
        p_rgh           0.8;
        pFinal          1;  // Last outer loop
    }
    equations
    {
       "U|k|epsilon"            0.8;
       "(U|k|epsilon)Final"     1;
      }
}
Here is the chechMesh result:


Code:
Create time

Create mesh for time = 0

Time = 0

Mesh stats
    points:           1141881
    faces:            3552114
    internal faces:   3153886
    cells:            1120000
    faces per cell:   5.9875
    boundary patches: 23
    point zones:      0
    face zones:       6
    cell zones:       4

Overall number of cells of each type:
    hexahedra:     1106000
    prisms:        14000
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    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                  
    pA1ToInt_master1797     1606     multiply connected (shared edge)  
    pA1ToInt_slave1797     1606     multiply connected (shared edge)  
    pA2ToInt_master1797     1606     multiply connected (shared edge)  
    pA2ToInt_slave1797     1606     multiply connected (shared edge)  
    pVToInt_master166920   57285    multiply connected (shared edge)  
    pVToInt_slave166920   57285    multiply connected (shared edge)  
    leftInt    14800    15075    ok (non-closed singly connected)  
    rightInt  14800    15075    ok (non-closed singly connected)  
    frontInt  13200    13467    ok (non-closed singly connected)  
    topInt    5314     5461     ok (non-closed singly connected)  
    bottomInt  5314     5461     ok (non-closed singly connected)  
    leftPA1     400      603      ok (non-closed singly connected)  
    frontPA1    400      603      ok (non-closed singly connected)  
    topPA1      3        8        ok (non-closed singly connected)  
    bottomPA1   3        8        ok (non-closed singly connected)  
    rightPA2    400      603      ok (non-closed singly connected)  
    frontPA2    400      603      ok (non-closed singly connected)  
    topPA2      3        8        ok (non-closed singly connected)  
    bottomPA2   3        8        ok (non-closed singly connected)  
    leftPV       800      1005     ok (non-closed singly connected)  
    rightPV      800      1005     ok (non-closed singly connected)  
    topPV        280      285      ok (non-closed singly connected)  
    bottomPV    280      285      ok (non-closed singly connected)  

Checking faceZone topology for multiply connected surfaces...
    FaceZone            Faces    Points   Surface topology                  
    PA1ToIntZone806      1011     ok (non-closed singly connected)  
    PVToIntZone2160     2361     ok (non-closed singly connected)  
    PA2ToIntZone806      1011     ok (non-closed singly connected)  
    pA1ToInt3594     1606     multiply connected (shared edge)  
    pA2ToInt3594     1606     multiply connected (shared edge)  
    pVToInt333840   57285    multiply connected (shared edge)  
  <<Writing 60067 conflicting points to set nonManifoldPoints

Checking basic cellZone addressing...
    CellZone            Cells        Points       Volume       BoundingBox
    PA1         600          1608         1.11249e-14  (0 0 0) (1.06839e-05 6.76937e-06 0.00025)
    PV           56000        57285        2.6234e-14   (0.00014725 0.000257236 0) (0.00016275 0.000270775 0.00025)
    PA2         600          1608         1.11255e-14  (0.000299316 0 0) (0.00031 6.76937e-06 0.00025)
    Int   1062800      1097661      1.04441e-11  (3.875e-06 0 0) (0.000306125 0.000257236 0.00025)

Checking geometry...
    Overall domain bounding box (0 0 0) (0.00031 0.000270775 0.00025)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.0073e-14 -1.23682e-14 -6.00026e-17) OK.
    Max cell openness = 1.43801e-15 OK.
    Max aspect ratio = 61.5455 OK.
    Minimum face area = 6.875e-14. Maximum face area = 1.48977e-11.  Face area magnitudes OK.
    Min volume = 1.16359e-19. Max volume = 1.86221e-17.  Total volume = 1.04925e-11.  Cell volumes OK.
    Mesh non-orthogonality Max: 30.478 average: 14.398
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.558528 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
log file for last 10 iteration is here:


Code:
PIMPLE: iteration 41
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0795693, Final residual = 0.00076712, No Iterations 411
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0827264, Final residual = 0.000822631, No Iterations 145
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0294893, Final residual = 4.54149e-05, No Iterations 1000
time step continuity errors : sum local = 19096.5, global = -5.00439e-07, cumulative = -1.75157e-06
PIMPLE: iteration 42
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0552106, Final residual = 0.000527625, No Iterations 472
diagonalPBiCGStab:  Solving for p, Initial residual = 0.112314, Final residual = 0.000967299, No Iterations 377
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0654356, Final residual = 0.000235085, No Iterations 1000
time step continuity errors : sum local = 97725.6, global = -4.26801e-07, cumulative = -2.17837e-06
PIMPLE: iteration 43
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0671211, Final residual = 0.000653167, No Iterations 715
diagonalPBiCGStab:  Solving for p, Initial residual = 0.326741, Final residual = 0.00282255, No Iterations 213
diagonalPBiCGStab:  Solving for p, Initial residual = 0.238664, Final residual = 0.000268523, No Iterations 1000
time step continuity errors : sum local = 83865.1, global = -4.25143e-07, cumulative = -2.60351e-06
PIMPLE: iteration 44
diagonalPBiCGStab:  Solving for p, Initial residual = 0.18643, Final residual = 0.00186274, No Iterations 530
diagonalPBiCGStab:  Solving for p, Initial residual = 0.566535, Final residual = 0.00565517, No Iterations 165
diagonalPBiCGStab:  Solving for p, Initial residual = 0.178827, Final residual = 0.000169369, No Iterations 1000
time step continuity errors : sum local = 124603, global = -6.04851e-07, cumulative = -3.20836e-06
PIMPLE: iteration 45
diagonalPBiCGStab:  Solving for p, Initial residual = 0.274872, Final residual = 0.00274587, No Iterations 362
diagonalPBiCGStab:  Solving for p, Initial residual = 0.16728, Final residual = 0.00156138, No Iterations 661
diagonalPBiCGStab:  Solving for p, Initial residual = 0.0732067, Final residual = 0.000538833, No Iterations 1000
time step continuity errors : sum local = 386540, global = 7.54262e-08, cumulative = -3.13294e-06
PIMPLE: iteration 46
diagonalPBiCGStab:  Solving for p, Initial residual = 0.182682, Final residual = 0.00160006, No Iterations 626
diagonalPBiCGStab:  Solving for p, Initial residual = 0.322494, Final residual = 0.00320588, No Iterations 215
diagonalPBiCGStab:  Solving for p, Initial residual = 0.18254, Final residual = 0.000731378, No Iterations 1000
time step continuity errors : sum local = 326844, global = -5.01812e-07, cumulative = -3.63475e-06
PIMPLE: iteration 47
diagonalPBiCGStab:  Solving for p, Initial residual = 0.215133, Final residual = 0.00171668, No Iterations 794
diagonalPBiCGStab:  Solving for p, Initial residual = 0.497876, Final residual = 0.00339729, No Iterations 192
diagonalPBiCGStab:  Solving for p, Initial residual = 0.159462, Final residual = 0.000577509, No Iterations 1000
time step continuity errors : sum local = 619349, global = -3.97768e-07, cumulative = -4.03252e-06
PIMPLE: iteration 48
diagonalPBiCGStab:  Solving for p, Initial residual = 0.298478, Final residual = 0.0492068, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.472865, Final residual = 0.0127205, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.313252, Final residual = 0.00107799, No Iterations 1000
time step continuity errors : sum local = 2.83926e+06, global = 2.86453e-06, cumulative = -1.16798e-06
PIMPLE: iteration 49
diagonalPBiCGStab:  Solving for p, Initial residual = 0.449452, Final residual = 0.148468, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.563206, Final residual = 0.056732, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.241008, Final residual = 0.0296467, No Iterations 1000
time step continuity errors : sum local = 1.41539e+08, global = 3.15228e-06, cumulative = 1.9843e-06
PIMPLE: iteration 50
diagonalPBiCGStab:  Solving for p, Initial residual = 0.524675, Final residual = 0.340216, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.784727, Final residual = 0.170904, No Iterations 1000
diagonalPBiCGStab:  Solving for p, Initial residual = 0.578367, Final residual = 0.0265166, No Iterations 1000
time step continuity errors : sum local = 2.67697e+09, global = 0.000206854, cumulative = 0.000208838
PIMPLE: not converged within 50 iterations
ExecutionTime = 14163 s  ClockTime = 1686 s

Courant Number mean: 9.36403e+10 max: 9.65634e+15
Time = 0.02
Any suggestion will be appreciated.
Regards
efsolat is offline   Reply With Quote

Old   December 21, 2020, 17:32
Default
  #2
New Member
 
Join Date: Dec 2020
Posts: 15
Rep Power: 5
MetEng is on a distinguished road
Your courant # is really high, try changing your solver to adjustableRunTime and set a max Co of 1.
hogsonik and efsolat like this.
MetEng is offline   Reply With Quote

Old   December 21, 2020, 19:30
Default
  #3
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Hello,

Although short time intervals are commonly used to reach convergence, orthogonal issues should be considered as well.

Dr. Trushar B. Gohil said in his virtual training that the max number of nNonOrthogonalCorrectors, for accurate results, is 20. One should also set snGradSchemes to corrected and laplacianSchemes to Gauss linear corrected. Use this knowledge to trouble shoot the large Courant number (Co).

If you know the smallest mesh cell length, from https://openfoamwiki.net/index.php/S...ng_calculation , you can estimate the delta t for Co < 1.
efsolat likes this.
HappyS5 is offline   Reply With Quote

Old   December 24, 2020, 14:43
Default
  #4
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Hi MetEng,
I have tried the adjustTimeStep but it didn't made the pimplfoam converge.
efsolat is offline   Reply With Quote

Old   December 24, 2020, 15:00
Default
  #5
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
Hello,

Although short time intervals are commonly used to reach convergence, orthogonal issues should be considered as well.

Dr. Trushar B. Gohil said in his virtual training that the max number of nNonOrthogonalCorrectors, for accurate results, is 20. One should also set snGradSchemes to corrected and laplacianSchemes to Gauss linear corrected. Use this knowledge to trouble shoot the large Courant number (Co).

If you know the smallest mesh cell length, from https://openfoamwiki.net/index.php/S...ng_calculation , you can estimate the delta t for Co < 1.
Hi Chris

thank you for your reply. It worked well. I tried different solvers and solver settings anf finally chose the following setting for fvSolutions


Code:
solvers
{
     p_rgh
    {
        solver         PCG; 
       preconditioner  DIC;
        tolerance       1e-05;
        relTol          0.001;
    }
    p_rghFinal
    {
        $p_rgh;
        tolerance       1e-5;
        relTol          0.001;
    }
   p
    {
        solver         PCG;
       preconditioner  DIC;
        tolerance       1e-05;
        relTol          0.001;
    }
    pFinal
    {
        $p;
        tolerance       1e-5;
        relTol          0.001;
    }
    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         3;
        tolerance       1e-04;
        relTol          0.01;
    }
    UFinal
    {
        $U;
        tolerance       1e-4;
        relTol          0;
    }

  //  "cellMotionU|cellMotionUFinal"    
  //  {
   //     solver          PCG;
   //     preconditioner  DIC;
    //    tolerance       1e-03;
    //    relTol          0.01;
  //  }

 //   "C|CFinal"
 //   {
  //      solver            smoothSolver;
   //     preconditioner    symGaussSeidel;
   //     tolerance         1e-3;
   //     relTol            0;
   // }
}

  PIMPLE
  {
    momentumPredictor   no;
    correctPhi          no;
    nOuterCorrectors    20;
    nCorrectors         1;
    nNonOrthogonalCorrectors 20;

    pRefCell        0;
    pRefValue       0;

    moveMeshOuterCorrectors false;

    consistent true;
  residualControl
    {
        U 
        {
            tolerance 1e-4;
            relTol 0.001;
        }
        p
        {
            tolerance 1e-4;
            relTol 0.001;
            
        }
        
        p_rgh
        {
            tolerance 1e-4;
            relTol 0.001;
        }
    }
  }
   
relaxationFactors
{
    fields
    {
        p              1;
        p_rgh           1;
     //   pFinal          1;  // Last outer loop
    }
    equations
    {
       "U|k|epsilon"            0.95;
    
    }
}
In this way, the pimplefoam conveged but now the problem is that the courant number increses to very big values.
For instance after 3 time steps the log file is as below


Code:
Courant Number mean: 75523.1 max: 5.99746e+06
Time = 0.04

PIMPLE: iteration 1
DICPCG:  Solving for p, Initial residual = 0.144255, Final residual = 0.000134999, No Iterations 760
DICPCG:  Solving for p, Initial residual = 0.902387, Final residual = 0.000888641, No Iterations 625
DICPCG:  Solving for p, Initial residual = 0.213929, Final residual = 0.000208715, No Iterations 625
DICPCG:  Solving for p, Initial residual = 0.0663741, Final residual = 6.49463e-05, No Iterations 669
DICPCG:  Solving for p, Initial residual = 0.0269923, Final residual = 2.2455e-05, No Iterations 675
DICPCG:  Solving for p, Initial residual = 0.0100464, Final residual = 9.12724e-06, No Iterations 698
DICPCG:  Solving for p, Initial residual = 0.00414816, Final residual = 8.76127e-06, No Iterations 675
DICPCG:  Solving for p, Initial residual = 0.00158662, Final residual = 9.74262e-06, No Iterations 674
DICPCG:  Solving for p, Initial residual = 0.000657485, Final residual = 9.42581e-06, No Iterations 33
DICPCG:  Solving for p, Initial residual = 0.00012647, Final residual = 8.17892e-06, No Iterations 7
DICPCG:  Solving for p, Initial residual = 3.15079e-05, Final residual = 7.84453e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 1.14425e-05, Final residual = 9.92295e-06, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.11815e-05, Final residual = 8.65543e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1.37576e-05, Final residual = 9.0758e-06, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.21263e-05, Final residual = 9.15413e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1.84304e-05, Final residual = 9.67875e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1.95107e-05, Final residual = 9.79995e-06, No Iterations 561
DICPCG:  Solving for p, Initial residual = 0.000180675, Final residual = 9.67694e-06, No Iterations 12
DICPCG:  Solving for p, Initial residual = 6.10161e-05, Final residual = 9.31011e-06, No Iterations 6
DICPCG:  Solving for p, Initial residual = 2.24837e-05, Final residual = 6.93831e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 1.54623e-05, Final residual = 9.80091e-06, No Iterations 269
time step continuity errors : sum local = 16.6162, global = 1.09315e-11, cumulative = -3.49284e-11
PIMPLE: iteration 2
DICPCG:  Solving for p, Initial residual = 0.289189, Final residual = 0.00275541, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.928585, Final residual = 0.000925487, No Iterations 686
DICPCG:  Solving for p, Initial residual = 0.210722, Final residual = 0.000192678, No Iterations 683
DICPCG:  Solving for p, Initial residual = 0.0679682, Final residual = 6.66053e-05, No Iterations 674
DICPCG:  Solving for p, Initial residual = 0.0279379, Final residual = 2.66399e-05, No Iterations 694
DICPCG:  Solving for p, Initial residual = 0.0107469, Final residual = 1.04657e-05, No Iterations 731
DICPCG:  Solving for p, Initial residual = 0.00442495, Final residual = 8.93771e-06, No Iterations 667
DICPCG:  Solving for p, Initial residual = 0.00173521, Final residual = 9.32693e-06, No Iterations 680
DICPCG:  Solving for p, Initial residual = 0.000719701, Final residual = 9.14021e-06, No Iterations 308
DICPCG:  Solving for p, Initial residual = 0.000288836, Final residual = 9.89971e-06, No Iterations 35
DICPCG:  Solving for p, Initial residual = 9.76707e-05, Final residual = 9.2164e-06, No Iterations 572
DICPCG:  Solving for p, Initial residual = 0.000103685, Final residual = 9.79783e-06, No Iterations 9
DICPCG:  Solving for p, Initial residual = 4.04155e-05, Final residual = 9.3791e-06, No Iterations 5
DICPCG:  Solving for p, Initial residual = 2.51758e-05, Final residual = 8.83134e-06, No Iterations 4
DICPCG:  Solving for p, Initial residual = 1.76651e-05, Final residual = 8.65934e-06, No Iterations 349
DICPCG:  Solving for p, Initial residual = 4.68677e-05, Final residual = 7.63479e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 2.62524e-05, Final residual = 8.66093e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 2.23577e-05, Final residual = 9.50361e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 1.90401e-05, Final residual = 9.349e-06, No Iterations 2
DICPCG:  Solving for p, Initial residual = 2.20659e-05, Final residual = 9.27872e-06, No Iterations 31
DICPCG:  Solving for p, Initial residual = 2.66159e-05, Final residual = 6.90536e-06, No Iterations 3
time step continuity errors : sum local = 97.9352, global = -2.9469e-08, cumulative = -2.95039e-08
PIMPLE: converged in 2 iterations
ExecutionTime = 9010.94 s  ClockTime = 9083 s

Courant Number mean: 4.30456e+06 max: 9.71204e+08
Time = 0.05

PIMPLE: iteration 1
DICPCG:  Solving for p, Initial residual = 0.626045, Final residual = 0.0403781, No Iterations 1000
I took a look at the outputs of P and U. It seems that the velocities are unacceptedly high for the first few time steps and result in very high courant #.


Best Regards
efsolat is offline   Reply With Quote

Old   December 24, 2020, 15:18
Default
  #6
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
I myself think that it may be due to U solver which is not doing well!


Maybe somebody give me any suggestion.
Thanks in advance
efsolat is offline   Reply With Quote

Old   December 24, 2020, 15:30
Default
  #7
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by efsolat View Post
Hi Chris

thank you for your reply. It worked well. I tried different solvers and solver settings anf finally chose the following setting for fvSolutions


.......
I took a look at the outputs of P and U. It seems that the velocities are unacceptedly high for the first few time steps and result in very high courant #.


Best Regards

Now work on your time step. Look at the size of your change in time or time step in control dictionary.

You can use the link I provided to the grading calculator and estimate the smallest cell. At that time, you can use Co = Velocity*\Delta t/\Delta x. The smallest cell, from the grading calculator, will be \Delta x. It might be a small number. Use that number in control dictionary.

Also, don't leave the number nNonOrthogonalCorrectors set at 20. Find the optimum number by decreasing until it diverges.
HappyS5 is offline   Reply With Quote

Old   December 24, 2020, 15:42
Default
  #8
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
Now work on your time step. Look at the size of your change in time or time step in control dictionary.

You can use the link I provided to the grading calculator and estimate the smallest cell. At that time, you can use Co = Velocity*\Delta t/\Delta x. The smallest cell, from the grading calculator, will be \Delta x. It might be a small number. Use that number in control dictionary.

Also, don't leave the number set at 20. Find the optimum number by decreasing until it diverges.

Thank you again Chris,
I have calculated the time step according to the cell size i made in blockMesh and the initial values of velocity. It seemed that the 0.01 was enough. I guess maybe something is wrong with my boundary conditions. Am i right or it is better first to try to work on time step and then on BCs?
Regards
efsolat is offline   Reply With Quote

Old   December 24, 2020, 16:01
Default
  #9
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by efsolat View Post
Thank you again Chris,
I have calculated the time step according to the cell size i made in blockMesh and the initial values of velocity. It seemed that the 0.01 was enough. I guess maybe something is wrong with my boundary conditions. Am i right or it is better first to try to work on time step and then on BCs?
Regards
I wish I can provide a path, but you have to base your decision on your own work. If the mesh is good, time step is good, etc than bc might need to be looked at.

For me, it is usually timestep--> nNonOrthogonalCorrectors to 20 --> nOuterCorrectors (Don't know the suggested maximum) --> trying to keep fvSchemes as 2nd order accuracy. I am new though! I am really a beginner. Relaxation factors are important too. 1 seems to be extreme, but I base that off a feeling from my readings. I don't have concrete evidence that 1 is bad. I can learn from you! Why did you pick 1 for the fields under relaxation factors?

Last edited by HappyS5; December 24, 2020 at 16:10. Reason: Aske a question.
HappyS5 is offline   Reply With Quote

Old   December 24, 2020, 16:08
Default
  #10
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
I wish I can provide a path, but you have to base your decision on your own work. If the mesh is good, time step is good, etc than bc might need to be looked at.

For me, it is usually timestep--> nNonOrthogonalCorrectors to 20 --> nOuterCorrectors (Don't know the suggested maximum) --> trying to keep fvSchemes as 2nd order accuracy. I am new though! I am really a beginner.

I do thank you for your guidance.
Regards
HappyS5 likes this.
efsolat is offline   Reply With Quote

Old   December 25, 2020, 16:21
Default
  #11
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
It seems that using a smaller time step doesn't resolve the problem. Halving the time step only halves the courant number in the sub-steps (the Co# for t=0.01 is twice that of t=0.005)
efsolat is offline   Reply With Quote

Old   January 2, 2021, 09:40
Default
  #12
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Hello
Since the last post, i worked on my model and because it seemed that the problem originates from U, i found out that the momentumPredictor was not active on my fvSolution settings so i changed it and thereafter pimple doesn't converge again! I tried different schemes to get the smallest residuals. The initial residuals are near 1 both for at least one of the velocity components and pressure at the beginning of the running and there is a trade off between the initial and final residuals of U and p, i.e. by decreasing initial residuals, final residuals increase and vise versa. This procedure continues until the time step continuity errors explode and pimple stops!
here is the first 2 iterations as well as the last one before the error occurs:
Code:
PIMPLE: iteration 1
DILUPBiCGStab:  Solving for Ux, Initial residual = 1.37306e-07, Final residual = 1.37306e-07, No Iterations 0
DILUPBiCGStab:  Solving for Uy, Initial residual = 1.81973e-07, Final residual = 1.81973e-07, No Iterations 0
DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 5.02475e-07, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.0585115, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.264369, Final residual = 0.0360576, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.122939, Final residual = 0.00712812, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0623862, Final residual = 0.00582726, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0369562, Final residual = 0.0024649, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.02365, Final residual = 0.0018142, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0167338, Final residual = 0.000926094, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0123707, Final residual = 0.000651092, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0100953, Final residual = 0.000303668, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00807202, Final residual = 0.000253053, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00639815, Final residual = 0.000120524, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00528881, Final residual = 0.000119928, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00458382, Final residual = 6.07163e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00408512, Final residual = 5.0111e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00364221, Final residual = 1.92931e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0032762, Final residual = 2.04797e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00300247, Final residual = 9.88479e-06, No Iterations 272
DICPCG:  Solving for p, Initial residual = 0.00277537, Final residual = 9.72915e-06, No Iterations 94
DICPCG:  Solving for p, Initial residual = 0.00255062, Final residual = 9.84963e-06, No Iterations 94
DICPCG:  Solving for p, Initial residual = 0.00238212, Final residual = 9.98526e-06, No Iterations 88
DICPCG:  Solving for p, Initial residual = 0.00223147, Final residual = 9.83777e-06, No Iterations 83
time step continuity errors : sum local = 2.4411e-08, global = 8.95815e-19, cumulative = 8.95815e-19
PIMPLE: iteration 2
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.250027, Final residual = 1.40478e-05, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.249709, Final residual = 5.69482e-05, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.858411, Final residual = 0.000474376, No Iterations 1
DICPCG:  Solving for p, Initial residual = 0.362386, Final residual = 0.00413912, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.223167, Final residual = 0.00599995, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.110709, Final residual = 0.0109506, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0548974, Final residual = 0.00267809, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0292759, Final residual = 0.00266981, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0187279, Final residual = 0.000789498, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0130362, Final residual = 0.000817948, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0108702, Final residual = 0.000320908, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00959716, Final residual = 0.00029351, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00888563, Final residual = 0.00014774, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00855473, Final residual = 0.00013236, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00828627, Final residual = 7.12897e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0081728, Final residual = 5.67997e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00802519, Final residual = 4.3785e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00798531, Final residual = 2.86331e-05, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.00790406, Final residual = 9.90927e-06, No Iterations 418
DICPCG:  Solving for p, Initial residual = 0.00787222, Final residual = 9.72002e-06, No Iterations 184
DICPCG:  Solving for p, Initial residual = 0.00780243, Final residual = 9.8376e-06, No Iterations 178
DICPCG:  Solving for p, Initial residual = 0.00779407, Final residual = 9.87139e-06, No Iterations 180
DICPCG:  Solving for p, Initial residual = 0.0077462, Final residual = 9.72159e-06, No Iterations 178
DICPCG:  Solving for p, Initial residual = 0.0077382, Final residual = 9.56369e-06, No Iterations 178
time step continuity errors : sum local = 1.47858e-08, global = 4.76049e-19, cumulative = 1.37186e-18

.
.
.
PIMPLE: iteration 16
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.177825, Final residual = 7.47569e+07, No Iterations 1000
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.205946, Final residual = 1.85588e+07, No Iterations 1000
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.0402573, Final residual = 1.26671e+07, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 39.3761, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.962193, Final residual = 2.21781, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.978459, Final residual = 0.246167, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.592345, Final residual = 0.860989, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.678416, Final residual = 0.095727, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.243093, Final residual = 0.717205, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.489834, Final residual = 0.0783245, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.150275, Final residual = 0.221777, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.218437, Final residual = 0.0372558, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0653149, Final residual = 0.0905242, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.102345, Final residual = 0.0388229, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0593614, Final residual = 0.04243, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0593874, Final residual = 0.0374865, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0544117, Final residual = 0.0275666, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0442457, Final residual = 0.034533, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0497766, Final residual = 0.0233408, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0395436, Final residual = 0.0283384, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0432466, Final residual = 0.0223694, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0379646, Final residual = 0.0258089, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0405771, Final residual = 0.0219351, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.0371665, Final residual = 0.0241324, No Iterations 1000
time step continuity errors : sum local = 8.61878e+26, global = 3.24692e+13, cumulative = 3.24692e+13
and the following error occurs:


Code:
PIMPLE: iteration 17
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::DILUPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) at ??:?
#4  Foam::DILUPreconditioner::DILUPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#5  Foam::lduMatrix::preconditioner::addasymMatrixConstructorToTable<Foam::DILUPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#6  Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#7  Foam::PBiCGStab::scalarSolve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8  Foam::PBiCGStab::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#9  Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&) at ??:?
#10  Foam::fvMatrix<Foam::Vector<double> >::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:?
#11  Foam::fvMesh::solve(Foam::fvMatrix<Foam::Vector<double> >&, Foam::dictionary const&) const at ??:?
#12  ? in ~/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#13  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#14  ? in ~/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
Any help, suggestion or advice would be greatly appreciated.
With thanks,
efsolat is offline   Reply With Quote

Old   January 3, 2021, 10:32
Default
  #13
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Any idea, suggestion or advice?


Regards
efsolat is offline   Reply With Quote

Old   January 5, 2021, 03:15
Default
  #14
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
1. turn off turbulence and simulate in laminar mode, still have problems?
2. execute checkMesh and post the result
geth03 is offline   Reply With Quote

Old   January 5, 2021, 10:55
Default
  #15
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by geth03 View Post
1. turn off turbulence and simulate in laminar mode, still have problems?
2. execute checkMesh and post the result

Hi geth03,
Thank you for your reply. My simulation was carried out in laminar mode (I set the turbulenceProperties as

Code:
simulationType  laminar;
)
if any additional setting is required please let me know.
I have provided the checkMesh result in the first post.


Best Regards
efsolat is offline   Reply With Quote

Old   January 5, 2021, 13:08
Default
  #16
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
Quote:
Originally Posted by efsolat View Post
Hi geth03,
Thank you for your reply. My simulation was carried out in laminar mode (I set the turbulenceProperties as

Code:
simulationType  laminar;
)
if any additional setting is required please let me know.
I have provided the checkMesh result in the first post.


Best Regards
Sorry for point 2

Did you write out any timestep?
Can you see where in your domain the extreme value occurs?
geth03 is offline   Reply With Quote

Old   January 5, 2021, 14:37
Default
  #17
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by geth03 View Post
Sorry for point 2

Did you write out any timestep?
Can you see where in your domain the extreme value occurs?

Unfortunately it doesn't converge even for the first time step!
I guess the time step continuity errors determine when the running stop.


With thanks
efsolat is offline   Reply With Quote

Old   January 5, 2021, 14:59
Default
  #18
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by geth03 View Post
Sorry for point 2

Did you write out any timestep?
Can you see where in your domain the extreme value occurs?

I tried different BCs e.g. i change the fixed walls of fluid domain from "zeroGradient" to "fixedValue (0 0 0)" or the outlet from "zeroGradient" to "inletOutlet (0 0 0)', or changed the pressure BC of the peripheral walls of porous domain from "zeroGradient" to "slip". For each change I executed the application and the same error occurred and the only difference was the #iteration progress (4 -7). Is it right to conclude that the reason of problem is not related to BCs?
efsolat is offline   Reply With Quote

Old   January 6, 2021, 08:45
Default
  #19
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
1. change the solver for p to GAMG and smoother DIC and for U to smoothSolver with smoother symGaussSeidel. Your case has over 1 mio of cells. do you use parallel processing?
geth03 is offline   Reply With Quote

Old   January 7, 2021, 07:42
Default
  #20
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 5
efsolat is on a distinguished road
Quote:
Originally Posted by geth03 View Post
1. change the solver for p to GAMG and smoother DIC and for U to smoothSolver with smoother symGaussSeidel. Your case has over 1 mio of cells. do you use parallel processing?
I changed the solvers and the same error resulted. Also GAMG is super slow !
this is the last iteration

Code:
PIMPLE: iteration 4
smoothSolver:  Solving for Ux, Initial residual = 0.207385, Final residual = 43973.4, No Iterations 1002
smoothSolver:  Solving for Uy, Initial residual = 0.233468, Final residual = 180860, No Iterations 1002
smoothSolver:  Solving for Uz, Initial residual = 0.200798, Final residual = 6.45593e+06, No Iterations 1002
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.000159063, No Iterations 2
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.56633e-09, Final residual = 1.56633e-09, No Iterations 0
time step continuity errors : sum local = 1.25879e+30, global = 3.80902e+28, cumulative = 3.80902e+28
PIMPLE: iteration 5
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4  Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<Foam::Vector<double> >::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:?
#8  Foam::fvMesh::solve(Foam::fvMatrix<Foam::Vector<double> >&, Foam::dictionary const&) const at ??:?
#9  ? in ~/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#10  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#11  ? in ~/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
Something seems to be wrong with velocity (i have bolded)!
efsolat 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
pimpleFoam runs slower than rhoPimpleFoam Kosuke Seto OpenFOAM Running, Solving & CFD 3 May 27, 2023 14:12
tutorial guide of converge Weiqiang Liu CONVERGE 4 August 6, 2020 04:24
PimpleFoam runs full length even after residuals converge! walakaka OpenFOAM Running, Solving & CFD 3 February 28, 2018 13:08
cannot converge a pimpleFoam simulation iper88 OpenFOAM Running, Solving & CFD 1 November 26, 2015 08:04
PisoFoam and PimpleFoam for my problem can not converge mechy OpenFOAM 0 August 1, 2013 05:56


All times are GMT -4. The time now is 08:43.