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

interFoam Surface Instability

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By aow
  • 1 Post By WaterHammer1985

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2019, 16:15
Question interFoam Surface Instability
  #1
Member
 
Join Date: Nov 2015
Posts: 38
Rep Power: 10
WaterHammer1985 is on a distinguished road
I'm modeling water flow through a small opening (see attached image). Using snappyHexMesh, I've created refinement regions to transition the cell size around the opening. As flow approaches the opening, large waves form on the surface that aren't realistic. I'm unsure if I need to do something different with the mesh, or if I need to make changes to the fvScheme/fvSolution settings? Any insight is greatly appreciated.

fvScheme
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
  default cellMDLimited Gauss linear 1;
  grad(k) faceLimited leastSquares 1;
  grad(omega) faceLimited leastSquares 1;
}

divSchemes
{
    div(rhoPhi,U)  Gauss limitedLinearV 1; //Gauss upwind;
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression 1;
    div(phi,p_rgh)  Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,omega) Gauss upwind;
}

laplacianSchemes
{
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

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

wallDist
{
    method meshWave;
}
fvSolution
Code:
solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        alphaOuterCorrectors yes;
        cAlpha          1;

        MULESCorr       yes;
        nLimiterIter    3;

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

   "pcorr.*" GAMG
    {
        tolerance        1e-7;
        relTol           0.0;

        smoother         DIC;//GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        nFinestSweeps    2;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
        maxIter 10;
    };

    p_rgh GAMG
    {
        tolerance        1e-7;
        relTol           0.0;

        smoother         DIC;//GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        nFinestSweeps    2;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    };

    p_rghFinal GAMG
    {
        tolerance        1e-8;
        relTol           0.0;

        smoother         DIC;//GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        nFinestSweeps    2;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    };



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

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


}


PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 2;
    nCorrectors     3;
    nNonOrthogonalCorrectors 3;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        ".*" 0.1;
    }
}
Attached Images
File Type: jpg surface_instability.jpg (48.4 KB, 155 views)
WaterHammer1985 is offline   Reply With Quote

Old   January 25, 2019, 11:58
Default Update
  #2
Member
 
Join Date: Nov 2015
Posts: 38
Rep Power: 10
WaterHammer1985 is on a distinguished road
I restarted the simulation using interIsoFoam and the free surface looks much more stable (see attached image) but there are still some velocity discontinuities at the areas of mesh transition.
Attached Images
File Type: jpg interIsoFoam.jpg (94.9 KB, 143 views)
WaterHammer1985 is offline   Reply With Quote

Old   January 28, 2019, 02:33
Default
  #3
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
My experience is that interfoam is very sensitive to the mesh. Sudden changes in size are not good. Can you make a mesh with a smooth transition?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   January 28, 2019, 11:19
Default .
  #4
Member
 
Join Date: Nov 2015
Posts: 38
Rep Power: 10
WaterHammer1985 is on a distinguished road
Thanks for the suggestion. The mesh transitions are as slow/smooth as I know how to make in snappyHexMesh by slowly tapering refinement levels. I decreased the MaxCo to 0.2 (was at 1) and the velocity discontinuities washed out.
WaterHammer1985 is offline   Reply With Quote

Old   January 28, 2019, 20:07
Default
  #5
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
Correct me if I'm wrong, but I think Akidess meant to intially setup your mesh better using blockMesh so that you have uniform grading instead of the sort of sudden jumps that are created using snappyHexMesh. Also, since you have only rectangular shapes in your problem as far as I can tell from your images, it would probably be best to just use blockMesh with a bunch of hexes instead of making a single one and then using snappyHexMesh. This will give you much better control over the quality of the mesh.
aow is offline   Reply With Quote

Old   February 12, 2019, 17:32
Default .
  #6
Member
 
Join Date: Nov 2015
Posts: 38
Rep Power: 10
WaterHammer1985 is on a distinguished road
Quote:
Originally Posted by aow View Post
Correct me if I'm wrong, but I think Akidess meant to intially setup your mesh better using blockMesh so that you have uniform grading instead of the sort of sudden jumps that are created using snappyHexMesh. Also, since you have only rectangular shapes in your problem as far as I can tell from your images, it would probably be best to just use blockMesh with a bunch of hexes instead of making a single one and then using snappyHexMesh. This will give you much better control over the quality of the mesh.
Using uniform grading near the free surface did the trick. Thanks for the info!
Attached Images
File Type: png Silky_Smooth_Transition.PNG (108.5 KB, 125 views)
aow likes this.
WaterHammer1985 is offline   Reply With Quote

Old   February 12, 2019, 17:37
Default
  #7
aow
Member
 
Andrew O. Winter
Join Date: Aug 2015
Location: Seattle, WA, USA
Posts: 78
Rep Power: 10
aow is on a distinguished road
Awesome! Glad to hear it worked out. Doing the messier blockMeshDict with multiple hexes and grading is a pain, but usually sorts out issues like this. Out of curiosity, what is the goal of your modeling?
aow is offline   Reply With Quote

Old   February 12, 2019, 18:38
Default .
  #8
Member
 
Join Date: Nov 2015
Posts: 38
Rep Power: 10
WaterHammer1985 is on a distinguished road
Agreed, more work upfront but better results in the end! Modeling is to look at flow conditions and hydrodynamic forces on a lock chamber closure section. The pressures seemed reasonable even with the velocity discontinuities but this condition was essentially hydrostatic so I'm not sure how it would have done with more velocity head.
WaterHammer1985 is offline   Reply With Quote

Reply

Tags
instability, interfoam, mesh, vof


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
Help!! customize surface tension term in interFoam w051cxw OpenFOAM Running, Solving & CFD 0 February 12, 2016 01:15
InterFoam - Gradient of Surface Field Twist OpenFOAM Running, Solving & CFD 0 June 24, 2013 10:28
2 phase flow, free surface instability issues Doginal CFX 29 September 19, 2012 18:37
Free surface - interFoam Pallav OpenFOAM Post-Processing 7 June 14, 2011 15:17
[ICEM] Automatic mesh generation script surface intersection problem stuart23 ANSYS Meshing & Geometry 0 May 13, 2011 01:10


All times are GMT -4. The time now is 22:13.