CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   waveDyMFoam stability issue (http://www.cfd-online.com/Forums/openfoam-solving/120234-wavedymfoam-stability-issue.html)

goodster July 3, 2013 00:04

waveDyMFoam stability issue
 
aloha everyone,
this is kind of a 'hail mary' pass, but after 50+ iterations of trying to tweak this case, i'm starting to get a little frustrated at my own lack of skill and if anyone has the time and/or inclination to check it out, i would be much obliged.

This is the model case:

> loosely based on the floating object tutorial, i modified it to be a floating cylinder with sHM
> I made the modifications incrementally, (1) first the tutorial, (2) then the tutorial with waves, (3) then the tutorial with a sHM cylinder in lieu of the floating object, (4) and finally the waves with the sHM object. All have worked except the last case.
> The case fails because the pressure will not converge, and when i look at the body force output, it appears that all is well until about 120 seconds, where the force/pressure begins to fluctuate wildly right before blowing up.
> CheckMesh reported that the mesh was OK, but i have a gut feeling the mesh is at least partly responsible...
> it also seems like the issue brought up here may also be a part of the problem:
http://www.cfd-online.com/Forums/ope...ject-case.html
> and lastly, I've become obsessed with making this work, and i think my sanity may have blown up along with the model, at the 43 year time step.

anyone who's interested can check the model setup out by downloading the archive from here:
https://www.dropbox.com/s/ahkeblkyj3...sLoRes.org.zip

sorry in advance for groveling for help, any constructive comments/advice/opinions are very much appreciated.

also wish to thank Mr. Niels Jacobsen for this very useful waves2foam tool.

goodster July 7, 2013 20:10

I'm desperately looking for a sanity check; can anyone out there suggest or comment on appropriate schemes and tolerances to use for the velocity, pressure and displacement solutions for the above waveDyMfoam/interdymfoam? The case is based on the floatingObject tutorial but with a cylinder gridded by SnappyHexMesh and my fvSchemes and fvSolution files are provided below.....
Mahalo,
Chris

fvschemes

Code:

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

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    div(rho*phi,U)  Gauss vanLeerV;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p_rgh;
    pcorr;
    alpha;
}


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

Code:

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

solvers
{
    cellDisplacement
    {
        solver                  GAMG;
        tolerance              1e-07;
        relTol                  0;
        smoother                GaussSeidel;
        cacheAgglomeration      true;
        nCellsInCoarsestLevel  10;
        agglomerator            faceAreaPair;
        mergeLevels            1;
    }

    pcorr                              // linear equation system solver for p
    {
        solver          GAMG;          // very efficient multigrid solver
        tolerance      1e-13;          // solver finishes if either absolute
        relTol          0;              // tolerance is reached or the relative
                                        // tolerance here
        minIter        3;              // a minimum number of iterations
        maxIter        200;            // limitation of iterions number
        smoother        GaussSeidel;    // DIC - setting for GAMG
        nPreSweeps      1;              // 1 for p, set to 0 for all other!
        nPostSweeps    2;              // 2 is fine
        nFinestSweeps  2;              // 2 is fine
        scaleCorrection true;          // true is fine
        directSolveCoarsestLevel false; // false is fine
        cacheAgglomeration on;          // on is fine; set to off, if dynamic
                                        // mesh refinement is used!
        nCellsInCoarsestLevel 500;      // 500 is fine,
                                        // otherwise sqrt(number of cells)
        agglomerator    faceAreaPair;  // faceAreaPair is fine
        mergeLevels    1;              // 1 is fine
    }

    p_rgh
    {
        solver                      GAMG;          // very efficient multigrid solver
        tolerance                  1e-13;          // solver finishes if either absolute
        relTol                      0;              // tolerance is reached or the relative
                                                    // tolerance here
        minIter                    3;              // a minimum number of iterations
        maxIter                    200;            // limitation of iterions number
        smoother                    GaussSeidel;            // DIC - setting for GAMG
        nPreSweeps                  1;              // 1 for p, set to 0 for all other!
        nPostSweeps                2;              // 2 is fine
        nFinestSweeps              2;              // 2 is fine
        scaleCorrection            true;          // true is fine
        directSolveCoarsestLevel    false;          // false is fine
        cacheAgglomeration on;                      // on is fine; set to off, if dynamic
                                                    // mesh refinement is used!
        nCellsInCoarsestLevel      500;            // 500 is fine,
                                                    // otherwise sqrt(number of cells)
        agglomerator                faceAreaPair;  // faceAreaPair is fine
        mergeLevels                1;              // 1 is fine
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance      1e-15;
        relTol          0;
    }
   
    U                                  // linear equation system solver for U
    {
        solver          smoothSolver;  // solver type
        smoother        GaussSeidel;    // smoother type
        tolerance      1e-10;          // solver finishes if either absolute
        relTol          0;              // tolerance is reached or the relative
                                        // tolerance here
        nSweeps        1;              // setting for smoothSolver
        maxIter        200;            // limitation of iterations number
    }
 
    UFinal                              // linear equation system solver for U
    {
        solver          smoothSolver;  // solver type
        smoother        GaussSeidel;    // smoother type
        tolerance      1e-07;          // solver finishes if either absolute
        relTol          0;              // tolerance is reached or the relative
                                        // tolerance here
        nSweeps        1;              // setting for smoothSolver
        maxIter        200;            // limitation of iterations number
 
    }
 
    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-07;
        relTol          0;
        nSweeps          1;
 
    }
    kFinal
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-07;
        relTol          0;
        nSweeps          1;
 
    }
 
    epsilon
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-07;
        relTol          0;
        nSweeps          1;
    }
 
    epsilonFinal
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-7;
        relTol          0;
        nSweeps          1;
    }
}

relaxationFactors
{
    p              0.3;                // 0.3 is stable, decrease for bad mesh
    U              0.7;                // 0.7 is stable, decrease for bad mesh
    k              0.5;
    epsilon        0.5;
}

PIMPLE
{
    //pRefCell                  0;
    //pRefValue                0;
    turbOnFinalIterOnly        yes;
    momentumPredictor          yes;
    nCorrectors                4; 
    nOuterCorrectors            2;
    nNonOrthogonalCorrectors    1;
    nAlphaCorr                  1;
    nAlphaSubCycles            4;
    cAlpha                      1;
}
 
// ************************************************************************* //


kilroy July 9, 2013 17:02

Hello Chris,

I am having exactly the same issues with waveDyMFoam (interDyMFoam). You cant even run a bobbing cork in 1D with this solver since the mesh motion,VOF and 6DOF solvers are weakly coupled. I was trying to model a speed boat traveling through the waves but it did not work. My simulations were blowing up because of pressure instabilities.

My advice to you is to stop working on it. You are just wasting your time. I don't think you will ever get it working. Either you can try to check solvers working on old versions (shipFoam etc.) or you can try to modify waveDyMFoam to create your own solver.

Please let me know of your progress

Good luck

Kilroy

goodster July 12, 2013 22:30

Thanks for the advice kilroy. I wish i could stop wasting my time, but i think i may be too stubborn.

anyway, do you, or anyone else for that matter, have any idea why the simulation actually works with waveDyMFoam when using only blockmesh (i.e., using cellset and subset mesh to define the body) and then fails when using snappyHexMesh?
Maybe having to do with cell orthogonality?? THat's the only difference i can think of...

mahalo,
chris

kilroy July 15, 2013 10:16

Chris,

I think it is definitely because of the mesh quality. Mesh created with "snappyHexMesh" is not good enough for moving mesh. And I don't think it will be working just with "blockMesh" etiher. If yours worked with just "blockMesh", I think that may just be luck. If you try to change the size of your object, I am sure your simulation will crash immediately.

If you have a chance can you increase the size of your floating object (double the dimensions) and let me now if it works or not?

Thanks

Kilroy

mary mor November 17, 2013 14:45

Hi Kilroy and Chris,
I'm trying to simulate almost the same problem, a floating object across waves. As I've seen in several posts that people mention the bugs and crashing withing the floating object tutorial I just wonder if you have solved the problem or not.

The shipfoam solver that Kilroy mentioned is another choice but I didn't know how to find the latest version of it.Also can it be compatible with wave2Foam or not?

If you can share anything please share it with me. I'm in desprate need in doing this problem:(
Best regards
Maryam


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