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

Bigger wave height leads to crash (interFoam)

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2011, 12:35
Default Bigger wave height leads to crash (interFoam)
  #1
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
David* is on a distinguished road
Hey Foamers,

currently I am using groovyBC to simulate Airy waves in a channel with interFoam. For a small wave height (H=0.1m, T=2s --> L=4,74m) everything works fine. But when I try to change to bigger waves (H=0.22m, T=3s --> L=7,68m) my case crashes after 3.48 s.

The stunning part is, that the residuals look quite good until this point and it crashes all out of a sudden.

I guess that my schemes and solution settings are responsible for this behavior, and ask you kindly, to provide me with some tips for improving those settings.

The residual plots are:




And the settings are:
controldict
Code:
adjustTimeStep  yes;

maxCo           0.6;
maxAlphaCo    0.6;

maxDeltaT       0.01;
fvSchemes
Code:
ddtSchemes
{
    default         Euler;
}

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


//V=Vectorfield
divSchemes
{
    div(rho*phi,U)  Gauss limitedLinearV 1.0;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div(phi,k)      Gauss linear;
    div(phi,omega)  Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}
/* corrected: unbounded, 2. order, conservative
   uncorrected: bounded, 1. order, non-conservative
   limited 0.5: blend corrected, uncorrected
*/

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

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
    pcorr;
    alpha1;
}
fvSolution
Code:
solvers
{
    pcorr
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nBottomSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 20;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-06;
        relTol          0;
        maxIter         100;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nBottomSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 20;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-06;
        relTol          0;
        maxIter         100;
    }

    p_rghFinal
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-06;
            relTol          0;
            nVcycles        2;
            smoother        DICGaussSeidel;
            nPreSweeps      2;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 20;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }

        tolerance       1e-06;
        relTol          0;
        maxIter         100;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-06;
        relTol          0;
        nSweeps         1;
    }

    k
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
    }

    omega
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
    }
}

PISO
{
    momentumPredictor no;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;        // non-orthogonality Max < 70: 0, otherwise 1-2, max. 3
    nAlphaCorr      1;
    nAlphaSubCycles 3;                // # sub-cycles, 2: 2x half lengh time step within each actual time step
    cAlpha          1.0;            // 0: no compression, 1: conservative compression, >1: enhanced compression
}
Thank you very much!

David
David* is offline   Reply With Quote

Old   May 19, 2011, 11:33
Default
  #2
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
David* is on a distinguished road
For the record: The crash was due to a poorly set inlet boundary condition.

But nevertheless, it would be interesting to know what's the difference between pcorr, p_rgh and p_rghFinal. Does somebody know that?

Thanks in advance,
David
David* is offline   Reply With Quote

Old   November 7, 2011, 03:29
Default
  #3
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 15
tfuwa is on a distinguished road
Hi David,

I am also using groovyBC to generate waves. The simulation crashed at a certain point when high wave height or 3D wave tank were tried. The simulation for low wave height and 2D can run smoothly. I suspect I am facing the same problem as you did. Can you please post here the solution to your problem? Many thanks.

Kind regards,
Albert
tfuwa is offline   Reply With Quote

Old   November 7, 2011, 04:00
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by David* View Post
But nevertheless, it would be interesting to know what's the difference between pcorr, p_rgh and p_rghFinal. Does somebody know that?
pCorr is a single correction done before the start of the time loop to improve the initial value of the pressure field. p_rgh refers to the pressure solution excluding the final correction, and p_rghFinal to the previously excluded final correction. It is beneficial for computational performance to solve p_rgh with a lower tolerance than p_rghFinal.
akidess is offline   Reply With Quote

Old   November 7, 2011, 06:12
Default
  #5
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
David* is on a distinguished road
Quote:
Originally Posted by tfuwa View Post
Hi David,

I am also using groovyBC to generate waves. The simulation crashed at a certain point when high wave height or 3D wave tank were tried. The simulation for low wave height and 2D can run smoothly. I suspect I am facing the same problem as you did. Can you please post here the solution to your problem? Many thanks.

Kind regards,
Albert
Hi Albert,
as far as I remember, it was a typo in the inlet BC. Re-check it with the sources, e.g. USACE CEM. Another tip is to translate the function by pi/2. By doing this, you start with a neutral water level and not with a crest or through at the inlet.
Regards,
David

edit: thanks @ anton
David* is offline   Reply With Quote

Old   November 8, 2011, 06:10
Default
  #6
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
It doesn't look like it was the problem in this case, but in general a lot of the crashes in interFoam are caused by collapsing air pockets which, due to the large density differences, can drive the velocity to increase very rapidly. To address this you can instead use the "compressible" interFoam solver or put an explicit limiter on the air side velocity magnitude.
eugene is offline   Reply With Quote

Old   November 14, 2011, 03:53
Default
  #7
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 15
tfuwa is on a distinguished road
Hi Eugene,

I saw a treatment suggested by Eric Paterson to ignore the convective term on air-side by changing Ueqn to

Code:
fvVectorMatrix UEqn
 (
 fvm::ddt(rho, U)
 + gamma*fvm::div(rhoPhi, U)  // change occurs here 
 - fvm::laplacian(muf, U, "laplacian(mut,U)")
 - (fvc::grad(U) & fvc::grad(muf))
 );
But, I failed to get any improvements. The velocity of air at free-surface is still very large pushing the time step to be small and always causing crashes.

Can you please explain how to "use the compressible interFoam" and especially how to "put an explicit limiter on the air side" to address this problem? Or please give some references.

Kind regards,
Albert

Edit: Thanks, David.
Attached Images
File Type: jpg EricPatersonMultiphaseAndFree-SurfaceFlowSimulations.jpg (58.0 KB, 84 views)
tfuwa is offline   Reply With Quote

Reply

Tags
fvschemes, fvsolution, interfoam, waves

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
alpha becomes bigger than 1 in interFoam ata OpenFOAM 1 March 21, 2020 15:49
How to generate waves of particular wave height...please help nims FLUENT 0 September 21, 2010 03:48
Latest git 1.6.x: Crash when using inletOutlet for variable alpha1 in interFoam carsten OpenFOAM Bugs 6 September 23, 2009 10:46
How to know the wave height at one point Nicolas FLOW-3D 2 March 31, 2009 21:08
WAVE HEIGHT AND FORCE WARITH Siemens 1 March 21, 2004 13:43


All times are GMT -4. The time now is 03:47.