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/)
-   -   waves2foam 2d deepwater case boundary reflections (https://www.cfd-online.com/Forums/openfoam-solving/106371-waves2foam-2d-deepwater-case-boundary-reflections.html)

kev4573 August 27, 2012 09:26

waves2foam 2d deepwater case boundary reflections
 
Hi I am having some difficulties using the waves2foam toolbox for a simple 2D deepwater case. It appears that the waves are breaking at the beginning of the wave outlet relaxation zone and causing reflections. I've tried a number of things to fix this, but I've been unsuccessful so far in getting rid of reflections.

Here's my openfoam case, setup for 2.1.x
https://www.dropbox.com/s/qht3ajefrr....025_mesh1.tgz

Thanks,
Kevin

ngj August 27, 2012 09:57

Hi Kevin

With the setup you have posted, the wave will never reach the outlet relaxation zone, simply because the domain is 7 m long, whereas the outlet relaxation zone starts at x = 15.

Kind regards,

Niels

kev4573 August 27, 2012 10:11

The waveProperties file uses an include statement to merge in the inputs for this case, so if you run expandDictionary on the the file, the output dictionary section looks like this -

Code:

outletCoeffs
{
    waveType        potentialCurrent;
    U              ( 0 0 0 );
    Tsoft          2;
    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape Rectangular;
        beachType      Empty;
        relaxType      OUTLET;
        startX          ( 6 0 0 );
        endX            ( 7 0 0.05 );
        orientation    ( 1 0 0 );
    }
}


ngj August 27, 2012 10:31

Hi Kevin

I see, then please disregard my answer, but I would recommend that you make your test cases more eligible in the future, as confusion will definitely occur otherwise.

Looking at the right values, your setup seems sane, so I will not be able to offer you any suggestions beside whether you have tried using a cell aspect ratio of 1 around the free surface. In paraview it looks more like 1:1.5. I have found tremendous improvements in the results using 1:1 around the free surface.

/ Niels

kev4573 August 27, 2012 11:41

Niels,

Thanks for taking a look at my case. Setting the cell AR~1 does improve the results, although the wave is still abruptly stopped near the beginning of the outlet relaxation zone, causing it to break and ultimately reflect waves back into the domain.

As is, this case uses relaxation zone lengths (input and output) twice the input wave length (lambda=0.5m). I have seen improvement by doubling the zone size. Maybe I need to extend the outlet zone further, and possibly use a cell AR~1.

Best regards,
Kevin

ngj August 27, 2012 12:02

Hi Kevin

To me it sounds like your time steps are really, really small due to some large velocities. This will mean that relaxation is applied many times in the very first cell of the relaxation zone, e.g. building a shock in alpha. This, obviously, cannot be sustained and it looks like wave breaking.

I would like you to try the Courant-dependent relaxation flag. Its implementation in waves2Foam is to my knowledge still untested, but it might be exactly what you are looking for. Merely add the following line to your relaxationZone definition:
Code:

courantCorrection on;

/ Niels

kev4573 August 27, 2012 12:40

2 Attachment(s)
Niels,

I have tried this option and it did improve the results - see attached. These are plots of surface elevation vs time in the middle of the domain. The runs were done with a cells ~0.75 (same as previously uploaded), though I've run the same case with the courant correction on a mesh with cell AR~1 and I get the same result.

When the courantCorrection is on, it looks like a different frequency wave is reflected. The reflected harmonics are not apparent in the surface elevation time history until a later time.

Kevin

ngj August 27, 2012 12:52

Hi Kevin

Interesting. If the problem is indeed too large velocities in the air, then could you try scaling your problem to say 10 s wave, very large depths and 0.5 m wave height. This will hopefully make the wave kinematics more dominant relative to the air velocities.

/ Niels

kev4573 August 28, 2012 14:00

1 Attachment(s)
Niels,

Thanks for the suggestion, I may try that out.

After post-processing the velocity field, it looks like there are some non-physical ripples being generated in the relaxation zone, which seems to be where the high frequency content originates. I cranked up some of the solver settings, which did give better results. There is still some reflection, but not as bad as before. I may also try using an upwind interface compression to see if that helps.

By default I think the below settings use 1 outer corrector and 1 nalphacorr.
Code:

PIMPLE {    nOuterCorrectors 2;    nCorrectors      2;    nNonOrthogonalCorrectors 0;      momentumPredictor no;    cAlpha 1;    nAlphaCorr 2;    nAlphaSubCycles 4; }


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