CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   turbDyMFoam and Convergence (https://www.cfd-online.com/Forums/openfoam/80409-turbdymfoam-convergence.html)

lordvon September 24, 2010 12:34

turbDyMFoam and Convergence
 
Hello,

I have used icoDyMFoam to run a turbomachinery case (I was learning to use OpenFOAM, mesh, etc.), and obviously it did not converge.

So I have been trying to implement turbDyMFoam. I have downloaded the files found here: http://openfoamwiki.net/index.php/Si...vaned_diffuser

And transplanted the controlDict, RASProperties, transportProperties, fvsolution, and fvscheme files to my (originally icoDyMFoam) case. I also put boundary conditions on the inlet (freestream) flow (I am doing an external flow with a rotating part) for k and epsilon (zerogradient for everywhere else).

The simulation runs at least, but soon diverges (floating point exception, huge velocity magnitudes).

Can anybody give me a guide to the parameters I can adjust to get convergence?

Thanks in advance.

lordvon September 24, 2010 15:17

I get these figures:

Code:

Largest slave weighting factor correction : 1.0817671 average: 1.0000028
  Largest master weighting factor correction: 1 average: 1

When I usually see much much smaller numbers on the forums. What do these figures imply?

It is actually running, and I am only getting floating point exceptions, so I guess that means only the initial conditions are bad. I have tried:

http://www.cfd-online.com/Forums/ope...implefoam.html

http://www.cfd-online.com/Forums/ope...ps-k-re-u.html

None fail to diverge.

lordvon September 24, 2010 20:27

Hey guys,

Posting working cases of turbulent external flow using turbdymfoam would be highly appreciated.

andrea.pasquali September 25, 2010 07:13

Hi lordvon,
I'm trying turbDyMFoam with ggi on wind turbine analysis and it's working well.
I use RAS kOmegaSST turbulence model.

Have you good mesh (especially in nonOrthoFaces check)?
Are your turbulent parameters internalField values correct?

Regards

lordvon September 25, 2010 19:03

Hello Andrea, thanks for your reply.

I ran 'checkMesh' and it said that one mesh check failed. I could not discern what exactly this was from the terminal outputs. 'Non-orthogonality check OK.' ; is this what you were talking about? I posted the entirety of the terminal message below.

I have also posted below my initial condition files for k and epsilon. I calculated them using the common formulas. The boundary types in those files are not the only ones I have tested.

Could I take a look at your fvsolution, fvscheme, and /0/ files for k, epsilon, and omega?

Have you tried using RNGkepsilon?

/0/k:
Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0.17;

boundaryField
{
    left
    { type                zeroGradient;
//type turbulentIntensityKineticEnergyInlet;
//intensity 0.05;
//value 1;
}
    top
    { type            zeroGradient; }
    right
    { type            zeroGradient; }
    bottom
    { type            zeroGradient; }
    outsideSlider
    { type            ggi; }
    casing
    { type            zeroGradient; }
    defaultFaces
    { type            empty; }
    insideSlider
    { type            ggi; }
    shaft
    { type            zeroGradient; }
    blades
    { type            zeroGradient; }
}

/0/epsilon:
Code:

dimensions      [0 2 -3 0 0 0 0];

internalField  uniform .67;

boundaryField
{
    left
    { type                zeroGradient;
//type turbulentMixingLengthDissipationRateInlet;
//mixingLength 0.1;
//value uniform 200;
}
    top
    { type            zeroGradient; }
    right
    { type            zeroGradient; }
    bottom
    { type            zeroGradient; }
    outsideSlider
    { type            ggi; }
    casing
    { type            zeroGradient; }
    defaultFaces
    { type            empty; }
    insideSlider
    { type            ggi; }
    shaft
    { type            zeroGradient; }
    blades
    { type            zeroGradient; }
}

Terminal message for checkMesh:
Code:

Create time

--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load libOpenFoamTurbo.so: cannot open shared object file: No such file or directory
Create polyMesh for time = constant

Time = constant

Mesh stats
    points:          72864
    internal points:  0
    faces:            248063
    internal faces:  104627
    cells:            70538
    boundary patches: 10
    point zones:      0
    face zones:      2
    cell zones:      2

Number of cells of each type:
    hexahedra:    0
    prisms:        70538
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
  *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "constant/cellToRegion"

Checking patch topology for multiply connected surfaces ...
    Patch              Faces    Points  Surface topology                 
    left                37      76      ok (non-closed singly connected) 
    top                56      114      ok (non-closed singly connected) 
    right              37      76      ok (non-closed singly connected) 
    bottom              56      114      ok (non-closed singly connected) 
    outsideSlider      456      912      ok (non-closed singly connected) 
    casing              670      1340    ok (non-closed singly connected) 
    defaultFaces        141076  72864    ok (non-closed singly connected) 
    insideSlider        456      912      ok (non-closed singly connected) 
    shaft              16      32      ok (non-closed singly connected) 
    blades              576      1152    ok (non-closed singly connected) 

Checking geometry...
    This is a 2-D mesh
    Overall domain bounding box (-1.125 -1.125 0) (2.25 1.125 1)
    Mesh (non-empty) directions (1 1 0)
    Mesh (non-empty, non-wedge) dimensions 2
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-1.6291944e-17 -4.3115768e-17 -1.895701e-23) Threshold = 1e-06 OK.
 ***High aspect ratio cells found, Max aspect ratio: 3898.0533, number of cells 37146 Threshold = 1000
  <<Writing 37146 cells with high aspect ratio to set highAspectRatioCells
    Minumum face area = 2.5918065e-07. Maximum face area = 0.084123393.  Face area magnitudes OK.
    Min volume = 2.5918065e-07. Max volume = 0.0027079637.  Total volume = 7.5688711.  Cell volumes OK.
    Mesh non-orthogonality Max: 33.073843 average: 6.9423388 Threshold = 70
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.49352535 OK.

