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

Proper settings for PimpleFoam Simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 1 Post By tomf
  • 2 Post By piu58
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2017, 13:06
Default Proper settings for PimpleFoam Simulation
  #1
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 6
Mahe88 is on a distinguished road
Hello,

I want to do a 3D transient simulation of a wing. However, I am not able to get pimple to converge. Maybe somebody can give me a hint.

so heres what I do:

I start the simulation with SimpleFoam and calculate 5000 timesteps. After that I switch to Pimple. My Settings are like this:

Control dict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime        5002;

deltaT         5e-6;

writeControl    timeStep;
writeInterval   10000;

purgeWrite      0;

writeFormat     ascii;

writePrecision  7;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

maxCo              2;

maxDeltaT     1; 

 functions
{
    #include "forceCoeffs"
}

// ************************************************************************* //
fvSolution
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/*The solver stops if any one of the following conditions are reached:
• the residual falls below the solver tolerance, tolerance ;
• the ratio of current to initial residuals falls below the solver relative tolerance, relTol;
• the number of iterations exceeds a maximum number of iterations, maxIter;*/
solvers
{
    p
    {
        solver           GAMG;
    smoother         DICGaussSeidel;
        tolerance        4e-4;
        relTol           0.001;
    }
    pFinal
    {
        $p;
        relTol          0;
    }

    "(U|k|epsilon|omega)"
    {
    solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0.1;
    }

    "(U|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
  {
    nNonOrthogonalCorrectors      0; // Korrigieren des Drucks mit den neu berechneten Drücken
    nOuterCorrectors         70; // Berechnung des Drucks - Momenten Kopplung
    nCorrectors             2;    // korrigieren des Drucks
      relaxationFactors
      {
      fields
      {
          p       0.2;
          pFinal  1;  // Last outer loop
      }

      equations
      {
          U       0.6;
          UFinal  1;// Last outer loop
      }
      }
      residualControl
      {
          p
          {
          
          relTol  0;
          // If this inital tolerance is reached, leave
          tolerance 1e-3;
          }

          U
          {
        relTol  0;
          // If this inital tolerance is reached, leave
          tolerance 1e-4;
          
          }
      }
    }
// ************************************************************************* //
fvSchemes
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    //default             Euler; //transient, first order implicit, bounded.
    //default         backward;//transient, second order implicit, potentially unbounded
    default        CrankNicolson 0.9;//ransient, second order implicit, bounded; requires an off-centering
                      //coefficient
    
}

gradSchemes
{
    default         Gauss linear;
}   

snGradSchemes
{
     default        corrected;    //The corrected scheme is generally recommended, 
                    //but for maximum non-orthogonality above 70, limited
                    //may be required.        
    //default             uncorrected;
    //default         limited corrected 0.33; //Typically,psi is chosen to be 0.33 or 
                          //0.5, where 0.33 offers greater stabilit
                          //y and 0.5 greater accuracy.
}

divSchemes
{
    //Konservativ Wolfgang
    /*default                     none;
    div(phi,U)                  Gauss upwind;
    div(phi,k)                  Gauss upwind;
    div(phi,epsilon)            Gauss upwind;
    div(phi,omega)              Gauss limitedLinear 1;
    div(phi,R)                Gauss upwind;
    div(R)                Gauss linear;
    div(phi,nuTilda)            Gauss upwind;
    div((nuEff*dev2(T(grad(U)))))     Gauss linear;
    */
    
    //Aggressiv Wolfgang
    /*default                     none;
    div(phi,U)                  Gauss limitedLinearV 1;
    div(phi,k)                  Gauss limitedLinearV 1;
    div(phi,epsilon)            Gauss limitedLinearV 1;
    div(phi,omega)              Gauss limitedLinearV 1;
    div(phi,R)                Gauss linear;
    div(R)                Gauss linear;
    div(phi,nuTilda)            Gauss linear;
    div((nuEff*dev2(T(grad(U)))))     Gauss linear;
      
    */
    //Tutorials
    default                     none;
    div(phi,U)                  bounded Gauss linearUpwind grad(U);
    div(phi,k)                  bounded Gauss upwind;
    div(phi,epsilon)             bounded Gauss upwind;
    div(phi,omega)            bounded Gauss upwind;
    div(phi,R)                  bounded Gauss upwind;
    div(R)                      Gauss linear;
    div(phi,nuTilda)             bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U)))))     Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
    laplacian(rAUf,p) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

