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

OpenFOAM 4.x

Case directory



We calculate hydrostatic pressure to analyze the waves generated by object floating on the liquid surface. The region "floatingObject" and "floatingObjectBottom" are the oscillating objects, the region "freeSurface" is the liquid surface, and the regions "leftWall", "bottomWall", and "rightWall" are the no-slip walls. 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 mesh geometry. The settings are specified in the file "0.orig/pointDisplacement" by defining the boundary condition of the region "floatingObjectBottom" as follows. To make the nodes on the "leftWall" and "floatingObject" follow the oscillation, we specify "fixedNormalSlip" for both regions in the same file.

    type            oscillatingDisplacement;
    amplitude       (0 -0.05 0);
    omega           6.2831853;
    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 (p_gh)
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/potentialFreeSurfaceDymFoam/oscillatingBox oscillatingBox
cd oscillatingBox

subsetMesh -overwrite c0 -patch floatingObject
topoSet -dict system/topoSetDict-selectBottom
createPatch -overwrite

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

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