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

[waves2Foam] Problem of deep water simulation(wavelength become larger as propagation)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jessica_ict

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2019, 02:23
Default Problem of deep water simulation(wavelength become larger as propagation)
  #1
New Member
 
i-chen,tsai
Join Date: Mar 2018
Posts: 4
Rep Power: 8
jessica_ict is on a distinguished road
Dear all,
I have a problem with deep water simulation.
Wavelength would become larger as wave propagation.
Could someone tell me how to solve the problem?

The following are my file:

waveProperties:
Code:
seaLevel	0.00;

// A list of the relaxation zones in the simulation. The parameters are given
// in <name>Coeffs below.
relaxationNames (inlet outlet);

initializationName outlet;

inletCoeffs
{
    // Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
    waveType    stokesSecond;  
    
    // Ramp time of 2 s
    Tsoft       1.2;

    // Water depth at the boundary and in the relaxation zone
    depth       0.900000;

    // Wave period
    period      1.20;

    // Phase shift in the wave
    phi         0.000000;

    // Wave number vector, k. 
    direction  (1.0 0.0 0.0);

    // Wave height
    height      0.06;
    debug       false;
    
    // Specifications on the relaxation zone shape and relaxation scheme
    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;
    
        relaxType   INLET;
        startX      (0.0  0.0 -0.9);
        endX        (6.0  0.9  0.3);
        orientation      (1.0 0.0 0.0);
    }
};

outletCoeffs
{
    waveType    potentialCurrent;
    U           (0 0 0);
    Tsoft      	1.2;

    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;    

        relaxType   OUTLET;
        startX      (29.0  0.0 -0.9);
        endX        (35.0  0.9  0.3);
        orientation      (1.0 0.0 0.0);
    }
};
controlDict:
Code:
application interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         60;

deltaT          0.001;

writeControl    adjustableRunTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           0.25;

maxAlphaCo      0.25;

maxDeltaT       0.001;
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;
    };

    pcorrFinal 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_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 PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-09;
        relTol           0;
    };

    UFinal PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-09;
        relTol           0;
    };

    gamma PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-07;
        relTol           0;
    };
}


PIMPLE 
{ 
    momentumPredictor yes;
    nOuterCorrectors 1; 
    nCorrectors     3;
    nNonOrthogonalCorrectors 1;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        ".*" 1;
    }
}
fvScheme
Code:
ddtSchemes
{
    default Euler;
}

gradSchemes
{
//    default	cellLimited fourth 1;
    default         Gauss linear;
    grad(U)         Gauss linear;
    grad(alpha1)     Gauss linear;
}

divSchemes
{
//    default	    Gauss linear;
    div(rhoPhi,U)  Gauss limitedLinearV 1;
//    div(phi,gamma)  Gauss vanLeer;
//    div(rho*phi,U)  Gauss MUSCL;
//    div((muEff*dev(T(grad(U))))) Gauss linear;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,alpha)  Gauss MUSCL;
    div(phirb,alpha) Gauss interfaceCompression;
//    div(rhoPhi,U)   Gauss limitedLinearV 1;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
    pcorr;
    alpha.water;
}
domain
x:35m z:1.2m
dx:0.005m dz:0.0025

wave condition
period:1.2 sec
wave height:0.06m
water depth:0.9m
This is deep water condition!
There are 24 cells per wave height and about 439 cells per wavelength.

I tried two versions of OpenFOAM (1712plus and extend 4.0), different types of mesh and different timesteps.

The result of different timesteps, version and mesh type shown below:
Attached Images
File Type: jpg dt.jpg (121.9 KB, 71 views)
File Type: jpg version.jpg (118.8 KB, 54 views)
File Type: jpg mesh.jpg (117.5 KB, 54 views)
ms.hashempour likes this.
jessica_ict is offline   Reply With Quote

Old   February 26, 2019, 18:05
Default
  #2
New Member
 
Hillary Kiptoo
Join Date: Jul 2018
Location: Nairobi
Posts: 9
Rep Power: 7
larry k is on a distinguished road
Quick answer: You need to check your numerical schemes for example, from my experience, CrankNicolson works best than euler
larry k is offline   Reply With Quote

Old   February 27, 2019, 13:55
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Also, if you compare the conditions with stream function wave theory, then you will see that stream function wave theory is roughly 1% longer, so after 13 wave lengths it amounts to a noticeable effect.



Kind regards


Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 6, 2019, 02:21
Default
  #4
New Member
 
i-chen,tsai
Join Date: Mar 2018
Posts: 4
Rep Power: 8
jessica_ict is on a distinguished road
@ngj
Dear Niels,
Thanks for your quick reply.
I found that the result is much more approach to Stokes 5th wave, not Stokes 2nd waves.
Would you please tell me why the wave condition is appropriate to choose Stokes 2nd Wave, but the result is more approach to Stokes 5th wave?
Thank you very much!
Attached Images
File Type: jpg result.jpg (95.7 KB, 59 views)
jessica_ict is offline   Reply With Quote

Reply


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
discrete model problem (water droplet evaporation) rabaeto1984 FLUENT 4 October 1, 2018 04:16
Problem after mergeMesh, water flows through the wall, which should not happen Andy_Wang OpenFOAM 13 June 15, 2016 08:11
shallow water VS deep water Paul Main CFD Forum 10 August 30, 2004 11:56
Problem Patching Water Depth (2-D) SEMC FLUENT 3 March 15, 2004 19:58
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 20:06.