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/)
-   -   2D Waveflume:Bad waves due to symmetryPlane + k-epsilon? (https://www.cfd-online.com/Forums/openfoam-solving/172500-2d-waveflume-bad-waves-due-symmetryplane-k-epsilon.html)

mo_na June 1, 2016 09:08

Turbulence settings in 2D Waveflume
 
1 Attachment(s)
Hey guys,

I am trying to simulate a pitching floater in a 2D waveflume with ihDyMFoam.
For now I am simulating the flume without the floater and with ihFoam because I had problems with the waves just disappearing on the way.
The wave has the following properties:

Code:

IH Wave Generation BC
Wave theory: StokesII
H: 0.06
T: 1
h: 0.775
L: 1.55536
Direction: 0º
Generation in: Intermediate waters.
Relative depth (kh): 3.13076

I simulated 3 different cases:
*1* laminar case with front and backside empty
*2* turbulent case with front and backside empty
*3* turbulent case with front and backside symmetryPlane


I attached a plot of the amplitude over space for all three cases after 20s. Actually I realized that even the laminar case doesn't look that good, so probably I have some mistake in my fvSchemes, fvSolution or IHWavesDict.
But anyway the results are getting much worse when I add turbulence, especially for case *3*.


On the waves2foam thread Niels wrote:
" Well the short answer is yes that turbulence models have been coupled with waveFoam, however, if you strictly stick to the turbulence formulations in OpenFoam, you will get poor results, as the turbulence formulation in OF does not consider the density in the equations, hence excessive diffusion of turbulence takes place over the interface, which results in rapid decay in the wave height.

Therefore, you need to formulate the turbulence equations correctly, namely including density in the turbulence equations. "

Could this be the reason? Will I face the same problems when using ihFoam?

I'll be grateful for any suggestions! :)
Cheers,
Mona


IHWavesDict:

Code:

waveType        regular;

waveTheory      StokesII;

genAbs          1;

absDir          0.0;

nPaddles        1;

wavePeriod      1.0;

waveHeight      0.06;

waveDir        0.0;

wavePhase      0.0;

tSmooth        0.0;

fvSchemes:
Code:

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    div(rhoPhi,U)  Gauss limitedLinearV 1;
    div(U)  Gauss linear;
    div((rhoPhi|interpolate(porosity)),U)  Gauss limitedLinearV 1;
    div(rhoPhiPor,UPor)  Gauss limitedLinearV 1;
    div(rhoPhi,UPor)  Gauss limitedLinearV 1;
    div(rhoPhiPor,U)  Gauss limitedLinearV 1;
    div(phi,alpha)  Gauss vanLeer01;
    div(phirb,alpha) Gauss interfaceCompression;
    div((muEff*dev(T(grad(U))))) Gauss linear;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div((phi|interpolate(porosity)),k)      Gauss upwind;
    div((phi|interpolate(porosity)),epsilon) Gauss upwind;
    div(phi,omega) Gauss upwind;
    div((phi|interpolate(porosity)),omega) Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

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

fvSolution:

Code:

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;
        alphaOuterCorrectors yes;
        cAlpha          1;

        MULESCorr      no;
        nLimiterIter    3;

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

    pcorr
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-5;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

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

    "(U|k|epsilon)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-06;
        relTol          0;
    }

    "(U|k|epsilon)Final"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-08;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor  no;
    nOuterCorrectors    1;
    nCorrectors        3;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        ".*" 1;
    }
}


mo_na June 8, 2016 08:14

Reflection issue?
 
5 Attachment(s)
Hey guys,

I added a new case *4* that is exactly the same as case *3* but I adjusted maxCo and maxAlphaCo both to 0.2 in the controlDict. This shows some improvements to case *3*.

I also plotted the first 10 seconds (see attachments) which makes me think that I did something wrong with the outlet boundary. It seems like the waves are reflected there.

This are my outlet BC in the 3D case:

U:
Code:

    outlet
    {
        type            IH_3D_3DAbsorption_InletVelocity;
        nPaddles        1;
        nEdgeMin        0;
        nEdgeMax        0;
        value          uniform (0 0 0);
    }

alpha.water, k and epsilon:
Code:

    outlet
    {
        type            zeroGradient;
    }

nut:
Code:

    outlet
    {
        type            calculated;
        value          uniform 0;
    }

p_rgh:
Code:

    outlet
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }


mo_na June 8, 2016 08:15

Reflection issue?
 
5 Attachment(s)
heres the plots for second 6-10


All times are GMT -4. The time now is 23:37.