Failed 1 mesh checks.

End


lordvon September 25, 2010 21:18

fvSolution tolerance and reltol
 
Hello everyone,

Running komegaSST, I no longer get floating point exceptions (at least not yet). However looking at the output through paraFoam, things are still crazy.

I stumbled upon this thread: http://www.cfd-online.com/Forums/ope...timesteps.html , I started to increase tolerance of p's reltol. That decreased the amount of bounding messages, though they still appear.

So I was wondering, can anybody explain how to adjust the fields in fvSolution (preconditioner, tolerance, reltol) to get better convergence and accuracy? Here is a relative section in the OpenFOAM manual: http://www.openfoam.com/docs/user/fvSolution.php

(I am looking into it myself of course, I put this up so that a solution may be worked towards in parallel)
ADDITIONS:
Ok, so I have decided to set all 'reltol's to zero, that way we only have to worry about the 'tolerance'.
Do I need to mess with the preconditioners?
My system files so far:
fvSolution:
Code:

solvers
{
    pcorr PCG
    {
        preconditioner  DIC;
        tolerance        1e-10;
        relTol          0;
    };

    p PCG
    {
        preconditioner  DIC;
        tolerance        1e-10;
        relTol          0;
    };

    pFinal PCG
    {
        preconditioner  DIC;
        tolerance        1e-10;
        relTol          0;
    };

    U PBiCG
    {
        preconditioner  DILU;
        tolerance        1e-10;
        relTol          0;
    };
    k PBiCG
    {
        preconditioner  DILU;
        tolerance        1e-10;
        relTol          0;
    };
    epsilon PBiCG
    {
        preconditioner  DILU;
        tolerance        1e-10;
        relTol          0;
    };
    R PBiCG
    {
        preconditioner  DILU;
        tolerance        1e-10;
        relTol          0;
    };
    omega PBiCG
    {
        preconditioner  DILU;
        tolerance        1e-10;
        relTol          0;
    };

}

PISO
{
    nCorrectors    3;
    nNonOrthogonalCorrectors 1;
    pRefCell        0;
    pRefValue      0;
}

fvSchemes:
Code:

ddtSchemes
{
    default Euler;
}

gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)  Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,omega) Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(R)          Gauss linear;
    div(phi,nuTilda) Gauss upwind;
    div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
    default        none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
    laplacian(DomegaEff,omega) Gauss linear corrected;
    laplacian((rho*(1|A(U))),p) Gauss linear corrected;
    laplacian(alphaEff,h) Gauss linear corrected;
    laplacian(rAU,p) Gauss linear corrected;
    laplacian(nu,U) Gauss linear corrected;
    laplacian(1,p)  Gauss linear corrected;

}

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

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p;
}



All times are GMT -4. The time now is 18:58.