Waves generated by the oscillation of an object floating on the liquid surface

Update: July 10, 2017
OpenFOAM 4.x

Case directory



We calculate hydrostatic pressure to analyze the waves generated by object floating on the liquid surface. The region "floatingObject" is the oscillating object, the region "freeSurface" is the liquid surface, and the regions "walls" is the no-slip wall. The calculation is performed as 2-dimensional problem with single mesh in Z-direction.

Model geometry Model geometry

The oscillation of the object is simulated by time-dependent changing of the flow velocity. The settings are specified in the file "0.orig/U" by defining the boundary condition of flow velocity as follows.

    type            fixedNormalInletOutletVelocity;

    fixTangentialInflow false;

        type            uniformFixedValue;
        uniformValue    sine;
            frequency 1;
            amplitude table
                (   0     0)
                (  10 0.025)
                (1000 0.025)
            scale     (0 1 0);
            level     (0 0 0);
    value           uniform (0 0 0);

By setting the following in the file "system/controlDict", the force that applied to the region "floatingObject" and the average water level of the liquid surface in the region "f0" will be output to the files during the calculation. The calculation results will be saved in the folder "postProcessing".

Region f0 (red part) Region f0 (red part)
        type            forces;
        libs            ("libforces.so");
        writeControl    writeTime;
        patches         (floatingObject);
        rho             rhoInf;
        log             yes;
        rhoInf          1000;
        CofR            (0 0 0);

        type            surfaceRegion;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             yes;
        writeTotalArea  no;
        writeFields     no;
        regionType      faceZone;
        name            f0;
        operation       areaAverage;

The meshes are as follows, and the number of mesh is 3829.

Mesh Meshes
Meshes (zoomed) Meshes (zoomed)

The calculation result is as follows.

Pressure at final time (p_gh) Pressure at final time (p_gh)
Time variation of average water level in region f0 (horizontal axis: time, vertical axis: average water level) Time variation of average water level in region f0 (horizontal axis: time, vertical axis: average water level)


cp -r $FOAM_TUTORIALS/multiphase/potentialFreeSurfaceFoam/oscillatingBox oscillatingBox
cd oscillatingBox

subsetMesh -overwrite c0 -patch floatingObject

cp -r 0.orig 0

# Draw 3D

# Draw graph of average water level in region f0
awk '{print $1 " " $3}' postProcessing/poolHeight/0/surfaceRegion.dat > poolHeight_vs_time
gnuplot>plot "poolHeight_vs_time" using 1:2 title 'poolHeight vs time' with lines lc rgb "black"

Calculation time

1分17.94 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz