$FOAM_TUTORIALS/multiphase/potentialFreeSurfaceFoam/oscillatingBox
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.
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.
floatingObject { type fixedNormalInletOutletVelocity; fixTangentialInflow false; normalVelocity { type uniformFixedValue; uniformValue sine; uniformValueCoeffs { 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".
functions { forces { type forces; libs ("libforces.so"); writeControl writeTime; patches (floatingObject); rho rhoInf; log yes; rhoInf 1000; CofR (0 0 0); } poolHeight { type surfaceRegion; libs ("libfieldFunctionObjects.so"); writeControl timeStep; writeInterval 1; log yes; writeTotalArea no; writeFields no; regionType faceZone; name f0; operation areaAverage; fields ( zeta ); } };
The meshes are as follows, and the number of mesh is 3829.
The calculation result is as follows.
1分17.94 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz