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

[waves2Foam] regular wave generation attenuation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2017, 11:46
Default regular wave generation attenuation
  #1
New Member
 
Yang Zhou
Join Date: Jun 2017
Location: Glasgow
Posts: 4
Rep Power: 9
yangzhou is on a distinguished road
Hi Foamers,

I am a newcomer of waves2Foam. I have confronted some problems in generating waves(OpenFoam 4.0, Ubuntu 17.04). I am getting approximately 5%-6% reduction on the peak and valley of the wave, the error is little bit more than I expected.
1.JPG
2.JPG
Wave properties input
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5                                   |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      environmentalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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    stokesFirst;  
    
    // Ramp time of 2 s
    Tsoft       2;

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

    // Wave period
    period      2.0;

    // Phase shift in the wave
    phi         0.000000;

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

    // Wave height
    height      0.04;
    
    // Specifications on the relaxation zone shape and relaxation scheme
    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;
    
        relaxType   INLET;
        startX      (0 0.0 -1);
        endX        (5 0.0  1);
        orientation      (1.0 0.0 0.0);
    }
};

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

    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;    

        relaxType   OUTLET;
        startX      (13 0.0 -1);
        endX        (18 0.0  1);
        orientation      (1.0 0.0 0.0);
    }
};



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


Blockmesh Dictionary
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5                                   |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
The blockmesh dic
Code:
convertToMeters 1;

vertices        
(
    (  0 -2 0 )
    ( 18 -2 0 )
    (  0  1 0 )
    ( 18  1 0 )
                 
    (  0 -2 0.1 )
    ( 18 -2 0.1 )
    (  0  1 0.1 )
    ( 18  1 0.1 )                    
);

blocks          
(
    hex (0 1 3 2 4 5 7 6) ( 150 450 1 ) simpleGrading (1 1 1)
);

edges           
(
);

patches         
(
    patch inlet
    (
        (0 4 6 2)
    )
    wall bottom 
    (
        (0 1 5 4)
    )
    patch outlet
    (
        (1 5 7 3)
    )

    patch atmosphere 
    (
        (2 3 7 6)
    )
    
    empty frontBack
    (
        (0 1 3 2)
        (4 5 7 6)
    )
);

mergePatchPairs
(
);

// ************************************************************************* //
Can anybody guide me how to narrow the gap? Many thanks

Last edited by wyldckat; August 23, 2018 at 15:50. Reason: PHP->CODE
yangzhou is offline   Reply With Quote

Old   June 23, 2017, 06:18
Thumbs up
  #2
New Member
 
Mehdi
Join Date: Apr 2016
Posts: 11
Rep Power: 10
MehdiCFD is on a distinguished road
me too i obtained the same range of error with Airy (stokesFirst) about 6%, but you have to refine your mesh bellow sea surface and verify tha you don't make a brutal grading and let a large distance between the end of the refined mesh and the max amplitude size.
me i'm using AR=9 delta z=0.0033m delta x,y=0.03m near the surface (H=0.1 m i use 0.35 m refined mesh bellow surface).

i hope that will be usefull for you and good luck.
Best regards,
Mehdi

Last edited by wyldckat; August 23, 2018 at 15:51. Reason: removed long quote, after moving to independent thread
MehdiCFD is offline   Reply With Quote

Old   June 28, 2017, 11:58
Default
  #3
New Member
 
Yang Zhou
Join Date: Jun 2017
Location: Glasgow
Posts: 4
Rep Power: 9
yangzhou is on a distinguished road
Dear Mehdi,
I have tried different mesh method by divide the wavelength(λ/20 for example)and the amplitude of the wave (H/6). By the results is not satisfying. It seems different mesh method do not affect the results of wave generation.
Capture.JPG
Any tips would be helpful to me.
Best regards,
Yang
Quote:
Originally Posted by MehdiCFD View Post
me too i obtained the same range of error with Airy (stokesFirst) about 6%, but you have to refine your mesh bellow sea surface and verify tha you don't make a brutal grading and let a large distance between the end of the refined mesh and the max amplitude size.
me i'm using AR=9 delta z=0.0033m delta x,y=0.03m near the surface (H=0.1 m i use 0.35 m refined mesh bellow surface).

i hope that will be usefull for you and good luck.
Best regards,
Mehdi
yangzhou is offline   Reply With Quote

Old   June 29, 2017, 05:34
Default
  #4
New Member
 
Mehdi
Join Date: Apr 2016
Posts: 11
Rep Power: 10
MehdiCFD is on a distinguished road
Dear Yangzhou,

so it's not a mesh problem, may be you have to use turbulence modelling if your Reynolds number is high then 10^5 then you should use it to modelise the production of turbulent energy may be it will be decreasing your relative error, i suggeste you to use K-w SST turbulence model
if it that doen't resolve your problem you have to look into your fvSchemes div Schemes, the Gauss linearUpwind Schemes of div(phi.U) is more efficient and less dessipative then limitedLinear schemes, you have to read different paper that use waves2Foam solver.

Best regards,
Mehdi
MehdiCFD 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
IHFOAM - Wave generation with moving boundaries Phicau OpenFOAM Verification & Validation 0 May 18, 2015 05:53
Wave generation, wave height reduces as it progresses haku88 STAR-CCM+ 1 August 6, 2013 20:32
Deep Water Wave Generation Problems zx9cp CFX 4 June 16, 2013 07:23
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
Help regarding regular wave generation !!!!! Jenifer FLUENT 0 September 27, 2006 07:57


All times are GMT -4. The time now is 12:14.