wallDist
{
    method meshWave;
}
// ************************************************************************* //
and my log looks like this:

Code:
Create time

Create mesh for time = 5000


PIMPLE: max iterations = 70
    field p    : relTol 0, tolerance 0.001
    field U    : relTol 0, tolerance 0.0001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
kOmegaSSTCoeffs
{
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.5555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

No MRF models present

No finite volume options present


Starting time loop

forces forces:
    Not including porosity effects

Courant Number mean: 0.0009207056 max: 5.870972
Time = 5000

PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 1.755553e-07, Final residual = 1.755553e-07, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 6.909956e-10, Final residual = 6.909956e-10, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.712918e-09, Final residual = 1.712918e-09, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.8733274, Final residual = 0.0008564715, No Iterations 51
time step continuity errors : sum local = 9.58361e-13, global = 4.116155e-15, cumulative = 4.116155e-15
GAMG:  Solving for p, Initial residual = 0.6793104, Final residual = 0.0006542594, No Iterations 58
time step continuity errors : sum local = 1.029039e-12, global = -3.69671e-14, cumulative = -3.285095e-14
PIMPLE: iteration 2
smoothSolver:  Solving for Ux, Initial residual = 1.232057e-06, Final residual = 4.12252e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.331185e-09, Final residual = 3.331185e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.43496e-08, Final residual = 1.43496e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7188413, Final residual = 0.0006887674, No Iterations 60
time step continuity errors : sum local = 9.293172e-13, global = -6.52682e-15, cumulative = -3.937777e-14
GAMG:  Solving for p, Initial residual = 0.6790615, Final residual = 0.0006542149, No Iterations 58
time step continuity errors : sum local = 1.028279e-12, global = -3.61447e-14, cumulative = -7.552246e-14
PIMPLE: iteration 3
smoothSolver:  Solving for Ux, Initial residual = 1.196535e-06, Final residual = 3.577596e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238559e-09, Final residual = 3.238559e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399866e-08, Final residual = 1.399866e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7186701, Final residual = 0.0006886802, No Iterations 60
time step continuity errors : sum local = 9.291727e-13, global = -6.536857e-15, cumulative = -8.205932e-14
GAMG:  Solving for p, Initial residual = 0.6790486, Final residual = 0.0006542245, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614505e-14, cumulative = -1.182044e-13
PIMPLE: iteration 4
smoothSolver:  Solving for Ux, Initial residual = 1.196485e-06, Final residual = 3.539771e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238436e-09, Final residual = 3.238436e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399785e-08, Final residual = 1.399785e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.718663, Final residual = 0.0006886793, No Iterations 60
time step continuity errors : sum local = 9.291714e-13, global = -6.536782e-15, cumulative = -1.247412e-13
GAMG:  Solving for p, Initial residual = 0.6790474, Final residual = 0.0006542243, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614506e-14, cumulative = -1.608862e-13
PIMPLE: iteration 5
smoothSolver:  Solving for Ux, Initial residual = 1.19648e-06, Final residual = 3.533432e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238428e-09, Final residual = 3.238428e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399783e-08, Final residual = 1.399783e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7186625, Final residual = 0.0006886793, No Iterations 60
time step continuity errors : sum local = 9.291714e-13, global = -6.536782e-15, cumulative = -1.67423e-13
GAMG:  Solving for p, Initial residual = 0.6790473, Final residual = 0.0006542243, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614506e-14, cumulative = -2.035681e-13
PIMPLE: iteration 6
smoothSolver:  Solving for Ux, Initial residual = 1.196477e-06, Final residual = 3.531863e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238427e-09, Final residual = 3.238427e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399782e-08, Final residual = 1.399782e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7186624, Final residual = 0.0006886793, No Iterations 60
time step continuity errors : sum local = 9.291714e-13, global = -6.536782e-15, cumulative = -2.101048e-13
GAMG:  Solving for p, Initial residual = 0.6790472, Final residual = 0.0006542243, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614506e-14, cumulative = -2.462499e-13
PIMPLE: iteration 7
smoothSolver:  Solving for Ux, Initial residual = 1.196477e-06, Final residual = 3.531392e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238427e-09, Final residual = 3.238427e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399782e-08, Final residual = 1.399782e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7186624, Final residual = 0.0006886793, No Iterations 60
time step continuity errors : sum local = 9.291714e-13, global = -6.536782e-15, cumulative = -2.527867e-13
GAMG:  Solving for p, Initial residual = 0.6790472, Final residual = 0.0006542243, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614506e-14, cumulative = -2.889318e-13
PIMPLE: iteration 8
smoothSolver:  Solving for Ux, Initial residual = 1.196477e-06, Final residual = 3.531239e-11, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 3.238426e-09, Final residual = 3.238426e-09, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.399782e-08, Final residual = 1.399782e-08, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.7186624, Final residual = 0.0006886793, No Iterations 60
time step continuity errors : sum local = 9.291714e-13, global = -6.536782e-15, cumulative = -2.954685e-13
GAMG:  Solving for p, Initial residual = 0.6790472, Final residual = 0.0006542243, No Iterations 58
time step continuity errors : sum local = 1.028292e-12, global = -3.614506e-14, cumulative = -3.316136e-13
The velocity residual looks nice, but the pressure residual stays constant, altough my convergence criteria is not to tide, is it?Looks like it starts all over again every new iteration?

Hope somebody can help me? Thanks a lot in advance!!
Mahe88 is offline   Reply With Quote

Old   March 15, 2017, 09:44
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 559
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I would think you should try this (might even use 0.9 if it is stable):

Code:
relaxationFactors
      {
      fields
      {
          p       0.8;
          pFinal  1;  // Last outer loop
      }

      equations
      {
          U       0.8;
          UFinal  1;// Last outer loop
      }
tomf is offline   Reply With Quote

Old   March 15, 2017, 10:07
Default
  #3
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 6
Mahe88 is on a distinguished road
Hey Tom,

thanks for your reply.

I will definitely try to increase the relaxation factors. However I thought making the relaxation factors bigger will make it more difficult for Pimple to converge. Thus i started with small relaxation factors.

Am I wrong with this?


Best,

Mahe
Mahe88 is offline   Reply With Quote

Old   March 15, 2017, 10:22
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 559
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Mahe,

Well for p you are relaxing the field, so it can only change by URF*(p-p_old), which means that changes in the field are slow with low underrelaxation. It may be that with too high URF your system becomes unstable and therefore cannot converge anymore. My experience with PIMPLE thus far is that 0.8-0.9 gives usually the best performance, but you will have to play around a bit for each particular case.

Regards,
Tom
tomf is offline   Reply With Quote

Old   March 16, 2017, 06:10
Default
  #5
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 6
Mahe88 is on a distinguished road
Hey Tom,

Thanks a lot for your help. It's good to know there is somebody out there helping

So to sum it up and get it right:

small relaxation factors = slow convergence, but stable
high relaxation factors = fast convergence, maybe unstable?


I have tried the settings you suggested, but still PIMPLE says it doesn't converge after the 20 iterations I have set. Therefore the simulation is not moving on in time. I am kind of lost now. I do not really care about my pressure residual. I mean it could be 0.1 and still the simulation could get me good results in forces, right? Furthermore I ran the same case in steady-state and the residual didn't change a lot, for the pressure it was around 0.1 to 0.01 and the forces were also stable.

So how can I achieve the simulation just starts and moves on and then see how it goes? I took the residual control out and though the simulation will just calculate the timesteps, but it doesn't...

thanks!
Mahe88 is offline   Reply With Quote

Old   March 16, 2017, 06:22
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 559
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Mahe,

I just had a closer look at your output, it looks like the pressure equations need a lot of iterations maybe you can change the relTol for pressure solver to 0.05.

If this does not help to get No Iterations down, then I think something is wrong with either mesh or boundary conditions, but than again you did get a result from simpleFoam.

I would also suggest to make your pimpleFoam case separate from the simpleFoam case by copying the files from the 5000 folder to a new 0 folder and then run to endTime 2. If you want to keep it like this I would suggest to increase the time precision in controlDict to 12.

Regards,
Tom
tomf is offline   Reply With Quote

Old   March 16, 2017, 06:41
Default
  #7
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 6
Mahe88 is on a distinguished road
Hey Tom,

wow. Incredibly fast answer! Thanks for that.

Actually I just had the same idea with creating a new folder and just did that an hour ago or so

I will try to change relTol. Thanks!

Well, I am not to sure about the mesh, since this is my first 3D simulation and I am also not too familiar with OpenFoam and especially SnappyHexMesh. However when I run a checkMesh, it seems to be ok.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.1-119cac7e8750
Exec   : checkMesh
Date   : Mar 16 2017
Time   : 11:26:35
Host   : 
PID    : 3448
Case   : /
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           9513444
    faces:            27400550
    internal faces:   27074847
    cells:            8952175
    faces per cell:   6.085158
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     8487632
    prisms:        43938
    wedges:        0
    pyramids:      0
    tet wedges:    625
    tetrahedra:    0
    polyhedra:     419980
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   12760
            5   12992
            6   79719
            7   123390
            8   33519
            9   105541
           10   3007
           11   970
           12   36939
           13   93
           14   114
           15   10765
           16   7
           17   2
           18   162

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     9900    10101  ok (non-closed singly connected)
                  Outlet     9900    10101  ok (non-closed singly connected)
                   Innen    51509    52440  ok (non-closed singly connected)
                  Aussen    19250    19536  ok (non-closed singly connected)
            ObenandUnten    31500    32032  ok (non-closed singly connected)
                    Wing   203644   222844  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (53.6 -30 -30) (80 46 30)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (2.550842e-14 1.535069e-15 -6.200779e-17) OK.
    Max cell openness = 5.294373e-16 OK.
    Max aspect ratio = 63.15114 OK.
    Minimum face area = 8.686202e-10. Maximum face area = 7.637955.  Face area magnitudes OK.
    Min volume = 1.025883e-12. Max volume = 14.76541.  Total volume = 120384.  Cell volumes OK.
    Mesh non-orthogonality Max: 65.07734 average: 5.86854
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.923949 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
I do have another question regarding the definition of Initial residual and final residual.

1. What counts for the pimple loop to end is the last Initial residual, right?
2. In every calculation step, Initial residual is p_old and final residual is p in your equation URF*(p-p_old)? => so multiplied with my relaxation factor it should give me the new Initial residual?
3. Still I am not sure, why my initial pressure residual starts with the same value for every iteration?! Shouldn't use the former calculated ones?

Sorry for all the questions and again, thanks so much for your help!!

My next steps will be:

1 changing the relTol
2 increase nNonOrthogonalCorrectors and see if it is better to recalculate the pressure in every iteration, since there it does decrease.

I will let you know how this goes!


Best,

Mahe
Mahe88 is offline   Reply With Quote

Old   March 16, 2017, 07:16
Default
  #8
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 185
Rep Power: 7
sheaker is on a distinguished road
Hello.
Look at those three lines in Your checkMesh:
1. Max aspect ratio = 63... (I think it its pretty high)
2. Mesh non-orthogonality Max = 65 (I think it its pretty high)
3. Min volume = 1.025883e-12. Max volume = 14.76541. (Isn't that mesh-cell too big?)
Maybe there is an answer? You should prepare better mesh.

Or maybe You should try to set Your PIMPLE nNonOrthogonalCorrectors to something like 2 - 5.

Have a nice day.
sheaker is offline   Reply With Quote

Old   March 16, 2017, 07:29
Default
  #9
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 6
Mahe88 is on a distinguished road
Hey sheaker,

thanks for your answer.

As I stated I use OpenFoam for about 5 months and SnappyHexMesh for maybe 2. I need it for my masterthesis. Therefore I am not completely sure what the maximum numbers are and trusted the checkMesh output.

Another thing is that you have to specify every parameter of the Mesh, run SHM and then check the result. I am not sure how to find the places, where to increase the Mesh and even when how to fix that particular spot. Also I am a bit limited by my resources. My Mesh now has around 8-10mio cells which I don't want to increase much.
Additionally I am calculating an wing, so I have small cells near the Wing-surface but the cells in the farfield are big (100m away). As I expect there isn't much going on at the farfield and therefore the big cells should be ok?!


Best,

Mahe
Mahe88 is offline   Reply With Quote

Old   March 16, 2017, 09:39
Default
  #10
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 9
piu58 is on a distinguished road
As I wrote somewhere else, the Courant number is a better measure for the quality of you mesh. It describes the mesh under flow conditions. The relation between maximal and mean Courant number should be small. This evaluation may be done with an imperfect mesh.
__________________
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   March 16, 2017, 10:19
Default
  #11
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 559
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Piu,

I do not agree with your statement. It may be related to the efficiency of the mesh (especially for interior domain simulations), but if you use large cells in the outer domain of your mesh and small cells near the surface there is always going to be a large difference between mean and max value of the Courant number. This does not mean you have a bad quality mesh.

With regards to the checkMesh report, I would agree that the non-orthogonality and skewness are a bit high. You may want to change these in the settings for quality with snappyHexMesh, but take care that there is still a decent boundary layer mesh. The aspect ratio does not scare me at all. Should be fine in case of boundary layer meshes. In fact I have had much higher aspect ratios and had no problems.

Regards,
Tom
Tobermory likes this.
tomf is offline   Reply With Quote

Old   March 16, 2017, 11:48
Default
  #12
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 9
piu58 is on a distinguished road
> if you use large cells in the outer domain of your mesh and small cells near the surface there is always going to be a large difference between mean and max value of the Courant number

No, that is not the case. The Co number gives how many cells the flow moves in a time step. If the mesh is well balanced the flow moves around the same number of cells in every point of the mesh.

> large difference between mean and max value of the Courant number. This does not mean you have a bad quality mesh.

For not too complex simulations you may be right. But for complex situations an unnecessary fine mesh means unnecessary number of unknowns and therewith a system of equations which is less well conditioned. This may lead to numerical problems.
kippo and Gang Wang like 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   March 16, 2017, 12:27
Default
  #13
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 559
Rep Power: 22
tomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Quote:
No, that is not the case. The Co number gives how many cells the flow moves in a time step. If the mesh is well balanced the flow moves around the same number of cells in every point of the mesh.
Yes that is what the Co number tells you, but it does not mean the mesh is well balanced. The mesh needs to have correct spatial resolution to capture gradients in your flow. In case of a wing you need more (and thus smaller) cells in the wake, where at the boundaries of the wake the flow velocity is probably higher than the undisturbed flow velocity at the boundaries of your domain. If you need to have the same Courant number throughout your domain you need to have the same fineness near the boundary of the domain and that is just a waste of resources plus it contradicts your second statement that

Quote:
an unnecessary fine mesh means unnecessary number of unknowns and therewith a system of equations which is less well conditioned
which I also think is not true since you also get more equations for the unknowns. I do agree that unnecessary refinement is a waste of resources.

So I can not agree with you about this.
Tobermory likes this.
tomf is offline   Reply With Quote

Old   March 16, 2017, 12:47
Default
  #14
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 9
piu58 is on a distinguished road
Dear Tom,

thank you for that explanation. Of course, they contain much trueness.

But I believe here are other aspects to take in concern too.

> The mesh needs to have correct spatial resolution to capture gradients in your flow.

This seems to be true. But in reality you need the exact flow only in some regions of your problem. In the case of the wing you have to chose a spatial resolution in the near of the wing which covers the gradients, no questions.
Normally, away from the wing the flow need only to solve to an accuracy which is adequate for covering the retroactive effects to the wing. It is not necessary to solve every detail of an eddy far away form the wing. So there you may have a coarser mesh. It may be a good strategy to make it at least as coarse as the balance of Co dictates: this leads to less time steps and to a more stable system of eqautions.

> not true since you also get more equations for the unknowns

Of course you get more equations. Without that you could not calculate the problem without any additional assumptions. But solving the system of equation means (in principle) to subtract a line of the system from the other as often as you have lines = unknowns. With more equations you get an accumulation of two bad effects:
1) Rounding errors increase. This leads slowly to less correct solutions
2) The probability that you have to subtract two nearly identical lines from each other increases. If that happens, you make something like division by zero (not full zero, but a very small number). In this case the solution gets wrong or explodes. The probability increases too, if you have cells which small changes in the flow variables in one part of the mesh and cells with rapid changes in another part.

I know that the more advanced solvers don't simply subtract lines, but the principal problems remains. The chance to have a higher condition number increases with number of equations and with the differences in the Courant number (small changes against large ones).
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

Last edited by piu58; March 16, 2017 at 14:45.
piu58 is offline   Reply With Quote

Reply

Tags
convergance, openfoam, pimplefoam, relaxation factor, wing simulation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Use homogeneous results as the initial guess for an inhomogeneous simulation JuPa CFX 5 December 26, 2014 14:44
right settings and yPlus values for turbulent pipe simulation in OF CRI_CFD OpenFOAM Pre-Processing 0 November 7, 2014 09:02
Using the same simulation settings for new geometry AHKB STAR-CCM+ 2 October 23, 2014 15:27
Simulation and Optimisation of centrifugal fan 3D to 2D eRzBeNgEl STAR-CCM+ 0 January 31, 2013 14:21
3-D Contaminant Dispersal Simulation Apple L S Chan Main CFD Forum 1 December 23, 1998 11:06


All times are GMT -4. The time now is 04:09.