CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interDymFOAM with dynamicRefineFvMesh for DTMB5415 ship (https://www.cfd-online.com/Forums/openfoam-solving/199797-interdymfoam-dynamicrefinefvmesh-dtmb5415-ship.html)

lbordier March 15, 2018 10:27

interDymFOAM with dynamicRefineFvMesh for DTMB5415 ship
 
Hi,

I am trying to use dynamicRefineFvMesh within a interDyMFoam computation to refine based on free surface (alpha.water field).

When my computation is in PISO mode, the refinement is done but then, pressure number of iteration increase and forces on body become instable such that finally computation crashes.

When my computation runs in PIMPLE mode, solver crashes just after the first solve of p_rgh :

Code:

PIMPLE: iteration 1
Selected 377308 cells for refinement out of 11056721.
Refined from 11056721 to 13697877 cells.
Selected 0 split points out of a possible 377308.
Execution time for mesh.update() = 18.03 s
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 9.78769e-05, No Iterations 74
time step continuity errors : sum local = 5.99048e-12, global = -1.6006e-14, cumulative = 3.108e-10
smoothSolver:  Solving for alpha.water, Initial residual = 1.8908e-08, Final residual = 8.08454e-11, No Iterations 1
Phase-1 volume fraction = 0.75008  Min(alpha.water) = -1.56267e-05  Max(alpha.water) = 1.16759
Applying the previous iteration compression flux
MULES: Correcting alpha.water
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.75008  Min(alpha.water) = -0.00340939  Max(alpha.water) = 1.16624
GAMG:  Solving for p_rgh, Initial residual = 0.0813079, Final residual = 0.000809642, No Iterations 7
[13] #0  Foam::error::printStack(Foam::Ostream&)[7] #0  Foam::error::printStack(Foam::Ostream&) addr2line failed
[13] #1  Foam::sigFpe::sigHandler(int) addr2line failed
[13] #2  ? in "/home/applis/OpenFOAM/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
[7] #1  Foam::sigFpe::sigHandler(int) addr2line failed
[13] #3  in "/home/applis/OpenFOAM/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
[7] #2  ??
[13] #4  in "/lib64/libc.so.6"
[7] #3  ?
[13] #5  ?
[13] #6  __libc_start_main? addr2line failed
[13] #7  Foam::UOPstream::write(float)

My fvSolution is as following :
Code:

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

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      2;
        nAlphaSubCycles 1;
        cAlpha          1;
        icAlpha        0;

        MULESCorr      yes;
        nLimiterIter    10;
        alphaApplyPrevCorr  yes;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-8;
        relTol          0;
        minIter        1;
    }

  /*  p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-7;
        relTol          0.01;
    };*/

  p_rgh
    {
        solver          GAMG;

        smoother        DIC;

        tolerance      1e-7;
        relTol          0.01;
        cacheAgglomeration false;
    };

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "pcorr.*"
    {
        $p_rghFinal;
        relTol          0.0001;
    }


    "(U|k|omega).*"
    {
        solver          smoothSolver;

        smoother        symGaussSeidel;
        nSweeps        1;

        tolerance      1e-7;
        relTol          0.1;
        minIter        1;
    };
}

PIMPLE
{
    momentumPredictor  no;

    nOuterCorrectors    25;
    nCorrectors        2; //2
    nNonOrthogonalCorrectors 0;

    maxCo              15;
    maxAlphaCo          5;

    rDeltaTSmoothingCoeff 0.05;
    rDeltaTDampingCoeff 0.5;
    nAlphaSpreadIter    0;
    nAlphaSweepIter    0;
    maxDeltaT          0.005;

    residualControl
    {
        p_rgh
        {
                relTol 0;
                tolerance 5e-5;
        }

        U
        {
                relTol 0;
                tolerance 1e-4;
        }
    }
}

relaxationFactors
{
    fields
    {
        p_rgh 0.4;
        p_rghFinal 0.4;
    }
    equations
    {
        U 0.6;
        UFinal 0.6;
    }
}

cache
{
    grad(U);
}


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

My dynamicMeshDict is :

Code:

dynamicRefineFvMeshCoeffs
{
    // How often to refine
    refineInterval  5;

    // Field to be refinement on
    field          alpha.water;

    // Refine field inbetween lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;

    // If value < unrefineLevel unrefine
    unrefineLevel  10;

    // Have slower than 2:1 refinement
    nBufferLayers  2;

    // Refine cells only up to maxRefinement levels
    maxRefinement  1;

    // Stop refinement if maxCells reached
    maxCells        30000000;

    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi none)
        (nHatf none)
        (rhoPhi none)
        (alphaPhi none)
        (ghf none)
        ("(alphaPhi-flux(alpha.water))" none)
    );

    // Write the refinement level as a volScalarField
    dumpLevel      true;
}

Does anybody have an idea how to solve this issue ?
Any help is appreciated.


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